switch surface to sk_sp
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1817383002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot
Review URL: https://codereview.chromium.org/1817383002
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index 3a3bca6..c0f674f 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -132,8 +132,8 @@
bool Target::init(SkImageInfo info, Benchmark* bench) {
if (Benchmark::kRaster_Backend == config.backend) {
- this->surface.reset(SkSurface::NewRaster(info));
- if (!this->surface.get()) {
+ this->surface = SkSurface::MakeRaster(info);
+ if (!this->surface) {
return false;
}
}
@@ -183,10 +183,10 @@
uint32_t flags = this->config.useDFText ? SkSurfaceProps::kUseDeviceIndependentFonts_Flag :
0;
SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType);
- this->surface.reset(SkSurface::NewRenderTarget(gGrFactory->get(this->config.ctxType,
- this->config.ctxOptions),
+ this->surface = SkSurface::MakeRenderTarget(gGrFactory->get(this->config.ctxType,
+ this->config.ctxOptions),
SkBudgeted::kNo, info,
- this->config.samples, &props));
+ this->config.samples, &props);
this->gl = gGrFactory->getContextInfo(this->config.ctxType,
this->config.ctxOptions).fGLContext;
if (!this->surface.get()) {