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/paint/display_item_list.h" |
| 8 #include "cc/paint/drawing_display_item.h" |
7 #include "cc/paint/paint_recorder.h" | 9 #include "cc/paint/paint_recorder.h" |
8 #include "cc/playback/display_item_list.h" | |
9 #include "cc/playback/drawing_display_item.h" | |
10 #include "third_party/skia/include/core/SkRefCnt.h" | 10 #include "third_party/skia/include/core/SkRefCnt.h" |
11 #include "ui/compositor/paint_cache.h" | 11 #include "ui/compositor/paint_cache.h" |
12 #include "ui/compositor/paint_context.h" | 12 #include "ui/compositor/paint_context.h" |
13 #include "ui/gfx/skia_util.h" | 13 #include "ui/gfx/skia_util.h" |
14 | 14 |
15 namespace ui { | 15 namespace ui { |
16 | 16 |
17 // This class records a reference to the context, the canvas returned | 17 // This class records a reference to the context, the canvas returned |
18 // by its recorder_, and the cache. Thus all 3 of these must remain | 18 // by its recorder_, and the cache. Thus all 3 of these must remain |
19 // valid for the lifetime of this object. | 19 // valid for the lifetime of this object. |
(...skipping 22 matching lines...) Expand all Loading... |
42 context_.inside_paint_recorder_ = false; | 42 context_.inside_paint_recorder_ = false; |
43 #endif | 43 #endif |
44 const auto& item = | 44 const auto& item = |
45 context_.list_->CreateAndAppendDrawingItem<cc::DrawingDisplayItem>( | 45 context_.list_->CreateAndAppendDrawingItem<cc::DrawingDisplayItem>( |
46 bounds_in_layer_, context_.recorder_->finishRecordingAsPicture()); | 46 bounds_in_layer_, context_.recorder_->finishRecordingAsPicture()); |
47 if (cache_) | 47 if (cache_) |
48 cache_->SetCache(item); | 48 cache_->SetCache(item); |
49 } | 49 } |
50 | 50 |
51 } // namespace ui | 51 } // namespace ui |
OLD | NEW |