OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 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 "SkBlurMaskFilter.h" | 8 #include "SkBlurMaskFilter.h" |
9 #include "SkBlurMask.h" | 9 #include "SkBlurMask.h" |
10 #include "SkGpuBlurUtils.h" | 10 #include "SkGpuBlurUtils.h" |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 const SkScalar sigma = buffer.readScalar(); | 585 const SkScalar sigma = buffer.readScalar(); |
586 const unsigned style = buffer.readUInt(); | 586 const unsigned style = buffer.readUInt(); |
587 const unsigned flags = buffer.readUInt(); | 587 const unsigned flags = buffer.readUInt(); |
588 if (style <= kLastEnum_SkBlurStyle) { | 588 if (style <= kLastEnum_SkBlurStyle) { |
589 return SkBlurMaskFilter::Make((SkBlurStyle)style, sigma, flags); | 589 return SkBlurMaskFilter::Make((SkBlurStyle)style, sigma, flags); |
590 } | 590 } |
591 return nullptr; | 591 return nullptr; |
592 } | 592 } |
593 | 593 |
594 void SkBlurMaskFilterImpl::flatten(SkWriteBuffer& buffer) const { | 594 void SkBlurMaskFilterImpl::flatten(SkWriteBuffer& buffer) const { |
595 buffer.writeScalar(fSigma); | 595 buffer.writeScalar("fSigma", fSigma); |
596 buffer.writeUInt(fBlurStyle); | 596 buffer.writeUInt("fBlurStyle", fBlurStyle); |
597 buffer.writeUInt(fBlurFlags); | 597 buffer.writeUInt("fBlurFlags", fBlurFlags); |
598 } | 598 } |
599 | 599 |
600 #if SK_SUPPORT_GPU | 600 #if SK_SUPPORT_GPU |
601 | 601 |
602 class GrGLRectBlurEffect; | 602 class GrGLRectBlurEffect; |
603 | 603 |
604 class GrRectBlurEffect : public GrFragmentProcessor { | 604 class GrRectBlurEffect : public GrFragmentProcessor { |
605 public: | 605 public: |
606 ~GrRectBlurEffect() override { } | 606 ~GrRectBlurEffect() override { } |
607 | 607 |
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1315 } else { | 1315 } else { |
1316 str->append("None"); | 1316 str->append("None"); |
1317 } | 1317 } |
1318 str->append("))"); | 1318 str->append("))"); |
1319 } | 1319 } |
1320 #endif | 1320 #endif |
1321 | 1321 |
1322 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) | 1322 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) |
1323 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) | 1323 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) |
1324 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 1324 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
OLD | NEW |