Chromium Code Reviews| Index: cc/picture_pile_impl.cc |
| =================================================================== |
| --- cc/picture_pile_impl.cc (revision 170195) |
| +++ cc/picture_pile_impl.cc (working copy) |
| @@ -12,7 +12,8 @@ |
| return make_scoped_refptr(new PicturePileImpl()); |
| } |
| -PicturePileImpl::PicturePileImpl() { |
| +PicturePileImpl::PicturePileImpl() : |
| + rasterize_time_in_seconds_(0) { |
| } |
| PicturePileImpl::~PicturePileImpl() { |
| @@ -29,6 +30,8 @@ |
| } |
| void PicturePileImpl::Raster(SkCanvas* canvas, gfx::Rect rect) { |
|
nduca
2012/11/29 18:16:30
Lets pass in a ref to Stats object and accumulate
Tom Hudson
2012/11/29 19:16:11
I hit "Done" when I was working in PicturePileImpl
reveman
2012/11/29 19:27:03
you can allocate storage for the stat in TileManag
|
| + base::TimeTicks rasterizeBeginTime = base::TimeTicks::Now(); |
| + |
| // TODO(enne): do this more efficiently, i.e. top down with Skia clips |
| canvas->save(); |
| canvas->translate(-rect.x(), -rect.y()); |
| @@ -41,6 +44,12 @@ |
| pile_[i]->Raster(canvas); |
| } |
| canvas->restore(); |
| + |
| + rasterize_time_in_seconds_ += (base::TimeTicks::Now() - rasterizeBeginTime).InSecondsF(); |
| } |
| +double PicturePileImpl::rasterizeTime() { |
| + return rasterize_time_in_seconds_; |
| +} |
| + |
| } // namespace cc |