aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake/example.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/example.cpp')
-rw-r--r--cmake/example.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmake/example.cpp b/cmake/example.cpp
index 93611d7c96..96bf4d3ff8 100644
--- a/cmake/example.cpp
+++ b/cmake/example.cpp
@@ -47,15 +47,15 @@ template <typename T> std::shared_ptr<T> adopt(T* ptr) {
static std::shared_ptr<SkSurface> create_raster_surface(int w, int h) {
std::cout << "Using raster surface" << std::endl;
- return adopt(SkSurface::NewRasterN32Premul(w, h));
+ return adopt(SkSurface::MakeRasterN32Premul(w, h).release());
}
static std::shared_ptr<SkSurface> create_opengl_surface(int w, int h) {
std::cout << "Using opengl surface" << std::endl;
std::shared_ptr<GrContext> grContext = adopt(GrContext::Create(kOpenGL_GrBackend, 0));
- return adopt(SkSurface::NewRenderTarget(grContext.get(),
+ return adopt(SkSurface::MakeRenderTarget(grContext.get(),
SkBudgeted::kNo,
- SkImageInfo::MakeN32Premul(w,h)));
+ SkImageInfo::MakeN32Premul(w,h)).release());
}
int main(int, char**) {