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); |
} |
} |