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

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

Issue 20426002: Implement crop rect for lighting image filters. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Bugfix: set the bitmap's width and height to the bounds's width and height, Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/effects/SkMagnifierImageFilter.cpp ('k') | no next file » | 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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 kernelSize, 558 kernelSize,
559 kernel.get(), 559 kernel.get(),
560 gain, 560 gain,
561 bias, 561 bias,
562 target, 562 target,
563 tileMode, 563 tileMode,
564 convolveAlpha); 564 convolveAlpha);
565 } 565 }
566 566
567 bool SkMatrixConvolutionImageFilter::asNewEffect(GrEffectRef** effect, 567 bool SkMatrixConvolutionImageFilter::asNewEffect(GrEffectRef** effect,
568 GrTexture* texture) const { 568 GrTexture* texture,
569 const SkIPoint&) const {
569 if (!effect) { 570 if (!effect) {
570 return fKernelSize.width() * fKernelSize.height() <= MAX_KERNEL_SIZE; 571 return fKernelSize.width() * fKernelSize.height() <= MAX_KERNEL_SIZE;
571 } 572 }
572 SkASSERT(fKernelSize.width() * fKernelSize.height() <= MAX_KERNEL_SIZE); 573 SkASSERT(fKernelSize.width() * fKernelSize.height() <= MAX_KERNEL_SIZE);
573 *effect = GrMatrixConvolutionEffect::Create(texture, 574 *effect = GrMatrixConvolutionEffect::Create(texture,
574 fKernelSize, 575 fKernelSize,
575 fKernel, 576 fKernel,
576 fGain, 577 fGain,
577 fBias, 578 fBias,
578 fTarget, 579 fTarget,
579 fTileMode, 580 fTileMode,
580 fConvolveAlpha); 581 fConvolveAlpha);
581 return true; 582 return true;
582 } 583 }
583 584
584 /////////////////////////////////////////////////////////////////////////////// 585 ///////////////////////////////////////////////////////////////////////////////
585 586
586 #endif 587 #endif
OLDNEW
« no previous file with comments | « src/effects/SkMagnifierImageFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698