diff --git a/gfx/2d/DrawTargetCG.cpp b/gfx/2d/DrawTargetCG.cpp index 65eee44199f..eca48d507ec 100644 --- a/gfx/2d/DrawTargetCG.cpp +++ b/gfx/2d/DrawTargetCG.cpp @@ -1270,7 +1270,9 @@ DrawTargetCG::Init(BackendType aType, void DrawTargetCG::Flush() { - CGContextFlush(mCg); + if (GetContextType(mCg) == CG_CONTEXT_TYPE_IOSURFACE) { + CGContextFlush(mCg); + } } bool