| 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" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 fRadius.fWidth = buffer.readInt(); | 25 fRadius.fWidth = buffer.readInt(); |
| 26 fRadius.fHeight = buffer.readInt(); | 26 fRadius.fHeight = buffer.readInt(); |
| 27 buffer.validate((fRadius.fWidth >= 0) && | 27 buffer.validate((fRadius.fWidth >= 0) && |
| 28 (fRadius.fHeight >= 0)); | 28 (fRadius.fHeight >= 0)); |
| 29 } | 29 } |
| 30 | 30 |
| 31 SkMorphologyImageFilter::SkMorphologyImageFilter(int radiusX, | 31 SkMorphologyImageFilter::SkMorphologyImageFilter(int radiusX, |
| 32 int radiusY, | 32 int radiusY, |
| 33 SkImageFilter* input, | 33 SkImageFilter* input, |
| 34 const CropRect* cropRect) | 34 const CropRect* cropRect) |
| 35 : INHERITED(input, cropRect), fRadius(SkISize::Make(radiusX, radiusY)) { | 35 : INHERITED(1, &input, cropRect), fRadius(SkISize::Make(radiusX, radiusY)) { |
| 36 } | 36 } |
| 37 | 37 |
| 38 | 38 |
| 39 void SkMorphologyImageFilter::flatten(SkWriteBuffer& buffer) const { | 39 void SkMorphologyImageFilter::flatten(SkWriteBuffer& buffer) const { |
| 40 this->INHERITED::flatten(buffer); | 40 this->INHERITED::flatten(buffer); |
| 41 buffer.writeInt(fRadius.fWidth); | 41 buffer.writeInt(fRadius.fWidth); |
| 42 buffer.writeInt(fRadius.fHeight); | 42 buffer.writeInt(fRadius.fHeight); |
| 43 } | 43 } |
| 44 | 44 |
| 45 enum MorphDirection { | 45 enum MorphDirection { |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 SkBitmap* result, SkIPoint* offset) con
st { | 578 SkBitmap* result, SkIPoint* offset) con
st { |
| 579 return this->filterImageGPUGeneric(true, proxy, src, ctx, result, offset); | 579 return this->filterImageGPUGeneric(true, proxy, src, ctx, result, offset); |
| 580 } | 580 } |
| 581 | 581 |
| 582 bool SkErodeImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const
Context& ctx, | 582 bool SkErodeImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const
Context& ctx, |
| 583 SkBitmap* result, SkIPoint* offset) cons
t { | 583 SkBitmap* result, SkIPoint* offset) cons
t { |
| 584 return this->filterImageGPUGeneric(false, proxy, src, ctx, result, offset); | 584 return this->filterImageGPUGeneric(false, proxy, src, ctx, result, offset); |
| 585 } | 585 } |
| 586 | 586 |
| 587 #endif | 587 #endif |
| OLD | NEW |