From e812d496aaa5e5e9f2117de8f442c297c9cb1367 Mon Sep 17 00:00:00 2001 From: csmartdalton Date: Tue, 21 Feb 2017 12:36:05 -0700 Subject: 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 Commit-Queue: Chris Dalton --- tests/GrContextFactoryTest.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'tests/GrContextFactoryTest.cpp') 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(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(i); GrContext* context = - testFactory.get(ctxType, GrContextFactory::ContextOptions::kRequireSRGBSupport); + testFactory.get(ctxType, GrContextFactory::ContextOverrides::kRequireSRGBSupport); if (context) { REPORTER_ASSERT(reporter, context->caps()->srgbSupport()); -- cgit v1.2.3