OLD | NEW |
---|---|
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/debug/trace_event.h" | 5 #include "base/debug/trace_event.h" |
6 #include "cc/picture_pile_impl.h" | 6 #include "cc/picture_pile_impl.h" |
7 #include "cc/rendering_stats.h" | 7 #include "cc/rendering_stats.h" |
8 #include "third_party/skia/include/core/SkCanvas.h" | 8 #include "third_party/skia/include/core/SkCanvas.h" |
9 #include "third_party/skia/include/core/SkSize.h" | 9 #include "third_party/skia/include/core/SkSize.h" |
10 | 10 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
65 | 65 |
66 SkISize deviceSize = canvas->getDeviceSize(); | 66 SkISize deviceSize = canvas->getDeviceSize(); |
67 stats->totalPixelsRasterized += deviceSize.width() * deviceSize.height(); | 67 stats->totalPixelsRasterized += deviceSize.width() * deviceSize.height(); |
68 } | 68 } |
69 canvas->restore(); | 69 canvas->restore(); |
70 | 70 |
71 stats->totalRasterizeTimeInSeconds += (base::TimeTicks::Now() - | 71 stats->totalRasterizeTimeInSeconds += (base::TimeTicks::Now() - |
72 rasterizeBeginTime).InSecondsF(); | 72 rasterizeBeginTime).InSecondsF(); |
73 } | 73 } |
74 | 74 |
75 void PicturePileImpl::GatherPixelRefs(const gfx::Rect& rect, | |
76 std::vector<SkPixelRef*>& pixel_refs) { | |
77 std::vector<SkPixelRef*> result; | |
78 for (PicturePile::Pile::const_iterator i = pile_.begin(); | |
79 i != pile_.end(); ++i) { | |
80 result.clear(); | |
reveman
2012/12/07 21:14:54
don't have to change this but I would have just pu
qinmin
2012/12/07 23:41:55
Done.
| |
81 (*i)->GatherPixelRefs(rect, result); | |
82 pixel_refs.insert(pixel_refs.end(), result.begin(), result.end()); | |
83 } | |
84 } | |
85 | |
75 } // namespace cc | 86 } // namespace cc |
OLD | NEW |