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

Side by Side Diff: src/effects/SkMatrixConvolutionImageFilter.cpp

Issue 1228683002: rename GrShaderDataManager -> GrProcessorDataManager (Closed) Base URL: https://skia.googlesource.com/skia.git@grfixuptests
Patch Set: rebase onto origin/master Created 5 years, 5 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/effects/SkMagnifierImageFilter.cpp ('k') | src/effects/SkPerlinNoiseShader.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 The Android Open Source Project 2 * Copyright 2012 The Android Open Source Project
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 "SkMatrixConvolutionImageFilter.h" 8 #include "SkMatrixConvolutionImageFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 return GrTextureDomain::kRepeat_Mode; 341 return GrTextureDomain::kRepeat_Mode;
342 case SkMatrixConvolutionImageFilter::kClampToBlack_TileMode: 342 case SkMatrixConvolutionImageFilter::kClampToBlack_TileMode:
343 return GrTextureDomain::kDecal_Mode; 343 return GrTextureDomain::kDecal_Mode;
344 default: 344 default:
345 SkASSERT(false); 345 SkASSERT(false);
346 } 346 }
347 return GrTextureDomain::kIgnore_Mode; 347 return GrTextureDomain::kIgnore_Mode;
348 } 348 }
349 349
350 bool SkMatrixConvolutionImageFilter::asFragmentProcessor(GrFragmentProcessor** f p, 350 bool SkMatrixConvolutionImageFilter::asFragmentProcessor(GrFragmentProcessor** f p,
351 GrShaderDataManager*, 351 GrProcessorDataManager* ,
352 GrTexture* texture, 352 GrTexture* texture,
353 const SkMatrix&, 353 const SkMatrix&,
354 const SkIRect& bounds) const { 354 const SkIRect& bounds) const {
355 if (!fp) { 355 if (!fp) {
356 return fKernelSize.width() * fKernelSize.height() <= MAX_KERNEL_SIZE; 356 return fKernelSize.width() * fKernelSize.height() <= MAX_KERNEL_SIZE;
357 } 357 }
358 SkASSERT(fKernelSize.width() * fKernelSize.height() <= MAX_KERNEL_SIZE); 358 SkASSERT(fKernelSize.width() * fKernelSize.height() <= MAX_KERNEL_SIZE);
359 *fp = GrMatrixConvolutionEffect::Create(texture, 359 *fp = GrMatrixConvolutionEffect::Create(texture,
360 bounds, 360 bounds,
361 fKernelSize, 361 fKernelSize,
(...skipping 16 matching lines...) Expand all
378 str->appendf("%f ", fKernel[y * fKernelSize.width() + x]); 378 str->appendf("%f ", fKernel[y * fKernelSize.width() + x]);
379 } 379 }
380 } 380 }
381 str->appendf(")"); 381 str->appendf(")");
382 str->appendf("gain: %f bias: %f ", fGain, fBias); 382 str->appendf("gain: %f bias: %f ", fGain, fBias);
383 str->appendf("offset: (%d, %d) ", fKernelOffset.fX, fKernelOffset.fY); 383 str->appendf("offset: (%d, %d) ", fKernelOffset.fX, fKernelOffset.fY);
384 str->appendf("convolveAlpha: %s", fConvolveAlpha ? "true" : "false"); 384 str->appendf("convolveAlpha: %s", fConvolveAlpha ? "true" : "false");
385 str->append(")"); 385 str->append(")");
386 } 386 }
387 #endif 387 #endif
OLDNEW
« no previous file with comments | « src/effects/SkMagnifierImageFilter.cpp ('k') | src/effects/SkPerlinNoiseShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698