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

Unified Diff: cc/picture_layer_tiling.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: rebased 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/picture_layer_tiling.h ('k') | cc/proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/picture_layer_tiling.cc
diff --git a/cc/picture_layer_tiling.cc b/cc/picture_layer_tiling.cc
index ae3afc39d0451f79f96449138fba168f8f90ae2a..a1b4d208b33eba62230de9e13cc083c15c39a507 100644
--- a/cc/picture_layer_tiling.cc
+++ b/cc/picture_layer_tiling.cc
@@ -11,8 +11,16 @@
#include "ui/gfx/safe_integer_conversions.h"
#include "ui/gfx/size_conversions.h"
+namespace {
+static bool store_screen_space_quads_on_tiles = false;
enne (OOO) 2013/02/12 00:21:13 I agree with Shawn that this isn't great as a stat
+}
+
namespace cc {
+void PictureLayerTiling::SetStoreScrenSpaceQuadsOnTiles(bool b) {
enne (OOO) 2013/02/12 00:21:13 Can you use a better variable name than b?
+ store_screen_space_quads_on_tiles = b;
+}
+
scoped_ptr<PictureLayerTiling> PictureLayerTiling::Create(
float contents_scale) {
return make_scoped_ptr(new PictureLayerTiling(contents_scale));
@@ -443,6 +451,13 @@ void PictureLayerTiling::UpdateTilePriorities(
resolution_,
time_to_visible_in_seconds,
distance_to_visible_in_pixels);
+ if (store_screen_space_quads_on_tiles) {
+ bool clipped;
+ priority.set_current_screen_quad(
+ MathUtil::projectQuad(current_screen_transform,
enne (OOO) 2013/02/12 00:21:13 In this case, you can just set_current_screen_quad
+ gfx::QuadF(tile_bounds),
+ clipped));
+ }
tile->set_priority(tree, priority);
}
}
@@ -481,6 +496,13 @@ void PictureLayerTiling::UpdateTilePriorities(
resolution_,
time_to_visible_in_seconds,
distance_to_visible_in_pixels);
+ if (store_screen_space_quads_on_tiles) {
+ bool clipped;
+ priority.set_current_screen_quad(
+ MathUtil::projectQuad(current_screen_transform,
+ gfx::QuadF(tile_bounds),
enne (OOO) 2013/02/12 00:21:13 Here's your low res issue: s/tile_bounds/current_l
+ clipped));
+ }
tile->set_priority(tree, priority);
}
}
« no previous file with comments | « cc/picture_layer_tiling.h ('k') | cc/proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698