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

Side by Side Diff: gm/yuvtorgbeffect.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/texturedomaineffect.cpp ('k') | no next file » | 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 59 }
60 } 60 }
61 61
62 void onDraw(SkCanvas* canvas) SK_OVERRIDE { 62 void onDraw(SkCanvas* canvas) SK_OVERRIDE {
63 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget (); 63 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget ();
64 if (NULL == rt) { 64 if (NULL == rt) {
65 return; 65 return;
66 } 66 }
67 GrContext* context = rt->getContext(); 67 GrContext* context = rt->getContext();
68 if (NULL == context) { 68 if (NULL == context) {
69 this->drawGpuOnlyMessage(canvas);
69 return; 70 return;
70 } 71 }
71 72
72 GrTestTarget tt; 73 GrTestTarget tt;
73 context->getTestTarget(&tt); 74 context->getTestTarget(&tt);
74 if (NULL == tt.target()) { 75 if (NULL == tt.target()) {
75 SkDEBUGFAIL("Couldn't get Gr test target."); 76 SkDEBUGFAIL("Couldn't get Gr test target.");
76 return; 77 return;
77 } 78 }
78 79
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 private: 125 private:
125 SkBitmap fBmp[3]; 126 SkBitmap fBmp[3];
126 127
127 typedef GM INHERITED; 128 typedef GM INHERITED;
128 }; 129 };
129 130
130 DEF_GM( return SkNEW(YUVtoRGBEffect); ) 131 DEF_GM( return SkNEW(YUVtoRGBEffect); )
131 } 132 }
132 133
133 #endif 134 #endif
OLDNEW
« no previous file with comments | « gm/texturedomaineffect.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698