| 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);
|
| }
|
|
|
|
|