| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 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 "SkAlphaThresholdFilter.h" | 8 #include "SkAlphaThresholdFilter.h" |
| 9 | 9 |
| 10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
| 11 #include "SkReadBuffer.h" | 11 #include "SkReadBuffer.h" |
| 12 #include "SkSpecialImage.h" | 12 #include "SkSpecialImage.h" |
| 13 #include "SkWriteBuffer.h" | 13 #include "SkWriteBuffer.h" |
| 14 #include "SkRegion.h" | 14 #include "SkRegion.h" |
| 15 | 15 |
| 16 #if SK_SUPPORT_GPU | 16 #if SK_SUPPORT_GPU |
| 17 #include "GrAlphaThresholdFragmentProcessor.h" | 17 #include "GrAlphaThresholdFragmentProcessor.h" |
| 18 #include "GrContext.h" | 18 #include "GrContext.h" |
| 19 #include "GrDrawContext.h" | 19 #include "GrDrawContext.h" |
| 20 #include "GrFixedClip.h" |
| 20 #endif | 21 #endif |
| 21 | 22 |
| 22 class SK_API SkAlphaThresholdFilterImpl : public SkImageFilter { | 23 class SK_API SkAlphaThresholdFilterImpl : public SkImageFilter { |
| 23 public: | 24 public: |
| 24 SkAlphaThresholdFilterImpl(const SkRegion& region, SkScalar innerThreshold, | 25 SkAlphaThresholdFilterImpl(const SkRegion& region, SkScalar innerThreshold, |
| 25 SkScalar outerThreshold, sk_sp<SkImageFilter> inp
ut, | 26 SkScalar outerThreshold, sk_sp<SkImageFilter> inp
ut, |
| 26 const CropRect* cropRect = nullptr); | 27 const CropRect* cropRect = nullptr); |
| 27 | 28 |
| 28 SK_TO_STRING_OVERRIDE() | 29 SK_TO_STRING_OVERRIDE() |
| 29 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkAlphaThresholdFilterIm
pl) | 30 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkAlphaThresholdFilterIm
pl) |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 dst); | 260 dst); |
| 260 } | 261 } |
| 261 | 262 |
| 262 #ifndef SK_IGNORE_TO_STRING | 263 #ifndef SK_IGNORE_TO_STRING |
| 263 void SkAlphaThresholdFilterImpl::toString(SkString* str) const { | 264 void SkAlphaThresholdFilterImpl::toString(SkString* str) const { |
| 264 str->appendf("SkAlphaThresholdImageFilter: ("); | 265 str->appendf("SkAlphaThresholdImageFilter: ("); |
| 265 str->appendf("inner: %f outer: %f", fInnerThreshold, fOuterThreshold); | 266 str->appendf("inner: %f outer: %f", fInnerThreshold, fOuterThreshold); |
| 266 str->append(")"); | 267 str->append(")"); |
| 267 } | 268 } |
| 268 #endif | 269 #endif |
| OLD | NEW |