Bug 952977: Perform some cleanup r=nical
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
#include "nsISupportsImpl.h" // for Layer::AddRef, etc
|
||||
#include "nsPoint.h" // for nsIntPoint
|
||||
#include "nsRect.h" // for nsIntRect
|
||||
#include "gfx3DMatrix.h" // for gfx3DMatrix
|
||||
#include "gfxMatrix.h" // for gfxMatrix
|
||||
#include "nsRegion.h" // for nsIntRegion
|
||||
|
||||
@@ -81,14 +80,12 @@ BasicContainerLayer::ComputeEffectiveTransforms(const Matrix4x4& aTransformToSur
|
||||
bool
|
||||
BasicContainerLayer::ChildrenPartitionVisibleRegion(const nsIntRect& aInRect)
|
||||
{
|
||||
gfxMatrix transform;
|
||||
gfx3DMatrix effectiveTransform;
|
||||
gfx::To3DMatrix(GetEffectiveTransform(), effectiveTransform);
|
||||
if (!effectiveTransform.CanDraw2D(&transform) ||
|
||||
transform.HasNonIntegerTranslation())
|
||||
Matrix transform;
|
||||
if (!GetEffectiveTransform().CanDraw2D(&transform) ||
|
||||
ThebesMatrix(transform).HasNonIntegerTranslation())
|
||||
return false;
|
||||
|
||||
nsIntPoint offset(int32_t(transform.x0), int32_t(transform.y0));
|
||||
nsIntPoint offset(int32_t(transform._31), int32_t(transform._32));
|
||||
nsIntRect rect = aInRect.Intersect(GetEffectiveVisibleRegion().GetBounds() + offset);
|
||||
nsIntRegion covered;
|
||||
|
||||
@@ -96,15 +93,13 @@ BasicContainerLayer::ChildrenPartitionVisibleRegion(const nsIntRect& aInRect)
|
||||
if (ToData(l)->IsHidden())
|
||||
continue;
|
||||
|
||||
gfxMatrix childTransform;
|
||||
gfx3DMatrix effectiveTransform;
|
||||
gfx::To3DMatrix(l->GetEffectiveTransform(), effectiveTransform);
|
||||
if (!effectiveTransform.CanDraw2D(&childTransform) ||
|
||||
childTransform.HasNonIntegerTranslation() ||
|
||||
Matrix childTransform;
|
||||
if (!l->GetEffectiveTransform().CanDraw2D(&childTransform) ||
|
||||
ThebesMatrix(childTransform).HasNonIntegerTranslation() ||
|
||||
l->GetEffectiveOpacity() != 1.0)
|
||||
return false;
|
||||
nsIntRegion childRegion = l->GetEffectiveVisibleRegion();
|
||||
childRegion.MoveBy(int32_t(childTransform.x0), int32_t(childTransform.y0));
|
||||
childRegion.MoveBy(int32_t(childTransform._31), int32_t(childTransform._32));
|
||||
childRegion.And(childRegion, rect);
|
||||
if (l->GetClipRect()) {
|
||||
childRegion.And(childRegion, *l->GetClipRect() + offset);
|
||||
|
||||
Reference in New Issue
Block a user