OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "cc/playback/display_item_list.h" | 5 #include "cc/playback/display_item_list.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
10 #include "base/trace_event/trace_event_argument.h" | 10 #include "base/trace_event/trace_event_argument.h" |
11 #include "cc/base/math_util.h" | 11 #include "cc/base/math_util.h" |
12 #include "cc/debug/picture_debug_util.h" | 12 #include "cc/debug/picture_debug_util.h" |
13 #include "cc/debug/traced_picture.h" | 13 #include "cc/debug/traced_picture.h" |
14 #include "cc/debug/traced_value.h" | 14 #include "cc/debug/traced_value.h" |
15 #include "cc/playback/largest_display_item.h" | 15 #include "cc/playback/largest_display_item.h" |
16 #include "third_party/skia/include/core/SkCanvas.h" | 16 #include "third_party/skia/include/core/SkCanvas.h" |
17 #include "third_party/skia/include/core/SkPictureRecorder.h" | 17 #include "third_party/skia/include/core/SkPictureRecorder.h" |
18 #include "third_party/skia/include/utils/SkPictureUtils.h" | 18 #include "third_party/skia/include/utils/SkPictureUtils.h" |
19 #include "ui/gfx/skia_util.h" | 19 #include "ui/gfx/skia_util.h" |
20 | 20 |
21 namespace cc { | 21 namespace cc { |
22 | 22 |
| 23 template class ListContainer<DisplayItem>; |
| 24 |
23 namespace { | 25 namespace { |
24 | 26 |
25 bool PictureTracingEnabled() { | 27 bool PictureTracingEnabled() { |
26 bool tracing_enabled; | 28 bool tracing_enabled; |
27 TRACE_EVENT_CATEGORY_GROUP_ENABLED( | 29 TRACE_EVENT_CATEGORY_GROUP_ENABLED( |
28 TRACE_DISABLED_BY_DEFAULT("cc.debug.picture") "," | 30 TRACE_DISABLED_BY_DEFAULT("cc.debug.picture") "," |
29 TRACE_DISABLED_BY_DEFAULT("devtools.timeline.picture"), | 31 TRACE_DISABLED_BY_DEFAULT("devtools.timeline.picture"), |
30 &tracing_enabled); | 32 &tracing_enabled); |
31 return tracing_enabled; | 33 return tracing_enabled; |
32 } | 34 } |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 // This should be only called once, and only after CreateAndCacheSkPicture. | 221 // This should be only called once, and only after CreateAndCacheSkPicture. |
220 DCHECK(picture_); | 222 DCHECK(picture_); |
221 DCHECK(!pixel_refs_); | 223 DCHECK(!pixel_refs_); |
222 pixel_refs_ = make_scoped_ptr(new PixelRefMap(grid_cell_size)); | 224 pixel_refs_ = make_scoped_ptr(new PixelRefMap(grid_cell_size)); |
223 if (!picture_->willPlayBackBitmaps()) | 225 if (!picture_->willPlayBackBitmaps()) |
224 return; | 226 return; |
225 | 227 |
226 pixel_refs_->GatherPixelRefsFromPicture(picture_.get()); | 228 pixel_refs_->GatherPixelRefsFromPicture(picture_.get()); |
227 } | 229 } |
228 } // namespace cc | 230 } // namespace cc |
OLD | NEW |