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 "SkMorphologyImageFilter.h" | 8 #include "SkMorphologyImageFilter.h" |
9 #include "SkBitmap.h" | 9 #include "SkBitmap.h" |
10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
11 #include "SkReadBuffer.h" | 11 #include "SkReadBuffer.h" |
12 #include "SkWriteBuffer.h" | 12 #include "SkWriteBuffer.h" |
13 #include "SkRect.h" | 13 #include "SkRect.h" |
14 #include "SkMorphology_opts.h" | 14 #include "SkMorphology_opts.h" |
15 #if SK_SUPPORT_GPU | 15 #if SK_SUPPORT_GPU |
16 #include "GrContext.h" | 16 #include "GrContext.h" |
17 #include "GrTexture.h" | 17 #include "GrTexture.h" |
18 #include "GrTBackendEffectFactory.h" | 18 #include "GrTBackendEffectFactory.h" |
19 #include "gl/GrGLEffect.h" | 19 #include "gl/GrGLEffect.h" |
| 20 #include "gl/GrGLShaderBuilder.h" |
20 #include "effects/Gr1DKernelEffect.h" | 21 #include "effects/Gr1DKernelEffect.h" |
21 #endif | 22 #endif |
22 | 23 |
23 SkMorphologyImageFilter::SkMorphologyImageFilter(SkReadBuffer& buffer) | 24 SkMorphologyImageFilter::SkMorphologyImageFilter(SkReadBuffer& buffer) |
24 : INHERITED(1, buffer) { | 25 : INHERITED(1, buffer) { |
25 fRadius.fWidth = buffer.readInt(); | 26 fRadius.fWidth = buffer.readInt(); |
26 fRadius.fHeight = buffer.readInt(); | 27 fRadius.fHeight = buffer.readInt(); |
27 buffer.validate((fRadius.fWidth >= 0) && | 28 buffer.validate((fRadius.fWidth >= 0) && |
28 (fRadius.fHeight >= 0)); | 29 (fRadius.fHeight >= 0)); |
29 } | 30 } |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 SkBitmap* result, SkIPoint* offset) con
st { | 578 SkBitmap* result, SkIPoint* offset) con
st { |
578 return this->filterImageGPUGeneric(true, proxy, src, ctx, result, offset); | 579 return this->filterImageGPUGeneric(true, proxy, src, ctx, result, offset); |
579 } | 580 } |
580 | 581 |
581 bool SkErodeImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const
Context& ctx, | 582 bool SkErodeImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const
Context& ctx, |
582 SkBitmap* result, SkIPoint* offset) cons
t { | 583 SkBitmap* result, SkIPoint* offset) cons
t { |
583 return this->filterImageGPUGeneric(false, proxy, src, ctx, result, offset); | 584 return this->filterImageGPUGeneric(false, proxy, src, ctx, result, offset); |
584 } | 585 } |
585 | 586 |
586 #endif | 587 #endif |
OLD | NEW |