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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 2727223002: Round the subpixel accumulation used for composited scrolling content (Closed)
Patch Set: Merge and fix 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/layout/compositing/CompositedLayerMapping.cpp
diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
index 445b2ad8364fdaf98ac5f7ef66b7d2379952c3da..82099422afca6333172560eac643a19656facc21 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
@@ -3035,10 +3035,18 @@ void CompositedLayerMapping::DoPaintTask(
if (paint_info.paint_layer->GetCompositingState() !=
kPaintsIntoGroupedBacking) {
+ LayoutSize sub_pixel_accumulation =
+ paint_info.paint_layer->SubpixelAccumulation();
+ if (paint_layer_flags & kPaintLayerPaintingCompositingScrollingPhase) {
+ // The composited scrolling contents layer position rounds the subpixel
+ // accumulation.
+ sub_pixel_accumulation =
+ LayoutSize(RoundedIntSize(sub_pixel_accumulation));
+ }
// FIXME: GraphicsLayers need a way to split for multicol.
PaintLayerPaintingInfo painting_info(
paint_info.paint_layer, LayoutRect(dirty_rect), kGlobalPaintNormalPhase,
- paint_info.paint_layer->SubpixelAccumulation());
+ sub_pixel_accumulation);
PaintLayerPainter(*paint_info.paint_layer)
.PaintLayerContents(context, painting_info, paint_layer_flags);

Powered by Google App Engine
This is Rietveld 408576698