Bug 627661 - RGBA surface clear was broken in 593733 r=roc,mattwoodrow a=approval2.0

This commit is contained in:
Oleg Romashin 2011-01-24 21:31:35 +02:00
parent bff49321b0
commit 21f38db312
2 changed files with 6 additions and 7 deletions

View File

@ -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");

View File

@ -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;
}