Index: gm/discard.cpp |
diff --git a/gm/discard.cpp b/gm/discard.cpp |
index 6f64b9c0b99d4a966b499065c185753f0dcbcbd2..d75f0ab1418a99389d9ff3cae27a6021ed511dcc 100644 |
--- a/gm/discard.cpp |
+++ b/gm/discard.cpp |
@@ -45,8 +45,7 @@ protected: |
size.fWidth /= 10; |
size.fHeight /= 10; |
SkImageInfo info = SkImageInfo::MakeN32Premul(size); |
- SkSurface* surface = SkSurface::NewRenderTarget(context, SkBudgeted::kNo, info); |
- |
+ auto surface = SkSurface::MakeRenderTarget(context, SkBudgeted::kNo, info); |
if (nullptr == surface) { |
return; |
} |
@@ -78,7 +77,6 @@ protected: |
} |
surface->getCanvas()->discard(); |
- surface->unref(); |
} |
private: |