diff options
author | 2015-01-31 07:51:14 -0800 | |
---|---|---|
committer | 2015-01-31 07:51:14 -0800 | |
commit | b62da80cbf6643c1944d3ebf8df233f286bd3fde (patch) | |
tree | 5e2db72b1dd92cb067ab99d899fcfd7c559d0bcf /gm/dcshader.cpp | |
parent | 6bfef2dfec3253efa48aec0b5ea108e0dc041d15 (diff) |
Add standard way to indicate GM is GPU-only.
TBR=egdaniel@google.com,mtklein@google.com
Review URL: https://codereview.chromium.org/869393007
Diffstat (limited to 'gm/dcshader.cpp')
-rw-r--r-- | gm/dcshader.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gm/dcshader.cpp b/gm/dcshader.cpp index 1f5969bd3c..4b8f5eddc7 100644 --- a/gm/dcshader.cpp +++ b/gm/dcshader.cpp @@ -248,6 +248,12 @@ protected: } void onDraw(SkCanvas* canvas) SK_OVERRIDE { + // This GM exists to test a specific feature of the GPU backend. It does not work with the + // sw rasterizer, tile modes, etc. + if (NULL == canvas->getGrContext()) { + this->drawGpuOnlyMessage(canvas); + return; + } SkPaint paint; SkTArray<SkMatrix> devMats; devMats.push_back().reset(); |