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

Side by Side Diff: bench/nanobench.cpp

Issue 1728093005: Move Budgeted enum out of SkSurface, use in GrTextureProvider (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add aliases for Chrome Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | cmake/example.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include <ctype.h> 8 #include <ctype.h>
9 9
10 #include "nanobench.h" 10 #include "nanobench.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 *maxFrameLag = FLAGS_gpuFrameLag; 178 *maxFrameLag = FLAGS_gpuFrameLag;
179 } 179 }
180 return true; 180 return true;
181 } 181 }
182 bool init(SkImageInfo info, Benchmark* bench) override { 182 bool init(SkImageInfo info, Benchmark* bench) override {
183 uint32_t flags = this->config.useDFText ? SkSurfaceProps::kUseDeviceInde pendentFonts_Flag : 183 uint32_t flags = this->config.useDFText ? SkSurfaceProps::kUseDeviceInde pendentFonts_Flag :
184 0; 184 0;
185 SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType); 185 SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType);
186 this->surface.reset(SkSurface::NewRenderTarget(gGrFactory->get(this->con fig.ctxType, 186 this->surface.reset(SkSurface::NewRenderTarget(gGrFactory->get(this->con fig.ctxType,
187 this->con fig.ctxOptions), 187 this->con fig.ctxOptions),
188 SkSurface::kNo_Budgeted , info, 188 SkBudgeted::kNo, info,
189 this->config.samples, & props)); 189 this->config.samples, & props));
190 this->gl = gGrFactory->getContextInfo(this->config.ctxType, 190 this->gl = gGrFactory->getContextInfo(this->config.ctxType,
191 this->config.ctxOptions).fGLContex t; 191 this->config.ctxOptions).fGLContex t;
192 if (!this->surface.get()) { 192 if (!this->surface.get()) {
193 return false; 193 return false;
194 } 194 }
195 if (!this->gl->fenceSyncSupport()) { 195 if (!this->gl->fenceSyncSupport()) {
196 SkDebugf("WARNING: GL context for config \"%s\" does not support fen ce sync. " 196 SkDebugf("WARNING: GL context for config \"%s\" does not support fen ce sync. "
197 "Timings might not be accurate.\n", this->config.name.c_str ()); 197 "Timings might not be accurate.\n", this->config.name.c_str ());
198 } 198 }
(...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 1275
1276 return 0; 1276 return 0;
1277 } 1277 }
1278 1278
1279 #if !defined SK_BUILD_FOR_IOS 1279 #if !defined SK_BUILD_FOR_IOS
1280 int main(int argc, char** argv) { 1280 int main(int argc, char** argv) {
1281 SkCommandLineFlags::Parse(argc, argv); 1281 SkCommandLineFlags::Parse(argc, argv);
1282 return nanobench_main(); 1282 return nanobench_main();
1283 } 1283 }
1284 #endif 1284 #endif
OLDNEW
« no previous file with comments | « no previous file | cmake/example.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698