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

Side by Side Diff: bench/nanobench.cpp

Issue 2182783004: Add test configs for instanced rendering (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add test configs for instanced rendering Created 4 years, 4 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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 #if SK_SUPPORT_GPU 400 #if SK_SUPPORT_GPU
401 if (const auto* gpuConfig = config->asConfigGpu()) { 401 if (const auto* gpuConfig = config->asConfigGpu()) {
402 if (!FLAGS_gpu) 402 if (!FLAGS_gpu)
403 return; 403 return;
404 404
405 auto ctxOptions = GrContextFactory::kNone_ContextOptions; 405 auto ctxOptions = GrContextFactory::kNone_ContextOptions;
406 if (gpuConfig->getUseNVPR()) { 406 if (gpuConfig->getUseNVPR()) {
407 ctxOptions = static_cast<GrContextFactory::ContextOptions>( 407 ctxOptions = static_cast<GrContextFactory::ContextOptions>(
408 ctxOptions | GrContextFactory::kEnableNVPR_ContextOptions); 408 ctxOptions | GrContextFactory::kEnableNVPR_ContextOptions);
409 } 409 }
410 if (gpuConfig->getUseInstanced()) {
411 ctxOptions = static_cast<GrContextFactory::ContextOptions>(
412 ctxOptions | GrContextFactory::kUseInstanced_ContextOptions);
413 }
410 if (SkColorAndColorSpaceAreGammaCorrect(gpuConfig->getColorType(), 414 if (SkColorAndColorSpaceAreGammaCorrect(gpuConfig->getColorType(),
411 gpuConfig->getColorSpace())) { 415 gpuConfig->getColorSpace())) {
412 ctxOptions = static_cast<GrContextFactory::ContextOptions>( 416 ctxOptions = static_cast<GrContextFactory::ContextOptions>(
413 ctxOptions | GrContextFactory::kRequireSRGBSupport_ContextOption s); 417 ctxOptions | GrContextFactory::kRequireSRGBSupport_ContextOption s);
414 } 418 }
415 const auto ctxType = gpuConfig->getContextType(); 419 const auto ctxType = gpuConfig->getContextType();
416 const auto sampleCount = gpuConfig->getSamples(); 420 const auto sampleCount = gpuConfig->getSamples();
417 421
418 if (const GrContext* ctx = gGrFactory->get(ctxType, ctxOptions)) { 422 if (const GrContext* ctx = gGrFactory->get(ctxType, ctxOptions)) {
419 const auto maxSampleCount = ctx->caps()->maxSampleCount(); 423 const auto maxSampleCount = ctx->caps()->maxSampleCount();
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 1301
1298 return 0; 1302 return 0;
1299 } 1303 }
1300 1304
1301 #if !defined SK_BUILD_FOR_IOS 1305 #if !defined SK_BUILD_FOR_IOS
1302 int main(int argc, char** argv) { 1306 int main(int argc, char** argv) {
1303 SkCommandLineFlags::Parse(argc, argv); 1307 SkCommandLineFlags::Parse(argc, argv);
1304 return nanobench_main(); 1308 return nanobench_main();
1305 } 1309 }
1306 #endif 1310 #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