diff options
author | Naomi Luis <nluis@codeaurora.org> | 2011-12-09 13:40:41 -0800 |
---|---|---|
committer | toastcfh <toastcfh@gmail.com> | 2011-12-20 20:31:58 -0500 |
commit | 7c61dd2b47ea725a1526efbfde88599d510566b3 (patch) | |
tree | 2963c4c027c582a84ce02893ee5b43f3b7d5a35e /services | |
parent | 06ea750004e162f30baf805b85de734f7034a791 (diff) | |
download | frameworks_base-7c61dd2b47ea725a1526efbfde88599d510566b3.zip frameworks_base-7c61dd2b47ea725a1526efbfde88599d510566b3.tar.gz frameworks_base-7c61dd2b47ea725a1526efbfde88599d510566b3.tar.bz2 |
Add support for drawing non-GPU supported buffers.
Add support for drawing buffers which are not supported by the GPU.
These buffers are drawn using the overlay or C2D. During rotation,
when the draw operation is performed, the GPU clears the clip region
for this buffer.
Change-Id: I8738dcffbfb31db330872ec2c295181b540e03fb
Diffstat (limited to 'services')
-rw-r--r-- | services/surfaceflinger/Android.mk | 5 | ||||
-rw-r--r-- | services/surfaceflinger/Layer.cpp | 11 |
2 files changed, 15 insertions, 1 deletions
diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk index 0e9c9f0..29e5ea5 100644 --- a/services/surfaceflinger/Android.mk +++ b/services/surfaceflinger/Android.mk @@ -31,7 +31,10 @@ ifeq ($(TARGET_BOARD_PLATFORM), s5pc110) LOCAL_CFLAGS += -DREFRESH_RATE=56 endif ifeq ($(BOARD_USES_QCOM_HARDWARE),true) - LOCAL_CFLAGS += -DQCOM_HARDWARE +LOCAL_SHARED_LIBRARIES := \ + libQcomUI +LOCAL_C_INCLUDES += hardware/qcom/display/libqcomui +LOCAL_CFLAGS += -DQCOM_HARDWARE endif LOCAL_SHARED_LIBRARIES := \ diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 806f6a7..b41a4f3 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -39,6 +39,10 @@ #include "SurfaceFlinger.h" #include "SurfaceTextureLayer.h" +#ifdef QCOM_HARDWARE +#include <qcom_ui.h> +#endif + #define DEBUG_RESIZE 0 @@ -285,6 +289,13 @@ void Layer::onDraw(const Region& clip) const return; } +#ifdef QCOM_HARDWARE + if (!isGPUSupportedFormat(mActiveBuffer->format)) { + clearWithOpenGL(clip, 0, 0, 0, 1); + return; + } +#endif + if (!isProtected()) { glBindTexture(GL_TEXTURE_EXTERNAL_OES, mTextureName); GLenum filter = GL_NEAREST; |