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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |