mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Backed out changeset 6846b610be41 (bug 897409) for suspicion of making Win8 mochitest-mc perma-orange.
This commit is contained in:
parent
160a182259
commit
7b6ff12193
@ -74,6 +74,11 @@ CopyableCanvasLayer::UpdateSurface(gfxASurface* aDestSurface, Layer* aMaskLayer)
|
||||
}
|
||||
|
||||
if (mGLContext) {
|
||||
if (aDestSurface && aDestSurface->GetType() != gfxASurface::SurfaceTypeImage) {
|
||||
MOZ_ASSERT(false, "Destination surface must be ImageSurface type.");
|
||||
return;
|
||||
}
|
||||
|
||||
nsRefPtr<gfxImageSurface> readSurf;
|
||||
nsRefPtr<gfxImageSurface> resultSurf;
|
||||
|
||||
@ -88,9 +93,9 @@ CopyableCanvasLayer::UpdateSurface(gfxASurface* aDestSurface, Layer* aMaskLayer)
|
||||
? gfxASurface::ImageFormatRGB24
|
||||
: gfxASurface::ImageFormatARGB32;
|
||||
|
||||
bool needsTempSurface = !aDestSurface ||
|
||||
!(resultSurf = aDestSurface->GetAsImageSurface());
|
||||
if (needsTempSurface) {
|
||||
if (aDestSurface) {
|
||||
resultSurf = static_cast<gfxImageSurface*>(aDestSurface);
|
||||
} else {
|
||||
resultSurf = GetTempSurface(readSize, format);
|
||||
}
|
||||
MOZ_ASSERT(resultSurf);
|
||||
@ -151,7 +156,7 @@ CopyableCanvasLayer::UpdateSurface(gfxASurface* aDestSurface, Layer* aMaskLayer)
|
||||
}
|
||||
|
||||
// stick our surface into mSurface, so that the Paint() path is the same
|
||||
if (needsTempSurface) {
|
||||
if (!aDestSurface) {
|
||||
mSurface = resultSurf;
|
||||
}
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ CanvasClient2D::Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer)
|
||||
: gfxASurface::CONTENT_COLOR_ALPHA;
|
||||
mDeprecatedTextureClient->EnsureAllocated(aSize, contentType);
|
||||
|
||||
gfxASurface* surface = mDeprecatedTextureClient->LockSurface();
|
||||
gfxASurface* surface = mDeprecatedTextureClient->LockImageSurface();
|
||||
aLayer->UpdateSurface(surface);
|
||||
mDeprecatedTextureClient->Unlock();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user