b=606218; [webgl] content appears upside down when rendered via shadow layers; r=cjones, a=b
authorVladimir Vukicevic <vladimir@pobox.com>
Wed, 19 Jan 2011 00:55:31 -0800
changeset 60861 809aded51aad6d2af6d00908c9adf5910f1027d7
parent 60860 710c1a6faf99d74232bfc82b813b922cf7e418b7
child 60862 f6c37a9bf3a3e768d26674e3b023338bb545ab38
push id18138
push uservladimir@mozilla.com
push dateWed, 19 Jan 2011 08:57:00 +0000
treeherdermozilla-central@809aded51aad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscjones, b
bugs606218
milestone2.0b10pre
first release with
nightly win64
809aded51aad / 4.0b10pre / 20110119030202 / files
nightly linux32
nightly linux64
nightly mac
nightly win32
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly win64
b=606218; [webgl] content appears upside down when rendered via shadow layers; r=cjones, a=b
gfx/layers/basic/BasicLayers.cpp
--- a/gfx/layers/basic/BasicLayers.cpp
+++ b/gfx/layers/basic/BasicLayers.cpp
@@ -2006,17 +2006,20 @@ BasicShadowableCanvasLayer::Paint(gfxCon
   BasicCanvasLayer::Paint(aContext, aCallback, aCallbackData);
   if (!HasShadow())
     return;
 
   // XXX this is yucky and slow.  It'd be nice to draw directly into
   // the shmem back buffer
   nsRefPtr<gfxContext> tmpCtx = new gfxContext(mBackBuffer);
   tmpCtx->SetOperator(gfxContext::OPERATOR_SOURCE);
-  tmpCtx->DrawSurface(mSurface, gfxSize(mBounds.width, mBounds.height));
+
+  // call BasicCanvasLayer::Paint to draw to our tmp context, because
+  // it'll handle things like flipping correctly
+  BasicCanvasLayer::Paint(tmpCtx, nsnull, nsnull);
 
   BasicManager()->PaintedCanvas(BasicManager()->Hold(this),
                                 mBackBuffer);
 }
 
 class ShadowThebesLayerBuffer : public BasicThebesLayerBuffer
 {
   typedef BasicThebesLayerBuffer Base;