Bug 934860 - Move paint region clipping into DrawThebesLayer. r=roc
This commit is contained in:
@@ -3268,6 +3268,7 @@ FrameLayerBuilder::PaintItems(nsTArray<ClippedDisplayItem>& aItems,
|
||||
FrameLayerBuilder::DrawThebesLayer(ThebesLayer* aLayer,
|
||||
gfxContext* aContext,
|
||||
const nsIntRegion& aRegionToDraw,
|
||||
DrawRegionClip aClip,
|
||||
const nsIntRegion& aRegionToInvalidate,
|
||||
void* aCallbackData)
|
||||
{
|
||||
@@ -3276,6 +3277,12 @@ FrameLayerBuilder::DrawThebesLayer(ThebesLayer* aLayer,
|
||||
nsDisplayListBuilder* builder = static_cast<nsDisplayListBuilder*>
|
||||
(aCallbackData);
|
||||
|
||||
if (aClip == CLIP_DRAW_SNAPPED) {
|
||||
gfxUtils::ClipToRegionSnapped(aContext, aRegionToDraw);
|
||||
} else if (aClip == CLIP_DRAW) {
|
||||
gfxUtils::ClipToRegion(aContext, aRegionToDraw);
|
||||
}
|
||||
|
||||
FrameLayerBuilder *layerBuilder = aLayer->Manager()->GetLayerBuilder();
|
||||
NS_ASSERTION(layerBuilder, "Unexpectedly null layer builder!");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user