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

Side by Side Diff: Source/core/rendering/RenderLayerCompositor.h

Issue 26110004: Defer the real work in updateCompositingLayers until it's really needed. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 28 matching lines...) Expand all
39 class RenderPart; 39 class RenderPart;
40 class RenderVideo; 40 class RenderVideo;
41 class ScrollingCoordinator; 41 class ScrollingCoordinator;
42 class StickyPositionViewportConstraints; 42 class StickyPositionViewportConstraints;
43 43
44 44
45 enum CompositingUpdateType { 45 enum CompositingUpdateType {
46 CompositingUpdateAfterStyleChange, 46 CompositingUpdateAfterStyleChange,
47 CompositingUpdateAfterLayout, 47 CompositingUpdateAfterLayout,
48 CompositingUpdateOnScroll, 48 CompositingUpdateOnScroll,
49 CompositingUpdateOnCompositedScroll 49 CompositingUpdateOnCompositedScroll,
50 CompositingUpdateOnBeginDrawingFrame
50 }; 51 };
51 52
52 // RenderLayerCompositor manages the hierarchy of 53 // RenderLayerCompositor manages the hierarchy of
53 // composited RenderLayers. It determines which RenderLayers 54 // composited RenderLayers. It determines which RenderLayers
54 // become compositing, and creates and maintains a hierarchy of 55 // become compositing, and creates and maintains a hierarchy of
55 // GraphicsLayers based on the RenderLayer painting order. 56 // GraphicsLayers based on the RenderLayer painting order.
56 // 57 //
57 // There is one RenderLayerCompositor per RenderView. 58 // There is one RenderLayerCompositor per RenderView.
58 59
59 class RenderLayerCompositor : public GraphicsLayerClient { 60 class RenderLayerCompositor : public GraphicsLayerClient {
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 193
193 void updateViewportConstraintStatus(RenderLayer*); 194 void updateViewportConstraintStatus(RenderLayer*);
194 void removeViewportConstrainedLayer(RenderLayer*); 195 void removeViewportConstrainedLayer(RenderLayer*);
195 196
196 void addOutOfFlowPositionedLayer(RenderLayer*); 197 void addOutOfFlowPositionedLayer(RenderLayer*);
197 void removeOutOfFlowPositionedLayer(RenderLayer*); 198 void removeOutOfFlowPositionedLayer(RenderLayer*);
198 199
199 void resetTrackedRepaintRects(); 200 void resetTrackedRepaintRects();
200 void setTracksRepaints(bool); 201 void setTracksRepaints(bool);
201 202
202 void setShouldReevaluateCompositingAfterLayout() { m_reevaluateCompositingAf terLayout = true; } 203 void setShouldReevaluateCompositingAfterLayout() { m_needsToRecomputeComposi tingRequirements = true; }
Ian Vollick 2013/10/08 18:32:21 nit: should this function be renamed as well, then
203 204
204 // Returns all reasons (direct, indirectly due to subtree, and indirectly du e to overlap) that a layer should be composited. 205 // Returns all reasons (direct, indirectly due to subtree, and indirectly du e to overlap) that a layer should be composited.
205 CompositingReasons reasonsForCompositing(const RenderLayer*) const; 206 CompositingReasons reasonsForCompositing(const RenderLayer*) const;
206 207
207 virtual String debugName(const GraphicsLayer*) OVERRIDE; 208 virtual String debugName(const GraphicsLayer*) OVERRIDE;
208 209
209 private: 210 private:
210 class OverlapMap; 211 class OverlapMap;
211 212
212 // GraphicsLayerClient implementation 213 // GraphicsLayerClient implementation
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 private: 310 private:
310 RenderView* m_renderView; 311 RenderView* m_renderView;
311 OwnPtr<GraphicsLayer> m_rootContentLayer; 312 OwnPtr<GraphicsLayer> m_rootContentLayer;
312 313
313 bool m_hasAcceleratedCompositing; 314 bool m_hasAcceleratedCompositing;
314 ChromeClient::CompositingTriggerFlags m_compositingTriggers; 315 ChromeClient::CompositingTriggerFlags m_compositingTriggers;
315 316
316 int m_compositedLayerCount; 317 int m_compositedLayerCount;
317 bool m_showRepaintCounter; 318 bool m_showRepaintCounter;
318 319
320 // FIXME update this comment before landing the patch
319 // When true, we have to wait until layout has happened before we can decide whether to enter compositing mode, 321 // When true, we have to wait until layout has happened before we can decide whether to enter compositing mode,
320 // because only then do we know the final size of plugins and iframes. 322 // because only then do we know the final size of plugins and iframes.
321 mutable bool m_reevaluateCompositingAfterLayout; 323 mutable bool m_needsToRecomputeCompositingRequirements;
324 mutable bool m_needsToUpdateLayerTreeGeometry;
322 325
323 bool m_compositing; 326 bool m_compositing;
324 bool m_compositingLayersNeedRebuild; 327 bool m_compositingLayersNeedRebuild;
325 bool m_forceCompositingMode; 328 bool m_forceCompositingMode;
326 bool m_inPostLayoutUpdate; // true when it's OK to trust layout information (e.g. layer sizes and positions) 329 bool m_inPostLayoutUpdate; // true when it's OK to trust layout information (e.g. layer sizes and positions)
327 bool m_needsUpdateCompositingRequirementsState; 330 bool m_needsUpdateCompositingRequirementsState;
328 331
329 bool m_isTrackingRepaints; // Used for testing. 332 bool m_isTrackingRepaints; // Used for testing.
330 333
331 RootLayerAttachment m_rootLayerAttachment; 334 RootLayerAttachment m_rootLayerAttachment;
(...skipping 27 matching lines...) Expand all
359 int m_secondaryCompositedLayerCount; // count of layers that have to be comp osited because of stacking or overlap. 362 int m_secondaryCompositedLayerCount; // count of layers that have to be comp osited because of stacking or overlap.
360 double m_obligatoryBackingStoreBytes; 363 double m_obligatoryBackingStoreBytes;
361 double m_secondaryBackingStoreBytes; 364 double m_secondaryBackingStoreBytes;
362 #endif 365 #endif
363 }; 366 };
364 367
365 368
366 } // namespace WebCore 369 } // namespace WebCore
367 370
368 #endif // RenderLayerCompositor_h 371 #endif // RenderLayerCompositor_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/RenderLayerCompositor.cpp » ('j') | Source/core/rendering/RenderLayerCompositor.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698