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

Side by Side Diff: bench/nanobench.cpp

Issue 1966013002: Turn ContextInfos returned by GrContextFactory into structs. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Address comment Created 4 years, 7 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 | dm/DM.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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 } 184 }
185 bool init(SkImageInfo info, Benchmark* bench) override { 185 bool init(SkImageInfo info, Benchmark* bench) override {
186 uint32_t flags = this->config.useDFText ? SkSurfaceProps::kUseDeviceInde pendentFonts_Flag : 186 uint32_t flags = this->config.useDFText ? SkSurfaceProps::kUseDeviceInde pendentFonts_Flag :
187 0; 187 0;
188 SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType); 188 SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType);
189 this->surface = SkSurface::MakeRenderTarget(gGrFactory->get(this->config .ctxType, 189 this->surface = SkSurface::MakeRenderTarget(gGrFactory->get(this->config .ctxType,
190 this->config .ctxOptions), 190 this->config .ctxOptions),
191 SkBudgeted::kNo, info, 191 SkBudgeted::kNo, info,
192 this->config.samples, & props); 192 this->config.samples, & props);
193 this->gl = gGrFactory->getContextInfo(this->config.ctxType, 193 this->gl = gGrFactory->getContextInfo(this->config.ctxType,
194 this->config.ctxOptions).fGLContex t; 194 this->config.ctxOptions).glContext ();
195 if (!this->surface.get()) { 195 if (!this->surface.get()) {
196 return false; 196 return false;
197 } 197 }
198 if (!this->gl->fenceSyncSupport()) { 198 if (!this->gl->fenceSyncSupport()) {
199 SkDebugf("WARNING: GL context for config \"%s\" does not support fen ce sync. " 199 SkDebugf("WARNING: GL context for config \"%s\" does not support fen ce sync. "
200 "Timings might not be accurate.\n", this->config.name.c_str ()); 200 "Timings might not be accurate.\n", this->config.name.c_str ());
201 } 201 }
202 return true; 202 return true;
203 } 203 }
204 void fillOptions(ResultsWriter* log) override { 204 void fillOptions(ResultsWriter* log) override {
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 1283
1284 return 0; 1284 return 0;
1285 } 1285 }
1286 1286
1287 #if !defined SK_BUILD_FOR_IOS 1287 #if !defined SK_BUILD_FOR_IOS
1288 int main(int argc, char** argv) { 1288 int main(int argc, char** argv) {
1289 SkCommandLineFlags::Parse(argc, argv); 1289 SkCommandLineFlags::Parse(argc, argv);
1290 return nanobench_main(); 1290 return nanobench_main();
1291 } 1291 }
1292 #endif 1292 #endif
OLDNEW
« no previous file with comments | « no previous file | dm/DM.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698