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

Side by Side Diff: cc/layer_impl.h

Issue 11419284: Move second internal recursion to a precomputation in layer_tree_host_common.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_LAYER_IMPL_H_ 5 #ifndef CC_LAYER_IMPL_H_
6 #define CC_LAYER_IMPL_H_ 6 #define CC_LAYER_IMPL_H_
7 7
8 #include <public/WebFilterOperations.h> 8 #include <public/WebFilterOperations.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 virtual RenderPass::Id firstContributingRenderPassId() const; 92 virtual RenderPass::Id firstContributingRenderPassId() const;
93 virtual RenderPass::Id nextContributingRenderPassId(RenderPass::Id) const; 93 virtual RenderPass::Id nextContributingRenderPassId(RenderPass::Id) const;
94 94
95 // Returns true if this layer has content to draw. 95 // Returns true if this layer has content to draw.
96 void setDrawsContent(bool); 96 void setDrawsContent(bool);
97 bool drawsContent() const { return m_drawsContent; } 97 bool drawsContent() const { return m_drawsContent; }
98 98
99 bool forceRenderSurface() const { return m_forceRenderSurface; } 99 bool forceRenderSurface() const { return m_forceRenderSurface; }
100 void setForceRenderSurface(bool force) { m_forceRenderSurface = force; } 100 void setForceRenderSurface(bool force) { m_forceRenderSurface = force; }
101 101
102 // Returns 0 if none of the layer's descendants has content to draw, 102 // This value does not consider the layer itself, only its descendants.
103 // 1 if exactly one descendant has content to draw, or a number >1 103 virtual int numDescendantsThatDrawContent() { return m_numDescendantsThatDra wContent; }
danakj 2012/12/03 18:33:41 i like the function name
104 // (but necessary the exact number of descendants) otherwise. 104 void setNumDescendantsThatDrawContent(int num) { m_numDescendantsThatDrawCon tent = num; }
danakj 2012/12/03 18:33:41 I kinda don't like this. Set/get seems simple but
105 virtual int descendantsDrawContent();
106 105
107 void setAnchorPoint(const gfx::PointF&); 106 void setAnchorPoint(const gfx::PointF&);
108 const gfx::PointF& anchorPoint() const { return m_anchorPoint; } 107 const gfx::PointF& anchorPoint() const { return m_anchorPoint; }
109 108
110 void setAnchorPointZ(float); 109 void setAnchorPointZ(float);
111 float anchorPointZ() const { return m_anchorPointZ; } 110 float anchorPointZ() const { return m_anchorPointZ; }
112 111
113 void setBackgroundColor(SkColor); 112 void setBackgroundColor(SkColor);
114 SkColor backgroundColor() const { return m_backgroundColor; } 113 SkColor backgroundColor() const { return m_backgroundColor; }
115 114
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 gfx::Rect m_clipRect; 415 gfx::Rect m_clipRect;
417 416
418 // True if the layer is clipped by m_clipRect. 417 // True if the layer is clipped by m_clipRect.
419 bool m_isClipped; 418 bool m_isClipped;
420 419
421 // Rect indicating what was repainted/updated during update. 420 // Rect indicating what was repainted/updated during update.
422 // Note that plugin layers bypass this and leave it empty. 421 // Note that plugin layers bypass this and leave it empty.
423 // Uses layer's content space. 422 // Uses layer's content space.
424 gfx::RectF m_updateRect; 423 gfx::RectF m_updateRect;
425 424
425 bool m_numDescendantsThatDrawContent;
slavi 2012/12/03 21:33:42 That should be an int.
426
426 // Manages animations for this layer. 427 // Manages animations for this layer.
427 scoped_ptr<LayerAnimationController> m_layerAnimationController; 428 scoped_ptr<LayerAnimationController> m_layerAnimationController;
428 429
429 // Manages scrollbars for this layer 430 // Manages scrollbars for this layer
430 scoped_ptr<ScrollbarAnimationController> m_scrollbarAnimationController; 431 scoped_ptr<ScrollbarAnimationController> m_scrollbarAnimationController;
431 432
432 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 433 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
433 }; 434 };
434 435
435 void sortLayers(std::vector<LayerImpl*>::iterator first, std::vector<LayerImpl*> ::iterator end, LayerSorter*); 436 void sortLayers(std::vector<LayerImpl*>::iterator first, std::vector<LayerImpl*> ::iterator end, LayerSorter*);
436 437
437 } 438 }
438 439
439 #endif // CC_LAYER_IMPL_H_ 440 #endif // CC_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698