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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/tile.h ('k') | cc/tile_manager.h » ('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 #include "cc/tile.h" 5 #include "cc/tile.h"
6 6
7 #include "base/stringprintf.h"
7 #include "cc/tile_manager.h" 8 #include "cc/tile_manager.h"
8 #include "third_party/khronos/GLES2/gl2.h" 9 #include "third_party/khronos/GLES2/gl2.h"
9 10
10 namespace cc { 11 namespace cc {
11 12
12 Tile::Tile(TileManager* tile_manager, 13 Tile::Tile(TileManager* tile_manager,
13 PicturePileImpl* picture_pile, 14 PicturePileImpl* picture_pile,
14 gfx::Size tile_size, 15 gfx::Size tile_size,
15 GLenum format, 16 GLenum format,
16 gfx::Rect content_rect, 17 gfx::Rect content_rect,
17 float contents_scale) 18 float contents_scale)
18 : tile_manager_(tile_manager), 19 : tile_manager_(tile_manager),
19 picture_pile_(picture_pile), 20 picture_pile_(picture_pile),
20 tile_size_(tile_size), 21 tile_size_(tile_size),
21 format_(format), 22 format_(format),
22 content_rect_(content_rect), 23 content_rect_(content_rect),
23 contents_scale_(contents_scale) { 24 contents_scale_(contents_scale) {
24 tile_manager_->RegisterTile(this); 25 tile_manager_->RegisterTile(this);
25 } 26 }
26 27
27 Tile::~Tile() { 28 Tile::~Tile() {
28 tile_manager_->UnregisterTile(this); 29 tile_manager_->UnregisterTile(this);
29 } 30 }
30 31
32 scoped_ptr<base::Value> Tile::AsValue() const {
33 scoped_ptr<base::DictionaryValue> res(new base::DictionaryValue());
34 res->SetString("id", base::StringPrintf("%p", this));
35 res->SetString("picture_pile", base::StringPrintf("%p",
36 picture_pile_.get()));
37 res->SetDouble("contents_scale", contents_scale_);
38 res->Set("priority.0", priority_[ACTIVE_TREE].AsValue().release());
39 res->Set("priority.1", priority_[PENDING_TREE].AsValue().release());
40 res->Set("managed_state", managed_state_.AsValue().release());
41 return res.PassAs<base::Value>();
42 }
43
31 } // namespace cc 44 } // namespace cc
OLDNEW
« 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