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

Side by Side Diff: gm/yuvtorgbeffect.cpp

Issue 858343002: Rename GrOptDrawState to GrPipeline and GrDrawState to GrPipelineBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more nits Created 5 years, 11 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') | gyp/gpu.gypi » ('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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 for (int i = 0; i < 6; ++i) { 109 for (int i = 0; i < 6; ++i) {
110 SkAutoTUnref<GrFragmentProcessor> fp( 110 SkAutoTUnref<GrFragmentProcessor> fp(
111 GrYUVtoRGBEffect::Create(texture[indices[i][0]], 111 GrYUVtoRGBEffect::Create(texture[indices[i][0]],
112 texture[indices[i][1]], 112 texture[indices[i][1]],
113 texture[indices[i][2]], 113 texture[indices[i][2]],
114 static_cast<SkYUVColorSpace> (space))); 114 static_cast<SkYUVColorSpace> (space)));
115 if (fp) { 115 if (fp) {
116 SkMatrix viewMatrix; 116 SkMatrix viewMatrix;
117 viewMatrix.setTranslate(x, y); 117 viewMatrix.setTranslate(x, y);
118 GrDrawState drawState; 118 GrPipelineBuilder pipelineBuilder;
119 drawState.setRenderTarget(rt); 119 pipelineBuilder.setRenderTarget(rt);
120 drawState.addColorProcessor(fp); 120 pipelineBuilder.addColorProcessor(fp);
121 tt.target()->drawSimpleRect(&drawState, GrColor_WHITE, viewM atrix, renderRect); 121 tt.target()->drawSimpleRect(&pipelineBuilder, GrColor_WHITE, viewMatrix,
122 renderRect);
122 } 123 }
123 x += renderRect.width() + kTestPad; 124 x += renderRect.width() + kTestPad;
124 } 125 }
125 } 126 }
126 } 127 }
127 128
128 private: 129 private:
129 SkBitmap fBmp[3]; 130 SkBitmap fBmp[3];
130 131
131 typedef GM INHERITED; 132 typedef GM INHERITED;
132 }; 133 };
133 134
134 DEF_GM( return SkNEW(YUVtoRGBEffect); ) 135 DEF_GM( return SkNEW(YUVtoRGBEffect); )
135 } 136 }
136 137
137 #endif 138 #endif
OLDNEW
« no previous file with comments | « gm/texturedomaineffect.cpp ('k') | gyp/gpu.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698