Update SkiaCanvasProxy with SkSurface API change
(cherry picked from commit 187b99292d0bf86e9e76b0c8d447abcbefe29afb)
Change-Id: I09a5ae6a844dec4607bc3f45e22dad93a00c0dc8
diff --git a/libs/hwui/SkiaCanvasProxy.cpp b/libs/hwui/SkiaCanvasProxy.cpp
index 9df32b28..f264a35 100644
--- a/libs/hwui/SkiaCanvasProxy.cpp
+++ b/libs/hwui/SkiaCanvasProxy.cpp
@@ -23,6 +23,7 @@
#include <SkPixelRef.h>
#include <SkRect.h>
#include <SkRRect.h>
+#include <SkSurface.h>
#include <memory>
@@ -153,7 +154,7 @@
mCanvas->drawVertices(mode, floatCount, vArray, tArray, cArray, indices, indexCount, paint);
}
-SkSurface* SkiaCanvasProxy::onNewSurface(const SkImageInfo&, const SkSurfaceProps&) {
+sk_sp<SkSurface> SkiaCanvasProxy::onNewSurface(const SkImageInfo&, const SkSurfaceProps&) {
SkDEBUGFAIL("SkiaCanvasProxy::onNewSurface is not supported");
return NULL;
}
diff --git a/libs/hwui/SkiaCanvasProxy.h b/libs/hwui/SkiaCanvasProxy.h
index 973c55f..d1c9c6b 100644
--- a/libs/hwui/SkiaCanvasProxy.h
+++ b/libs/hwui/SkiaCanvasProxy.h
@@ -44,7 +44,7 @@
protected:
- virtual SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) override;
+ virtual sk_sp<SkSurface> onNewSurface(const SkImageInfo&, const SkSurfaceProps&) override;
virtual void willSave() override;
virtual SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) override;