| Index: samplecode/SampleApp.h
|
| diff --git a/samplecode/SampleApp.h b/samplecode/SampleApp.h
|
| index 8aea272c6d3f48c11ee23692d2b7bce899a8b552..75416426b463941f58f0cee1c7bc7d41225ea418 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;
|
| }
|
|
|