Bug 1070722 - Remove DrawTargetCG::OptimizeSourceSurface since we don't get any benefit without quartz high-quality downscaling enabled. r=jrmuizel
authorMatt Woodrow <mwoodrow@mozilla.com>
Thu, 02 Oct 2014 21:14:46 +1300
changeset 208370 0f14e8b69354a01de664b5a04dceaf0de6da2564
parent 208369 8378f26b07304275cab36c135881d44ac60544d3
child 208371 13740fca92f2a957514ab91fc0243770583776ad
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersjrmuizel
bugs1070722
milestone35.0a1
Bug 1070722 - Remove DrawTargetCG::OptimizeSourceSurface since we don't get any benefit without quartz high-quality downscaling enabled. r=jrmuizel
gfx/2d/DrawTargetCG.cpp
--- a/gfx/2d/DrawTargetCG.cpp
+++ b/gfx/2d/DrawTargetCG.cpp
@@ -246,26 +246,17 @@ GetRetainedImageFromSourceSurface(Source
                            data->Stride(), data->GetFormat());
     }
   }
 }
 
 TemporaryRef<SourceSurface>
 DrawTargetCG::OptimizeSourceSurface(SourceSurface *aSurface) const
 {
-  if (aSurface->GetType() == SurfaceType::COREGRAPHICS_IMAGE ||
-      aSurface->GetType() == SurfaceType::COREGRAPHICS_CGCONTEXT) {
-    return aSurface;
-  }
-  RefPtr<DataSourceSurface> data = aSurface->GetDataSurface();
-
-  return CreateSourceSurfaceFromData(data->GetData(),
-                                     data->GetSize(),
-                                     data->Stride(),
-                                     data->GetFormat());
+  return aSurface;
 }
 
 class UnboundnessFixer
 {
     CGRect mClipBounds;
     CGLayerRef mLayer;
     CGContextRef mCg;
   public: