Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1834)

Unified Diff: bench/nanobench.cpp

Issue 1817383002: switch surface to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bench/nanobench.h ('k') | cmake/example.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/nanobench.cpp
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index 3a3bca673f3f0c61a0131dfe4374e77980ff2dfc..c0f674fc59d141ed246437aaafb55cf077821549 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -132,8 +132,8 @@ static SkString humanize(double ms) {
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 @@ struct GPUTarget : public Target {
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()) {
« no previous file with comments | « bench/nanobench.h ('k') | cmake/example.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698