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

Unified Diff: dm/DM.cpp

Issue 1448883002: Make NVPR a GL context option instead of a GL context (Closed) Base URL: https://skia.googlesource.com/skia.git@commandbuffer-as-api-02-other-tests-refactor
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: dm/DM.cpp
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 7497161369b42788dac022dc8f9eedb534801135..6549af5a0fdb3ddc606191d4c736238fbf1a7963 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -609,8 +609,8 @@ static Sink* create_sink(const char* tag) {
SINK("gpudft", GPUSink, Gr::kNative_GLContextType, api, 0, true, FLAGS_gpu_threading);
SINK("msaa4", GPUSink, Gr::kNative_GLContextType, api, 4, false, FLAGS_gpu_threading);
SINK("msaa16", GPUSink, Gr::kNative_GLContextType, api, 16, false, FLAGS_gpu_threading);
- SINK("nvprmsaa4", GPUSink, Gr::kNVPR_GLContextType, api, 4, true, FLAGS_gpu_threading);
- SINK("nvprmsaa16", GPUSink, Gr::kNVPR_GLContextType, api, 16, true, FLAGS_gpu_threading);
+ SINK("nvprmsaa4", GPUSink, Gr::kNative_GLContextType, Gr::kEnableNVPR_GLContextOptions, api, 4, true, FLAGS_gpu_threading);
+ SINK("nvprmsaa16", GPUSink, Gr::kNative_GLContextType, Gr::kEnableNVPR_GLContextOptions, api, 16, true, FLAGS_gpu_threading);
#if SK_ANGLE
SINK("angle", GPUSink, Gr::kANGLE_GLContextType, api, 0, false, FLAGS_gpu_threading);
SINK("angle-gl", GPUSink, Gr::kANGLE_GL_GLContextType, api, 0, false, FLAGS_gpu_threading);
@@ -1171,6 +1171,7 @@ template<typename T>
void RunWithGPUTestContexts(T test, GPUTestContexts testContexts, Reporter* reporter,
GrContextFactory* factory) {
#if SK_SUPPORT_GPU
+ const GrGLStandard api = get_gpu_api();
for (int i = 0; i < GrContextFactory::kGLContextTypeCnt; ++i) {
GrContextFactory::GLContextType glCtxType = (GrContextFactory::GLContextType) i;
int contextSelector = kNone_GPUTestContexts;
@@ -1186,7 +1187,12 @@ void RunWithGPUTestContexts(T test, GPUTestContexts testContexts, Reporter* repo
if ((testContexts & contextSelector) == 0) {
continue;
}
- if (GrContextFactory::ContextInfo* context = factory->getContextInfo(glCtxType)) {
+ if (GrContextFactory::ContextInfo* context = factory->getContextInfo(glCtxType, api)) {
+ call_test(test, reporter, context);
+ }
+ if (GrContextFactory::ContextInfo* context =
+ factory->getContextInfo(glCtxType, api,
+ GrContextFactory::kEnableNVPR_GLContextOptions)) {
call_test(test, reporter, context);
}
}
« no previous file with comments | « bench/nanobench.cpp ('k') | dm/DMGpuSupport.h » ('j') | src/gpu/GrContextFactory.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698