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/GraphicsTypes.h" | 9 #include "platform/graphics/GraphicsTypes.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 RawPtr<FEBoxReflect> create(Filter*, ReflectionDirection, float offse
t); | 17 static FEBoxReflect* create(Filter*, ReflectionDirection, float offset); |
18 | 18 |
19 // FilterEffect implementation | 19 // FilterEffect implementation |
20 FloatRect mapRect(const FloatRect&, bool forward = true) const final; | 20 FloatRect mapRect(const FloatRect&, bool forward = true) const final; |
21 TextStream& externalRepresentation(TextStream&, int indentation) const final
; | 21 TextStream& externalRepresentation(TextStream&, int indentation) const final
; |
22 PassRefPtr<SkImageFilter> createImageFilter(SkiaImageFilterBuilder&) final; | 22 PassRefPtr<SkImageFilter> createImageFilter(SkiaImageFilterBuilder&) final; |
23 | 23 |
24 private: | 24 private: |
25 FEBoxReflect(Filter*, ReflectionDirection, float offset); | 25 FEBoxReflect(Filter*, ReflectionDirection, float offset); |
26 ~FEBoxReflect() final; | 26 ~FEBoxReflect() final; |
27 | 27 |
28 ReflectionDirection m_reflectionDirection; | 28 ReflectionDirection m_reflectionDirection; |
29 float m_offset; | 29 float m_offset; |
30 }; | 30 }; |
31 | 31 |
32 } // namespace blink | 32 } // namespace blink |
33 | 33 |
34 #endif // FEBoxReflect_h | 34 #endif // FEBoxReflect_h |
OLD | NEW |