cc: Fix frequent low-res tile flash when using impl-side painting.
The sequence of events that will trigger this problem:
1. Commit complete, we have a new pending tree, UpdateDrawProperties()
and PictureLayerImpl::updateTilePriorities() are called immediately after
commit.
2. Vsync tick, activatePendingTreeIfNeeded() is called and we make
another call to UpdateDrawProperties() for the pending tree.
This second call to UpdateDrawProperties() happens to create a new high
res tiling but PictureLayerImpl::updateTilePriorities() will early out as
frame number as not changed since last call.
3. areVisibleResourcesReady() is called to determine if we can activate
the pending tree. The result is negative as tiles of new high res tiling
have not been initialized.
4. HasPendingWorkScheduled(PENDING_TREE) is called in case the tile
manager has run out of memory and we need to activate the tree
even though all visible tiles are not initialized. This call will in this
case return false as the new tiling has not yet had a chance to update
tile priorities and as far as the tile manager knows there's no work
to be done.
5. As the tile manager is idle the pending tree is activated even though
none of it's high res tiles have been initialized.
Solution:
Move last_source_frame_number_, last_impl_frame_time_ and early
out decision to PictureLayerTiling class.
BUG=173301
NOTRY=True
Review URL: https://codereview.chromium.org/12094084
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179975 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/cc/picture_layer_tiling_set.h b/cc/picture_layer_tiling_set.h
index d6a8950..62c4b9d 100644
--- a/cc/picture_layer_tiling_set.h
+++ b/cc/picture_layer_tiling_set.h
@@ -53,11 +53,16 @@
WhichTree tree,
const gfx::Size& device_viewport,
gfx::Rect viewport_in_content_space,
- float layer_content_scale_x,
- float layer_content_scale_y,
+ gfx::Size last_layer_bounds,
+ gfx::Size current_layer_bounds,
+ gfx::Size last_layer_content_bounds,
+ gfx::Size current_layer_content_bounds,
+ float last_layer_contents_scale,
+ float current_layer_contents_scale,
const gfx::Transform& last_screen_transform,
const gfx::Transform& current_screen_transform,
- double time_delta);
+ int current_source_frame_number,
+ double current_frame_time);
void DidBecomeActive();