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

Side by Side Diff: cc/resources/picture_layer_tiling.h

Issue 380763002: Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed memory leak found by Linux ASAN Created 6 years, 4 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/resources/picture.cc ('k') | cc/resources/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_RESOURCES_PICTURE_LAYER_TILING_H_ 5 #ifndef CC_RESOURCES_PICTURE_LAYER_TILING_H_
6 #define CC_RESOURCES_PICTURE_LAYER_TILING_H_ 6 #define CC_RESOURCES_PICTURE_LAYER_TILING_H_
7 7
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/containers/hash_tables.h" 12 #include "base/containers/hash_tables.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "cc/base/cc_export.h" 14 #include "cc/base/cc_export.h"
15 #include "cc/base/region.h" 15 #include "cc/base/region.h"
16 #include "cc/base/tiling_data.h" 16 #include "cc/base/tiling_data.h"
17 #include "cc/resources/tile.h" 17 #include "cc/resources/tile.h"
18 #include "cc/resources/tile_priority.h" 18 #include "cc/resources/tile_priority.h"
19 #include "ui/gfx/rect.h" 19 #include "ui/gfx/rect.h"
20 20
21 namespace base {
22 namespace debug {
23 class TracedValue;
24 }
25 }
26
21 namespace cc { 27 namespace cc {
22 28
23 template <typename LayerType> 29 template <typename LayerType>
24 class OcclusionTracker; 30 class OcclusionTracker;
25 class PictureLayerTiling; 31 class PictureLayerTiling;
26 class PicturePileImpl; 32 class PicturePileImpl;
27 33
28 class CC_EXPORT PictureLayerTilingClient { 34 class CC_EXPORT PictureLayerTilingClient {
29 public: 35 public:
30 // Create a tile at the given content_rect (in the contents scale of the 36 // Create a tile at the given content_rect (in the contents scale of the
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 // tiling is becoming recycled. This may include some tiles which are 241 // tiling is becoming recycled. This may include some tiles which are
236 // not in the the pending tiling (due to invalidations). This must 242 // not in the the pending tiling (due to invalidations). This must
237 // be called before DidBecomeActive, as it resets the active priority 243 // be called before DidBecomeActive, as it resets the active priority
238 // while DidBecomeActive promotes pending priority on a similar set of tiles. 244 // while DidBecomeActive promotes pending priority on a similar set of tiles.
239 void DidBecomeRecycled(); 245 void DidBecomeRecycled();
240 246
241 bool NeedsUpdateForFrameAtTime(double frame_time_in_seconds) { 247 bool NeedsUpdateForFrameAtTime(double frame_time_in_seconds) {
242 return frame_time_in_seconds != last_impl_frame_time_in_seconds_; 248 return frame_time_in_seconds != last_impl_frame_time_in_seconds_;
243 } 249 }
244 250
245 scoped_ptr<base::Value> AsValue() const; 251 void AsValueInto(base::debug::TracedValue* array) const;
246 size_t GPUMemoryUsageInBytes() const; 252 size_t GPUMemoryUsageInBytes() const;
247 253
248 struct RectExpansionCache { 254 struct RectExpansionCache {
249 RectExpansionCache(); 255 RectExpansionCache();
250 256
251 gfx::Rect previous_start; 257 gfx::Rect previous_start;
252 gfx::Rect previous_bounds; 258 gfx::Rect previous_bounds;
253 gfx::Rect previous_result; 259 gfx::Rect previous_result;
254 int64 previous_target; 260 int64 previous_target;
255 }; 261 };
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 331
326 private: 332 private:
327 DISALLOW_ASSIGN(PictureLayerTiling); 333 DISALLOW_ASSIGN(PictureLayerTiling);
328 334
329 RectExpansionCache expansion_cache_; 335 RectExpansionCache expansion_cache_;
330 }; 336 };
331 337
332 } // namespace cc 338 } // namespace cc
333 339
334 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ 340 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_
OLDNEW
« no previous file with comments | « cc/resources/picture.cc ('k') | cc/resources/picture_layer_tiling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698