Index: samplecode/SampleApp.cpp |
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp |
index 9d7e727ce5e87d46347facaf9e36b007bd9eaafe..08e7240f989f1bd131fcadb5318d66c3f774cd1a 100644 |
--- a/samplecode/SampleApp.cpp |
+++ b/samplecode/SampleApp.cpp |
@@ -271,17 +271,14 @@ public: |
fBackend = kNone_BackEndType; |
} |
- virtual SkCanvas* createCanvas(SampleWindow::DeviceType dType, |
- SampleWindow* win) { |
+ virtual SkSurface* createSurface(SampleWindow::DeviceType dType, |
+ SampleWindow* win) SK_OVERRIDE { |
#if SK_SUPPORT_GPU |
if (IsGpuDeviceType(dType) && fCurContext) { |
- SkAutoTUnref<SkBaseDevice> device(SkGpuDevice::Create(fCurRenderTarget)); |
- return new SkCanvas(device); |
- } else |
-#endif |
- { |
- return NULL; |
+ return SkSurface::NewRenderTargetDirect(fCurRenderTarget); |
} |
+#endif |
+ return NULL; |
} |
virtual void publishCanvas(SampleWindow::DeviceType dType, |