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

Unified Diff: dm/DM.cpp

Issue 1513703002: Revert of 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
« no previous file with comments | « bench/nanobench.cpp ('k') | dm/DMGpuSupport.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DM.cpp
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 9adfa9b97239f6e9f21be095f25deaef1879af59..41e4c8dc3eae4a6c56b399bb963414b15f4c0197 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -537,13 +537,11 @@
}
}
-#if SK_SUPPORT_GPU
static GrGLStandard get_gpu_api() {
if (FLAGS_gpuAPI.contains("gl")) { return kGL_GrGLStandard; }
if (FLAGS_gpuAPI.contains("gles")) { return kGLES_GrGLStandard; }
return kNone_GrGLStandard;
}
-#endif
static void push_sink(const char* tag, Sink* s) {
SkAutoTDelete<Sink> sink(s);
@@ -581,14 +579,12 @@
return false;
#endif
}
-static Sink* create_gpu_sink(const char* tag, GrContextFactory::GLContextType contextType,
- GrContextFactory::GLContextOptions contextOptions, int samples,
- bool diText, bool threaded) {
+static Sink* create_gpu_sink(const char* tag, GrContextFactory::GLContextType contextType, int samples, bool diText, bool threaded) {
#if SK_SUPPORT_GPU
GrContextFactory testFactory;
const GrGLStandard api = get_gpu_api();
if (testFactory.get(contextType, api)) {
- return new GPUSink(contextType, contextOptions, api, samples, diText, threaded);
+ return new GPUSink(contextType, api, samples, diText, threaded);
}
SkDebugf("WARNING: can not create GPU context for config '%s'. GM tests will be skipped.\n", tag);
#endif
@@ -598,23 +594,23 @@
#define GPU_SINK(t, ...) if (0 == strcmp(t, tag)) { return create_gpu_sink(tag, __VA_ARGS__); }
if (gpu_supported()) {
typedef GrContextFactory Gr;
- GPU_SINK("gpunull", Gr::kNull_GLContextType, Gr::kNone_GLContextOptions, 0, false, FLAGS_gpu_threading);
- GPU_SINK("gpudebug", Gr::kDebug_GLContextType, Gr::kNone_GLContextOptions, 0, false, FLAGS_gpu_threading);
- GPU_SINK("gpu", Gr::kNative_GLContextType, Gr::kNone_GLContextOptions, 0, false, FLAGS_gpu_threading);
- GPU_SINK("gpudft", Gr::kNative_GLContextType, Gr::kNone_GLContextOptions, 0, true, FLAGS_gpu_threading);
- GPU_SINK("msaa4", Gr::kNative_GLContextType, Gr::kNone_GLContextOptions, 4, false, FLAGS_gpu_threading);
- GPU_SINK("msaa16", Gr::kNative_GLContextType, Gr::kNone_GLContextOptions, 16, false, FLAGS_gpu_threading);
- GPU_SINK("nvprmsaa4", Gr::kNative_GLContextType, Gr::kEnableNVPR_GLContextOptions, 4, true, FLAGS_gpu_threading);
- GPU_SINK("nvprmsaa16", Gr::kNative_GLContextType, Gr::kEnableNVPR_GLContextOptions, 16, true, FLAGS_gpu_threading);
+ GPU_SINK("gpunull", Gr::kNull_GLContextType, 0, false, FLAGS_gpu_threading);
+ GPU_SINK("gpudebug", Gr::kDebug_GLContextType, 0, false, FLAGS_gpu_threading);
+ GPU_SINK("gpu", Gr::kNative_GLContextType, 0, false, FLAGS_gpu_threading);
+ GPU_SINK("gpudft", Gr::kNative_GLContextType, 0, true, FLAGS_gpu_threading);
+ GPU_SINK("msaa4", Gr::kNative_GLContextType, 4, false, FLAGS_gpu_threading);
+ GPU_SINK("msaa16", Gr::kNative_GLContextType, 16, false, FLAGS_gpu_threading);
+ GPU_SINK("nvprmsaa4", Gr::kNVPR_GLContextType, 4, true, FLAGS_gpu_threading);
+ GPU_SINK("nvprmsaa16", Gr::kNVPR_GLContextType, 16, true, FLAGS_gpu_threading);
#if SK_ANGLE
- GPU_SINK("angle", Gr::kANGLE_GLContextType, Gr::kNone_GLContextOptions, 0, false, FLAGS_gpu_threading);
- GPU_SINK("angle-gl", Gr::kANGLE_GL_GLContextType, Gr::kNone_GLContextOptions, 0, false, FLAGS_gpu_threading);
+ GPU_SINK("angle", Gr::kANGLE_GLContextType, 0, false, FLAGS_gpu_threading);
+ GPU_SINK("angle-gl", Gr::kANGLE_GL_GLContextType, 0, false, FLAGS_gpu_threading);
#endif
#if SK_COMMAND_BUFFER
- GPU_SINK("commandbuffer", Gr::kCommandBuffer_GLContextType, Gr::kNone_GLContextOptions, 0, false, FLAGS_gpu_threading);
+ GPU_SINK("commandbuffer", Gr::kCommandBuffer_GLContextType, 0, false, FLAGS_gpu_threading);
#endif
#if SK_MESA
- GPU_SINK("mesa", Gr::kMESA_GLContextType, Gr::kNone_GLContextOptions, 0, false, FLAGS_gpu_threading);
+ GPU_SINK("mesa", Gr::kMESA_GLContextType, 0, false, FLAGS_gpu_threading);
#endif
}
#undef GPU_SINK
@@ -1168,7 +1164,6 @@
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;
@@ -1184,12 +1179,7 @@
if ((testContexts & contextSelector) == 0) {
continue;
}
- if (GrContextFactory::ContextInfo* context = factory->getContextInfo(glCtxType, api)) {
- call_test(test, reporter, context);
- }
- if (GrContextFactory::ContextInfo* context =
- factory->getContextInfo(glCtxType, api,
- GrContextFactory::kEnableNVPR_GLContextOptions)) {
+ if (GrContextFactory::ContextInfo* context = factory->getContextInfo(glCtxType)) {
call_test(test, reporter, context);
}
}
« no previous file with comments | « bench/nanobench.cpp ('k') | dm/DMGpuSupport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698