Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: cc/resources/skpicture_content_layer_updater.cc

Issue 315963003: Switch Chromium to new Skia SkCanvas::drawPicture method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address code review comment (fix benchmasking_canvas override) Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | skia/ext/benchmarking_canvas.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | skia/ext/benchmarking_canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698