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

Unified Diff: Source/core/platform/graphics/filters/ReferenceFilter.h

Issue 14793008: Extract the SVG Filter Reference implementation out of the FilterEffectRenderer into its own type (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix copyrights Created 7 years, 6 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: Source/core/platform/graphics/filters/ReferenceFilter.h
diff --git a/Source/core/rendering/style/StyleCustomFilterProgram.cpp b/Source/core/platform/graphics/filters/ReferenceFilter.h
similarity index 61%
copy from Source/core/rendering/style/StyleCustomFilterProgram.cpp
copy to Source/core/platform/graphics/filters/ReferenceFilter.h
index 31c3d64d662ce7da9ff0582f323a1c6c79d0fe36..7bc87dcc4b380abc71299863b480b24d2a081ea3 100644
--- a/Source/core/rendering/style/StyleCustomFilterProgram.cpp
+++ b/Source/core/platform/graphics/filters/ReferenceFilter.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
+ * Copyright (C) 2013 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -27,20 +28,41 @@
* SUCH DAMAGE.
*/
-#include "config.h"
+#ifndef ReferenceFilter_h
+#define ReferenceFilter_h
-#include "core/rendering/style/StyleCustomFilterProgram.h"
-
-#include "core/rendering/style/StyleCustomFilterProgramCache.h"
+#include "core/platform/graphics/FloatRect.h"
+#include "core/platform/graphics/filters/Filter.h"
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefPtr.h"
namespace WebCore {
-StyleCustomFilterProgram::~StyleCustomFilterProgram()
-{
- if (m_cache)
- m_cache->remove(this);
-}
+class SourceGraphic;
+class FilterEffect;
+
+class ReferenceFilter: public Filter {
+public:
+ static PassRefPtr<ReferenceFilter> create()
+ {
+ return adoptRef(new ReferenceFilter());
+ }
+
+ virtual FloatRect sourceImageRect() const { return FloatRect(); };
-} // namespace WebCore
+ void setLastEffect(PassRefPtr<FilterEffect>);
+ FilterEffect* lastEffect() const { return m_lastEffect.get(); }
+ SourceGraphic* sourceGraphic() const { return m_sourceGraphic.get(); }
+
+private:
+ ReferenceFilter();
+ ~ReferenceFilter();
+
+ RefPtr<SourceGraphic> m_sourceGraphic;
+ RefPtr<FilterEffect> m_lastEffect;
+};
+
+}
+#endif // ReferenceFilter_h
« no previous file with comments | « Source/core/platform/graphics/filters/FilterOperations.cpp ('k') | Source/core/platform/graphics/filters/ReferenceFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698