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

Side by Side Diff: gm/beziereffects.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 | « no previous file | gm/convexpolyeffect.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 2013 Google Inc. 3 * Copyright 2013 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 30 matching lines...) Expand all
41 } 41 }
42 42
43 SkISize onISize() SK_OVERRIDE { 43 SkISize onISize() SK_OVERRIDE {
44 return SkISize::Make(800, 800); 44 return SkISize::Make(800, 800);
45 } 45 }
46 46
47 47
48 void onDraw(SkCanvas* canvas) SK_OVERRIDE { 48 void onDraw(SkCanvas* canvas) SK_OVERRIDE {
49 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget (); 49 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget ();
50 if (NULL == rt) { 50 if (NULL == rt) {
51 this->drawGpuOnlyMessage(canvas);
51 return; 52 return;
52 } 53 }
53 GrContext* context = rt->getContext(); 54 GrContext* context = rt->getContext();
54 if (NULL == context) { 55 if (NULL == context) {
55 return; 56 return;
56 } 57 }
57 58
58 struct Vertex { 59 struct Vertex {
59 SkPoint fPosition; 60 SkPoint fPosition;
60 float fKLM[4]; // The last value is ignored. The effect expects a vec4f. 61 float fKLM[4]; // The last value is ignored. The effect expects a vec4f.
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 197 }
197 198
198 SkISize onISize() SK_OVERRIDE { 199 SkISize onISize() SK_OVERRIDE {
199 return SkISize::Make(800, 800); 200 return SkISize::Make(800, 800);
200 } 201 }
201 202
202 203
203 void onDraw(SkCanvas* canvas) SK_OVERRIDE { 204 void onDraw(SkCanvas* canvas) SK_OVERRIDE {
204 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget (); 205 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget ();
205 if (NULL == rt) { 206 if (NULL == rt) {
207 this->drawGpuOnlyMessage(canvas);
206 return; 208 return;
207 } 209 }
208 GrContext* context = rt->getContext(); 210 GrContext* context = rt->getContext();
209 if (NULL == context) { 211 if (NULL == context) {
210 return; 212 return;
211 } 213 }
212 214
213 struct Vertex { 215 struct Vertex {
214 SkPoint fPosition; 216 SkPoint fPosition;
215 float fKLM[4]; // The last value is ignored. The effect expects a vec4f. 217 float fKLM[4]; // The last value is ignored. The effect expects a vec4f.
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 } 386 }
385 387
386 SkISize onISize() SK_OVERRIDE { 388 SkISize onISize() SK_OVERRIDE {
387 return SkISize::Make(800, 800); 389 return SkISize::Make(800, 800);
388 } 390 }
389 391
390 392
391 void onDraw(SkCanvas* canvas) SK_OVERRIDE { 393 void onDraw(SkCanvas* canvas) SK_OVERRIDE {
392 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget (); 394 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget ();
393 if (NULL == rt) { 395 if (NULL == rt) {
396 this->drawGpuOnlyMessage(canvas);
394 return; 397 return;
395 } 398 }
396 GrContext* context = rt->getContext(); 399 GrContext* context = rt->getContext();
397 if (NULL == context) { 400 if (NULL == context) {
398 return; 401 return;
399 } 402 }
400 403
401 struct Vertex { 404 struct Vertex {
402 SkPoint fPosition; 405 SkPoint fPosition;
403 float fUV[4]; // The last two values are ignored. The effect expec ts a vec4f. 406 float fUV[4]; // The last two values are ignored. The effect expec ts a vec4f.
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 typedef GM INHERITED; 515 typedef GM INHERITED;
513 }; 516 };
514 517
515 DEF_GM( return SkNEW(BezierCubicEffects); ) 518 DEF_GM( return SkNEW(BezierCubicEffects); )
516 DEF_GM( return SkNEW(BezierConicEffects); ) 519 DEF_GM( return SkNEW(BezierConicEffects); )
517 DEF_GM( return SkNEW(BezierQuadEffects); ) 520 DEF_GM( return SkNEW(BezierQuadEffects); )
518 521
519 } 522 }
520 523
521 #endif 524 #endif
OLDNEW
« no previous file with comments | « no previous file | gm/convexpolyeffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698