aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleApp.h
diff options
context:
space:
mode:
Diffstat (limited to 'samplecode/SampleApp.h')
-rw-r--r--samplecode/SampleApp.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/samplecode/SampleApp.h b/samplecode/SampleApp.h
index 8aea272c6d..75416426b4 100644
--- a/samplecode/SampleApp.h
+++ b/samplecode/SampleApp.h
@@ -74,7 +74,7 @@ public:
// called before drawing. should install correct device
// type on the canvas. Will skip drawing if returns false.
- virtual SkSurface* createSurface(DeviceType dType, SampleWindow* win) = 0;
+ virtual sk_sp<SkSurface> makeSurface(DeviceType dType, SampleWindow* win) = 0;
// called after drawing, should get the results onto the
// screen.
@@ -90,7 +90,7 @@ public:
virtual GrContext* getGrContext() = 0;
// return the GrRenderTarget backing gpu devices (nullptr if not built with GPU support)
- virtual GrRenderTarget* getGrRenderTarget() = 0;
+ virtual int numColorSamples() const = 0;
// return the color depth of the output device
virtual int getColorBits() = 0;
@@ -102,13 +102,13 @@ public:
SampleWindow(void* hwnd, int argc, char** argv, DeviceManager*);
virtual ~SampleWindow();
- SkSurface* createSurface() override {
- SkSurface* surface = nullptr;
+ sk_sp<SkSurface> makeSurface() override {
+ sk_sp<SkSurface> surface;
if (fDevManager) {
- surface = fDevManager->createSurface(fDeviceType, this);
+ surface = fDevManager->makeSurface(fDeviceType, this);
}
- if (nullptr == surface) {
- surface = this->INHERITED::createSurface();
+ if (!surface) {
+ surface = this->INHERITED::makeSurface();
}
return surface;
}