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

Side by Side Diff: gm/yuvtorgbeffect.cpp

Issue 543623004: Removing vertex attrib indices (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: warning fixed Created 6 years, 3 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 (effect) { 115 if (effect) {
116 SkMatrix viewMatrix; 116 SkMatrix viewMatrix;
117 viewMatrix.setTranslate(x, y); 117 viewMatrix.setTranslate(x, y);
118 drawState->reset(viewMatrix); 118 drawState->reset(viewMatrix);
119 drawState->setRenderTarget(rt); 119 drawState->setRenderTarget(rt);
120 drawState->setColor(0xffffffff); 120 drawState->setColor(0xffffffff);
121 drawState->addColorEffect(effect, 1); 121 drawState->addColorEffect(effect);
122 tt.target()->drawSimpleRect(renderRect); 122 tt.target()->drawSimpleRect(renderRect);
123 } 123 }
124 x += renderRect.width() + kTestPad; 124 x += renderRect.width() + kTestPad;
125 } 125 }
126 } 126 }
127 127
128 GrUnlockAndUnrefCachedBitmapTexture(texture[0]); 128 GrUnlockAndUnrefCachedBitmapTexture(texture[0]);
129 GrUnlockAndUnrefCachedBitmapTexture(texture[1]); 129 GrUnlockAndUnrefCachedBitmapTexture(texture[1]);
130 GrUnlockAndUnrefCachedBitmapTexture(texture[2]); 130 GrUnlockAndUnrefCachedBitmapTexture(texture[2]);
131 } 131 }
132 132
133 private: 133 private:
134 SkBitmap fBmp[3]; 134 SkBitmap fBmp[3];
135 135
136 typedef GM INHERITED; 136 typedef GM INHERITED;
137 }; 137 };
138 138
139 DEF_GM( return SkNEW(YUVtoRGBEffect); ) 139 DEF_GM( return SkNEW(YUVtoRGBEffect); )
140 } 140 }
141 141
142 #endif 142 #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