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

Unified Diff: gm/dcshader.cpp

Issue 869393007: Add standard way to indicate GM is GPU-only. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add include Created 5 years, 11 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 | « gm/convexpolyeffect.cpp ('k') | gm/gm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « gm/convexpolyeffect.cpp ('k') | gm/gm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698