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

Side by Side Diff: Source/core/paint/LayerPainter.cpp

Issue 900653003: Avoid empty display item pairs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix try bot breakage Created 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/paint/LayerPainter.h" 6 #include "core/paint/LayerPainter.h"
7 7
8 #include "core/frame/Settings.h" 8 #include "core/frame/Settings.h"
9 #include "core/layout/Layer.h" 9 #include "core/layout/Layer.h"
10 #include "core/page/Page.h" 10 #include "core/page/Page.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 if (m_renderLayer.compositingState() == PaintsIntoOwnBacking) 202 if (m_renderLayer.compositingState() == PaintsIntoOwnBacking)
203 offsetFromRoot.move(m_renderLayer.subpixelAccumulation()); 203 offsetFromRoot.move(m_renderLayer.subpixelAccumulation());
204 204
205 LayoutRect rootRelativeBounds; 205 LayoutRect rootRelativeBounds;
206 bool rootRelativeBoundsComputed = false; 206 bool rootRelativeBoundsComputed = false;
207 207
208 // These helpers output clip and compositing operations using a RAII pattern . Stack-allocated-varibles are destructed in the reverse order of construction, 208 // These helpers output clip and compositing operations using a RAII pattern . Stack-allocated-varibles are destructed in the reverse order of construction,
209 // so they are nested properly. 209 // so they are nested properly.
210 ClipPathHelper clipPathHelper(context, m_renderLayer, paintingInfo, rootRela tiveBounds, rootRelativeBoundsComputed, offsetFromRoot, paintFlags); 210 ClipPathHelper clipPathHelper(context, m_renderLayer, paintingInfo, rootRela tiveBounds, rootRelativeBoundsComputed, offsetFromRoot, paintFlags);
211 211
212 OwnPtr<LayerClipRecorder> clipRecorder;
212 OwnPtr<CompositingRecorder> compositingRecorder; 213 OwnPtr<CompositingRecorder> compositingRecorder;
213 OwnPtr<LayerClipRecorder> clipRecorder;
214 // Blending operations must be performed only with the nearest ancestor stac king context. 214 // Blending operations must be performed only with the nearest ancestor stac king context.
215 // Note that there is no need to composite if we're painting the root. 215 // Note that there is no need to composite if we're painting the root.
216 // FIXME: this should be unified further into Layer::paintsWithTransparency( ). 216 // FIXME: this should be unified further into Layer::paintsWithTransparency( ).
217 bool shouldCompositeForBlendMode = (!m_renderLayer.renderer()->isDocumentEle ment() || m_renderLayer.renderer()->isSVGRoot()) && m_renderLayer.stackingNode() ->isStackingContext() && m_renderLayer.hasNonIsolatedDescendantWithBlendMode(); 217 bool shouldCompositeForBlendMode = (!m_renderLayer.renderer()->isDocumentEle ment() || m_renderLayer.renderer()->isSVGRoot()) && m_renderLayer.stackingNode() ->isStackingContext() && m_renderLayer.hasNonIsolatedDescendantWithBlendMode();
218 if (shouldCompositeForBlendMode || m_renderLayer.paintsWithTransparency(pain tingInfo.paintBehavior)) { 218 if (shouldCompositeForBlendMode || m_renderLayer.paintsWithTransparency(pain tingInfo.paintBehavior)) {
219 clipRecorder = adoptPtr(new LayerClipRecorder(m_renderLayer.renderer(), context, DisplayItem::TransparencyClip, 219 clipRecorder = adoptPtr(new LayerClipRecorder(m_renderLayer.renderer(), context, DisplayItem::TransparencyClip,
220 m_renderLayer.paintingExtent(paintingInfo.rootLayer, paintingInfo.pa intDirtyRect, paintingInfo.subPixelAccumulation, paintingInfo.paintBehavior), 220 m_renderLayer.paintingExtent(paintingInfo.rootLayer, paintingInfo.pa intDirtyRect, paintingInfo.subPixelAccumulation, paintingInfo.paintBehavior),
221 &paintingInfo, LayoutPoint(), paintFlags)); 221 &paintingInfo, LayoutPoint(), paintFlags));
222 222
223 compositingRecorder = adoptPtr(new CompositingRecorder(context, m_render Layer.renderer()->displayItemClient(), 223 compositingRecorder = adoptPtr(new CompositingRecorder(context, m_render Layer.renderer()->displayItemClient(),
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 if (!m_renderLayer.containsDirtyOverlayScrollbars()) 698 if (!m_renderLayer.containsDirtyOverlayScrollbars())
699 return; 699 return;
700 700
701 LayerPaintingInfo paintingInfo(&m_renderLayer, enclosingIntRect(damageRect), paintBehavior, LayoutSize(), paintingRoot); 701 LayerPaintingInfo paintingInfo(&m_renderLayer, enclosingIntRect(damageRect), paintBehavior, LayoutSize(), paintingRoot);
702 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); 702 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars);
703 703
704 m_renderLayer.setContainsDirtyOverlayScrollbars(false); 704 m_renderLayer.setContainsDirtyOverlayScrollbars(false);
705 } 705 }
706 706
707 } // namespace blink 707 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/LayerClipRecorderTest.cpp ('k') | Source/platform/graphics/paint/ClipDisplayItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698