From 40a787f89a6f4c20f2c7fce29e5bc53954305f34 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Wed, 2 Mar 2011 15:15:42 -0800 Subject: Properly initialize FBO textures for linear filtering. Change-Id: I67fc4fd760483ef85809be8d6e608cf4f469650f --- libs/hwui/LayerRenderer.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libs/hwui') diff --git a/libs/hwui/LayerRenderer.cpp b/libs/hwui/LayerRenderer.cpp index 24f9739..b1eb164 100644 --- a/libs/hwui/LayerRenderer.cpp +++ b/libs/hwui/LayerRenderer.cpp @@ -214,6 +214,11 @@ Layer* LayerRenderer::createLayer(uint32_t width, uint32_t height, bool isOpaque glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, layer->texture, 0); + glDisable(GL_SCISSOR_TEST); + glClearColor(0.0f, 0.0f, 0.0f, 0.0f); + glClear(GL_COLOR_BUFFER_BIT); + glEnable(GL_SCISSOR_TEST); + glBindFramebuffer(GL_FRAMEBUFFER, previousFbo); return layer; -- cgit v1.1