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

Side by Side Diff: Source/core/rendering/RenderLayer.cpp

Issue 449723003: Simply rules for compositing fixed position elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Deleted Created 6 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 , m_has3DTransformedDescendant(false) 121 , m_has3DTransformedDescendant(false)
122 , m_containsDirtyOverlayScrollbars(false) 122 , m_containsDirtyOverlayScrollbars(false)
123 , m_hasFilterInfo(false) 123 , m_hasFilterInfo(false)
124 , m_needsAncestorDependentCompositingInputsUpdate(true) 124 , m_needsAncestorDependentCompositingInputsUpdate(true)
125 , m_needsDescendantDependentCompositingInputsUpdate(true) 125 , m_needsDescendantDependentCompositingInputsUpdate(true)
126 , m_childNeedsCompositingInputsUpdate(true) 126 , m_childNeedsCompositingInputsUpdate(true)
127 , m_hasCompositingDescendant(false) 127 , m_hasCompositingDescendant(false)
128 , m_hasNonCompositedChild(false) 128 , m_hasNonCompositedChild(false)
129 , m_shouldIsolateCompositedDescendants(false) 129 , m_shouldIsolateCompositedDescendants(false)
130 , m_lostGroupedMapping(false) 130 , m_lostGroupedMapping(false)
131 , m_viewportConstrainedNotCompositedReason(NoNotCompositedReason)
132 , m_renderer(renderer) 131 , m_renderer(renderer)
133 , m_parent(0) 132 , m_parent(0)
134 , m_previous(0) 133 , m_previous(0)
135 , m_next(0) 134 , m_next(0)
136 , m_first(0) 135 , m_first(0)
137 , m_last(0) 136 , m_last(0)
138 , m_staticInlinePosition(0) 137 , m_staticInlinePosition(0)
139 , m_staticBlockPosition(0) 138 , m_staticBlockPosition(0)
140 , m_enclosingPaginationLayer(0) 139 , m_enclosingPaginationLayer(0)
141 , m_potentialCompositingReasonsFromStyle(CompositingReasonNone) 140 , m_potentialCompositingReasonsFromStyle(CompositingReasonNone)
(...skipping 1520 matching lines...) Expand 10 before | Expand all | Expand 10 after
1662 DisableCompositingQueryAsserts disabler; 1661 DisableCompositingQueryAsserts disabler;
1663 1662
1664 if (compositingState() != NotComposited) { 1663 if (compositingState() != NotComposited) {
1665 if (context->updatingControlTints() || (paintingInfo.paintBehavior & Pai ntBehaviorFlattenCompositingLayers)) { 1664 if (context->updatingControlTints() || (paintingInfo.paintBehavior & Pai ntBehaviorFlattenCompositingLayers)) {
1666 // The updatingControlTints() painting pass goes through compositing layers, 1665 // The updatingControlTints() painting pass goes through compositing layers,
1667 // but we need to ensure that we don't cache clip rects computed wit h the wrong root in this case. 1666 // but we need to ensure that we don't cache clip rects computed wit h the wrong root in this case.
1668 // FIXME: ok, but what about PaintBehaviorFlattenCompositingLayers? That's for printing. 1667 // FIXME: ok, but what about PaintBehaviorFlattenCompositingLayers? That's for printing.
1669 // FIXME: why isn't the code here global, as opposed to being set on each paintLayer() call? 1668 // FIXME: why isn't the code here global, as opposed to being set on each paintLayer() call?
1670 paintFlags |= PaintLayerUncachedClipRects; 1669 paintFlags |= PaintLayerUncachedClipRects;
1671 } 1670 }
1672 } else if (viewportConstrainedNotCompositedReason() == NotCompositedForBound sOutOfView) {
1673 // Don't paint out-of-view viewport constrained layers (when doing prepa inting) because they will never be visible
1674 // unless their position or viewport size is changed.
1675 return;
1676 } 1671 }
1677 1672
1678 // Non self-painting leaf layers don't need to be painted as their renderer( ) should properly paint itself. 1673 // Non self-painting leaf layers don't need to be painted as their renderer( ) should properly paint itself.
1679 if (!isSelfPaintingLayer() && !hasSelfPaintingLayerDescendant()) 1674 if (!isSelfPaintingLayer() && !hasSelfPaintingLayerDescendant())
1680 return; 1675 return;
1681 1676
1682 if (shouldSuppressPaintingLayer(this)) 1677 if (shouldSuppressPaintingLayer(this))
1683 return; 1678 return;
1684 1679
1685 // If this layer is totally invisible then there is nothing to paint. 1680 // If this layer is totally invisible then there is nothing to paint.
(...skipping 2049 matching lines...) Expand 10 before | Expand all | Expand 10 after
3735 } else { 3730 } else {
3736 rect.append(logicalBoundingBox()); 3731 rect.append(logicalBoundingBox());
3737 rects.set(this, rect); 3732 rects.set(this, rect);
3738 } 3733 }
3739 } 3734 }
3740 } 3735 }
3741 3736
3742 DisableCompositingQueryAsserts::DisableCompositingQueryAsserts() 3737 DisableCompositingQueryAsserts::DisableCompositingQueryAsserts()
3743 : m_disabler(gCompositingQueryMode, CompositingQueriesAreAllowed) { } 3738 : m_disabler(gCompositingQueryMode, CompositingQueriesAreAllowed) { }
3744 3739
3745 COMPILE_ASSERT(1 << RenderLayer::ViewportConstrainedNotCompositedReasonBits >= R enderLayer::NumNotCompositedReasons, too_many_viewport_constrained_not_compositi ng_reasons);
3746
3747 } // namespace blink 3740 } // namespace blink
3748 3741
3749 #ifndef NDEBUG 3742 #ifndef NDEBUG
3750 void showLayerTree(const blink::RenderLayer* layer) 3743 void showLayerTree(const blink::RenderLayer* layer)
3751 { 3744 {
3752 if (!layer) 3745 if (!layer)
3753 return; 3746 return;
3754 3747
3755 if (blink::LocalFrame* frame = layer->renderer()->frame()) { 3748 if (blink::LocalFrame* frame = layer->renderer()->frame()) {
3756 WTF::String output = externalRepresentation(frame, blink::RenderAsTextSh owAllLayers | blink::RenderAsTextShowLayerNesting | blink::RenderAsTextShowCompo sitedLayers | blink::RenderAsTextShowAddresses | blink::RenderAsTextShowIDAndCla ss | blink::RenderAsTextDontUpdateLayout | blink::RenderAsTextShowLayoutState); 3749 WTF::String output = externalRepresentation(frame, blink::RenderAsTextSh owAllLayers | blink::RenderAsTextShowLayerNesting | blink::RenderAsTextShowCompo sitedLayers | blink::RenderAsTextShowAddresses | blink::RenderAsTextShowIDAndCla ss | blink::RenderAsTextDontUpdateLayout | blink::RenderAsTextShowLayoutState);
3757 fprintf(stderr, "%s\n", output.utf8().data()); 3750 fprintf(stderr, "%s\n", output.utf8().data());
3758 } 3751 }
3759 } 3752 }
3760 3753
3761 void showLayerTree(const blink::RenderObject* renderer) 3754 void showLayerTree(const blink::RenderObject* renderer)
3762 { 3755 {
3763 if (!renderer) 3756 if (!renderer)
3764 return; 3757 return;
3765 showLayerTree(renderer->enclosingLayer()); 3758 showLayerTree(renderer->enclosingLayer());
3766 } 3759 }
3767 #endif 3760 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | Source/core/rendering/compositing/CompositingReasonFinder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698