Update iOS to new SkSurface interface
authorjvanverth <jvanverth@google.com>
Tue, 26 Jul 2016 20:33:07 +0000 (13:33 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 26 Jul 2016 20:33:07 +0000 (13:33 -0700)
BUG=skia:5558
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2179363003

Review-Url: https://codereview.chromium.org/2179363003

experimental/iOSSampleApp/SkSampleUIView.mm

index 8bf7c90..b4c6b1c 100644 (file)
@@ -123,10 +123,12 @@ public:
 #if SK_SUPPORT_GPU
         if (SampleWindow::IsGpuDeviceType(dType) && fCurContext) {
             SkSurfaceProps props(win->getSurfaceProps());
-            return SkSurface::NewRenderTargetDirect(fCurRenderTarget, &props);
+            return SkSurface::MakeRenderTargetDirect(fCurRenderTarget,
+                                                     sk_ref_sp(win->info().colorSpace()),
+                                                     &props).release();
         }
 #endif
-        return NULL;
+        return nullptr;
     }
 
     virtual void publishCanvas(SampleWindow::DeviceType dType,