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

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

Issue 23295017: In image filters, apply the CTM and offset to the crop rect. This is necessary to compensate for bo… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix documentation comment. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/effects/SkMagnifierImageFilter.cpp ('k') | src/gpu/SkGpuDevice.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 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 kernel.get(), 554 kernel.get(),
555 gain, 555 gain,
556 bias, 556 bias,
557 target, 557 target,
558 tileMode, 558 tileMode,
559 convolveAlpha); 559 convolveAlpha);
560 } 560 }
561 561
562 bool SkMatrixConvolutionImageFilter::asNewEffect(GrEffectRef** effect, 562 bool SkMatrixConvolutionImageFilter::asNewEffect(GrEffectRef** effect,
563 GrTexture* texture, 563 GrTexture* texture,
564 const SkIPoint&) const { 564 const SkMatrix&) const {
565 if (!effect) { 565 if (!effect) {
566 return fKernelSize.width() * fKernelSize.height() <= MAX_KERNEL_SIZE; 566 return fKernelSize.width() * fKernelSize.height() <= MAX_KERNEL_SIZE;
567 } 567 }
568 SkASSERT(fKernelSize.width() * fKernelSize.height() <= MAX_KERNEL_SIZE); 568 SkASSERT(fKernelSize.width() * fKernelSize.height() <= MAX_KERNEL_SIZE);
569 *effect = GrMatrixConvolutionEffect::Create(texture, 569 *effect = GrMatrixConvolutionEffect::Create(texture,
570 fKernelSize, 570 fKernelSize,
571 fKernel, 571 fKernel,
572 fGain, 572 fGain,
573 fBias, 573 fBias,
574 fTarget, 574 fTarget,
575 fTileMode, 575 fTileMode,
576 fConvolveAlpha); 576 fConvolveAlpha);
577 return true; 577 return true;
578 } 578 }
579 579
580 /////////////////////////////////////////////////////////////////////////////// 580 ///////////////////////////////////////////////////////////////////////////////
581 581
582 #endif 582 #endif
OLDNEW
« no previous file with comments | « src/effects/SkMagnifierImageFilter.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698