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

Unified Diff: tools/PictureRenderingFlags.cpp

Issue 351583002: Revert of Support using OpenGL ES context on desktop (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 months 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 | « tools/PictureRenderer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/PictureRenderingFlags.cpp
diff --git a/tools/PictureRenderingFlags.cpp b/tools/PictureRenderingFlags.cpp
index 4ffa16f12b80f0a57efdbf59a8c0cf30f54146a2..5acec267b075e8e71c84ea7e766c2ba5366c3172 100644
--- a/tools/PictureRenderingFlags.cpp
+++ b/tools/PictureRenderingFlags.cpp
@@ -26,8 +26,6 @@
#if SK_SUPPORT_GPU
-static const char kGpuAPINameGL[] = "gl";
-static const char kGpuAPINameGLES[] = "gles";
#define GPU_CONFIG_STRING "|gpu|msaa4|msaa16|nvprmsaa4|nvprmsaa16"
#else
#define GPU_CONFIG_STRING ""
@@ -76,12 +74,6 @@
DEFINE_string(tiles, "", "Used with --mode copyTile to specify number of tiles per larger tile "
"in the x and y directions.");
DEFINE_string(viewport, "", "width height: Set the viewport.");
-#if SK_SUPPORT_GPU
-DEFINE_string(gpuAPI, "", "Force use of specific gpu API. Using \"gl\" "
- "forces OpenGL API. Using \"gles\" forces OpenGL ES API. "
- "Defaults to empty string, which selects the API native to the "
- "system.");
-#endif
sk_tools::PictureRenderer* parseRenderer(SkString& error, PictureTool tool) {
error.reset();
@@ -269,21 +261,6 @@
sk_tools::PictureRenderer::SkDeviceTypes deviceType =
sk_tools::PictureRenderer::kBitmap_DeviceType;
#if SK_SUPPORT_GPU
- GrGLStandard gpuAPI = kNone_GrGLStandard;
- if (1 == FLAGS_gpuAPI.count()) {
- if (FLAGS_gpuAPI.contains(kGpuAPINameGL)) {
- gpuAPI = kGL_GrGLStandard;
- } else if (FLAGS_gpuAPI.contains(kGpuAPINameGLES)) {
- gpuAPI = kGLES_GrGLStandard;
- } else {
- error.printf("--gpuAPI invalid api value.\n");
- return NULL;
- }
- } else if (FLAGS_gpuAPI.count() > 1) {
- error.printf("--gpuAPI invalid api value.\n");
- return NULL;
- }
-
int sampleCount = 0;
#endif
if (FLAGS_config.count() > 0) {
@@ -353,14 +330,7 @@
error.printf("%s is not a valid mode for --config\n", FLAGS_config[0]);
return NULL;
}
-#if SK_SUPPORT_GPU
- if (!renderer->setDeviceType(deviceType, gpuAPI)) {
-#else
- if (!renderer->setDeviceType(deviceType)) {
-#endif
- error.printf("Could not create backend for --config %s\n", FLAGS_config[0]);
- return NULL;
- }
+ renderer->setDeviceType(deviceType);
#if SK_SUPPORT_GPU
renderer->setSampleCount(sampleCount);
#endif
« no previous file with comments | « tools/PictureRenderer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698