diff options
| author | 2012-09-27 18:45:42 -0700 | |
|---|---|---|
| committer | 2012-09-27 18:45:42 -0700 | |
| commit | a852ff3a4b637e8101c2f54e110467586fe604cf (patch) | |
| tree | 0c940ea5314930c6fdbe15bfc1f4cc17c61d1b78 /libs/hwui/OpenGLRenderer.cpp | |
| parent | 93aa70c6dfec91909404c9ade9b4a94574814092 (diff) | |
| parent | 6ed9e43879039ce0cbead08d304edbce79a88ced (diff) | |
Merge changes I9873540e,I4f6c38e3 into jb-mr1-dev
* changes:
Skia's ColorMatrix vector is in the 0..255 range not 0..1 Bug #7248980
Don't use the QCOM_tiled_rendering extension with functors Bug #7247880
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 b0328f5966f5..684d5e1c4138 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() { |