diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-03-07 18:41:14 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-03-07 18:41:14 +0000 |
commit | 0fd5270ad69f5b99852d544158c989d2deda2c11 (patch) | |
tree | 4cdaaff403441de74bfc0d17c331f4567a640fcf /tools | |
parent | dec0065e098e1f1c002e9d476718760ced6395ff (diff) |
Add nvprmsaa4 and nvprmsaa16 configs to bench_pictures
Add nvprmsaa4 and nvprmsaa16 configs to bench_pictures.
R=bsalomon@google.com
Author: kkinnunen@nvidia.com
Review URL: https://codereview.chromium.org/189263012
git-svn-id: http://skia.googlecode.com/svn/trunk@13708 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools')
-rw-r--r-- | tools/PictureRenderer.cpp | 3 | ||||
-rw-r--r-- | tools/PictureRenderer.h | 11 | ||||
-rw-r--r-- | tools/PictureRenderingFlags.cpp | 18 |
3 files changed, 30 insertions, 2 deletions
diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp index 6d9ce62df9..35b1b6166d 100644 --- a/tools/PictureRenderer.cpp +++ b/tools/PictureRenderer.cpp @@ -152,7 +152,8 @@ SkCanvas* PictureRenderer::setupCanvas(int width, int height) { case kMesa_DeviceType: // fall through #endif - case kGPU_DeviceType: { + case kGPU_DeviceType: + case kNVPR_DeviceType: { SkAutoTUnref<GrSurface> target; if (fGrContext) { // create a render target to back the device diff --git a/tools/PictureRenderer.h b/tools/PictureRenderer.h index 67392774ba..5d30e5b733 100644 --- a/tools/PictureRenderer.h +++ b/tools/PictureRenderer.h @@ -75,6 +75,7 @@ public: kBitmap_DeviceType, #if SK_SUPPORT_GPU kGPU_DeviceType, + kNVPR_DeviceType, #endif }; @@ -176,6 +177,9 @@ public: case kGPU_DeviceType: // Already set to GrContextFactory::kNative_GLContextType, above. break; + case kNVPR_DeviceType: + glContextType = GrContextFactory::kNVPR_GLContextType; + break; #if SK_ANGLE case kAngle_DeviceType: glContextType = GrContextFactory::kANGLE_GLContextType; @@ -262,6 +266,9 @@ public: config.append("_gpu"); } break; + case kNVPR_DeviceType: + config.appendf("_nvprmsaa%d", fSampleCount); + break; #if SK_ANGLE case kAngle_DeviceType: config.append("_angle"); @@ -285,6 +292,7 @@ public: bool isUsingGpuDevice() { switch (fDeviceType) { case kGPU_DeviceType: + case kNVPR_DeviceType: // fall through #if SK_ANGLE case kAngle_DeviceType: @@ -306,6 +314,9 @@ public: case kGPU_DeviceType: glContextType = GrContextFactory::kNative_GLContextType; break; + case kNVPR_DeviceType: + glContextType = GrContextFactory::kNVPR_GLContextType; + break; #if SK_ANGLE case kAngle_DeviceType: glContextType = GrContextFactory::kANGLE_GLContextType; diff --git a/tools/PictureRenderingFlags.cpp b/tools/PictureRenderingFlags.cpp index c5226534d5..0c4bc75fa0 100644 --- a/tools/PictureRenderingFlags.cpp +++ b/tools/PictureRenderingFlags.cpp @@ -26,7 +26,7 @@ DEFINE_string(bbh, "none", "bbhType [width height]: Set the bounding box hierarc #if SK_SUPPORT_GPU -#define GPU_CONFIG_STRING "|gpu|msaa4|msaa16" +#define GPU_CONFIG_STRING "|gpu|msaa4|msaa16|nvprmsaa4|nvprmsaa16" #else #define GPU_CONFIG_STRING "" #endif @@ -289,6 +289,22 @@ sk_tools::PictureRenderer* parseRenderer(SkString& error, PictureTool tool) { } sampleCount = 16; } + else if (0 == strcmp(FLAGS_config[0], "nvprmsaa4")) { + deviceType = sk_tools::PictureRenderer::kNVPR_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], "nvprmsaa16")) { + deviceType = sk_tools::PictureRenderer::kNVPR_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; |