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

Unified Diff: Source/platform/graphics/paint/FilterDisplayItem.h

Issue 1203343002: WIP for display item list backed by ListContainer Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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/platform/graphics/paint/FilterDisplayItem.h
diff --git a/Source/platform/graphics/paint/FilterDisplayItem.h b/Source/platform/graphics/paint/FilterDisplayItem.h
index 549938edb3b21e503b5897c8077406360ce98987..4383276e3e10985b76939c9e155d56ea57910859 100644
--- a/Source/platform/graphics/paint/FilterDisplayItem.h
+++ b/Source/platform/graphics/paint/FilterDisplayItem.h
@@ -17,16 +17,17 @@
namespace blink {
class PLATFORM_EXPORT BeginFilterDisplayItem : public PairedBeginDisplayItem {
- WTF_MAKE_FAST_ALLOCATED(BeginFilterDisplayItem);
public:
- static PassOwnPtr<BeginFilterDisplayItem> create(const DisplayItemClientWrapper& client, PassRefPtr<SkImageFilter> imageFilter, const FloatRect& bounds)
+ void setNew(PassRefPtr<SkImageFilter> imageFilter, FloatRect& bounds)
{
- return adoptPtr(new BeginFilterDisplayItem(client, imageFilter, bounds));
+ m_imageFilter = imageFilter;
+ m_bounds = bounds;
}
-
- static PassOwnPtr<BeginFilterDisplayItem> create(const DisplayItemClientWrapper& client, PassRefPtr<SkImageFilter> imageFilter, const FloatRect& bounds, PassOwnPtr<WebFilterOperations> filterOperations)
+ void setNew(PassRefPtr<SkImageFilter> imageFilter, FloatRect& bounds, PassOwnPtr<WebFilterOperations> filterOperations)
{
- return adoptPtr(new BeginFilterDisplayItem(client, imageFilter, bounds, filterOperations));
+ m_imageFilter = imageFilter;
+ m_bounds = bounds;
+ m_webFilterOperations = filterOperations;
}
virtual void replay(GraphicsContext&) override;
@@ -34,9 +35,6 @@ public:
virtual bool drawsContent() const override;
private:
- BeginFilterDisplayItem(const DisplayItemClientWrapper&, PassRefPtr<SkImageFilter>, const FloatRect& bounds);
- BeginFilterDisplayItem(const DisplayItemClientWrapper&, PassRefPtr<SkImageFilter>, const FloatRect& bounds, PassOwnPtr<WebFilterOperations>);
-
#ifndef NDEBUG
virtual void dumpPropertiesAsDebugString(WTF::StringBuilder&) const override;
#endif
@@ -44,20 +42,11 @@ private:
// FIXME: m_imageFilter should be replaced with m_webFilterOperations when copying data to the compositor.
RefPtr<SkImageFilter> m_imageFilter;
OwnPtr<WebFilterOperations> m_webFilterOperations;
- const FloatRect m_bounds;
+ FloatRect m_bounds;
};
class PLATFORM_EXPORT EndFilterDisplayItem : public PairedEndDisplayItem {
- WTF_MAKE_FAST_ALLOCATED(EndFilterDisplayItem);
public:
- static PassOwnPtr<EndFilterDisplayItem> create(const DisplayItemClientWrapper& client)
- {
- return adoptPtr(new EndFilterDisplayItem(client));
- }
-
- EndFilterDisplayItem(const DisplayItemClientWrapper& client)
- : PairedEndDisplayItem(client, EndFilter) { }
-
virtual void replay(GraphicsContext&) override;
virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override;
« no previous file with comments | « Source/platform/graphics/paint/DrawingRecorder.cpp ('k') | Source/platform/graphics/paint/FilterDisplayItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698