Bug 1143522 - Convert Layer::mClipRect to ParentLayerIntRect. r=botond

Change interface of getter/setter for mClipRect,
also necessary modification for codes that use these resources.

* * *
Bundle mUseClipRect and mClipRect as Maybe<ParentLayerIntRect> mClipRect
This commit is contained in:
Ying-Ruei Liang (KK)
2015-04-11 22:03:00 -04:00
parent e6eea00ff7
commit 2c219b4aaf
18 changed files with 156 additions and 125 deletions

View File

@@ -324,9 +324,9 @@ MarkLayersHidden(Layer* aLayer, const nsIntRect& aClipRect,
}
{
const nsIntRect* clipRect = aLayer->GetEffectiveClipRect();
const Maybe<ParentLayerIntRect>& clipRect = aLayer->GetEffectiveClipRect();
if (clipRect) {
nsIntRect cr = *clipRect;
nsIntRect cr = ParentLayerIntRect::ToUntyped(*clipRect);
// clipRect is in the container's coordinate system. Get it into the
// global coordinate system.
if (aLayer->GetParent()) {
@@ -404,9 +404,9 @@ ApplyDoubleBuffering(Layer* aLayer, const nsIntRect& aVisibleRect)
nsIntRect newVisibleRect(aVisibleRect);
{
const nsIntRect* clipRect = aLayer->GetEffectiveClipRect();
const Maybe<ParentLayerIntRect>& clipRect = aLayer->GetEffectiveClipRect();
if (clipRect) {
nsIntRect cr = *clipRect;
nsIntRect cr = ParentLayerIntRect::ToUntyped(*clipRect);
// clipRect is in the container's coordinate system. Get it into the
// global coordinate system.
if (aLayer->GetParent()) {
@@ -865,7 +865,7 @@ BasicLayerManager::PaintLayer(gfxContext* aTarget,
RenderTraceScope trace("BasicLayerManager::PaintLayer", "707070");
const nsIntRect* clipRect = aLayer->GetEffectiveClipRect();
const Maybe<ParentLayerIntRect>& clipRect = aLayer->GetEffectiveClipRect();
BasicContainerLayer* container =
static_cast<BasicContainerLayer*>(aLayer->AsContainerLayer());
bool needsGroup = container && container->UseIntermediateSurface();