aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu/GrContextFactory.cpp
diff options
context:
space:
mode:
authorGravatar csmartdalton <csmartdalton@google.com>2017-02-22 12:00:42 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-22 20:29:56 +0000
commit008b9d80ab9adbf2656eceaf54d11cd15e4dda05 (patch)
tree06d4863dc3f65dcdb6704ec65f31800e544ea181 /tools/gpu/GrContextFactory.cpp
parent19eec39c90a357ff3476d65f2c672096f55518e3 (diff)
Add the ability to enable/disable GPU path renderers
Adds a bitfield to GrContextOptions that masks out path renderers. Adds commandline flags support to set this bitfield in tools apps. Removes GrGLInterfaceRemoveNVPR since we can now accomplish the same thing in the context options. BUG=skia: Change-Id: Icf2a4df36374b3ba2f69ebf0db56e8aedd6cf65f Reviewed-on: https://skia-review.googlesource.com/8786 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'tools/gpu/GrContextFactory.cpp')
-rw-r--r--tools/gpu/GrContextFactory.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/gpu/GrContextFactory.cpp b/tools/gpu/GrContextFactory.cpp
index 965e646e59..637c569f89 100644
--- a/tools/gpu/GrContextFactory.cpp
+++ b/tools/gpu/GrContextFactory.cpp
@@ -196,12 +196,6 @@ ContextInfo GrContextFactory::getContextInfo(ContextType type, ContextOverrides
}
testCtx.reset(glCtx);
glInterface.reset(SkRef(glCtx->gl()));
- if (ContextOverrides::kDisableNVPR & overrides) {
- glInterface.reset(GrGLInterfaceRemoveNVPR(glInterface.get()));
- if (!glInterface) {
- return ContextInfo();
- }
- }
backendContext = reinterpret_cast<GrBackendContext>(glInterface.get());
break;
}
@@ -238,6 +232,9 @@ ContextInfo GrContextFactory::getContextInfo(ContextType type, ContextOverrides
testCtx->makeCurrent();
SkASSERT(testCtx && testCtx->backend() == backend);
GrContextOptions grOptions = fGlobalOptions;
+ if (ContextOverrides::kDisableNVPR & overrides) {
+ grOptions.fSuppressPathRendering = true;
+ }
if (ContextOverrides::kUseInstanced & overrides) {
grOptions.fEnableInstancedRendering = true;
}