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

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

Issue 1193433004: Blink-side contiguous allocation of display items. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add ListContainer::AllocateAndConstructWithArguments and a TODO in DisplayItemList::findMatchingIte… 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..cbd3321a45dbee7741837e2e970c6607f9bd51a5 100644
--- a/Source/platform/graphics/paint/FilterDisplayItem.h
+++ b/Source/platform/graphics/paint/FilterDisplayItem.h
@@ -17,26 +17,18 @@
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)
- {
- return adoptPtr(new BeginFilterDisplayItem(client, imageFilter, bounds));
- }
-
- static PassOwnPtr<BeginFilterDisplayItem> create(const DisplayItemClientWrapper& client, PassRefPtr<SkImageFilter> imageFilter, const FloatRect& bounds, PassOwnPtr<WebFilterOperations> filterOperations)
- {
- return adoptPtr(new BeginFilterDisplayItem(client, imageFilter, bounds, filterOperations));
- }
+ BeginFilterDisplayItem(const DisplayItemClientWrapper& client, PassRefPtr<SkImageFilter> imageFilter, const FloatRect& bounds, PassOwnPtr<WebFilterOperations> filterOperations = nullptr)
+ : PairedBeginDisplayItem(client, BeginFilter)
+ , m_imageFilter(imageFilter)
+ , m_webFilterOperations(filterOperations)
+ , m_bounds(bounds) { }
virtual void replay(GraphicsContext&) override;
virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override;
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
@@ -48,13 +40,7 @@ private:
};
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) { }
« 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