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

Unified Diff: third_party/WebKit/Source/platform/graphics/filters/FEBoxReflect.h

Issue 1870793004: Move common logic between BoxReflectFilterOperation and FEBoxReflect into BoxReflection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no-filter-outsets-2
Patch Set: merge with master Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/filters/FEBoxReflect.h
diff --git a/third_party/WebKit/Source/platform/graphics/filters/FEBoxReflect.h b/third_party/WebKit/Source/platform/graphics/filters/FEBoxReflect.h
index 1b136d121c09058d850247f6e605f397f14561d0..52dc95c045022206ca4c82f3a26f76d18fe82000 100644
--- a/third_party/WebKit/Source/platform/graphics/filters/FEBoxReflect.h
+++ b/third_party/WebKit/Source/platform/graphics/filters/FEBoxReflect.h
@@ -6,7 +6,7 @@
#define FEBoxReflect_h
#include "platform/PlatformExport.h"
-#include "platform/graphics/GraphicsTypes.h"
+#include "platform/graphics/BoxReflection.h"
#include "platform/graphics/filters/FilterEffect.h"
namespace blink {
@@ -14,7 +14,10 @@ namespace blink {
// Used to implement the -webkit-box-reflect property as a filter.
class PLATFORM_EXPORT FEBoxReflect final : public FilterEffect {
public:
- static FEBoxReflect* create(Filter*, ReflectionDirection, float offset);
+ static FEBoxReflect* create(Filter* filter, const BoxReflection& reflection)
+ {
+ return new FEBoxReflect(filter, reflection);
+ }
// FilterEffect implementation
FloatRect mapRect(const FloatRect&, bool forward = true) const final;
@@ -22,11 +25,10 @@ public:
PassRefPtr<SkImageFilter> createImageFilter(SkiaImageFilterBuilder&) final;
private:
- FEBoxReflect(Filter*, ReflectionDirection, float offset);
+ FEBoxReflect(Filter*, const BoxReflection&);
~FEBoxReflect() final;
- ReflectionDirection m_reflectionDirection;
- float m_offset;
+ BoxReflection m_reflection;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698