mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-12 00:50:40 +00:00
Bug 627661 - RGBA surface clear was broken in 593733 r=roc,mattwoodrow a=approval2.0
This commit is contained in:
parent
bff49321b0
commit
21f38db312
@ -595,6 +595,12 @@ BasicBufferOGL::BeginPaint(ContentType aContentType)
|
||||
result.mContext = new gfxContext(surf);
|
||||
} else {
|
||||
result.mContext = new gfxContext(mTexImage->BeginUpdate(result.mRegionToDraw));
|
||||
if (mTexImage->GetContentType() == gfxASurface::CONTENT_COLOR_ALPHA) {
|
||||
gfxUtils::ClipToRegion(result.mContext, result.mRegionToDraw);
|
||||
result.mContext->SetOperator(gfxContext::OPERATOR_CLEAR);
|
||||
result.mContext->Fill();
|
||||
result.mContext->SetOperator(gfxContext::OPERATOR_OVER);
|
||||
}
|
||||
}
|
||||
if (!result.mContext) {
|
||||
NS_WARNING("unable to get context for update");
|
||||
|
@ -589,13 +589,6 @@ BasicTextureImage::BeginUpdate(nsIntRegion& aRegion)
|
||||
|
||||
mUpdateSurface->SetDeviceOffset(gfxPoint(-rgnSize.x, -rgnSize.y));
|
||||
|
||||
if (format == gfxASurface::ImageFormatARGB32) {
|
||||
// Clear the returned surface because it might have been re-used.
|
||||
nsRefPtr<gfxContext> ctx = new gfxContext(mUpdateSurface);
|
||||
ctx->SetOperator(gfxContext::OPERATOR_CLEAR);
|
||||
ctx->Paint();
|
||||
}
|
||||
|
||||
return mUpdateSurface;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user