| 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/playback/display_item_list.h" | 7 #include "cc/playback/display_item_list.h" |
| 8 #include "cc/playback/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" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 : PaintRecorder(context, recording_size, nullptr) { | 36 : PaintRecorder(context, recording_size, nullptr) { |
| 37 } | 37 } |
| 38 | 38 |
| 39 PaintRecorder::~PaintRecorder() { | 39 PaintRecorder::~PaintRecorder() { |
| 40 #if DCHECK_IS_ON() | 40 #if DCHECK_IS_ON() |
| 41 context_.inside_paint_recorder_ = false; | 41 context_.inside_paint_recorder_ = false; |
| 42 #endif | 42 #endif |
| 43 const auto& item = | 43 const auto& item = |
| 44 context_.list_->CreateAndAppendItem<cc::DrawingDisplayItem>( | 44 context_.list_->CreateAndAppendItem<cc::DrawingDisplayItem>( |
| 45 bounds_in_layer_, | 45 bounds_in_layer_, |
| 46 skia::AdoptRef(context_.recorder_->endRecordingAsPicture())); | 46 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 |