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

Side by Side Diff: cc/picture_layer_tiling.h

Issue 12258044: cc: Add PictureLayerImpl::AsValue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Size as value 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.cc ('k') | cc/picture_layer_tiling.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_LAYER_TILING_H_ 5 #ifndef CC_PICTURE_LAYER_TILING_H_
6 #define CC_PICTURE_LAYER_TILING_H_ 6 #define CC_PICTURE_LAYER_TILING_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/hash_tables.h" 9 #include "base/hash_tables.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 const gfx::Transform& current_screen_transform, 137 const gfx::Transform& current_screen_transform,
138 int current_source_frame_number, 138 int current_source_frame_number,
139 double current_frame_time, 139 double current_frame_time,
140 bool store_screen_space_quads_on_tiles); 140 bool store_screen_space_quads_on_tiles);
141 141
142 // Copies the src_tree priority into the dst_tree priority for all tiles. 142 // Copies the src_tree priority into the dst_tree priority for all tiles.
143 // The src_tree priority is reset to the lowest priority possible. This 143 // The src_tree priority is reset to the lowest priority possible. This
144 // also updates the pile on each tile to be the current client's pile. 144 // also updates the pile on each tile to be the current client's pile.
145 void DidBecomeActive(); 145 void DidBecomeActive();
146 146
147 scoped_ptr<base::Value> AsValue() const;
148
147 protected: 149 protected:
148 typedef std::pair<int, int> TileMapKey; 150 typedef std::pair<int, int> TileMapKey;
149 typedef base::hash_map<TileMapKey, scoped_refptr<Tile> > TileMap; 151 typedef base::hash_map<TileMapKey, scoped_refptr<Tile> > TileMap;
150 152
151 PictureLayerTiling(float contents_scale); 153 PictureLayerTiling(float contents_scale);
152 Tile* TileAt(int, int) const; 154 Tile* TileAt(int, int) const;
153 void CreateTilesFromContentRect(gfx::Rect layer_rect); 155 void CreateTilesFromContentRect(gfx::Rect layer_rect);
154 void CreateTile(int i, int j); 156 void CreateTile(int i, int j);
155 157
156 PictureLayerTilingClient* client_; 158 PictureLayerTilingClient* client_;
157 float contents_scale_; 159 float contents_scale_;
158 gfx::Size layer_bounds_; 160 gfx::Size layer_bounds_;
159 gfx::Rect last_prioritized_rect_; 161 gfx::Rect last_prioritized_rect_;
160 // It is not legal to have a NULL tile in the tiles_ map. 162 // It is not legal to have a NULL tile in the tiles_ map.
161 TileMap tiles_; 163 TileMap tiles_;
162 TilingData tiling_data_; 164 TilingData tiling_data_;
163 TileResolution resolution_; 165 TileResolution resolution_;
164 int last_source_frame_number_; 166 int last_source_frame_number_;
165 double last_impl_frame_time_; 167 double last_impl_frame_time_;
166 168
167 friend class Iterator; 169 friend class Iterator;
168 }; 170 };
169 171
170 } // namespace cc 172 } // namespace cc
171 173
172 #endif // CC_PICTURE_LAYER_TILING_H_ 174 #endif // CC_PICTURE_LAYER_TILING_H_
OLDNEW
« no previous file with comments | « cc/picture_layer_impl.cc ('k') | cc/picture_layer_tiling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698