зеркало из https://github.com/mozilla/pjs.git
Bug 627661 - RGBA surface clear was broken in 593733 r=roc,mattwoodrow a=approval2.0
This commit is contained in:
Родитель
18bfd9ac71
Коммит
692c620f70
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче