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

Unified Diff: Source/core/paint/DrawingRecorder.cpp

Issue 723103002: Revert "Move ViewDisplayList to GraphicsLayer" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « Source/core/paint/DrawingRecorder.h ('k') | Source/core/paint/DrawingRecorderTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/DrawingRecorder.cpp
diff --git a/Source/core/paint/DrawingRecorder.cpp b/Source/core/paint/DrawingRecorder.cpp
index fae14dee3d40f983f91890c1d995fbba8bbd6ab1..65c94d46a059a66c263271a20039c3b843f87966 100644
--- a/Source/core/paint/DrawingRecorder.cpp
+++ b/Source/core/paint/DrawingRecorder.cpp
@@ -5,17 +5,18 @@
#include "config.h"
#include "core/paint/DrawingRecorder.h"
-#include "core/rendering/RenderLayer.h"
#include "core/rendering/RenderObject.h"
+#include "core/rendering/RenderView.h"
#include "platform/RuntimeEnabledFeatures.h"
-#include "platform/graphics/DisplayList.h"
#include "platform/graphics/GraphicsContext.h"
-#include "platform/graphics/GraphicsLayer.h"
-#include "platform/graphics/paint/DisplayItemList.h"
-#include "platform/graphics/paint/DrawingDisplayItem.h"
namespace blink {
+void DrawingDisplayItem::replay(GraphicsContext* context)
+{
+ context->drawPicture(m_picture.get(), m_location);
+}
+
#if ENABLE(ASSERT)
static bool s_inDrawingRecorder = false;
#endif
@@ -51,18 +52,18 @@ DrawingRecorder::~DrawingRecorder()
return;
ASSERT(displayList->bounds() == m_bounds);
OwnPtr<DrawingDisplayItem> drawingItem = adoptPtr(
- new DrawingDisplayItem(m_renderer->displayItemClient(), (DisplayItem::Type)m_phase, displayList->picture(), m_bounds.location()));
-#ifndef NDEBUG
- if (!m_renderer)
- drawingItem->setClientDebugString("nullptr");
- else if (m_renderer->node())
- drawingItem->setClientDebugString(String::format("nodeName: \"%s\", renderer: \"%p\"", m_renderer->node()->nodeName().utf8().data(), m_renderer));
- else
- drawingItem->setClientDebugString(String::format("renderer: \"%p\"", m_renderer));
-#endif
+ new DrawingDisplayItem(displayList->picture(), m_bounds.location(), m_phase, m_renderer));
+ ASSERT(m_renderer->view());
+ m_renderer->view()->viewDisplayList().add(drawingItem.release());
+}
- if (RenderLayer* container = m_renderer->enclosingLayer()->enclosingLayerForPaintInvalidationCrossingFrameBoundaries())
- container->graphicsLayerBacking()->displayItemList().add(drawingItem.release());
+#ifndef NDEBUG
+WTF::String DrawingDisplayItem::asDebugString() const
+{
+ return String::format("{%s, type: \"%s\", location: [%f,%f]}",
+ rendererDebugString(renderer()).utf8().data(), typeAsDebugString(type()).utf8().data(),
+ m_location.x(), m_location.y());
}
+#endif
} // namespace blink
« no previous file with comments | « Source/core/paint/DrawingRecorder.h ('k') | Source/core/paint/DrawingRecorderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698