aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/GrContextFactoryTest.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 /tests/GrContextFactoryTest.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 'tests/GrContextFactoryTest.cpp')
-rw-r--r--tests/GrContextFactoryTest.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/GrContextFactoryTest.cpp b/tests/GrContextFactoryTest.cpp
index 9b600fa8a4..f7ddf36d91 100644
--- a/tests/GrContextFactoryTest.cpp
+++ b/tests/GrContextFactoryTest.cpp
@@ -23,7 +23,7 @@ DEF_GPUTEST(GrContextFactory_NVPRContextOptionHasPathRenderingSupport, reporter,
for (int i = 0; i < GrContextFactory::kContextTypeCnt; ++i) {
GrContextFactory::ContextType ctxType = static_cast<GrContextFactory::ContextType>(i);
GrContext* context = testFactory.get(ctxType,
- GrContextFactory::ContextOptions::kEnableNVPR);
+ GrContextFactory::ContextOverrides::kRequireNVPRSupport);
if (!context) {
continue;
}
@@ -33,13 +33,14 @@ DEF_GPUTEST(GrContextFactory_NVPRContextOptionHasPathRenderingSupport, reporter,
}
}
-DEF_GPUTEST(GrContextFactory_NoPathRenderingUnlessNVPRRequested, reporter, /*factory*/) {
- // Test that if NVPR is not requested, the context never has path rendering support.
+DEF_GPUTEST(GrContextFactory_NoPathRenderingIfNVPRDisabled, reporter, /*factory*/) {
+ // Test that if NVPR is explicitly disabled, the context has no path rendering support.
GrContextFactory testFactory;
for (int i = 0; i <= GrContextFactory::kLastContextType; ++i) {
GrContextFactory::ContextType ctxType = (GrContextFactory::ContextType)i;
- GrContext* context = testFactory.get(ctxType);
+ GrContext* context =
+ testFactory.get(ctxType, GrContextFactory::ContextOverrides::kDisableNVPR);
if (context) {
REPORTER_ASSERT(
reporter,
@@ -57,7 +58,7 @@ DEF_GPUTEST(GrContextFactory_RequiredSRGBSupport, reporter, /*factory*/) {
for (int i = 0; i < GrContextFactory::kContextTypeCnt; ++i) {
GrContextFactory::ContextType ctxType = static_cast<GrContextFactory::ContextType>(i);
GrContext* context =
- testFactory.get(ctxType, GrContextFactory::ContextOptions::kRequireSRGBSupport);
+ testFactory.get(ctxType, GrContextFactory::ContextOverrides::kRequireSRGBSupport);
if (context) {
REPORTER_ASSERT(reporter, context->caps()->srgbSupport());