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

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

Issue 2691303004: Less code duplication in PaintLayer::collectFragments() (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/PaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index b0755de97eb432595878d3979350ce6e5b0dde45..7fb3db27db64cfe3023cfe7cd71d1b026fc02f31 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -1558,16 +1558,10 @@ void PaintLayer::collectFragments(
const LayoutPoint* offsetFromRoot,
const LayoutSize& subPixelAccumulation,
const LayoutRect* layerBoundingBox) {
- if (!enclosingPaginationLayer()) {
- // For unpaginated layers, there is only one fragment.
- appendSingleFragmentIgnoringPagination(
- fragments, rootLayer, dirtyRect, clipRectsCacheSlot,
- geometryMapperOption, overlayScrollbarClipBehavior, respectOverflowClip,
- offsetFromRoot, subPixelAccumulation);
- return;
- }
-
- if (!shouldFragmentCompositedBounds(rootLayer)) {
+ // For unpaginated layers, there is only one fragment. We also avoid
+ // fragmentation when compositing, due to implementation limitations.
+ if (!enclosingPaginationLayer() ||
+ !shouldFragmentCompositedBounds(rootLayer)) {
appendSingleFragmentIgnoringPagination(
fragments, rootLayer, dirtyRect, clipRectsCacheSlot,
geometryMapperOption, overlayScrollbarClipBehavior, respectOverflowClip,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698