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

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

Issue 1775013003: Implement -webkit-box-reflect as a filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make msvc dbg happy Created 4 years, 9 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
new file mode 100644
index 0000000000000000000000000000000000000000..00ace338847339505c73fb8f74a38d1c1fd7dd28
--- /dev/null
+++ b/third_party/WebKit/Source/platform/graphics/filters/FEBoxReflect.h
@@ -0,0 +1,34 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef FEBoxReflect_h
+#define FEBoxReflect_h
+
+#include "platform/PlatformExport.h"
+#include "platform/graphics/GraphicsTypes.h"
+#include "platform/graphics/filters/FilterEffect.h"
+
+namespace blink {
+
+// Used to implement the -webkit-box-reflect property as a filter.
+class PLATFORM_EXPORT FEBoxReflect final : public FilterEffect {
+public:
+ static PassRefPtrWillBeRawPtr<FEBoxReflect> create(Filter*, ReflectionDirection, float offset);
+
+ // FilterEffect implementation
+ FloatRect mapRect(const FloatRect&, bool forward = true) final;
+ TextStream& externalRepresentation(TextStream&, int indentation) const final;
+ PassRefPtr<SkImageFilter> createImageFilter(SkiaImageFilterBuilder&) final;
+
+private:
+ FEBoxReflect(Filter*, ReflectionDirection, float offset);
+ ~FEBoxReflect() final;
+
+ ReflectionDirection m_reflectionDirection;
+ float m_offset;
+};
+
+} // namespace blink
+
+#endif // FEBoxReflect_h

Powered by Google App Engine
This is Rietveld 408576698