OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef FEBoxReflect_h | 5 #ifndef FEBoxReflect_h |
6 #define FEBoxReflect_h | 6 #define FEBoxReflect_h |
7 | 7 |
8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
9 #include "platform/graphics/BoxReflection.h" | 9 #include "platform/graphics/BoxReflection.h" |
10 #include "platform/graphics/filters/FilterEffect.h" | 10 #include "platform/graphics/filters/FilterEffect.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 // Used to implement the -webkit-box-reflect property as a filter. | 14 // Used to implement the -webkit-box-reflect property as a filter. |
15 class PLATFORM_EXPORT FEBoxReflect final : public FilterEffect { | 15 class PLATFORM_EXPORT FEBoxReflect final : public FilterEffect { |
16 public: | 16 public: |
17 static FEBoxReflect* create(Filter* filter, const BoxReflection& reflection) | 17 static FEBoxReflect* create(Filter* filter, const BoxReflection& reflection) |
18 { | 18 { |
19 return new FEBoxReflect(filter, reflection); | 19 return new FEBoxReflect(filter, reflection); |
20 } | 20 } |
21 | 21 |
22 // FilterEffect implementation | 22 // FilterEffect implementation |
23 FloatRect mapRect(const FloatRect&, bool forward = true) const final; | |
24 TextStream& externalRepresentation(TextStream&, int indentation) const final
; | 23 TextStream& externalRepresentation(TextStream&, int indentation) const final
; |
25 sk_sp<SkImageFilter> createImageFilter() final; | |
26 | 24 |
27 private: | 25 private: |
28 FEBoxReflect(Filter*, const BoxReflection&); | 26 FEBoxReflect(Filter*, const BoxReflection&); |
29 ~FEBoxReflect() final; | 27 ~FEBoxReflect() final; |
30 | 28 |
| 29 FloatRect mapEffect(const FloatRect&) const final; |
| 30 |
| 31 sk_sp<SkImageFilter> createImageFilter() final; |
| 32 |
31 BoxReflection m_reflection; | 33 BoxReflection m_reflection; |
32 }; | 34 }; |
33 | 35 |
34 } // namespace blink | 36 } // namespace blink |
35 | 37 |
36 #endif // FEBoxReflect_h | 38 #endif // FEBoxReflect_h |
OLD | NEW |