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

Side by Side Diff: gm/convexpolyeffect.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, 10 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 unified diff | Download patch
« no previous file with comments | « gm/beziereffects.cpp ('k') | gm/dcshader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 // This test only works with the GPU backend. 9 // This test only works with the GPU backend.
10 10
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 fRects.addToTail(SkRect::MakeLTRB(5.5f, .05f, 29.5f, .25f)); 88 fRects.addToTail(SkRect::MakeLTRB(5.5f, .05f, 29.5f, .25f));
89 // small in x and y 89 // small in x and y
90 fRects.addToTail(SkRect::MakeLTRB(5.05f, .55f, 5.45f, .85f)); 90 fRects.addToTail(SkRect::MakeLTRB(5.05f, .55f, 5.45f, .85f));
91 // inverted in x and y 91 // inverted in x and y
92 fRects.addToTail(SkRect::MakeLTRB(100.f, 50.5f, 5.f, 0.5f)); 92 fRects.addToTail(SkRect::MakeLTRB(100.f, 50.5f, 5.f, 0.5f));
93 } 93 }
94 94
95 void onDraw(SkCanvas* canvas) SK_OVERRIDE { 95 void onDraw(SkCanvas* canvas) SK_OVERRIDE {
96 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget (); 96 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget ();
97 if (NULL == rt) { 97 if (NULL == rt) {
98 this->drawGpuOnlyMessage(canvas);
98 return; 99 return;
99 } 100 }
100 GrContext* context = rt->getContext(); 101 GrContext* context = rt->getContext();
101 if (NULL == context) { 102 if (NULL == context) {
102 return; 103 return;
103 } 104 }
104 105
105 SkScalar y = 0; 106 SkScalar y = 0;
106 for (SkTLList<SkPath>::Iter iter(fPaths, SkTLList<SkPath>::Iter::kHead_I terStart); 107 for (SkTLList<SkPath>::Iter iter(fPaths, SkTLList<SkPath>::Iter::kHead_I terStart);
107 iter.get(); 108 iter.get();
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 SkTLList<SkPath> fPaths; 226 SkTLList<SkPath> fPaths;
226 SkTLList<SkRect> fRects; 227 SkTLList<SkRect> fRects;
227 228
228 typedef GM INHERITED; 229 typedef GM INHERITED;
229 }; 230 };
230 231
231 DEF_GM( return SkNEW(ConvexPolyEffect); ) 232 DEF_GM( return SkNEW(ConvexPolyEffect); )
232 } 233 }
233 234
234 #endif 235 #endif
OLDNEW
« no previous file with comments | « gm/beziereffects.cpp ('k') | gm/dcshader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698