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

Side by Side Diff: src/gpu/effects/GrMatrixConvolutionEffect.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/GrDitherEffect.cpp ('k') | src/gpu/effects/GrOvalEffect.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 2014 Google Inc. 2 * Copyright 2014 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 #include "GrMatrixConvolutionEffect.h" 7 #include "GrMatrixConvolutionEffect.h"
8 #include "gl/GrGLProcessor.h" 8 #include "gl/GrGLProcessor.h"
9 #include "gl/GrGLSL.h" 9 #include "gl/GrGLSL.h"
10 #include "gl/GrGLTexture.h" 10 #include "gl/GrGLTexture.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 bias, 232 bias,
233 kernelOffset, 233 kernelOffset,
234 tileMode, 234 tileMode,
235 convolveAlpha)); 235 convolveAlpha));
236 } 236 }
237 237
238 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrMatrixConvolutionEffect); 238 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrMatrixConvolutionEffect);
239 239
240 GrFragmentProcessor* GrMatrixConvolutionEffect::TestCreate(SkRandom* random, 240 GrFragmentProcessor* GrMatrixConvolutionEffect::TestCreate(SkRandom* random,
241 GrContext* context, 241 GrContext* context,
242 const GrDrawTargetCap s&, 242 const GrCaps&,
243 GrTexture* textures[] ) { 243 GrTexture* textures[] ) {
244 int texIdx = random->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : 244 int texIdx = random->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx :
245 GrProcessorUnitTest::kAlphaTextureIdx; 245 GrProcessorUnitTest::kAlphaTextureIdx;
246 int width = random->nextRangeU(1, MAX_KERNEL_SIZE); 246 int width = random->nextRangeU(1, MAX_KERNEL_SIZE);
247 int height = random->nextRangeU(1, MAX_KERNEL_SIZE / width); 247 int height = random->nextRangeU(1, MAX_KERNEL_SIZE / width);
248 SkISize kernelSize = SkISize::Make(width, height); 248 SkISize kernelSize = SkISize::Make(width, height);
249 SkAutoTDeleteArray<SkScalar> kernel(new SkScalar[width * height]); 249 SkAutoTDeleteArray<SkScalar> kernel(new SkScalar[width * height]);
250 for (int i = 0; i < width * height; i++) { 250 for (int i = 0; i < width * height; i++) {
251 kernel.get()[i] = random->nextSScalar1(); 251 kernel.get()[i] = random->nextSScalar1();
252 } 252 }
(...skipping 10 matching lines...) Expand all
263 return GrMatrixConvolutionEffect::Create(textures[texIdx], 263 return GrMatrixConvolutionEffect::Create(textures[texIdx],
264 bounds, 264 bounds,
265 kernelSize, 265 kernelSize,
266 kernel.get(), 266 kernel.get(),
267 gain, 267 gain,
268 bias, 268 bias,
269 kernelOffset, 269 kernelOffset,
270 tileMode, 270 tileMode,
271 convolveAlpha); 271 convolveAlpha);
272 } 272 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrDitherEffect.cpp ('k') | src/gpu/effects/GrOvalEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698