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

Unified Diff: gm/rrects.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/gm.cpp ('k') | gm/texdata.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/rrects.cpp
diff --git a/gm/rrects.cpp b/gm/rrects.cpp
index 046e5e624aa6d0f6d1d3b1033fcca8d17644e1c7..4b8e7648f72c23603d24353c4fb078457d5ba374 100644
--- a/gm/rrects.cpp
+++ b/gm/rrects.cpp
@@ -57,13 +57,15 @@ protected:
SkISize onISize() SK_OVERRIDE { return SkISize::Make(kImageWidth, kImageHeight); }
void onDraw(SkCanvas* canvas) SK_OVERRIDE {
+ GrContext* context = NULL;
#if SK_SUPPORT_GPU
GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget();
- GrContext* context = rt ? rt->getContext() : NULL;
+ context = rt ? rt->getContext() : NULL;
+#endif
if (kEffect_Type == fType && NULL == context) {
+ this->drawGpuOnlyMessage(canvas);
return;
}
-#endif
SkPaint paint;
if (kAA_Draw_Type == fType) {
« no previous file with comments | « gm/gm.cpp ('k') | gm/texdata.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698