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

Side by Side Diff: Source/core/layout/LayoutBlockFlow.cpp

Issue 1315213002: (WIP) Paint invalidation for slimming paint v2 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/layout/LayoutBox.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 2011 matching lines...) Expand 10 before | Expand all | Expand 10 after
2022 && !floatingObject.layoutObject()->hasSelfPaintingLayer() 2022 && !floatingObject.layoutObject()->hasSelfPaintingLayer()
2023 && (floatingObject.isDirectlyContained() || (paintAllDescendants && floatingObject.isDescendant()))) { 2023 && (floatingObject.isDirectlyContained() || (paintAllDescendants && floatingObject.isDescendant()))) {
2024 2024
2025 LayoutBox* floatingLayoutBox = floatingObject.layoutObject(); 2025 LayoutBox* floatingLayoutBox = floatingObject.layoutObject();
2026 floatingLayoutBox->setShouldDoFullPaintInvalidation(); 2026 floatingLayoutBox->setShouldDoFullPaintInvalidation();
2027 floatingLayoutBox->invalidatePaintForOverhangingFloats(false); 2027 floatingLayoutBox->invalidatePaintForOverhangingFloats(false);
2028 } 2028 }
2029 } 2029 }
2030 } 2030 }
2031 2031
2032 // TODO: Remove this (which is a kind of incremental invalidation) for slimming paint v2.
2032 void LayoutBlockFlow::invalidatePaintForOverflow() 2033 void LayoutBlockFlow::invalidatePaintForOverflow()
2033 { 2034 {
2034 // FIXME: We could tighten up the left and right invalidation points if we l et layoutInlineChildren fill them in based off the particular lines 2035 // FIXME: We could tighten up the left and right invalidation points if we l et layoutInlineChildren fill them in based off the particular lines
2035 // it had to lay out. We wouldn't need the hasOverflowClip() hack in that ca se either. 2036 // it had to lay out. We wouldn't need the hasOverflowClip() hack in that ca se either.
2036 LayoutUnit paintInvalidationLogicalLeft = logicalLeftVisualOverflow(); 2037 LayoutUnit paintInvalidationLogicalLeft = logicalLeftVisualOverflow();
2037 LayoutUnit paintInvalidationLogicalRight = logicalRightVisualOverflow(); 2038 LayoutUnit paintInvalidationLogicalRight = logicalRightVisualOverflow();
2038 if (hasOverflowClip()) { 2039 if (hasOverflowClip()) {
2039 // If we have clipped overflow, we should use layout overflow as well, s ince visual overflow from lines didn't propagate to our block's overflow. 2040 // If we have clipped overflow, we should use layout overflow as well, s ince visual overflow from lines didn't propagate to our block's overflow.
2040 // Note the old code did this as well but even for overflow:visible. The addition of hasOverflowClip() at least tightens up the hack a bit. 2041 // Note the old code did this as well but even for overflow:visible. The addition of hasOverflowClip() at least tightens up the hack a bit.
2041 // layoutInlineChildren should be patched to compute the entire paint in validation rect. 2042 // layoutInlineChildren should be patched to compute the entire paint in validation rect.
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
3057 FrameView* frameView = document().view(); 3058 FrameView* frameView = document().view();
3058 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr ollOffset().height(); 3059 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr ollOffset().height();
3059 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height( ); 3060 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height( );
3060 if (size().height() < visibleHeight) 3061 if (size().height() < visibleHeight)
3061 top += (visibleHeight - size().height()) / 2; 3062 top += (visibleHeight - size().height()) / 2;
3062 setY(top); 3063 setY(top);
3063 dialog->setCentered(top); 3064 dialog->setCentered(top);
3064 } 3065 }
3065 3066
3066 } // namespace blink 3067 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/layout/LayoutBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698