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

Side by Side Diff: gm/yuvtorgbeffect.cpp

Issue 1225923010: Refugee from Dead Machine 4: MDB Monster Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Last update from dead machine Created 4 years, 7 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/libjpeg-turbo.gyp » ('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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 const int indices[6][3] = {{0, 1, 2}, {0, 2, 1}, {1, 0, 2}, 113 const int indices[6][3] = {{0, 1, 2}, {0, 2, 1}, {1, 0, 2},
114 {1, 2, 0}, {2, 0, 1}, {2, 1, 0}}; 114 {1, 2, 0}, {2, 0, 1}, {2, 1, 0}};
115 115
116 for (int i = 0; i < 6; ++i) { 116 for (int i = 0; i < 6; ++i) {
117 GrPipelineBuilder pipelineBuilder; 117 GrPipelineBuilder pipelineBuilder;
118 SkAutoTUnref<GrFragmentProcessor> fp( 118 SkAutoTUnref<GrFragmentProcessor> fp(
119 GrYUVtoRGBEffect::Create(texture[indices[i][0]], 119 GrYUVtoRGBEffect::Create(texture[indices[i][0]],
120 texture[indices[i][1]], 120 texture[indices[i][1]],
121 texture[indices[i][2]], 121 texture[indices[i][2]],
122 sizes, 122 sizes,
123 static_cast<SkYUVColorSpace >(space))); 123 static_cast<SkYUVColorSpace >(space), rt));
124 if (fp) { 124 if (fp) {
125 SkMatrix viewMatrix; 125 SkMatrix viewMatrix;
126 viewMatrix.setTranslate(x, y); 126 viewMatrix.setTranslate(x, y);
127 pipelineBuilder.setRenderTarget(rt); 127 pipelineBuilder.setRenderTarget(rt);
128 pipelineBuilder.addColorFragmentProcessor(fp); 128 pipelineBuilder.addColorFragmentProcessor(fp);
129 tt.target()->drawNonAARect(pipelineBuilder, 129 tt.target()->drawNonAARect(pipelineBuilder,
130 GrColor_WHITE, 130 GrColor_WHITE,
131 viewMatrix, 131 viewMatrix,
132 renderRect); 132 renderRect);
133 } 133 }
134 x += renderRect.width() + kTestPad; 134 x += renderRect.width() + kTestPad;
135 } 135 }
136 } 136 }
137 } 137 }
138 138
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') | gyp/libjpeg-turbo.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698