OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/resources/skpicture_content_layer_updater.h" | 5 #include "cc/resources/skpicture_content_layer_updater.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "cc/debug/rendering_stats_instrumentation.h" | 8 #include "cc/debug/rendering_stats_instrumentation.h" |
9 #include "cc/resources/layer_painter.h" | 9 #include "cc/resources/layer_painter.h" |
10 #include "cc/resources/prioritized_resource.h" | 10 #include "cc/resources/prioritized_resource.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 base::TimeDelta duration = | 43 base::TimeDelta duration = |
44 rendering_stats_instrumentation_->EndRecording(start_time); | 44 rendering_stats_instrumentation_->EndRecording(start_time); |
45 rendering_stats_instrumentation_->AddRecord( | 45 rendering_stats_instrumentation_->AddRecord( |
46 duration, content_rect.width() * content_rect.height()); | 46 duration, content_rect.width() * content_rect.height()); |
47 picture_ = skia::AdoptRef(recorder.endRecording()); | 47 picture_ = skia::AdoptRef(recorder.endRecording()); |
48 } | 48 } |
49 | 49 |
50 void SkPictureContentLayerUpdater::DrawPicture(SkCanvas* canvas) { | 50 void SkPictureContentLayerUpdater::DrawPicture(SkCanvas* canvas) { |
51 TRACE_EVENT0("cc", "SkPictureContentLayerUpdater::DrawPicture"); | 51 TRACE_EVENT0("cc", "SkPictureContentLayerUpdater::DrawPicture"); |
52 if (picture_) | 52 if (picture_) |
53 canvas->drawPicture(*picture_); | 53 canvas->drawPicture(picture_.get()); |
54 } | 54 } |
55 | 55 |
56 } // namespace cc | 56 } // namespace cc |
OLD | NEW |