aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm/DM.cpp
diff options
context:
space:
mode:
authorGravatar csmartdalton <csmartdalton@google.com>2017-02-21 12:36:05 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-21 21:45:45 +0000
commite812d496aaa5e5e9f2117de8f442c297c9cb1367 (patch)
tree7342c7c6e048e3a226e162d7d1bcbf6ffbcddc55 /dm/DM.cpp
parente026511f4c4b90bfe842f89966d088b663fc8c13 (diff)
Rename GrContextFactory::ContextOptions to ContextOverrides
Also changes the behavior of these flags to only override their corresponding context options when set, and to leave them unchanged when not set. BUG=skia: Change-Id: I09f6be09997594fa888d9045dd4901354ef3f880 Reviewed-on: https://skia-review.googlesource.com/8780 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'dm/DM.cpp')
-rw-r--r--dm/DM.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 6bef230ca7..c25076ff06 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -843,14 +843,14 @@ static Sink* create_sink(const SkCommandLineConfig* config) {
if (gpu_supported()) {
if (const SkCommandLineConfigGpu* gpuConfig = config->asConfigGpu()) {
GrContextFactory::ContextType contextType = gpuConfig->getContextType();
- GrContextFactory::ContextOptions contextOptions = gpuConfig->getContextOptions();
+ GrContextFactory::ContextOverrides contextOverrides = gpuConfig->getContextOverrides();
GrContextFactory testFactory;
- if (!testFactory.get(contextType, contextOptions)) {
+ if (!testFactory.get(contextType, contextOverrides)) {
info("WARNING: can not create GPU context for config '%s'. "
"GM tests will be skipped.\n", gpuConfig->getTag().c_str());
return nullptr;
}
- return new GPUSink(contextType, contextOptions, gpuConfig->getSamples(),
+ return new GPUSink(contextType, contextOverrides, gpuConfig->getSamples(),
gpuConfig->getUseDIText(), gpuConfig->getColorType(),
sk_ref_sp(gpuConfig->getColorSpace()), FLAGS_gpu_threading);
}
@@ -1462,7 +1462,8 @@ void RunWithGPUTestContexts(GrContextTestFn* test, GrContextTypeFilterFn* contex
continue;
}
}
- ContextInfo ctxInfo = factory->getContextInfo(contextType);
+ ContextInfo ctxInfo = factory->getContextInfo(contextType,
+ GrContextFactory::ContextOverrides::kDisableNVPR);
if (contextTypeFilter && !(*contextTypeFilter)(contextType)) {
continue;
}
@@ -1471,7 +1472,7 @@ void RunWithGPUTestContexts(GrContextTestFn* test, GrContextTypeFilterFn* contex
(*test)(reporter, ctxInfo);
}
ctxInfo = factory->getContextInfo(contextType,
- GrContextFactory::ContextOptions::kEnableNVPR);
+ GrContextFactory::ContextOverrides::kRequireNVPRSupport);
if (ctxInfo.grContext()) {
(*test)(reporter, ctxInfo);
}