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

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

Issue 582963002: Solo gp (Closed) Base URL: https://skia.googlesource.com/skia.git@no_peb
Patch Set: rebase 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 | « src/effects/SkMagnifierImageFilter.cpp ('k') | src/effects/SkMorphologyImageFilter.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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 case SkMatrixConvolutionImageFilter::kRepeat_TileMode: 356 case SkMatrixConvolutionImageFilter::kRepeat_TileMode:
357 return GrTextureDomain::kRepeat_Mode; 357 return GrTextureDomain::kRepeat_Mode;
358 case SkMatrixConvolutionImageFilter::kClampToBlack_TileMode: 358 case SkMatrixConvolutionImageFilter::kClampToBlack_TileMode:
359 return GrTextureDomain::kDecal_Mode; 359 return GrTextureDomain::kDecal_Mode;
360 default: 360 default:
361 SkASSERT(false); 361 SkASSERT(false);
362 } 362 }
363 return GrTextureDomain::kIgnore_Mode; 363 return GrTextureDomain::kIgnore_Mode;
364 } 364 }
365 365
366 bool SkMatrixConvolutionImageFilter::asNewEffect(GrEffect** effect, 366 bool SkMatrixConvolutionImageFilter::asFragmentProcessor(GrFragmentProcessor** f p,
367 GrTexture* texture, 367 GrTexture* texture,
368 const SkMatrix&, 368 const SkMatrix&,
369 const SkIRect& bounds) const { 369 const SkIRect& bounds) const {
370 if (!effect) { 370 if (!fp) {
371 return fKernelSize.width() * fKernelSize.height() <= MAX_KERNEL_SIZE; 371 return fKernelSize.width() * fKernelSize.height() <= MAX_KERNEL_SIZE;
372 } 372 }
373 SkASSERT(fKernelSize.width() * fKernelSize.height() <= MAX_KERNEL_SIZE); 373 SkASSERT(fKernelSize.width() * fKernelSize.height() <= MAX_KERNEL_SIZE);
374 *effect = GrMatrixConvolutionEffect::Create(texture, 374 *fp = GrMatrixConvolutionEffect::Create(texture,
375 bounds, 375 bounds,
376 fKernelSize, 376 fKernelSize,
377 fKernel, 377 fKernel,
378 fGain, 378 fGain,
379 fBias, 379 fBias,
380 fKernelOffset, 380 fKernelOffset,
381 convert_tilemodes(fTileMode), 381 convert_tilemodes(fTileMode),
382 fConvolveAlpha); 382 fConvolveAlpha);
383 return true; 383 return true;
384 } 384 }
385 #endif 385 #endif
OLDNEW
« no previous file with comments | « src/effects/SkMagnifierImageFilter.cpp ('k') | src/effects/SkMorphologyImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698