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 #include "platform/graphics/filters/FEBoxReflect.h" | 5 #include "platform/graphics/filters/FEBoxReflect.h" |
6 | 6 |
7 #include "platform/geometry/FloatRect.h" | 7 #include "platform/geometry/FloatRect.h" |
8 #include "platform/graphics/filters/SkiaImageFilterBuilder.h" | 8 #include "platform/graphics/filters/SkiaImageFilterBuilder.h" |
9 #include "wtf/Assertions.h" | 9 #include "wtf/Assertions.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 RawPtr<FEBoxReflect> FEBoxReflect::create(Filter* filter, ReflectionDirection di
rection, float offset) | 13 FEBoxReflect* FEBoxReflect::create(Filter* filter, ReflectionDirection direction
, float offset) |
14 { | 14 { |
15 return new FEBoxReflect(filter, direction, offset); | 15 return new FEBoxReflect(filter, direction, offset); |
16 } | 16 } |
17 | 17 |
18 FEBoxReflect::FEBoxReflect(Filter* filter, ReflectionDirection direction, float
offset) | 18 FEBoxReflect::FEBoxReflect(Filter* filter, ReflectionDirection direction, float
offset) |
19 : FilterEffect(filter) | 19 : FilterEffect(filter) |
20 , m_reflectionDirection(direction) | 20 , m_reflectionDirection(direction) |
21 , m_offset(offset) | 21 , m_offset(offset) |
22 { | 22 { |
23 } | 23 } |
(...skipping 26 matching lines...) Expand all Loading... |
50 return ts; | 50 return ts; |
51 } | 51 } |
52 | 52 |
53 PassRefPtr<SkImageFilter> FEBoxReflect::createImageFilter(SkiaImageFilterBuilder
& builder) | 53 PassRefPtr<SkImageFilter> FEBoxReflect::createImageFilter(SkiaImageFilterBuilder
& builder) |
54 { | 54 { |
55 RefPtr<SkImageFilter> input(builder.build(inputEffect(0), operatingColorSpac
e())); | 55 RefPtr<SkImageFilter> input(builder.build(inputEffect(0), operatingColorSpac
e())); |
56 return builder.buildBoxReflectFilter(m_reflectionDirection, m_offset, nullpt
r, input.get()); | 56 return builder.buildBoxReflectFilter(m_reflectionDirection, m_offset, nullpt
r, input.get()); |
57 } | 57 } |
58 | 58 |
59 } // namespace blink | 59 } // namespace blink |
OLD | NEW |