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

Side by Side Diff: sky/engine/core/rendering/RenderLayer.h

Issue 959543002: Simplify and reduce calls to beginTransparencyLayers. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
« no previous file with comments | « sky/engine/core/rendering/RenderBox.cpp ('k') | sky/engine/core/rendering/RenderLayer.cpp » ('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) 2003, 2009, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Intel Corporation. All rights reserved. 3 * Copyright (C) 2013 Intel Corporation. All rights reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 RenderLayerStackingNode* stackingNode() { return m_stackingNode.get(); } 124 RenderLayerStackingNode* stackingNode() { return m_stackingNode.get(); }
125 const RenderLayerStackingNode* stackingNode() const { return m_stackingNode. get(); } 125 const RenderLayerStackingNode* stackingNode() const { return m_stackingNode. get(); }
126 126
127 bool hasBoxDecorationsOrBackground() const; 127 bool hasBoxDecorationsOrBackground() const;
128 bool hasVisibleBoxDecorations() const; 128 bool hasVisibleBoxDecorations() const;
129 // Returns true if this layer has visible content (ignoring any child layers ). 129 // Returns true if this layer has visible content (ignoring any child layers ).
130 bool isVisuallyNonEmpty() const; 130 bool isVisuallyNonEmpty() const;
131 // True if this layer container renderers that paint. 131 // True if this layer container renderers that paint.
132 bool hasNonEmptyChildRenderers() const; 132 bool hasNonEmptyChildRenderers() const;
133 133
134 bool usedTransparency() const { return m_usedTransparency; }
135 void clearUsedTransparency() { m_usedTransparency = false; }
136
137 // Gets the nearest enclosing positioned ancestor layer (also includes 134 // Gets the nearest enclosing positioned ancestor layer (also includes
138 // the <html> layer and the root layer). 135 // the <html> layer and the root layer).
139 RenderLayer* enclosingPositionedAncestor() const; 136 RenderLayer* enclosingPositionedAncestor() const;
140 137
141 RenderLayer* enclosingOverflowClipLayer(IncludeSelfOrNot = IncludeSelf) cons t; 138 RenderLayer* enclosingOverflowClipLayer(IncludeSelfOrNot = IncludeSelf) cons t;
142 139
143 const RenderLayer* compositingContainer() const; 140 const RenderLayer* compositingContainer() const;
144 RenderLayer* enclosingFilterLayer(IncludeSelfOrNot = IncludeSelf) const; 141 RenderLayer* enclosingFilterLayer(IncludeSelfOrNot = IncludeSelf) const;
145 bool hasAncestorWithFilterOutsets() const; 142 bool hasAncestorWithFilterOutsets() const;
146 143
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 // FIXME: We should only create the stacking node if needed. 257 // FIXME: We should only create the stacking node if needed.
261 bool requiresStackingNode() const { return true; } 258 bool requiresStackingNode() const { return true; }
262 void updateStackingNode(); 259 void updateStackingNode();
263 260
264 void updateTransform(const RenderStyle* oldStyle, RenderStyle* newStyle); 261 void updateTransform(const RenderStyle* oldStyle, RenderStyle* newStyle);
265 262
266 void dirty3DTransformedDescendantStatus(); 263 void dirty3DTransformedDescendantStatus();
267 264
268 void updateOrRemoveFilterClients(); 265 void updateOrRemoveFilterClients();
269 266
270 LayoutRect paintingExtent(const RenderLayer* rootLayer, const LayoutRect& pa intDirtyRect, const LayoutSize& subPixelAccumulation);
271
272 LayerType m_layerType; 267 LayerType m_layerType;
273 268
274 // Self-painting layer is an optimization where we avoid the heavy RenderLay er painting 269 // Self-painting layer is an optimization where we avoid the heavy RenderLay er painting
275 // machinery for a RenderLayer allocated only to handle the overflow clip ca se. 270 // machinery for a RenderLayer allocated only to handle the overflow clip ca se.
276 // FIXME(crbug.com/332791): Self-painting layer should be merged into the ov erflow-only concept. 271 // FIXME(crbug.com/332791): Self-painting layer should be merged into the ov erflow-only concept.
277 unsigned m_isSelfPaintingLayer : 1; 272 unsigned m_isSelfPaintingLayer : 1;
278 273
279 // If have no self-painting descendants, we don't have to walk our children during painting. This can lead to 274 // If have no self-painting descendants, we don't have to walk our children during painting. This can lead to
280 // significant savings, especially if the tree has lots of non-self-painting layers grouped together (e.g. table cells). 275 // significant savings, especially if the tree has lots of non-self-painting layers grouped together (e.g. table cells).
281 mutable unsigned m_hasSelfPaintingLayerDescendant : 1; 276 mutable unsigned m_hasSelfPaintingLayerDescendant : 1;
282 mutable unsigned m_hasSelfPaintingLayerDescendantDirty : 1; 277 mutable unsigned m_hasSelfPaintingLayerDescendantDirty : 1;
283 278
284 const unsigned m_isRootLayer : 1; 279 const unsigned m_isRootLayer : 1;
285 280
286 unsigned m_usedTransparency : 1; // Tracks whether we need to close a transp arent layer, i.e., whether
287 // we ended up painting this layer or any desce ndants (and therefore need to
288 // blend).
289
290 unsigned m_3DTransformedDescendantStatusDirty : 1; 281 unsigned m_3DTransformedDescendantStatusDirty : 1;
291 // Set on a stacking context layer that has 3D descendants anywhere 282 // Set on a stacking context layer that has 3D descendants anywhere
292 // in a preserves3D hierarchy. Hint to do 3D-aware hit testing. 283 // in a preserves3D hierarchy. Hint to do 3D-aware hit testing.
293 unsigned m_has3DTransformedDescendant : 1; 284 unsigned m_has3DTransformedDescendant : 1;
294 285
295 unsigned m_hasFilterInfo : 1; 286 unsigned m_hasFilterInfo : 1;
296 287
297 RenderBox* m_renderer; 288 RenderBox* m_renderer;
298 289
299 RenderLayer* m_parent; 290 RenderLayer* m_parent;
(...skipping 12 matching lines...) Expand all
312 303
313 } // namespace blink 304 } // namespace blink
314 305
315 #ifndef NDEBUG 306 #ifndef NDEBUG
316 // Outside the WebCore namespace for ease of invocation from gdb. 307 // Outside the WebCore namespace for ease of invocation from gdb.
317 void showLayerTree(const blink::RenderLayer*); 308 void showLayerTree(const blink::RenderLayer*);
318 void showLayerTree(const blink::RenderObject*); 309 void showLayerTree(const blink::RenderObject*);
319 #endif 310 #endif
320 311
321 #endif // SKY_ENGINE_CORE_RENDERING_RENDERLAYER_H_ 312 #endif // SKY_ENGINE_CORE_RENDERING_RENDERLAYER_H_
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderBox.cpp ('k') | sky/engine/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698