diff options
author | Romain Guy <romainguy@google.com> | 2012-09-27 17:55:46 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2012-09-27 17:57:24 -0700 |
commit | 54c1a64d5441a964890b44280e4457e11f4f924a (patch) | |
tree | 31e8837991a90927dfa925246df31b8e6ee36a18 /libs/hwui/OpenGLRenderer.cpp | |
parent | d9730390c6bbac09107866462b9bf45d0b5706cf (diff) | |
download | frameworks_base-54c1a64d5441a964890b44280e4457e11f4f924a.zip frameworks_base-54c1a64d5441a964890b44280e4457e11f4f924a.tar.gz frameworks_base-54c1a64d5441a964890b44280e4457e11f4f924a.tar.bz2 |
Don't use the QCOM_tiled_rendering extension with functors
Bug #7247880
Change-Id: I4f6c38e37b953c58e6107097c613891a49dac766
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
-rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 87c3a47..e1a5132 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -193,6 +193,11 @@ int OpenGLRenderer::prepareDirty(float left, float top, float right, float botto syncState(); + // Functors break the tiling extension in pretty spectacular ways + // This ensures we don't use tiling when a functor is going to be + // invoked during the frame + mSuppressTiling = mCaches.hasRegisteredFunctors(); + mTilingSnapshot = mSnapshot; startTiling(mTilingSnapshot, true); @@ -221,17 +226,19 @@ void OpenGLRenderer::syncState() { } void OpenGLRenderer::startTiling(const sp<Snapshot>& s, bool opaque) { - Rect* clip = mTilingSnapshot->clipRect; - if (s->flags & Snapshot::kFlagIsFboLayer) { - clip = s->clipRect; - } + if (!mSuppressTiling) { + Rect* clip = mTilingSnapshot->clipRect; + if (s->flags & Snapshot::kFlagIsFboLayer) { + clip = s->clipRect; + } - mCaches.startTiling(clip->left, s->height - clip->bottom, - clip->right - clip->left, clip->bottom - clip->top, opaque); + mCaches.startTiling(clip->left, s->height - clip->bottom, + clip->right - clip->left, clip->bottom - clip->top, opaque); + } } void OpenGLRenderer::endTiling() { - mCaches.endTiling(); + if (!mSuppressTiling) mCaches.endTiling(); } void OpenGLRenderer::finish() { |