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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 | 248 |
249 typedef Gr1DKernelEffect INHERITED; | 249 typedef Gr1DKernelEffect INHERITED; |
250 }; | 250 }; |
251 | 251 |
252 /////////////////////////////////////////////////////////////////////////////// | 252 /////////////////////////////////////////////////////////////////////////////// |
253 | 253 |
254 class GrGLMorphologyEffect : public GrGLSLFragmentProcessor { | 254 class GrGLMorphologyEffect : public GrGLSLFragmentProcessor { |
255 public: | 255 public: |
256 GrGLMorphologyEffect(const GrProcessor&); | 256 GrGLMorphologyEffect(const GrProcessor&); |
257 | 257 |
258 virtual void emitCode(EmitArgs&) override; | 258 void emitCode(EmitArgs&) override; |
259 | 259 |
260 static inline void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessor
KeyBuilder* b); | 260 static inline void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessor
KeyBuilder* b); |
261 | 261 |
262 protected: | 262 protected: |
263 void onSetData(const GrGLSLProgramDataManager&, const GrProcessor&) override
; | 263 void onSetData(const GrGLSLProgramDataManager&, const GrProcessor&) override
; |
264 | 264 |
265 private: | 265 private: |
266 int width() const { return GrMorphologyEffect::WidthFromRadius(fRadius); } | 266 int width() const { return GrMorphologyEffect::WidthFromRadius(fRadius); } |
267 | 267 |
268 int fRadius; | 268 int fRadius; |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
661 SkBitmap* result, SkIPoint* offset) con
st { | 661 SkBitmap* result, SkIPoint* offset) con
st { |
662 return this->filterImageGPUGeneric(true, proxy, src, ctx, result, offset); | 662 return this->filterImageGPUGeneric(true, proxy, src, ctx, result, offset); |
663 } | 663 } |
664 | 664 |
665 bool SkErodeImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const
Context& ctx, | 665 bool SkErodeImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const
Context& ctx, |
666 SkBitmap* result, SkIPoint* offset) cons
t { | 666 SkBitmap* result, SkIPoint* offset) cons
t { |
667 return this->filterImageGPUGeneric(false, proxy, src, ctx, result, offset); | 667 return this->filterImageGPUGeneric(false, proxy, src, ctx, result, offset); |
668 } | 668 } |
669 | 669 |
670 #endif | 670 #endif |
OLD | NEW |