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

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

Issue 380763002: Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_PILE_BASE_H_ 5 #ifndef CC_RESOURCES_PICTURE_PILE_BASE_H_
6 #define CC_RESOURCES_PICTURE_PILE_BASE_H_ 6 #define CC_RESOURCES_PICTURE_PILE_BASE_H_
7 7
8 #include <bitset> 8 #include <bitset>
9 #include <list> 9 #include <list>
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/containers/hash_tables.h" 12 #include "base/containers/hash_tables.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.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/picture.h" 17 #include "cc/resources/picture.h"
18 #include "ui/gfx/size.h" 18 #include "ui/gfx/size.h"
19 19
20 namespace base { 20 namespace base {
21 namespace debug {
22 class TracedValue;
23 }
21 class Value; 24 class Value;
22 } 25 }
23 26
24 namespace cc { 27 namespace cc {
25 28
26 class CC_EXPORT PicturePileBase : public base::RefCounted<PicturePileBase> { 29 class CC_EXPORT PicturePileBase : public base::RefCounted<PicturePileBase> {
27 public: 30 public:
28 PicturePileBase(); 31 PicturePileBase();
29 explicit PicturePileBase(const PicturePileBase* other); 32 explicit PicturePileBase(const PicturePileBase* other);
30 PicturePileBase(const PicturePileBase* other, unsigned thread_index); 33 PicturePileBase(const PicturePileBase* other, unsigned thread_index);
(...skipping 14 matching lines...) Expand all
45 48
46 // If this pile contains any valid recordings. May have false positives. 49 // If this pile contains any valid recordings. May have false positives.
47 bool HasRecordings() const { return has_any_recordings_; } 50 bool HasRecordings() const { return has_any_recordings_; }
48 51
49 static void ComputeTileGridInfo(const gfx::Size& tile_grid_size, 52 static void ComputeTileGridInfo(const gfx::Size& tile_grid_size,
50 SkTileGridFactory::TileGridInfo* info); 53 SkTileGridFactory::TileGridInfo* info);
51 54
52 void SetTileGridSize(const gfx::Size& tile_grid_size); 55 void SetTileGridSize(const gfx::Size& tile_grid_size);
53 TilingData& tiling() { return tiling_; } 56 TilingData& tiling() { return tiling_; }
54 57
55 scoped_ptr<base::Value> AsValue() const; 58 void AsValueInto(base::debug::TracedValue* array) const;
56 59
57 protected: 60 protected:
58 class CC_EXPORT PictureInfo { 61 class CC_EXPORT PictureInfo {
59 public: 62 public:
60 enum { 63 enum {
61 INVALIDATION_FRAMES_TRACKED = 32 64 INVALIDATION_FRAMES_TRACKED = 32
62 }; 65 };
63 66
64 PictureInfo(); 67 PictureInfo();
65 ~PictureInfo(); 68 ~PictureInfo();
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 private: 121 private:
119 void SetBufferPixels(int buffer_pixels); 122 void SetBufferPixels(int buffer_pixels);
120 123
121 friend class base::RefCounted<PicturePileBase>; 124 friend class base::RefCounted<PicturePileBase>;
122 DISALLOW_COPY_AND_ASSIGN(PicturePileBase); 125 DISALLOW_COPY_AND_ASSIGN(PicturePileBase);
123 }; 126 };
124 127
125 } // namespace cc 128 } // namespace cc
126 129
127 #endif // CC_RESOURCES_PICTURE_PILE_BASE_H_ 130 #endif // CC_RESOURCES_PICTURE_PILE_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698