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

Side by Side Diff: bench/nanobench.cpp

Issue 1455093003: Remove GrContextFactory::getGLContext (Closed) Base URL: https://skia.googlesource.com/skia.git@commandbuffer-as-api-01-gpu-test-context-support
Patch Set: rebase Created 5 years, 1 month 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 | src/gpu/GrContextFactory.h » ('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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 } 165 }
166 return true; 166 return true;
167 } 167 }
168 bool init(SkImageInfo info, Benchmark* bench) override { 168 bool init(SkImageInfo info, Benchmark* bench) override {
169 uint32_t flags = this->config.useDFText ? SkSurfaceProps::kUseDeviceInde pendentFonts_Flag : 169 uint32_t flags = this->config.useDFText ? SkSurfaceProps::kUseDeviceInde pendentFonts_Flag :
170 0; 170 0;
171 SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType); 171 SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType);
172 this->surface.reset(SkSurface::NewRenderTarget(gGrFactory->get(this->con fig.ctxType), 172 this->surface.reset(SkSurface::NewRenderTarget(gGrFactory->get(this->con fig.ctxType),
173 SkSurface::kNo_Budgeted , info, 173 SkSurface::kNo_Budgeted , info,
174 this->config.samples, & props)); 174 this->config.samples, & props));
175 this->gl = gGrFactory->getGLContext(this->config.ctxType); 175 this->gl = gGrFactory->getContextInfo(this->config.ctxType)->fGLContext;
176 if (!this->surface.get()) { 176 if (!this->surface.get()) {
177 return false; 177 return false;
178 } 178 }
179 if (!this->gl->fenceSyncSupport()) { 179 if (!this->gl->fenceSyncSupport()) {
180 SkDebugf("WARNING: GL context for config \"%s\" does not support fen ce sync. " 180 SkDebugf("WARNING: GL context for config \"%s\" does not support fen ce sync. "
181 "Timings might not be accurate.\n", this->config.name); 181 "Timings might not be accurate.\n", this->config.name);
182 } 182 }
183 return true; 183 return true;
184 } 184 }
185 void fillOptions(ResultsWriter* log) override { 185 void fillOptions(ResultsWriter* log) override {
(...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after
1270 1270
1271 return 0; 1271 return 0;
1272 } 1272 }
1273 1273
1274 #if !defined SK_BUILD_FOR_IOS 1274 #if !defined SK_BUILD_FOR_IOS
1275 int main(int argc, char** argv) { 1275 int main(int argc, char** argv) {
1276 SkCommandLineFlags::Parse(argc, argv); 1276 SkCommandLineFlags::Parse(argc, argv);
1277 return nanobench_main(); 1277 return nanobench_main();
1278 } 1278 }
1279 #endif 1279 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrContextFactory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698