summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Romain Guy <romainguy@google.com> 2011-01-14 11:25:56 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2011-01-14 11:25:56 -0800
commitfe5be1b04273b8f67a00ac688940299f7d502c1d (patch)
treea07f1f3340783e98d443dc427ec4e21e92df2618
parent010719c2fff4ab40757984f29d7755ff7f79e3de (diff)
parentf5106847fc962d57c7d5c586099b4a382f3e1c3d (diff)
Merge "Don't add clipped rects to layer regions. Bug #3350208" into honeycomb
-rw-r--r--libs/hwui/OpenGLRenderer.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 98eb11eb11f7..f00557386bce 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -697,12 +697,12 @@ void OpenGLRenderer::dirtyLayer(const float left, const float top,
if ((mSnapshot->flags & Snapshot::kFlagFboTarget) && mSnapshot->region) {
Rect bounds(left, top, right, bottom);
transform.mapRect(bounds);
- bounds.intersect(*mSnapshot->clipRect);
- bounds.snapToPixelBoundaries();
-
- android::Rect dirty(bounds.left, bounds.top, bounds.right, bounds.bottom);
- if (!dirty.isEmpty()) {
- mSnapshot->region->orSelf(dirty);
+ if (bounds.intersect(*mSnapshot->clipRect)) {
+ bounds.snapToPixelBoundaries();
+ android::Rect dirty(bounds.left, bounds.top, bounds.right, bounds.bottom);
+ if (!dirty.isEmpty()) {
+ mSnapshot->region->orSelf(dirty);
+ }
}
}
#endif
@@ -713,12 +713,12 @@ void OpenGLRenderer::dirtyLayer(const float left, const float top,
#if RENDER_LAYERS_AS_REGIONS
if ((mSnapshot->flags & Snapshot::kFlagFboTarget) && mSnapshot->region) {
Rect bounds(left, top, right, bottom);
- bounds.intersect(*mSnapshot->clipRect);
- bounds.snapToPixelBoundaries();
-
- android::Rect dirty(bounds.left, bounds.top, bounds.right, bounds.bottom);
- if (!dirty.isEmpty()) {
- mSnapshot->region->orSelf(dirty);
+ if (bounds.intersect(*mSnapshot->clipRect)) {
+ bounds.snapToPixelBoundaries();
+ android::Rect dirty(bounds.left, bounds.top, bounds.right, bounds.bottom);
+ if (!dirty.isEmpty()) {
+ mSnapshot->region->orSelf(dirty);
+ }
}
}
#endif