Bug 589755 - [D3D9] Canvas layer uses incorrect source with d2d surfaces. r=bas, a=beta5+

This commit is contained in:
Matt Woodrow 2010-08-23 20:57:59 -07:00
Родитель a4b8d433d4
Коммит 56e9a9a98a
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -163,7 +163,7 @@ CanvasLayerD3D9::Updated(const nsIntRect& aRect)
aRect.x * 4;
sourceStride = sourceSurface->Stride();
} else if (mSurface->GetType() == gfxASurface::SurfaceTypeImage) {
sourceSurface = static_cast<gfxImageSurface*>(sourceSurface.get());
sourceSurface = static_cast<gfxImageSurface*>(mSurface.get());
if (sourceSurface->Format() != gfxASurface::ImageFormatARGB32 &&
sourceSurface->Format() != gfxASurface::ImageFormatRGB24)
{
@ -179,7 +179,7 @@ CanvasLayerD3D9::Updated(const nsIntRect& aRect)
nsRefPtr<gfxContext> ctx = new gfxContext(sourceSurface);
ctx->Translate(gfxPoint(-aRect.x, -aRect.y));
ctx->SetOperator(gfxContext::OPERATOR_SOURCE);
ctx->SetSource(sourceSurface);
ctx->SetSource(mSurface);
ctx->Paint();
startBits = sourceSurface->Data();
sourceStride = sourceSurface->Stride();