Bug 923309 - Don't flush CGContext drawing to the window when we're only meant to be completing any pending drawing. r=Bas
authorMatt Woodrow <mwoodrow@mozilla.com>
Thu, 10 Oct 2013 17:44:09 +1300
changeset 150290 b73a8fa118dd016f2409d299b51f23f2f9b07bc2
parent 150289 3cca295fd212f8addfacde03737f171d9643831a
child 150291 64b24d431280e09bbb4db1e030db6f34a26b003d
push id34813
push usermwoodrow@mozilla.com
push dateThu, 10 Oct 2013 04:45:16 +0000
treeherdermozilla-inbound@64b24d431280 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBas
bugs923309
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 923309 - Don't flush CGContext drawing to the window when we're only meant to be completing any pending drawing. r=Bas
gfx/2d/DrawTargetCG.cpp
--- a/gfx/2d/DrawTargetCG.cpp
+++ b/gfx/2d/DrawTargetCG.cpp
@@ -1265,17 +1265,19 @@ DrawTargetCG::Init(BackendType aType,
   }
 
   return true;
 }
 
 void
 DrawTargetCG::Flush()
 {
-  CGContextFlush(mCg);
+  if (GetContextType(mCg) == CG_CONTEXT_TYPE_IOSURFACE) {
+    CGContextFlush(mCg);
+  }
 }
 
 bool
 DrawTargetCG::Init(CGContextRef cgContext, const IntSize &aSize)
 {
   // XXX: we should come up with some consistent semantics for dealing
   // with zero area drawtargets
   if (aSize.width == 0 || aSize.height == 0) {