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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
48 | 48 |
49 SkISize deviceSize = canvas->getDeviceSize(); | 49 SkISize deviceSize = canvas->getDeviceSize(); |
50 stats->totalPixelsRasterized += deviceSize.width() * deviceSize.height(); | 50 stats->totalPixelsRasterized += deviceSize.width() * deviceSize.height(); |
51 } | 51 } |
52 canvas->restore(); | 52 canvas->restore(); |
53 | 53 |
54 stats->totalRasterizeTimeInSeconds += (base::TimeTicks::Now() - | 54 stats->totalRasterizeTimeInSeconds += (base::TimeTicks::Now() - |
55 rasterizeBeginTime).InSecondsF(); | 55 rasterizeBeginTime).InSecondsF(); |
56 } | 56 } |
57 | 57 |
58 std::vector<SkPixelRef*> PicturePileImpl::GatherPixelRefs( | |
nduca
2012/12/06 08:46:53
style nit, should we pass in the vector that we're
qinmin
2012/12/07 05:06:28
Done.
| |
59 const gfx::Rect& rect) { | |
60 std::vector<SkPixelRef*> result; | |
61 for (PicturePile::Pile::const_iterator i = pile_.begin(); | |
62 i != pile_.end(); ++i) { | |
63 std::vector<SkPixelRef*> pixel_refs = (*i)->GatherPixelRefs(rect); | |
64 result.insert(result.end(), pixel_refs.begin(), pixel_refs.end()); | |
65 } | |
66 return result; | |
67 } | |
68 | |
58 } // namespace cc | 69 } // namespace cc |
OLD | NEW |