Chromium Code Reviews| Index: cc/picture_layer_impl.cc |
| diff --git a/cc/picture_layer_impl.cc b/cc/picture_layer_impl.cc |
| index 18095964f70095b5ee16343138d2fc01f5003e4e..5ae76df22cf6a9433f78df375c3c94cef17d0665 100644 |
| --- a/cc/picture_layer_impl.cc |
| +++ b/cc/picture_layer_impl.cc |
| @@ -4,6 +4,7 @@ |
| #include "cc/picture_layer_impl.h" |
| +#include "base/time.h" |
| #include "cc/layer_tree_host_impl.h" |
| #include "cc/math_util.h" |
| #include "cc/quad_sink.h" |
| @@ -13,7 +14,8 @@ namespace cc { |
| PictureLayerImpl::PictureLayerImpl(int id) : |
| LayerImpl(id), |
| - tilings_(this) { |
| + tilings_(this), |
| + last_update_time_(0) { |
| } |
| PictureLayerImpl::~PictureLayerImpl() { |
| @@ -88,6 +90,19 @@ void PictureLayerImpl::didUpdateTransforms() { |
| tilings_.AddTiling(contentsScaleX(), tile_size); |
| // TODO(enne): handle invalidations, create new tiles |
| } |
| + |
| + gfx::Transform current_transform = screenSpaceTransform(); |
| + double current_time = |
| + (base::TimeTicks::Now() - base::TimeTicks()).InSecondsF(); |
| + if (last_update_time_ != 0) { |
|
epennerAtGoogle
2012/11/30 16:48:34
Should we move this condition into UpdateTilePrior
qinmin
2012/11/30 19:24:13
using timedelta 0 when this happens, so that we wo
|
| + tilings_.UpdateTilePriorities(layerTreeHostImpl()->deviceViewportSize(), |
| + contentsScaleX(), |
|
danakj
2012/11/30 18:39:00
can you DCHECK that contentsScaleX() == contentsSc
qinmin
2012/11/30 19:24:13
Done.
|
| + last_transform_, |
| + current_transform, |
| + current_time - last_update_time_); |
| + } |
| + last_transform_ = current_transform; |
| + last_update_time_ = current_time; |
| } |
| scoped_refptr<Tile> PictureLayerImpl::CreateTile(PictureLayerTiling*, |