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

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

Issue 202533003: Don't schedule an animation during compositing dirty-bit setting unless needed. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add null check. Created 6 years, 9 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 void addOutOfFlowPositionedLayer(RenderLayer*); 192 void addOutOfFlowPositionedLayer(RenderLayer*);
193 void removeOutOfFlowPositionedLayer(RenderLayer*); 193 void removeOutOfFlowPositionedLayer(RenderLayer*);
194 194
195 void resetTrackedRepaintRects(); 195 void resetTrackedRepaintRects();
196 void setTracksRepaints(bool); 196 void setTracksRepaints(bool);
197 197
198 void setNeedsToRecomputeCompositingRequirements() { m_needsToRecomputeCompos itingRequirements = true; } 198 void setNeedsToRecomputeCompositingRequirements() { m_needsToRecomputeCompos itingRequirements = true; }
199 199
200 virtual String debugName(const GraphicsLayer*) OVERRIDE; 200 virtual String debugName(const GraphicsLayer*) OVERRIDE;
201 201
202 void scheduleAnimationIfNeeded();
203
202 private: 204 private:
203 class OverlapMap; 205 class OverlapMap;
204 206
205 enum CompositingStateTransitionType { 207 enum CompositingStateTransitionType {
206 NoCompositingStateChange, 208 NoCompositingStateChange,
207 AllocateOwnCompositedLayerMapping, 209 AllocateOwnCompositedLayerMapping,
208 RemoveOwnCompositedLayerMapping, 210 RemoveOwnCompositedLayerMapping,
209 PutInSquashingLayer, 211 PutInSquashingLayer,
210 RemoveFromSquashingLayer 212 RemoveFromSquashingLayer
211 }; 213 };
(...skipping 14 matching lines...) Expand all
226 // Absolute coordinates of the compositedLayerMapping's owning layer. Th is is used for computing the correct 228 // Absolute coordinates of the compositedLayerMapping's owning layer. Th is is used for computing the correct
227 // positions of renderlayers when they paint into the squashing layer. 229 // positions of renderlayers when they paint into the squashing layer.
228 LayoutPoint offsetFromAbsoluteForSquashingCLM; 230 LayoutPoint offsetFromAbsoluteForSquashingCLM;
229 231
230 // Counter that tracks what index the next RenderLayer would be if it ge ts squashed to the current squashing layer. 232 // Counter that tracks what index the next RenderLayer would be if it ge ts squashed to the current squashing layer.
231 size_t nextSquashedLayerIndex; 233 size_t nextSquashedLayerIndex;
232 234
233 RenderLayer* clippingAncestorForMostRecentMapping; 235 RenderLayer* clippingAncestorForMostRecentMapping;
234 }; 236 };
235 237
238 bool hasUnresolvedDirtyBits();
239
236 bool canSquashIntoCurrentSquashingOwner(const RenderLayer* candidate, const SquashingState&, const RenderLayer* clippingAncestor); 240 bool canSquashIntoCurrentSquashingOwner(const RenderLayer* candidate, const SquashingState&, const RenderLayer* clippingAncestor);
237 241
238 CompositingStateTransitionType computeCompositedLayerUpdate(RenderLayer*); 242 CompositingStateTransitionType computeCompositedLayerUpdate(RenderLayer*);
239 // Make updates to the layer based on viewport-constrained properties such a s position:fixed. This can in turn affect 243 // Make updates to the layer based on viewport-constrained properties such a s position:fixed. This can in turn affect
240 // compositing. 244 // compositing.
241 bool updateLayerIfViewportConstrained(RenderLayer*); 245 bool updateLayerIfViewportConstrained(RenderLayer*);
242 246
243 // GraphicsLayerClient implementation 247 // GraphicsLayerClient implementation
244 virtual void notifyAnimationStarted(const GraphicsLayer*, double) OVERRIDE { } 248 virtual void notifyAnimationStarted(const GraphicsLayer*, double) OVERRIDE { }
245 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL ayerPaintingPhase, const IntRect&) OVERRIDE; 249 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL ayerPaintingPhase, const IntRect&) OVERRIDE;
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 OwnPtr<GraphicsLayer> m_layerForScrollCorner; 376 OwnPtr<GraphicsLayer> m_layerForScrollCorner;
373 #if USE(RUBBER_BANDING) 377 #if USE(RUBBER_BANDING)
374 OwnPtr<GraphicsLayer> m_layerForOverhangShadow; 378 OwnPtr<GraphicsLayer> m_layerForOverhangShadow;
375 #endif 379 #endif
376 }; 380 };
377 381
378 382
379 } // namespace WebCore 383 } // namespace WebCore
380 384
381 #endif // RenderLayerCompositor_h 385 #endif // RenderLayerCompositor_h
OLDNEW
« no previous file with comments | « Source/core/page/PageAnimator.cpp ('k') | Source/core/rendering/compositing/RenderLayerCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698