am c1f8bcff: Merge "Fix incorrect dirty rectangle transformation in hardware layers. Bug #3413433" into honeycomb
* commit 'c1f8bcffb8612ef5bdddc4bca6eca23804cbe453': Fix incorrect dirty rectangle transformation in hardware layers. Bug #3413433
This commit is contained in:
@@ -3537,6 +3537,12 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
|
||||
// Make sure we do not set both flags at the same time
|
||||
int opaqueFlag = isOpaque ? DIRTY_OPAQUE : DIRTY;
|
||||
|
||||
if (child.mLayerType != LAYER_TYPE_NONE) {
|
||||
mPrivateFlags |= INVALIDATED;
|
||||
mPrivateFlags &= ~DRAWING_CACHE_VALID;
|
||||
child.mLocalDirtyRect.union(dirty);
|
||||
}
|
||||
|
||||
final int[] location = attachInfo.mInvalidateChildLocation;
|
||||
location[CHILD_LEFT_INDEX] = child.mLeft;
|
||||
location[CHILD_TOP_INDEX] = child.mTop;
|
||||
@@ -3550,12 +3556,6 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
|
||||
(int) (boundingRect.bottom + 0.5f));
|
||||
}
|
||||
|
||||
if (child.mLayerType != LAYER_TYPE_NONE) {
|
||||
mPrivateFlags |= INVALIDATED;
|
||||
mPrivateFlags &= ~DRAWING_CACHE_VALID;
|
||||
child.mLocalDirtyRect.union(dirty);
|
||||
}
|
||||
|
||||
do {
|
||||
View view = null;
|
||||
if (parent instanceof View) {
|
||||
@@ -3639,7 +3639,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
|
||||
if (mLayerType != LAYER_TYPE_NONE) {
|
||||
mLocalDirtyRect.union(dirty);
|
||||
}
|
||||
|
||||
|
||||
return mParent;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -39,6 +39,7 @@ void LayerRenderer::prepareDirty(float left, float top, float right, float botto
|
||||
mLayer->region.clear();
|
||||
dirty.set(0.0f, 0.0f, mLayer->width, mLayer->height);
|
||||
} else {
|
||||
dirty.intersect(0.0f, 0.0f, mLayer->width, mLayer->height);
|
||||
android::Rect r(dirty.left, dirty.top, dirty.right, dirty.bottom);
|
||||
mLayer->region.subtractSelf(r);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user