Index: gm/dcshader.cpp |
diff --git a/gm/dcshader.cpp b/gm/dcshader.cpp |
index 1f5969bd3c6eefee456ea3d09bd565e076d9b25e..4b8f5eddc7492cf961b5d7e913fe20ab2145074a 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(); |