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

Side by Side 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 remove subpixel adjustment for transformed fragments. Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 3028 matching lines...) Expand 10 before | Expand all | Expand 10 after
3039 !GetLayoutObject().View()->GetFrame()->ShouldThrottleRendering()) 3039 !GetLayoutObject().View()->GetFrame()->ShouldThrottleRendering())
3040 paint_info.paint_layer->GetLayoutObject().AssertSubtreeIsLaidOut(); 3040 paint_info.paint_layer->GetLayoutObject().AssertSubtreeIsLaidOut();
3041 #endif 3041 #endif
3042 3042
3043 float device_scale_factor = blink::DeviceScaleFactorDeprecated( 3043 float device_scale_factor = blink::DeviceScaleFactorDeprecated(
3044 paint_info.paint_layer->GetLayoutObject().GetFrame()); 3044 paint_info.paint_layer->GetLayoutObject().GetFrame());
3045 context.SetDeviceScaleFactor(device_scale_factor); 3045 context.SetDeviceScaleFactor(device_scale_factor);
3046 3046
3047 if (paint_info.paint_layer->GetCompositingState() != 3047 if (paint_info.paint_layer->GetCompositingState() !=
3048 kPaintsIntoGroupedBacking) { 3048 kPaintsIntoGroupedBacking) {
3049 LayoutSize sub_pixel_accumulation =
3050 paint_info.paint_layer->SubpixelAccumulation();
3051 if (paint_layer_flags & kPaintLayerPaintingCompositingScrollingPhase) {
3052 // The composited scrolling contents layer position rounds the subpixel
3053 // accumulation.
3054 sub_pixel_accumulation =
chrishtr 2017/05/05 01:14:09 This will round off the subpixel accumulation for
flackr 2017/05/05 17:02:19 The composited scrolling content geometry size doe
3055 LayoutSize(RoundedIntSize(sub_pixel_accumulation));
3056 }
3049 // FIXME: GraphicsLayers need a way to split for multicol. 3057 // FIXME: GraphicsLayers need a way to split for multicol.
3050 PaintLayerPaintingInfo painting_info( 3058 PaintLayerPaintingInfo painting_info(
3051 paint_info.paint_layer, LayoutRect(dirty_rect), kGlobalPaintNormalPhase, 3059 paint_info.paint_layer, LayoutRect(dirty_rect), kGlobalPaintNormalPhase,
3052 paint_info.paint_layer->SubpixelAccumulation()); 3060 sub_pixel_accumulation);
3053 PaintLayerPainter(*paint_info.paint_layer) 3061 PaintLayerPainter(*paint_info.paint_layer)
3054 .PaintLayerContents(context, painting_info, paint_layer_flags); 3062 .PaintLayerContents(context, painting_info, paint_layer_flags);
3055 3063
3056 if (paint_info.paint_layer->ContainsDirtyOverlayScrollbars()) 3064 if (paint_info.paint_layer->ContainsDirtyOverlayScrollbars())
3057 PaintLayerPainter(*paint_info.paint_layer) 3065 PaintLayerPainter(*paint_info.paint_layer)
3058 .PaintLayerContents( 3066 .PaintLayerContents(
3059 context, painting_info, 3067 context, painting_info,
3060 paint_layer_flags | kPaintLayerPaintingOverlayScrollbars); 3068 paint_layer_flags | kPaintLayerPaintingOverlayScrollbars);
3061 } else { 3069 } else {
3062 PaintLayerPaintingInfo painting_info( 3070 PaintLayerPaintingInfo painting_info(
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
3615 } else if (graphics_layer == decoration_outline_layer_.get()) { 3623 } else if (graphics_layer == decoration_outline_layer_.get()) {
3616 name = "Decoration Layer"; 3624 name = "Decoration Layer";
3617 } else { 3625 } else {
3618 NOTREACHED(); 3626 NOTREACHED();
3619 } 3627 }
3620 3628
3621 return name; 3629 return name;
3622 } 3630 }
3623 3631
3624 } // namespace blink 3632 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698