b=500493; fix bogus getter_AddRefs in canvas code; r=stuart

This commit is contained in:
Vladimir Vukicevic 2009-06-27 16:44:32 -07:00
Родитель b19b951e70
Коммит a33acd773d
1 изменённых файлов: 2 добавлений и 6 удалений

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

@ -2938,9 +2938,7 @@ nsCanvasRenderingContext2D::DrawImage()
gfxMatrix matrix;
nsRefPtr<gfxPattern> pattern;
nsRefPtr<gfxPath> path;
#ifdef WINCE
nsRefPtr<gfxASurface> currentSurface;
#endif
nsLayoutUtils::SurfaceFromElementResult res =
nsLayoutUtils::SurfaceFromElement(imgElt);
if (!res.mSurface)
@ -3026,13 +3024,11 @@ nsCanvasRenderingContext2D::DrawImage()
matrix.Translate(gfxPoint(sx, sy));
matrix.Scale(sw/dw, sh/dh);
#ifdef WINCE
currentSurface = getter_AddRefs(mThebes->CurrentSurface());
/* cairo doesn't have consistent semantics for drawing a surface onto
* itself. Specifically, pixman will not preserve the contents when doing
* the copy. So to get the desired semantics a temporary copy would be needed.
* Instead we optimize opaque self copies here */
if (currentSurface == imgsurf) {
if (mThebes->CurrentSurface() == imgsurf) {
if (imgsurf->GetType() == gfxASurface::SurfaceTypeImage) {
gfxImageSurface *surf = static_cast<gfxImageSurface*>(imgsurf.get());
gfxContext::GraphicsOperator op = mThebes->CurrentOperator();