Chromium Code Reviews| Index: cc/picture_pile.cc |
| =================================================================== |
| --- cc/picture_pile.cc (revision 170195) |
| +++ cc/picture_pile.cc (working copy) |
| @@ -4,8 +4,10 @@ |
| #include <algorithm> |
| +#include "base/time.h" |
| #include "cc/picture_pile.h" |
| #include "cc/picture_pile_impl.h" |
| +#include "cc/rendering_stats.h" |
| namespace cc { |
| @@ -38,6 +40,8 @@ |
| ContentLayerClient* painter, |
| const Region&, |
| RenderingStats& stats) { |
| + base::TimeTicks paintBeginTime = base::TimeTicks::Now(); |
| + |
| // TODO(enne): Add things to the pile, consolidate if needed, etc... |
| // TODO(enne): Only re-record invalidated areas. |
| // TODO(enne): Also re-record areas that have been newly exposed by resize. |
| @@ -47,6 +51,9 @@ |
| pile_.clear(); |
| pile_.push_back(Picture::Create()); |
| pile_[0]->Record(painter, gfx::Rect(gfx::Point(), size_), stats); |
| + |
| + stats.totalPaintTimeInSeconds += (base::TimeTicks::Now() - |
|
nduca
2012/11/29 18:16:30
Lets move this into accounting Picture::Record
Tom Hudson
2012/11/29 19:16:11
D'oh! Picture::Record already does it, so this was
|
| + paintBeginTime).InSecondsF(); |
|
nduca
2012/11/29 18:16:30
i think we also need to track the number of pixels
Tom Hudson
2012/11/29 19:16:11
Done.
|
| } |
| void PicturePile::PushPropertiesTo(PicturePileImpl* other) { |