OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ui/compositor/paint_recorder.h" | 5 #include "ui/compositor/paint_recorder.h" |
6 | 6 |
7 #include "cc/resources/display_item_list.h" | 7 #include "cc/playback/display_item_list.h" |
8 #include "cc/resources/drawing_display_item.h" | 8 #include "cc/playback/drawing_display_item.h" |
9 #include "third_party/skia/include/core/SkPictureRecorder.h" | 9 #include "third_party/skia/include/core/SkPictureRecorder.h" |
10 #include "ui/compositor/paint_cache.h" | 10 #include "ui/compositor/paint_cache.h" |
11 #include "ui/compositor/paint_context.h" | 11 #include "ui/compositor/paint_context.h" |
12 #include "ui/gfx/skia_util.h" | 12 #include "ui/gfx/skia_util.h" |
13 | 13 |
14 namespace ui { | 14 namespace ui { |
15 | 15 |
16 PaintRecorder::PaintRecorder(const PaintContext& context, PaintCache* cache) | 16 PaintRecorder::PaintRecorder(const PaintContext& context, PaintCache* cache) |
17 : context_(context), | 17 : context_(context), |
18 owned_canvas_( | 18 owned_canvas_( |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 if (!context_.list_) | 53 if (!context_.list_) |
54 return; | 54 return; |
55 | 55 |
56 auto* item = context_.list_->CreateAndAppendItem<cc::DrawingDisplayItem>(); | 56 auto* item = context_.list_->CreateAndAppendItem<cc::DrawingDisplayItem>(); |
57 item->SetNew(skia::AdoptRef(context_.recorder_->endRecordingAsPicture())); | 57 item->SetNew(skia::AdoptRef(context_.recorder_->endRecordingAsPicture())); |
58 if (cache_) | 58 if (cache_) |
59 cache_->SetCache(item); | 59 cache_->SetCache(item); |
60 } | 60 } |
61 | 61 |
62 } // namespace ui | 62 } // namespace ui |
OLD | NEW |