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

Unified Diff: cc/tile.cc

Issue 12096112: [cc] Trace detailed tile info when --trace-all-rendered-frames (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Dont expose to extension yet 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/tile.h ('k') | cc/tile_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tile.cc
diff --git a/cc/tile.cc b/cc/tile.cc
index bc07dccfa85a6ad0dab561bfb2f6f0b7c9521a88..ae2396fb803c01e208405775f5265df2eebe0400 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
« no previous file with comments | « cc/tile.h ('k') | cc/tile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698