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

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

Issue 11970041: Merge 139461 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 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
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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 222
223 void updateViewportConstraintStatus(RenderLayer*); 223 void updateViewportConstraintStatus(RenderLayer*);
224 void removeViewportConstrainedLayer(RenderLayer*); 224 void removeViewportConstrainedLayer(RenderLayer*);
225 225
226 void resetTrackedRepaintRects(); 226 void resetTrackedRepaintRects();
227 void setTracksRepaints(bool); 227 void setTracksRepaints(bool);
228 228
229 void reportMemoryUsage(MemoryObjectInfo*) const; 229 void reportMemoryUsage(MemoryObjectInfo*) const;
230 void setShouldReevaluateCompositingAfterLayout() { m_reevaluateCompositingAf terLayout = true; } 230 void setShouldReevaluateCompositingAfterLayout() { m_reevaluateCompositingAf terLayout = true; }
231 231
232 enum FixedPositionLayerNotCompositedReason {
233 NoReason,
234 LayerBoundsOutOfView,
235 DescendantOfTransformedElement,
236 };
237
238 FixedPositionLayerNotCompositedReason fixedPositionLayerNotCompositedReason( const RenderLayer* layer) const { return m_fixedPositionLayerNotCompositedReason Map.get(layer); }
239
240 private: 232 private:
241 class OverlapMap; 233 class OverlapMap;
242 234
243 // GraphicsLayerClient implementation 235 // GraphicsLayerClient implementation
244 virtual void notifyAnimationStarted(const GraphicsLayer*, double) OVERRIDE { } 236 virtual void notifyAnimationStarted(const GraphicsLayer*, double) OVERRIDE { }
245 virtual void notifyFlushRequired(const GraphicsLayer*) OVERRIDE { scheduleLa yerFlush(); } 237 virtual void notifyFlushRequired(const GraphicsLayer*) OVERRIDE { scheduleLa yerFlush(); }
246 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL ayerPaintingPhase, const IntRect&) OVERRIDE; 238 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL ayerPaintingPhase, const IntRect&) OVERRIDE;
247 239
248 virtual bool isTrackingRepaints() const OVERRIDE; 240 virtual bool isTrackingRepaints() const OVERRIDE;
249 241
250 // GraphicsLayerUpdaterClient implementation 242 // GraphicsLayerUpdaterClient implementation
251 virtual void flushLayers(GraphicsLayerUpdater*) OVERRIDE; 243 virtual void flushLayers(GraphicsLayerUpdater*) OVERRIDE;
252 244
253 // Whether the given RL needs a compositing layer. 245 // Whether the given RL needs a compositing layer.
254 bool needsToBeComposited(const RenderLayer*, FixedPositionLayerNotComposited Reason* = 0) const; 246 bool needsToBeComposited(const RenderLayer*, RenderLayer::ViewportConstraine dNotCompositedReason* = 0) const;
255 // Whether the layer has an intrinsic need for compositing layer. 247 // Whether the layer has an intrinsic need for compositing layer.
256 bool requiresCompositingLayer(const RenderLayer*, FixedPositionLayerNotCompo sitedReason* = 0) const; 248 bool requiresCompositingLayer(const RenderLayer*, RenderLayer::ViewportConst rainedNotCompositedReason* = 0) const;
257 // Whether the layer could ever be composited. 249 // Whether the layer could ever be composited.
258 bool canBeComposited(const RenderLayer*) const; 250 bool canBeComposited(const RenderLayer*) const;
259 251
260 // Make or destroy the backing for this layer; returns true if backing chang ed. 252 // Make or destroy the backing for this layer; returns true if backing chang ed.
261 bool updateBacking(RenderLayer*, CompositingChangeRepaint shouldRepaint); 253 bool updateBacking(RenderLayer*, CompositingChangeRepaint shouldRepaint);
262 254
263 void clearBackingForLayerIncludingDescendants(RenderLayer*); 255 void clearBackingForLayerIncludingDescendants(RenderLayer*);
264 256
265 // Repaint the given rect (which is layer's coords), and regions of child la yers that intersect that rect. 257 // Repaint the given rect (which is layer's coords), and regions of child la yers that intersect that rect.
266 void recursiveRepaintLayer(RenderLayer*, const IntRect* = 0); 258 void recursiveRepaintLayer(RenderLayer*, const IntRect* = 0);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 // Whether a running transition or animation enforces the need for a composi ting layer. 303 // Whether a running transition or animation enforces the need for a composi ting layer.
312 bool requiresCompositingForAnimation(RenderObject*) const; 304 bool requiresCompositingForAnimation(RenderObject*) const;
313 bool requiresCompositingForTransform(RenderObject*) const; 305 bool requiresCompositingForTransform(RenderObject*) const;
314 bool requiresCompositingForVideo(RenderObject*) const; 306 bool requiresCompositingForVideo(RenderObject*) const;
315 bool requiresCompositingForCanvas(RenderObject*) const; 307 bool requiresCompositingForCanvas(RenderObject*) const;
316 bool requiresCompositingForPlugin(RenderObject*) const; 308 bool requiresCompositingForPlugin(RenderObject*) const;
317 bool requiresCompositingForFrame(RenderObject*) const; 309 bool requiresCompositingForFrame(RenderObject*) const;
318 bool requiresCompositingForFilters(RenderObject*) const; 310 bool requiresCompositingForFilters(RenderObject*) const;
319 bool requiresCompositingForBlending(RenderObject* renderer) const; 311 bool requiresCompositingForBlending(RenderObject* renderer) const;
320 bool requiresCompositingForScrollableFrame() const; 312 bool requiresCompositingForScrollableFrame() const;
321 bool requiresCompositingForPosition(RenderObject*, const RenderLayer*, Fixed PositionLayerNotCompositedReason* = 0) const; 313 bool requiresCompositingForPosition(RenderObject*, const RenderLayer*, Rende rLayer::ViewportConstrainedNotCompositedReason* = 0) const;
322 bool requiresCompositingForOverflowScrolling(const RenderLayer*) const; 314 bool requiresCompositingForOverflowScrolling(const RenderLayer*) const;
323 bool requiresCompositingForIndirectReason(RenderObject*, bool hasCompositedD escendants, bool has3DTransformedDescendants, RenderLayer::IndirectCompositingRe ason&) const; 315 bool requiresCompositingForIndirectReason(RenderObject*, bool hasCompositedD escendants, bool has3DTransformedDescendants, RenderLayer::IndirectCompositingRe ason&) const;
324 316
325 void addViewportConstrainedLayer(RenderLayer*); 317 void addViewportConstrainedLayer(RenderLayer*);
326 void registerOrUpdateViewportConstrainedLayer(RenderLayer*); 318 void registerOrUpdateViewportConstrainedLayer(RenderLayer*);
327 void unregisterViewportConstrainedLayer(RenderLayer*); 319 void unregisterViewportConstrainedLayer(RenderLayer*);
328 320
329 const FixedPositionViewportConstraints computeFixedViewportConstraints(Rende rLayer*); 321 const FixedPositionViewportConstraints computeFixedViewportConstraints(Rende rLayer*);
330 const StickyPositionViewportConstraints computeStickyViewportConstraints(Ren derLayer*); 322 const StickyPositionViewportConstraints computeStickyViewportConstraints(Ren derLayer*);
331 323
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 384
393 OwnPtr<GraphicsLayerUpdater> m_layerUpdater; // Updates tiled layer visible area periodically while animations are running. 385 OwnPtr<GraphicsLayerUpdater> m_layerUpdater; // Updates tiled layer visible area periodically while animations are running.
394 386
395 #if !LOG_DISABLED 387 #if !LOG_DISABLED
396 int m_rootLayerUpdateCount; 388 int m_rootLayerUpdateCount;
397 int m_obligateCompositedLayerCount; // count of layer that have to be compos ited. 389 int m_obligateCompositedLayerCount; // count of layer that have to be compos ited.
398 int m_secondaryCompositedLayerCount; // count of layers that have to be comp osited because of stacking or overlap. 390 int m_secondaryCompositedLayerCount; // count of layers that have to be comp osited because of stacking or overlap.
399 double m_obligatoryBackingStoreBytes; 391 double m_obligatoryBackingStoreBytes;
400 double m_secondaryBackingStoreBytes; 392 double m_secondaryBackingStoreBytes;
401 #endif 393 #endif
402
403 typedef HashMap<const RenderLayer*, FixedPositionLayerNotCompositedReason> F ixedPositionLayerNotCompositedReasonMap;
404 FixedPositionLayerNotCompositedReasonMap m_fixedPositionLayerNotCompositedRe asonMap;
405 }; 394 };
406 395
407 396
408 } // namespace WebCore 397 } // namespace WebCore
409 398
410 #endif // RenderLayerCompositor_h 399 #endif // RenderLayerCompositor_h
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderLayer.cpp ('k') | Source/WebCore/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698