Bug 992486 - Part 1: Add API to RotatedContentBuffer for drawing in multiple passes. r=roc

This commit is contained in:
Matt Woodrow
2014-04-09 21:15:17 +12:00
parent 74e432c518
commit 013d6e57f8
6 changed files with 87 additions and 26 deletions

View File

@@ -785,13 +785,20 @@ ContentClientIncremental::BeginPaintBuffer(ThebesLayer* aLayer,
}
DrawTarget*
ContentClientIncremental::BorrowDrawTargetForPainting(ThebesLayer* aLayer,
const PaintState& aPaintState)
ContentClientIncremental::BorrowDrawTargetForPainting(const PaintState& aPaintState,
RotatedContentBuffer::DrawIterator* aIter)
{
if (aPaintState.mMode == SurfaceMode::SURFACE_NONE) {
return nullptr;
}
if (aIter) {
if (aIter->mCount++ > 0) {
return nullptr;
}
aIter->mDrawRegion = aPaintState.mRegionToDraw;
}
DrawTarget* result = nullptr;
nsIntRect drawBounds = aPaintState.mRegionToDraw.GetBounds();