2 * Copyright (C) 2009, 2013 Apple Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 #ifndef RenderLayerCompositor_h
27 #define RenderLayerCompositor_h
29 #include "ChromeClient.h"
30 #include "GraphicsLayerClient.h"
31 #include "GraphicsLayerUpdater.h"
32 #include "RenderLayer.h"
33 #include <wtf/HashMap.h>
37 class FixedPositionViewportConstraints;
39 class GraphicsLayerUpdater;
40 class RenderEmbeddedObject;
41 class RenderNamedFlowFragment;
44 class ScrollingCoordinator;
45 class StickyPositionViewportConstraints;
48 typedef unsigned LayerTreeFlags;
50 enum CompositingUpdateType {
51 CompositingUpdateAfterStyleChange,
52 CompositingUpdateAfterLayout,
53 CompositingUpdateOnHitTest,
54 CompositingUpdateOnScroll,
55 CompositingUpdateOnCompositedScroll
59 CompositingReasonNone = 0,
60 CompositingReason3DTransform = 1 << 0,
61 CompositingReasonVideo = 1 << 1,
62 CompositingReasonCanvas = 1 << 2,
63 CompositingReasonPlugin = 1 << 3,
64 CompositingReasonIFrame = 1 << 4,
65 CompositingReasonBackfaceVisibilityHidden = 1 << 5,
66 CompositingReasonClipsCompositingDescendants = 1 << 6,
67 CompositingReasonAnimation = 1 << 7,
68 CompositingReasonFilters = 1 << 8,
69 CompositingReasonPositionFixed = 1 << 9,
70 CompositingReasonPositionSticky = 1 << 10,
71 CompositingReasonOverflowScrollingTouch = 1 << 11,
72 CompositingReasonStacking = 1 << 12,
73 CompositingReasonOverlap = 1 << 13,
74 CompositingReasonNegativeZIndexChildren = 1 << 14,
75 CompositingReasonTransformWithCompositedDescendants = 1 << 15,
76 CompositingReasonOpacityWithCompositedDescendants = 1 << 16,
77 CompositingReasonMaskWithCompositedDescendants = 1 << 17,
78 CompositingReasonReflectionWithCompositedDescendants = 1 << 18,
79 CompositingReasonFilterWithCompositedDescendants = 1 << 19,
80 CompositingReasonBlendingWithCompositedDescendants = 1 << 20,
81 CompositingReasonPerspective = 1 << 21,
82 CompositingReasonPreserve3D = 1 << 22,
83 CompositingReasonRoot = 1 << 23,
84 CompositingReasonIsolatesCompositedBlendingDescendants = 1 << 24,
86 typedef unsigned CompositingReasons;
88 // RenderLayerCompositor manages the hierarchy of
89 // composited RenderLayers. It determines which RenderLayers
90 // become compositing, and creates and maintains a hierarchy of
91 // GraphicsLayers based on the RenderLayer painting order.
93 // There is one RenderLayerCompositor per RenderView.
95 class RenderLayerCompositor final : public GraphicsLayerClient, public GraphicsLayerUpdaterClient {
96 WTF_MAKE_FAST_ALLOCATED;
98 explicit RenderLayerCompositor(RenderView&);
99 virtual ~RenderLayerCompositor();
101 // Return true if this RenderView is in "compositing mode" (i.e. has one or more
102 // composited RenderLayers)
103 bool inCompositingMode() const { return m_compositing; }
104 // This will make a compositing layer at the root automatically, and hook up to
105 // the native view/window system.
106 void enableCompositingMode(bool enable = true);
108 bool inForcedCompositingMode() const { return m_forceCompositingMode; }
110 // Returns true if the accelerated compositing is enabled
111 bool hasAcceleratedCompositing() const { return m_hasAcceleratedCompositing; }
113 bool canRender3DTransforms() const;
115 // Copy the accelerated compositing related flags from Settings
116 void cacheAcceleratedCompositingFlags();
118 // Called when the layer hierarchy needs to be updated (compositing layers have been
119 // created, destroyed or re-parented).
120 void setCompositingLayersNeedRebuild(bool needRebuild = true);
121 bool compositingLayersNeedRebuild() const { return m_compositingLayersNeedRebuild; }
123 void willRecalcStyle();
124 void didRecalcStyleWithNoPendingLayout();
126 // GraphicsLayers buffer state, which gets pushed to the underlying platform layers
127 // at specific times.
128 void scheduleLayerFlush(bool canThrottle);
129 void flushPendingLayerChanges(bool isFlushRoot = true);
131 // flushPendingLayerChanges() flushes the entire GraphicsLayer tree, which can cross frame boundaries.
132 // This call returns the rootmost compositor that is being flushed (including self).
133 RenderLayerCompositor* enclosingCompositorFlushingLayers() const;
135 // Called when the GraphicsLayer for the given RenderLayer has flushed changes inside of flushPendingLayerChanges().
136 void didFlushChangesForLayer(RenderLayer&, const GraphicsLayer*);
138 // Called when something outside WebKit affects the visible rect (e.g. delegated scrolling). Might schedule a layer flush.
139 void didChangeVisibleRect();
141 // Rebuild the tree of compositing layers
142 void updateCompositingLayers(CompositingUpdateType, RenderLayer* updateRoot = nullptr);
143 // This is only used when state changes and we do not exepect a style update or layout to happen soon (e.g. when
144 // we discover that an iframe is overlapped during painting).
145 void scheduleCompositingLayerUpdate();
146 // This is used to cancel any pending update timers when the document goes into page cache.
147 void cancelCompositingLayerUpdate();
149 // Update the compositing state of the given layer. Returns true if that state changed.
150 enum CompositingChangeRepaint { CompositingChangeRepaintNow, CompositingChangeWillRepaintLater };
151 bool updateLayerCompositingState(RenderLayer&, CompositingChangeRepaint = CompositingChangeRepaintNow);
153 // Update the geometry for compositing children of compositingAncestor.
154 void updateCompositingDescendantGeometry(RenderLayer& compositingAncestor, RenderLayer&, bool compositedChildrenOnly);
156 // Whether layer's backing needs a graphics layer to do clipping by an ancestor (non-stacking-context parent with overflow).
157 bool clippedByAncestor(RenderLayer&) const;
158 // Whether layer's backing needs a graphics layer to clip z-order children of the given layer.
159 bool clipsCompositingDescendants(const RenderLayer&) const;
161 // Whether the given layer needs an extra 'contents' layer.
162 bool needsContentsCompositingLayer(const RenderLayer&) const;
164 bool supportsFixedRootBackgroundCompositing() const;
165 bool needsFixedRootBackgroundLayer(const RenderLayer&) const;
166 GraphicsLayer* fixedRootBackgroundLayer() const;
168 // Called after the view transparency, or the document or base background color change.
169 void rootBackgroundTransparencyChanged();
171 // Repaint the appropriate layers when the given RenderLayer starts or stops being composited.
172 void repaintOnCompositingChange(RenderLayer&);
174 void repaintInCompositedAncestor(RenderLayer&, const LayoutRect&);
176 // Notify us that a layer has been added or removed
177 void layerWasAdded(RenderLayer& parent, RenderLayer& child);
178 void layerWillBeRemoved(RenderLayer& parent, RenderLayer& child);
180 void layerStyleChanged(StyleDifference, RenderLayer&, const RenderStyle* oldStyle);
182 static bool canCompositeClipPath(const RenderLayer&);
184 // Get the nearest ancestor layer that has overflow or clip, but is not a stacking context
185 RenderLayer* enclosingNonStackingClippingLayer(const RenderLayer&) const;
187 // Repaint all composited layers.
188 void repaintCompositedLayers();
190 // Returns true if the given layer needs it own backing store.
191 bool requiresOwnBackingStore(const RenderLayer&, const RenderLayer* compositingAncestorLayer, const LayoutRect& layerCompositedBoundsInAncestor, const LayoutRect& ancestorCompositedBounds) const;
193 WEBCORE_EXPORT RenderLayer& rootRenderLayer() const;
194 GraphicsLayer* rootGraphicsLayer() const;
195 WEBCORE_EXPORT GraphicsLayer* scrollLayer() const;
196 GraphicsLayer* clipLayer() const;
197 GraphicsLayer* rootContentLayer() const;
199 #if ENABLE(RUBBER_BANDING)
200 GraphicsLayer* headerLayer() const;
201 GraphicsLayer* footerLayer() const;
204 enum RootLayerAttachment {
206 RootLayerAttachedViaChromeClient,
207 RootLayerAttachedViaEnclosingFrame
210 RootLayerAttachment rootLayerAttachment() const { return m_rootLayerAttachment; }
211 void updateRootLayerAttachment();
212 void updateRootLayerPosition();
214 void setIsInWindow(bool);
216 void clearBackingForAllLayers();
218 void layerBecameComposited(const RenderLayer&) { ++m_compositedLayerCount; }
219 void layerBecameNonComposited(const RenderLayer&);
222 // Use by RenderVideo to ask if it should try to use accelerated compositing.
223 bool canAccelerateVideoRendering(RenderVideo&) const;
226 // Walk the tree looking for layers with 3d transforms. Useful in case you need
227 // to know if there is non-affine content, e.g. for drawing into an image.
228 bool has3DContent() const;
230 static RenderLayerCompositor* frameContentsCompositor(RenderWidget*);
231 // Return true if the layers changed.
232 static bool parentFrameContentLayers(RenderWidget*);
234 // Update the geometry of the layers used for clipping and scrolling in frames.
235 void frameViewDidChangeLocation(const IntPoint& contentsOffset);
236 void frameViewDidChangeSize();
237 void frameViewDidScroll();
238 void frameViewDidAddOrRemoveScrollbars();
239 void frameViewDidLayout();
240 void rootFixedBackgroundsChanged();
242 void scrollingLayerDidChange(RenderLayer&);
243 void fixedRootBackgroundLayerChanged();
245 String layerTreeAsText(LayerTreeFlags);
247 virtual float deviceScaleFactor() const override;
248 virtual float contentsScaleMultiplierForNewTiles(const GraphicsLayer*) const override;
249 virtual float pageScaleFactor() const override;
250 virtual float zoomedOutPageScaleFactor() const override;
252 virtual void didCommitChangesForLayer(const GraphicsLayer*) const override;
253 virtual void notifyFlushBeforeDisplayRefresh(const GraphicsLayer*) override;
255 void layerTiledBackingUsageChanged(const GraphicsLayer*, bool /*usingTiledBacking*/);
257 bool acceleratedDrawingEnabled() const { return m_acceleratedDrawingEnabled; }
259 void deviceOrPageScaleFactorChanged();
261 void windowScreenDidChange(PlatformDisplayID);
263 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizontalScrollbar.get(); }
264 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVerticalScrollbar.get(); }
265 GraphicsLayer* layerForScrollCorner() const { return m_layerForScrollCorner.get(); }
266 #if ENABLE(RUBBER_BANDING)
267 GraphicsLayer* layerForOverhangAreas() const { return m_layerForOverhangAreas.get(); }
268 GraphicsLayer* layerForContentShadow() const { return m_contentShadowLayer.get(); }
270 GraphicsLayer* updateLayerForTopOverhangArea(bool wantsLayer);
271 GraphicsLayer* updateLayerForBottomOverhangArea(bool wantsLayer);
272 GraphicsLayer* updateLayerForHeader(bool wantsLayer);
273 GraphicsLayer* updateLayerForFooter(bool wantsLayer);
276 ScrollableArea* scrollableAreaForScrollLayerID(ScrollingNodeID) const;
278 void updateScrollCoordinatedStatus(RenderLayer&);
279 void removeFromScrollCoordinatedLayers(RenderLayer&);
281 void willRemoveScrollingLayerWithBacking(RenderLayer&, RenderLayerBacking&);
282 void didAddScrollingLayer(RenderLayer&);
285 void registerAllViewportConstrainedLayers();
286 void unregisterAllViewportConstrainedLayers();
288 void registerAllScrollingLayers();
289 void unregisterAllScrollingLayers();
292 void resetTrackedRepaintRects();
293 void setTracksRepaints(bool);
295 void setShouldReevaluateCompositingAfterLayout() { m_reevaluateCompositingAfterLayout = true; }
297 bool viewHasTransparentBackground(Color* backgroundColor = nullptr) const;
299 bool hasNonMainLayersWithTiledBacking() const { return m_layersWithTiledBackingCount; }
301 CompositingReasons reasonsForCompositing(const RenderLayer&) const;
303 void setLayerFlushThrottlingEnabled(bool);
304 void disableLayerFlushThrottlingTemporarilyForInteraction();
306 void didPaintBacking(RenderLayerBacking*);
308 void setRootExtendedBackgroundColor(const Color&);
309 Color rootExtendedBackgroundColor() const { return m_rootExtendedBackgroundColor; }
312 WEBCORE_EXPORT void startTrackingLayerFlushes();
313 WEBCORE_EXPORT unsigned layerFlushCount() const;
315 WEBCORE_EXPORT void startTrackingCompositingUpdates();
316 WEBCORE_EXPORT unsigned compositingUpdateCount() const;
320 struct CompositingState;
321 struct OverlapExtent;
323 // GraphicsLayerClient implementation
324 virtual void notifyFlushRequired(const GraphicsLayer*) override;
325 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const FloatRect&) override;
326 virtual void customPositionForVisibleRectComputation(const GraphicsLayer*, FloatPoint&) const override;
327 virtual bool isTrackingRepaints() const override;
329 // GraphicsLayerUpdaterClient implementation
330 virtual void flushLayersSoon(GraphicsLayerUpdater&) override;
332 // Whether the given RL needs a compositing layer.
333 bool needsToBeComposited(const RenderLayer&, RenderLayer::ViewportConstrainedNotCompositedReason* = nullptr) const;
334 // Whether the layer has an intrinsic need for compositing layer.
335 bool requiresCompositingLayer(const RenderLayer&, RenderLayer::ViewportConstrainedNotCompositedReason* = nullptr) const;
336 // Whether the layer could ever be composited.
337 bool canBeComposited(const RenderLayer&) const;
339 // Make or destroy the backing for this layer; returns true if backing changed.
340 enum class BackingRequired { No, Yes, Unknown };
341 bool updateBacking(RenderLayer&, CompositingChangeRepaint shouldRepaint, BackingRequired = BackingRequired::Unknown);
343 void clearBackingForLayerIncludingDescendants(RenderLayer&);
344 void setIsInWindowForLayerIncludingDescendants(RenderLayer&, bool isInWindow);
346 // Repaint this and its child layers.
347 void recursiveRepaintLayer(RenderLayer&);
349 void computeExtent(const OverlapMap&, const RenderLayer&, OverlapExtent&) const;
350 void addToOverlapMap(OverlapMap&, const RenderLayer&, OverlapExtent&);
351 void addToOverlapMapRecursive(OverlapMap&, const RenderLayer&, const RenderLayer* ancestorLayer = nullptr);
353 void updateCompositingLayersTimerFired();
355 // Returns true if any layer's compositing changed
356 void computeCompositingRequirements(RenderLayer* ancestorLayer, RenderLayer&, OverlapMap&, CompositingState&, bool& layersChanged, bool& descendantHas3DTransform);
358 void computeRegionCompositingRequirements(RenderNamedFlowFragment*, OverlapMap&, CompositingState&, bool& layersChanged, bool& anyDescendantHas3DTransform);
360 void computeCompositingRequirementsForNamedFlowFixed(RenderLayer&, OverlapMap&, CompositingState&, bool& layersChanged, bool& anyDescendantHas3DTransform);
362 // Recurses down the tree, parenting descendant compositing layers and collecting an array of child layers for the current compositing layer.
363 void rebuildCompositingLayerTree(RenderLayer&, Vector<GraphicsLayer*>& childGraphicsLayersOfEnclosingLayer, int depth);
365 // Recurses down the RenderFlowThread tree, parenting descendant compositing layers and collecting an array of child
366 // layers for the current compositing layer corresponding to the anonymous region (that belongs to the region's parent).
367 void rebuildRegionCompositingLayerTree(RenderNamedFlowFragment*, Vector<GraphicsLayer*>& childList, int depth);
369 void rebuildCompositingLayerTreeForNamedFlowFixed(RenderLayer&, Vector<GraphicsLayer*>& childList, int depth);
371 // Recurses down the tree, updating layer geometry only.
372 void updateLayerTreeGeometry(RenderLayer&, int depth);
374 // Hook compositing layers together
375 void setCompositingParent(RenderLayer& childLayer, RenderLayer* parentLayer);
376 void removeCompositedChildren(RenderLayer&);
378 bool layerHas3DContent(const RenderLayer&) const;
379 bool isRunningTransformAnimation(RenderLayerModelObject&) const;
381 void appendDocumentOverlayLayers(Vector<GraphicsLayer*>&);
382 bool hasAnyAdditionalCompositedLayers(const RenderLayer& rootLayer) const;
384 void ensureRootLayer();
385 void destroyRootLayer();
387 void attachRootLayer(RootLayerAttachment);
388 void detachRootLayer();
390 void rootLayerAttachmentChanged();
392 void updateOverflowControlsLayers();
394 void updateScrollLayerPosition();
396 FloatPoint positionForClipLayer() const;
398 void notifyIFramesOfCompositingChange();
400 bool isFlushingLayers() const { return m_flushingLayers; }
401 void updateScrollCoordinatedLayersAfterFlushIncludingSubframes();
402 void updateScrollCoordinatedLayersAfterFlush();
406 GraphicsLayerFactory* graphicsLayerFactory() const;
407 ScrollingCoordinator* scrollingCoordinator() const;
409 #if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
410 RefPtr<DisplayRefreshMonitor> createDisplayRefreshMonitor(PlatformDisplayID) const override;
413 bool requiresCompositingForAnimation(RenderLayerModelObject&) const;
414 bool requiresCompositingForTransform(RenderLayerModelObject&) const;
415 bool requiresCompositingForBackfaceVisibility(RenderLayerModelObject&) const;
416 bool requiresCompositingForVideo(RenderLayerModelObject&) const;
417 bool requiresCompositingForCanvas(RenderLayerModelObject&) const;
418 bool requiresCompositingForPlugin(RenderLayerModelObject&) const;
419 bool requiresCompositingForFrame(RenderLayerModelObject&) const;
420 bool requiresCompositingForFilters(RenderLayerModelObject&) const;
421 bool requiresCompositingForScrollableFrame() const;
422 bool requiresCompositingForPosition(RenderLayerModelObject&, const RenderLayer&, RenderLayer::ViewportConstrainedNotCompositedReason* = nullptr) const;
423 bool requiresCompositingForOverflowScrolling(const RenderLayer&) const;
424 bool requiresCompositingForIndirectReason(RenderLayerModelObject&, bool hasCompositedDescendants, bool has3DTransformedDescendants, RenderLayer::IndirectCompositingReason&) const;
427 bool requiresCompositingForScrolling(const RenderLayer&) const;
429 void updateCustomLayersAfterFlush();
431 ChromeClient* chromeClient() const;
435 void updateScrollCoordinationForThisFrame(ScrollingNodeID);
436 ScrollingNodeID attachScrollingNode(RenderLayer&, ScrollingNodeType, ScrollingNodeID parentNodeID);
437 void updateScrollCoordinatedLayer(RenderLayer&, LayerScrollCoordinationRoles);
438 void detachScrollCoordinatedLayer(RenderLayer&, LayerScrollCoordinationRoles);
439 void reattachSubframeScrollLayers();
441 FixedPositionViewportConstraints computeFixedViewportConstraints(RenderLayer&) const;
442 StickyPositionViewportConstraints computeStickyViewportConstraints(RenderLayer&) const;
444 bool requiresScrollLayer(RootLayerAttachment) const;
445 bool requiresHorizontalScrollbarLayer() const;
446 bool requiresVerticalScrollbarLayer() const;
447 bool requiresScrollCornerLayer() const;
448 #if ENABLE(RUBBER_BANDING)
449 bool requiresOverhangAreasLayer() const;
450 bool requiresContentShadowLayer() const;
453 // True if the FrameView uses a ScrollingCoordinator.
454 bool hasCoordinatedScrolling() const;
456 bool isAsyncScrollableStickyLayer(const RenderLayer&, const RenderLayer** enclosingAcceleratedOverflowLayer = nullptr) const;
457 bool isViewportConstrainedFixedOrStickyLayer(const RenderLayer&) const;
459 bool shouldCompositeOverflowControls() const;
461 void scheduleLayerFlushNow();
462 bool isThrottlingLayerFlushes() const;
463 void startInitialLayerFlushTimerIfNeeded();
464 void startLayerFlushTimerIfNeeded();
465 void layerFlushTimerFired();
467 void paintRelatedMilestonesTimerFired();
470 const char* logReasonsForCompositing(const RenderLayer&);
471 void logLayerInfo(const RenderLayer&, int depth);
474 bool documentUsesTiledBacking() const;
475 bool isMainFrameCompositor() const;
478 RenderView& m_renderView;
479 std::unique_ptr<GraphicsLayer> m_rootContentLayer;
480 Timer m_updateCompositingLayersTimer;
482 bool m_hasAcceleratedCompositing;
483 ChromeClient::CompositingTriggerFlags m_compositingTriggers;
485 bool m_showDebugBorders;
486 bool m_showRepaintCounter;
487 bool m_acceleratedDrawingEnabled;
489 // When true, we have to wait until layout has happened before we can decide whether to enter compositing mode,
490 // because only then do we know the final size of plugins and iframes.
491 mutable bool m_reevaluateCompositingAfterLayout;
494 bool m_compositingLayersNeedRebuild;
495 bool m_flushingLayers;
496 bool m_shouldFlushOnReattach;
497 bool m_forceCompositingMode;
498 bool m_inPostLayoutUpdate; // true when it's OK to trust layout information (e.g. layer sizes and positions)
499 bool m_subframeScrollLayersNeedReattach;
501 bool m_isTrackingRepaints; // Used for testing.
503 int m_compositedLayerCount { 0 };
504 unsigned m_layersWithTiledBackingCount { 0 };
505 unsigned m_layerFlushCount { 0 };
506 unsigned m_compositingUpdateCount { 0 };
508 RootLayerAttachment m_rootLayerAttachment;
510 // Enclosing clipping layer for iframe content
511 std::unique_ptr<GraphicsLayer> m_clipLayer;
512 std::unique_ptr<GraphicsLayer> m_scrollLayer;
515 HashSet<RenderLayer*> m_scrollingLayers;
516 HashSet<RenderLayer*> m_scrollingLayersNeedingUpdate;
518 HashSet<RenderLayer*> m_scrollCoordinatedLayers;
519 HashSet<RenderLayer*> m_scrollCoordinatedLayersNeedingUpdate;
521 // Enclosing layer for overflow controls and the clipping layer
522 std::unique_ptr<GraphicsLayer> m_overflowControlsHostLayer;
524 // Layers for overflow controls
525 std::unique_ptr<GraphicsLayer> m_layerForHorizontalScrollbar;
526 std::unique_ptr<GraphicsLayer> m_layerForVerticalScrollbar;
527 std::unique_ptr<GraphicsLayer> m_layerForScrollCorner;
528 #if ENABLE(RUBBER_BANDING)
529 std::unique_ptr<GraphicsLayer> m_layerForOverhangAreas;
530 std::unique_ptr<GraphicsLayer> m_contentShadowLayer;
531 std::unique_ptr<GraphicsLayer> m_layerForTopOverhangArea;
532 std::unique_ptr<GraphicsLayer> m_layerForBottomOverhangArea;
533 std::unique_ptr<GraphicsLayer> m_layerForHeader;
534 std::unique_ptr<GraphicsLayer> m_layerForFooter;
537 std::unique_ptr<GraphicsLayerUpdater> m_layerUpdater; // Updates tiled layer visible area periodically while animations are running.
539 Timer m_layerFlushTimer;
540 bool m_layerFlushThrottlingEnabled;
541 bool m_layerFlushThrottlingTemporarilyDisabledForInteraction;
542 bool m_hasPendingLayerFlush;
543 bool m_layerNeedsCompositingUpdate { false };
545 Timer m_paintRelatedMilestonesTimer;
548 int m_rootLayerUpdateCount { 0 };
549 int m_obligateCompositedLayerCount { 0 }; // count of layer that have to be composited.
550 int m_secondaryCompositedLayerCount { 0 }; // count of layers that have to be composited because of stacking or overlap.
551 double m_obligatoryBackingStoreBytes { 0 };
552 double m_secondaryBackingStoreBytes { 0 };
555 Color m_rootExtendedBackgroundColor;
556 Color m_lastDocumentBackgroundColor;
558 HashMap<ScrollingNodeID, RenderLayer*> m_scrollingNodeToLayerMap;
562 } // namespace WebCore
564 #endif // RenderLayerCompositor_h