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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp

Issue 2819923003: [SPInvalidation, SPv2] Compute paint offset for paginated content (Closed)
Patch Set: none Created 3 years, 8 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: third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
index f9320de2ecbc1121d69e6f67d14d7989fe630dc2..7e55aceb6e45f30eb0e4bbebb389fde746e1564e 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
@@ -442,11 +442,7 @@ PaintResult PaintLayerPainter::PaintLayerContents(
if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled())
geometry_mapper_option = PaintLayer::kUseGeometryMapper;
- // TODO(trchen): We haven't decided how to handle visual fragmentation with
- // SPv2. Related thread
- // https://groups.google.com/a/chromium.org/forum/#!topic/graphics-dev/81XuWFf-mxM
- if (fragment_policy == kForceSingleFragment ||
- RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
+ if (fragment_policy == kForceSingleFragment) {
paint_layer_for_fragments->AppendSingleFragmentIgnoringPagination(
layer_fragments, local_painting_info.root_layer,
local_painting_info.paint_dirty_rect, cache_slot,
@@ -990,7 +986,8 @@ void PaintLayerPainter::PaintFragmentWithPhase(
LayoutRect new_cull_rect(clip_rect.Rect());
Optional<ScrollRecorder> scroll_recorder;
LayoutPoint paint_offset = -paint_layer_.LayoutBoxLocation();
- if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() &&
+ !paint_layer_.EnclosingPaginationLayer()) {
paint_offset += paint_layer_.GetLayoutObject().PaintOffset();
new_cull_rect.Move(painting_info.scroll_offset_accumulation);
} else {

Powered by Google App Engine
This is Rietveld 408576698