Chromium Code Reviews| Index: Source/platform/graphics/paint/DisplayItem.cpp |
| diff --git a/Source/platform/graphics/paint/DisplayItem.cpp b/Source/platform/graphics/paint/DisplayItem.cpp |
| index cd1d1516b233c900aa2f58ff9ab27050fd9654fc..429fbe92972a230bb4c506aa2162489b292d7cb9 100644 |
| --- a/Source/platform/graphics/paint/DisplayItem.cpp |
| +++ b/Source/platform/graphics/paint/DisplayItem.cpp |
| @@ -7,6 +7,25 @@ |
| namespace blink { |
| +namespace { |
|
pdr.
2014/12/12 18:39:04
Does this need to be in a namespace block?
|
| + |
| +class DummyDisplayItem : public DisplayItem { |
| +public: |
| + DummyDisplayItem(DisplayItemClient client, Type type) : DisplayItem(client, type) { } |
| + |
| +private: |
| + virtual void replay(GraphicsContext*) override final { } |
| + virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override final { } |
| + virtual const char* name() const override final { return "Dummy"; } |
| +}; |
| + |
| +} // namespace |
| + |
| +PassOwnPtr<DisplayItem> DisplayItem::createDummy(DisplayItemClient client, Type type) |
| +{ |
| + return adoptPtr(new DummyDisplayItem(client, type)); |
| +} |
| + |
| #ifndef NDEBUG |
| WTF::String DisplayItem::typeAsDebugString(DisplayItem::Type type) |
| @@ -74,13 +93,14 @@ WTF::String DisplayItem::asDebugString() const |
| void DisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder& stringBuilder) const |
| { |
| + stringBuilder.append("name: \""); |
| + stringBuilder.append(name()); |
| + stringBuilder.append("\", "); |
| if (!clientDebugString().isEmpty()) { |
| stringBuilder.append(clientDebugString()); |
| stringBuilder.append(", "); |
| } |
| stringBuilder.append("type: \""); |
| - if (isCached()) |
|
pdr.
2014/12/12 18:39:04
Any reason for removing this?
Xianzhu
2014/12/12 19:11:17
Now the new "name" attribute can show the same inf
|
| - stringBuilder.append("Cached-"); |
| stringBuilder.append(typeAsDebugString(type())); |
| stringBuilder.append('"'); |
| } |