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

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

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.cpp
diff --git a/Source/core/rendering/style/StyleCustomFilterProgram.cpp b/Source/core/platform/graphics/filters/ReferenceFilter.cpp
similarity index 70%
copy from Source/core/rendering/style/StyleCustomFilterProgram.cpp
copy to Source/core/platform/graphics/filters/ReferenceFilter.cpp
index 31c3d64d662ce7da9ff0582f323a1c6c79d0fe36..2b84dd5a963bc4aeebf8e05539e1872d74b2f950 100644
--- a/Source/core/rendering/style/StyleCustomFilterProgram.cpp
+++ b/Source/core/platform/graphics/filters/ReferenceFilter.cpp
@@ -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
@@ -29,18 +30,28 @@
#include "config.h"
-#include "core/rendering/style/StyleCustomFilterProgram.h"
+#include "core/platform/graphics/filters/ReferenceFilter.h"
-#include "core/rendering/style/StyleCustomFilterProgramCache.h"
+#include "core/platform/graphics/filters/FilterEffect.h"
+#include "core/platform/graphics/filters/SourceGraphic.h"
namespace WebCore {
-StyleCustomFilterProgram::~StyleCustomFilterProgram()
+ReferenceFilter::ReferenceFilter()
+ : Filter(AffineTransform())
+ , m_sourceGraphic(SourceGraphic::create(this))
{
- if (m_cache)
- m_cache->remove(this);
+ // FIXME: This should come from the filter DOM node's filterRes attribute.
+ setFilterResolution(FloatSize(1, 1));
}
-} // namespace WebCore
+void ReferenceFilter::setLastEffect(PassRefPtr<FilterEffect> effect)
+{
+ m_lastEffect = effect;
+}
+ReferenceFilter::~ReferenceFilter()
+{
+}
+} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698