mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 739679 - Part 5: Remove memset for 565 surfaces. r=mwoodrow
This commit is contained in:
parent
51549b38f1
commit
561a82215a
@ -79,10 +79,12 @@ BasicTiledLayerBuffer::PaintThebes(BasicTiledThebesLayer* aLayer,
|
||||
long start = PR_IntervalNow();
|
||||
#endif
|
||||
if (UseSinglePaintBuffer()) {
|
||||
SAMPLE_LABEL("BasicTiledLayerBuffer", "PaintThebesSingleBuffer");
|
||||
const nsIntRect bounds = aPaintRegion.GetBounds();
|
||||
mSinglePaintBuffer = new gfxImageSurface(gfxIntSize(bounds.width, bounds.height), GetFormat());
|
||||
mSinglePaintBufferOffset = nsIntPoint(bounds.x, bounds.y);
|
||||
{
|
||||
SAMPLE_LABEL("BasicTiledLayerBuffer", "PaintThebesSingleBufferAlloc");
|
||||
mSinglePaintBuffer = new gfxImageSurface(gfxIntSize(bounds.width, bounds.height), GetFormat(), !aLayer->CanUseOpaqueSurface());
|
||||
mSinglePaintBufferOffset = nsIntPoint(bounds.x, bounds.y);
|
||||
}
|
||||
nsRefPtr<gfxContext> ctxt = new gfxContext(mSinglePaintBuffer);
|
||||
ctxt->NewPath();
|
||||
ctxt->Translate(gfxPoint(-bounds.x, -bounds.y));
|
||||
@ -92,6 +94,7 @@ BasicTiledLayerBuffer::PaintThebes(BasicTiledThebesLayer* aLayer,
|
||||
}
|
||||
start = PR_IntervalNow();
|
||||
#endif
|
||||
SAMPLE_LABEL("BasicTiledLayerBuffer", "PaintThebesSingleBufferDraw");
|
||||
mCallback(mThebesLayer, ctxt, aPaintRegion, aPaintRegion, mCallbackData);
|
||||
}
|
||||
|
||||
@ -133,7 +136,7 @@ BasicTiledLayerBuffer::ValidateTileInternal(BasicTiledLayerTile aTile,
|
||||
{
|
||||
if (aTile == GetPlaceholderTile()) {
|
||||
gfxImageSurface* tmpTile = new gfxImageSurface(gfxIntSize(GetTileLength(), GetTileLength()),
|
||||
GetFormat());
|
||||
GetFormat(), !mThebesLayer->CanUseOpaqueSurface());
|
||||
aTile = BasicTiledLayerTile(tmpTile);
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ gfxReusableSurfaceWrapper::GetWritable(gfxImageSurface** aSurface)
|
||||
}
|
||||
|
||||
// Something else is reading the surface, copy it
|
||||
gfxImageSurface* copySurface = new gfxImageSurface(mSurface->GetSize(), mSurface->Format());
|
||||
gfxImageSurface* copySurface = new gfxImageSurface(mSurface->GetSize(), mSurface->Format(), false);
|
||||
copySurface->CopyFrom(mSurface);
|
||||
*aSurface = copySurface;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user