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

Side by Side Diff: gm/texturedomaineffect.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/texdata.cpp ('k') | gm/yuvtorgbeffect.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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 fBmp.width() + 10.f, fBmp.height() + 10 .f), paint); 68 fBmp.width() + 10.f, fBmp.height() + 10 .f), paint);
69 } 69 }
70 70
71 void onDraw(SkCanvas* canvas) SK_OVERRIDE { 71 void onDraw(SkCanvas* canvas) SK_OVERRIDE {
72 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget (); 72 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget ();
73 if (NULL == rt) { 73 if (NULL == rt) {
74 return; 74 return;
75 } 75 }
76 GrContext* context = rt->getContext(); 76 GrContext* context = rt->getContext();
77 if (NULL == context) { 77 if (NULL == context) {
78 this->drawGpuOnlyMessage(canvas);
78 return; 79 return;
79 } 80 }
80 81
81 GrTestTarget tt; 82 GrTestTarget tt;
82 context->getTestTarget(&tt); 83 context->getTestTarget(&tt);
83 if (NULL == tt.target()) { 84 if (NULL == tt.target()) {
84 SkDEBUGFAIL("Couldn't get Gr test target."); 85 SkDEBUGFAIL("Couldn't get Gr test target.");
85 return; 86 return;
86 } 87 }
87 88
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 }; 150 };
150 151
151 // Windows builds did not like SkScalar initialization in class :( 152 // Windows builds did not like SkScalar initialization in class :(
152 const SkScalar TextureDomainEffect::kDrawPad = 10.f; 153 const SkScalar TextureDomainEffect::kDrawPad = 10.f;
153 const SkScalar TextureDomainEffect::kTestPad = 10.f; 154 const SkScalar TextureDomainEffect::kTestPad = 10.f;
154 155
155 DEF_GM( return SkNEW(TextureDomainEffect); ) 156 DEF_GM( return SkNEW(TextureDomainEffect); )
156 } 157 }
157 158
158 #endif 159 #endif
OLDNEW
« no previous file with comments | « gm/texdata.cpp ('k') | gm/yuvtorgbeffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698