Bug 1143522 - Convert cliprect coordinate in gonk code. r=botond

This commit is contained in:
Ying-Ruei Liang (KK) 2015-04-11 22:06:00 -04:00
parent 5b075b3ea2
commit 35742b950a

View File

@ -19,9 +19,10 @@
#include "ImageLayers.h"
#include "libdisplay/GonkDisplay.h"
#include "HwcUtils.h"
#include "HwcComposer2D.h"
#include "HwcUtils.h"
#include "LayerScope.h"
#include "Units.h"
#include "mozilla/layers/CompositorParent.h"
#include "mozilla/layers/LayerManagerComposite.h"
#include "mozilla/layers/PLayerTransaction.h"
@ -345,8 +346,11 @@ HwcComposer2D::PrepareLayerList(Layer* aLayer,
}
nsIntRect clip;
nsIntRect layerClip = aLayer->GetEffectiveClipRect() ?
ParentLayerIntRect::ToUntyped(*aLayer->GetEffectiveClipRect()) : nsIntRect();
nsIntRect* layerClipPtr = aLayer->GetEffectiveClipRect() ? &layerClip : nullptr;
if (!HwcUtils::CalculateClipRect(aParentTransform,
aLayer->GetEffectiveClipRect(),
layerClipPtr,
aClip,
&clip))
{