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

Unified Diff: third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp

Issue 1484163002: Raster display item lists via a visual rect RTree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to head. Created 5 years 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: third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp b/third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp
index c38264fbe8b6b9d5791b44456ae01b9dd4d15aaf..37c140416a26107b275ed8e54a5b48ae51fd7990 100644
--- a/third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp
@@ -53,7 +53,8 @@ ContentLayerDelegate::~ContentLayerDelegate()
{
}
-static void paintArtifactToWebDisplayItemList(WebDisplayItemList* list, const PaintArtifact& artifact, const gfx::Rect& bounds)
+static void paintArtifactToWebDisplayItemList(WebDisplayItemList* list, const PaintArtifact& artifact,
+ const PaintController::DisplayItemRectMap& visualRects, const gfx::Rect& bounds)
{
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
// This is a temporary path to paint the artifact using the paint chunk
@@ -62,11 +63,11 @@ static void paintArtifactToWebDisplayItemList(WebDisplayItemList* list, const Pa
// one big flat SkPicture.
SkRect skBounds = SkRect::MakeXYWH(bounds.x(), bounds.y(), bounds.width(), bounds.height());
RefPtr<SkPicture> picture = paintArtifactToSkPicture(artifact, skBounds);
- // TODO(wkorman): Pass actual visual rect with the drawing item.
- list->appendDrawingItem(IntRect(), picture.get());
+ // TODO(wkorman): Why do we need to explicitly construct now? Wasn't required previously.
+ list->appendDrawingItem(WebRect(bounds.x(), bounds.y(), bounds.width(), bounds.height()), picture.get());
return;
}
- artifact.appendToWebDisplayItemList(list);
+ artifact.appendToWebDisplayItemList(visualRects, list);
}
gfx::Rect ContentLayerDelegate::paintableRegion()
@@ -99,7 +100,8 @@ void ContentLayerDelegate::paintContents(
m_painter->paint(context, nullptr);
paintController->commitNewDisplayItems();
- paintArtifactToWebDisplayItemList(webDisplayItemList, paintController->paintArtifact(), paintableRegion());
+ paintArtifactToWebDisplayItemList(webDisplayItemList, paintController->paintArtifact(),
+ paintController->displayItemVisualRects(), paintableRegion());
paintController->setDisplayItemConstructionIsDisabled(false);
}

Powered by Google App Engine
This is Rietveld 408576698