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

Side by Side Diff: gm/yuvtorgbeffect.cpp

Issue 1388113002: Bye bye processor data manager (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove files Created 5 years, 2 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 SkScalar y = kDrawPad + kTestPad + space * kColorSpaceOffset; 107 SkScalar y = kDrawPad + kTestPad + space * kColorSpaceOffset;
108 SkScalar x = kDrawPad + kTestPad; 108 SkScalar x = kDrawPad + kTestPad;
109 109
110 const int indices[6][3] = {{0, 1, 2}, {0, 2, 1}, {1, 0, 2}, 110 const int indices[6][3] = {{0, 1, 2}, {0, 2, 1}, {1, 0, 2},
111 {1, 2, 0}, {2, 0, 1}, {2, 1, 0}}; 111 {1, 2, 0}, {2, 0, 1}, {2, 1, 0}};
112 112
113 for (int i = 0; i < 6; ++i) { 113 for (int i = 0; i < 6; ++i) {
114 GrPipelineBuilder pipelineBuilder; 114 GrPipelineBuilder pipelineBuilder;
115 SkAutoTUnref<GrFragmentProcessor> fp( 115 SkAutoTUnref<GrFragmentProcessor> fp(
116 GrYUVtoRGBEffect::Create(pipelineBuilder.getProcesso rDataManager(), 116 GrYUVtoRGBEffect::Create(texture[indices[i][0]],
117 texture[indices[i][0]],
118 texture[indices[i][1]], 117 texture[indices[i][1]],
119 texture[indices[i][2]], 118 texture[indices[i][2]],
120 sizes, 119 sizes,
121 static_cast<SkYUVColorSpace >(space))); 120 static_cast<SkYUVColorSpace >(space)));
122 if (fp) { 121 if (fp) {
123 SkMatrix viewMatrix; 122 SkMatrix viewMatrix;
124 viewMatrix.setTranslate(x, y); 123 viewMatrix.setTranslate(x, y);
125 pipelineBuilder.setRenderTarget(rt); 124 pipelineBuilder.setRenderTarget(rt);
126 pipelineBuilder.addColorFragmentProcessor(fp); 125 pipelineBuilder.addColorFragmentProcessor(fp);
127 tt.target()->drawNonAARect(pipelineBuilder, 126 tt.target()->drawNonAARect(pipelineBuilder,
128 GrColor_WHITE, 127 GrColor_WHITE,
129 viewMatrix, 128 viewMatrix,
130 renderRect); 129 renderRect);
131 } 130 }
132 x += renderRect.width() + kTestPad; 131 x += renderRect.width() + kTestPad;
133 } 132 }
134 } 133 }
135 } 134 }
136 135
137 private: 136 private:
138 SkBitmap fBmp[3]; 137 SkBitmap fBmp[3];
139 138
140 typedef GM INHERITED; 139 typedef GM INHERITED;
141 }; 140 };
142 141
143 DEF_GM(return new YUVtoRGBEffect;) 142 DEF_GM(return new YUVtoRGBEffect;)
144 } 143 }
145 144
146 #endif 145 #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