summaryrefslogtreecommitdiffstats
path: root/cc/tile.cc
diff options
context:
space:
mode:
authornduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-12 18:31:08 +0000
committernduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-12 18:31:08 +0000
commit131a0c245d22336b9c6c6abf78902f5833e5baeb (patch)
tree546e5a89d4c6988fb4491b63efd5b611c193ceb3 /cc/tile.cc
parent3849fb743df6e05f6fd08da8734d1cf2e2285bd4 (diff)
downloadchromium_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.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/cc/tile.cc b/cc/tile.cc
index bc07dcc..ae2396f 100644
--- a/cc/tile.cc
+++ b/cc/tile.cc
@@ -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