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

Unified Diff: tools/PictureRenderingFlags.cpp

Issue 14544007: Add msaa configs to bench_pictures (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Remove enum Created 7 years, 8 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.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/PictureRenderingFlags.cpp
===================================================================
--- tools/PictureRenderingFlags.cpp (revision 8891)
+++ tools/PictureRenderingFlags.cpp (working copy)
@@ -31,9 +31,9 @@
// consistent.
#if SK_ANGLE
// ANGLE assumes GPU
-DEFINE_string(config, "8888", "[8888|gpu|angle]: Use the corresponding config.");
+DEFINE_string(config, "8888", "[8888|gpu|msaa4|msaa16|angle]: Use the corresponding config.");
#elif SK_SUPPORT_GPU
-DEFINE_string(config, "8888", "[8888|gpu]: Use the corresponding config.");
+DEFINE_string(config, "8888", "[8888|gpu|msaa4|msaa16]: Use the corresponding config.");
#else
DEFINE_string(config, "8888", "[8888]: Use the corresponding config.");
#endif
@@ -252,6 +252,9 @@
sk_tools::PictureRenderer::SkDeviceTypes deviceType =
sk_tools::PictureRenderer::kBitmap_DeviceType;
+#if SK_SUPPORT_GPU
+ int sampleCount = 0;
+#endif
if (FLAGS_config.count() > 0) {
if (0 == strcmp(FLAGS_config[0], "8888")) {
deviceType = sk_tools::PictureRenderer::kBitmap_DeviceType;
@@ -264,6 +267,22 @@
return NULL;
}
}
+ else if (0 == strcmp(FLAGS_config[0], "msaa4")) {
+ deviceType = sk_tools::PictureRenderer::kGPU_DeviceType;
+ if (FLAGS_multi > 1) {
+ error.printf("GPU not compatible with multithreaded tiling.\n");
+ return NULL;
+ }
+ sampleCount = 4;
+ }
+ else if (0 == strcmp(FLAGS_config[0], "msaa16")) {
+ deviceType = sk_tools::PictureRenderer::kGPU_DeviceType;
+ if (FLAGS_multi > 1) {
+ error.printf("GPU not compatible with multithreaded tiling.\n");
+ return NULL;
+ }
+ sampleCount = 16;
+ }
#if SK_ANGLE
else if (0 == strcmp(FLAGS_config[0], "angle")) {
deviceType = sk_tools::PictureRenderer::kAngle_DeviceType;
@@ -279,6 +298,9 @@
return NULL;
}
renderer->setDeviceType(deviceType);
+#if SK_SUPPORT_GPU
+ renderer->setSampleCount(sampleCount);
+#endif
}
« no previous file with comments | « tools/PictureRenderer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698