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

Side by Side Diff: src/gpu/effects/GrConvolutionEffect.cpp

Issue 1133123009: rename GrDrawTargetCaps to GrCaps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix gypi filename Created 5 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 | « src/gpu/effects/GrConvexPolyEffect.cpp ('k') | src/gpu/effects/GrCoverageSetOpXP.cpp » ('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 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrConvolutionEffect.h" 8 #include "GrConvolutionEffect.h"
9 #include "gl/GrGLProcessor.h" 9 #include "gl/GrGLProcessor.h"
10 #include "gl/GrGLSL.h" 10 #include "gl/GrGLSL.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 0 == memcmp(fBounds, s.fBounds, sizeof(fBounds)) && 213 0 == memcmp(fBounds, s.fBounds, sizeof(fBounds)) &&
214 0 == memcmp(fKernel, s.fKernel, this->width() * sizeof(float))); 214 0 == memcmp(fKernel, s.fKernel, this->width() * sizeof(float)));
215 } 215 }
216 216
217 /////////////////////////////////////////////////////////////////////////////// 217 ///////////////////////////////////////////////////////////////////////////////
218 218
219 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrConvolutionEffect); 219 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrConvolutionEffect);
220 220
221 GrFragmentProcessor* GrConvolutionEffect::TestCreate(SkRandom* random, 221 GrFragmentProcessor* GrConvolutionEffect::TestCreate(SkRandom* random,
222 GrContext*, 222 GrContext*,
223 const GrDrawTargetCaps&, 223 const GrCaps&,
224 GrTexture* textures[]) { 224 GrTexture* textures[]) {
225 int texIdx = random->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : 225 int texIdx = random->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx :
226 GrProcessorUnitTest::kAlphaTextureIdx; 226 GrProcessorUnitTest::kAlphaTextureIdx;
227 Direction dir = random->nextBool() ? kX_Direction : kY_Direction; 227 Direction dir = random->nextBool() ? kX_Direction : kY_Direction;
228 int radius = random->nextRangeU(1, kMaxKernelRadius); 228 int radius = random->nextRangeU(1, kMaxKernelRadius);
229 float kernel[kMaxKernelWidth]; 229 float kernel[kMaxKernelWidth];
230 for (size_t i = 0; i < SK_ARRAY_COUNT(kernel); ++i) { 230 for (size_t i = 0; i < SK_ARRAY_COUNT(kernel); ++i) {
231 kernel[i] = random->nextSScalar1(); 231 kernel[i] = random->nextSScalar1();
232 } 232 }
233 float bounds[2]; 233 float bounds[2];
234 for (size_t i = 0; i < SK_ARRAY_COUNT(bounds); ++i) { 234 for (size_t i = 0; i < SK_ARRAY_COUNT(bounds); ++i) {
235 bounds[i] = random->nextF(); 235 bounds[i] = random->nextF();
236 } 236 }
237 237
238 bool useBounds = random->nextBool(); 238 bool useBounds = random->nextBool();
239 return GrConvolutionEffect::Create(textures[texIdx], 239 return GrConvolutionEffect::Create(textures[texIdx],
240 dir, 240 dir,
241 radius, 241 radius,
242 kernel, 242 kernel,
243 useBounds, 243 useBounds,
244 bounds); 244 bounds);
245 } 245 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrConvexPolyEffect.cpp ('k') | src/gpu/effects/GrCoverageSetOpXP.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698