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

Side by Side Diff: gm/yuvtorgbeffect.cpp

Issue 1447113002: Optionally pass rendertarget to getTestTarget (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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') | include/gpu/GrContext.h » ('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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 if (nullptr == rt) { 71 if (nullptr == rt) {
72 return; 72 return;
73 } 73 }
74 GrContext* context = rt->getContext(); 74 GrContext* context = rt->getContext();
75 if (nullptr == context) { 75 if (nullptr == context) {
76 skiagm::GM::DrawGpuOnlyMessage(canvas); 76 skiagm::GM::DrawGpuOnlyMessage(canvas);
77 return; 77 return;
78 } 78 }
79 79
80 GrTestTarget tt; 80 GrTestTarget tt;
81 context->getTestTarget(&tt); 81 context->getTestTarget(&tt, rt);
82 if (nullptr == tt.target()) { 82 if (nullptr == tt.target()) {
83 SkDEBUGFAIL("Couldn't get Gr test target."); 83 SkDEBUGFAIL("Couldn't get Gr test target.");
84 return; 84 return;
85 } 85 }
86 86
87 SkAutoTUnref<GrTexture> texture[3]; 87 SkAutoTUnref<GrTexture> texture[3];
88 texture[0].reset(GrRefCachedBitmapTexture(context, fBmp[0], 88 texture[0].reset(GrRefCachedBitmapTexture(context, fBmp[0],
89 GrTextureParams::ClampBilerp() )); 89 GrTextureParams::ClampBilerp() ));
90 texture[1].reset(GrRefCachedBitmapTexture(context, fBmp[1], 90 texture[1].reset(GrRefCachedBitmapTexture(context, fBmp[1],
91 GrTextureParams::ClampBilerp() )); 91 GrTextureParams::ClampBilerp() ));
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 private: 139 private:
140 SkBitmap fBmp[3]; 140 SkBitmap fBmp[3];
141 141
142 typedef GM INHERITED; 142 typedef GM INHERITED;
143 }; 143 };
144 144
145 DEF_GM(return new YUVtoRGBEffect;) 145 DEF_GM(return new YUVtoRGBEffect;)
146 } 146 }
147 147
148 #endif 148 #endif
OLDNEW
« no previous file with comments | « gm/texturedomaineffect.cpp ('k') | include/gpu/GrContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698