diff options
author | nduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-12 18:31:08 +0000 |
---|---|---|
committer | nduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-12 18:31:08 +0000 |
commit | 131a0c245d22336b9c6c6abf78902f5833e5baeb (patch) | |
tree | 546e5a89d4c6988fb4491b63efd5b611c193ceb3 /cc/tile.cc | |
parent | 3849fb743df6e05f6fd08da8734d1cf2e2285bd4 (diff) | |
download | chromium_src-131a0c245d22336b9c6c6abf78902f5833e5baeb.zip chromium_src-131a0c245d22336b9c6c6abf78902f5833e5baeb.tar.gz chromium_src-131a0c245d22336b9c6c6abf78902f5833e5baeb.tar.bz2 |
[cc] Trace detailed tile info when --trace-all-rendered-frames
With this command line flag, this store a detailed dump of all tile data into the trace buffer, including tile quads in screenspace. This provides enough foundation for cc-frame-viewer to visualize what impl-side painting is doing.
NOTRY=True
Review URL: https://chromiumcodereview.appspot.com/12096112
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181956 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/tile.cc')
-rw-r--r-- | cc/tile.cc | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -4,6 +4,7 @@ #include "cc/tile.h" +#include "base/stringprintf.h" #include "cc/tile_manager.h" #include "third_party/khronos/GLES2/gl2.h" @@ -28,4 +29,16 @@ Tile::~Tile() { tile_manager_->UnregisterTile(this); } +scoped_ptr<base::Value> Tile::AsValue() const { + scoped_ptr<base::DictionaryValue> res(new base::DictionaryValue()); + res->SetString("id", base::StringPrintf("%p", this)); + res->SetString("picture_pile", base::StringPrintf("%p", + picture_pile_.get())); + res->SetDouble("contents_scale", contents_scale_); + res->Set("priority.0", priority_[ACTIVE_TREE].AsValue().release()); + res->Set("priority.1", priority_[PENDING_TREE].AsValue().release()); + res->Set("managed_state", managed_state_.AsValue().release()); + return res.PassAs<base::Value>(); +} + } // namespace cc |