OLD | NEW |
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 Loading... |
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 |
OLD | NEW |