Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/filters/FEBoxReflect.cpp

Issue 2341923002: Harmonize FilterEffect::mapRect and mapPaintRect (Closed)
Patch Set: Baselines (again) Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 FEBoxReflect::FEBoxReflect(Filter* filter, const BoxReflection& reflection) 13 FEBoxReflect::FEBoxReflect(Filter* filter, const BoxReflection& reflection)
14 : FilterEffect(filter) 14 : FilterEffect(filter)
15 , m_reflection(reflection) 15 , m_reflection(reflection)
16 { 16 {
17 } 17 }
18 18
19 FEBoxReflect::~FEBoxReflect() 19 FEBoxReflect::~FEBoxReflect()
20 { 20 {
21 } 21 }
22 22
23 FloatRect FEBoxReflect::mapRect(const FloatRect& rect, bool forward) const 23 FloatRect FEBoxReflect::mapEffect(const FloatRect& rect) const
24 { 24 {
25 // Reflection about any line is self-inverse, so this for both forward and 25 // Reflection about any line is self-inverse, so this for both forward and
Stephen White 2016/09/20 15:36:19 Nit: probably could remove this comment, since we
fs 2016/09/20 19:14:14 Removed.
26 // reverse mapping. 26 // reverse mapping.
27 return m_reflection.mapRect(rect); 27 return m_reflection.mapRect(rect);
28 } 28 }
29 29
30 TextStream& FEBoxReflect::externalRepresentation(TextStream& ts, int indent) con st 30 TextStream& FEBoxReflect::externalRepresentation(TextStream& ts, int indent) con st
31 { 31 {
32 // Only called for SVG layout tree printing. 32 // Only called for SVG layout tree printing.
33 ASSERT_NOT_REACHED(); 33 ASSERT_NOT_REACHED();
34 return ts; 34 return ts;
35 } 35 }
36 36
37 sk_sp<SkImageFilter> FEBoxReflect::createImageFilter() 37 sk_sp<SkImageFilter> FEBoxReflect::createImageFilter()
38 { 38 {
39 return SkiaImageFilterBuilder::buildBoxReflectFilter(m_reflection, SkiaImage FilterBuilder::build(inputEffect(0), operatingColorSpace())); 39 return SkiaImageFilterBuilder::buildBoxReflectFilter(m_reflection, SkiaImage FilterBuilder::build(inputEffect(0), operatingColorSpace()));
40 } 40 }
41 41
42 } // namespace blink 42 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698