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

Side by Side Diff: cc/picture_pile.h

Issue 12095053: cc: Avoid expensive RenderingStats collection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 10 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
« no previous file with comments | « cc/picture_layer_impl_unittest.cc ('k') | cc/picture_pile.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_PICTURE_PILE_H_ 5 #ifndef CC_PICTURE_PILE_H_
6 #define CC_PICTURE_PILE_H_ 6 #define CC_PICTURE_PILE_H_
7 7
8 #include "cc/picture_pile_base.h" 8 #include "cc/picture_pile_base.h"
9 #include "ui/gfx/rect.h" 9 #include "ui/gfx/rect.h"
10 10
11 namespace cc { 11 namespace cc {
12 class PicturePileImpl; 12 class PicturePileImpl;
13 class Region; 13 class Region;
14 struct RenderingStats; 14 struct RenderingStats;
15 15
16 class CC_EXPORT PicturePile : public PicturePileBase { 16 class CC_EXPORT PicturePile : public PicturePileBase {
17 public: 17 public:
18 PicturePile(); 18 PicturePile();
19 19
20 // Re-record parts of the picture that are invalid. 20 // Re-record parts of the picture that are invalid.
21 // Invalidations are in layer space. 21 // Invalidations are in layer space.
22 void Update( 22 void Update(
23 ContentLayerClient* painter, 23 ContentLayerClient* painter,
24 const Region& invalidation, 24 const Region& invalidation,
25 gfx::Rect visible_layer_rect, 25 gfx::Rect visible_layer_rect,
26 RenderingStats& stats); 26 RenderingStats* stats);
27 27
28 // Update other with a shallow copy of this (main => compositor thread commit) 28 // Update other with a shallow copy of this (main => compositor thread commit)
29 void PushPropertiesTo(PicturePileImpl* other); 29 void PushPropertiesTo(PicturePileImpl* other);
30 30
31 private: 31 private:
32 virtual ~PicturePile(); 32 virtual ~PicturePile();
33 friend class PicturePileImpl; 33 friend class PicturePileImpl;
34 34
35 // Add an invalidation to this picture list. If the list needs to be 35 // Add an invalidation to this picture list. If the list needs to be
36 // entirely recreated, leave it empty. Do not call this on an empty list. 36 // entirely recreated, leave it empty. Do not call this on an empty list.
37 void InvalidateRect( 37 void InvalidateRect(
38 PictureList& picture_list, 38 PictureList& picture_list,
39 gfx::Rect invalidation); 39 gfx::Rect invalidation);
40 40
41 DISALLOW_COPY_AND_ASSIGN(PicturePile); 41 DISALLOW_COPY_AND_ASSIGN(PicturePile);
42 }; 42 };
43 43
44 } // namespace cc 44 } // namespace cc
45 45
46 #endif // CC_PICTURE_PILE_H_ 46 #endif // CC_PICTURE_PILE_H_
OLDNEW
« no previous file with comments | « cc/picture_layer_impl_unittest.cc ('k') | cc/picture_pile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698