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

Side by Side Diff: cc/tile.h

Issue 11953005: cc: Update picture pile on tiles to prevent memory leak (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename MoveTilePriorities to DidBecomeActive 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 | Annotate | Revision Log
« no previous file with comments | « cc/test/fake_picture_layer_tiling_client.h ('k') | no next file » | 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_TILE_H_ 5 #ifndef CC_TILE_H_
6 #define CC_TILE_H_ 6 #define CC_TILE_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // Returns 0 if not drawable. 47 // Returns 0 if not drawable.
48 ResourceProvider::ResourceId GetResourceId() const; 48 ResourceProvider::ResourceId GetResourceId() const;
49 49
50 const gfx::Rect& opaque_rect() const { return opaque_rect_; } 50 const gfx::Rect& opaque_rect() const { return opaque_rect_; }
51 51
52 bool contents_swizzled() const { return managed_state_.contents_swizzled; } 52 bool contents_swizzled() const { return managed_state_.contents_swizzled; }
53 53
54 float contents_scale() const { return contents_scale_; } 54 float contents_scale() const { return contents_scale_; }
55 gfx::Rect content_rect() const { return content_rect_; } 55 gfx::Rect content_rect() const { return content_rect_; }
56 56
57 void set_picture_pile(scoped_refptr<PicturePileImpl> pile) {
58 picture_pile_ = pile;
59 }
60
57 private: 61 private:
58 // Methods called by by tile manager. 62 // Methods called by by tile manager.
59 friend class TileManager; 63 friend class TileManager;
60 friend class BinComparator; 64 friend class BinComparator;
61 ManagedTileState& managed_state() { return managed_state_; } 65 ManagedTileState& managed_state() { return managed_state_; }
62 const ManagedTileState& managed_state() const { return managed_state_; } 66 const ManagedTileState& managed_state() const { return managed_state_; }
63 size_t bytes_consumed_if_allocated() const; 67 size_t bytes_consumed_if_allocated() const;
64 68
65 // Normal private methods. 69 // Normal private methods.
66 friend class base::RefCounted<Tile>; 70 friend class base::RefCounted<Tile>;
67 ~Tile(); 71 ~Tile();
68 72
69 TileManager* tile_manager_; 73 TileManager* tile_manager_;
70 scoped_refptr<PicturePileImpl> picture_pile_; 74 scoped_refptr<PicturePileImpl> picture_pile_;
71 gfx::Rect tile_size_; 75 gfx::Rect tile_size_;
72 GLenum format_; 76 GLenum format_;
73 gfx::Rect content_rect_; 77 gfx::Rect content_rect_;
74 float contents_scale_; 78 float contents_scale_;
75 gfx::Rect opaque_rect_; 79 gfx::Rect opaque_rect_;
76 80
77 TilePriority priority_[2]; 81 TilePriority priority_[2];
78 ManagedTileState managed_state_; 82 ManagedTileState managed_state_;
79 }; 83 };
80 84
81 } // namespace cc 85 } // namespace cc
82 86
83 #endif // CC_TILE_H_ 87 #endif // CC_TILE_H_
OLDNEW
« no previous file with comments | « cc/test/fake_picture_layer_tiling_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698