From 1c0bebbc9548dfe929f0f9db4473eb93af9339f5 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Mon, 16 Nov 2009 14:55:36 -0800 Subject: [PATCH] fix [2262591] Junk on screen in ERD46 since we're using the GPU for composition, don't use a texture for dimming, instead simply use an alpha-blended quad. also workaround what looks like a GL driver bug by calling glFinish() before glReadPixels(). --- libs/surfaceflinger/Android.mk | 3 --- libs/surfaceflinger/LayerBlur.cpp | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/libs/surfaceflinger/Android.mk b/libs/surfaceflinger/Android.mk index eb51c22bcb202..b3fed58a4f840 100644 --- a/libs/surfaceflinger/Android.mk +++ b/libs/surfaceflinger/Android.mk @@ -22,9 +22,6 @@ LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES ifeq ($(TARGET_BOARD_PLATFORM), msm7k) LOCAL_CFLAGS += -DDIM_WITH_TEXTURE endif -ifeq ($(TARGET_BOARD_PLATFORM), qsd8k) - LOCAL_CFLAGS += -DDIM_WITH_TEXTURE -endif # need "-lrt" on Linux simulator to pick up clock_gettime ifeq ($(TARGET_SIMULATOR),true) diff --git a/libs/surfaceflinger/LayerBlur.cpp b/libs/surfaceflinger/LayerBlur.cpp index 5fd7904be6cf0..5d4a38b8abe97 100644 --- a/libs/surfaceflinger/LayerBlur.cpp +++ b/libs/surfaceflinger/LayerBlur.cpp @@ -169,6 +169,7 @@ void LayerBlur::onDraw(const Region& clip) const // This reads the frame-buffer, so a h/w GL would have to // finish() its rendering first. we don't want to do that // too often. Read data is 4-bytes aligned. + glFinish(); glReadPixels(X, Y, w, h, mReadFormat, mReadType, pixels); // blur that texture.