diff options
| author | 2010-10-12 18:44:18 -0700 | |
|---|---|---|
| committer | 2010-10-12 18:44:18 -0700 | |
| commit | 63eadbce7795aad458db0ae8558fa6fe68bf2b5b (patch) | |
| tree | c8382d9c12ce0917f6a92ffec302d9de60c83dd8 | |
| parent | 2fd0c94a118c829a78f47ec26d04ce9d7961ec8b (diff) | |
| parent | eb07af687319a0f52c219c3c0c1b73162fce9d04 (diff) | |
Merge "Optimize layer clears."
| -rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 585fa53039bd..ffd0aed92d3e 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -425,8 +425,6 @@ bool OpenGLRenderer::createLayer(sp<Snapshot> snapshot, float left, float top, snapshot->flags |= Snapshot::kFlagDirtyOrtho; snapshot->orthoMatrix.load(mOrthoMatrix); - setScissorFromClip(); - // Bind texture to FBO glBindFramebuffer(GL_FRAMEBUFFER, layer->fbo); glBindTexture(GL_TEXTURE_2D, layer->texture); @@ -457,10 +455,11 @@ bool OpenGLRenderer::createLayer(sp<Snapshot> snapshot, float left, float top, #endif // Clear the FBO - glDisable(GL_SCISSOR_TEST); + glScissor(0.0f, 0.0f, bounds.getWidth(), bounds.getHeight()); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glClear(GL_COLOR_BUFFER_BIT); - glEnable(GL_SCISSOR_TEST); + + setScissorFromClip(); // Change the ortho projection glViewport(0, 0, bounds.getWidth(), bounds.getHeight()); |