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

Side by Side Diff: cc/paint/skia_paint_canvas.cc

Issue 2769533002: Clean up calls to ToSkPicture (Closed)
Patch Set: Rebase Created 3 years, 9 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/paint/paint_canvas.h" 5 #include "cc/paint/paint_canvas.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "cc/paint/display_item_list.h" 8 #include "cc/paint/display_item_list.h"
9 #include "cc/paint/paint_record.h" 9 #include "cc/paint/paint_record.h"
10 #include "cc/paint/paint_recorder.h" 10 #include "cc/paint/paint_recorder.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 SkScalar y, 261 SkScalar y,
262 const PaintFlags& flags) { 262 const PaintFlags& flags) {
263 canvas_->drawTextBlob(blob.get(), x, y, ToSkPaint(flags)); 263 canvas_->drawTextBlob(blob.get(), x, y, ToSkPaint(flags));
264 } 264 }
265 265
266 void SkiaPaintCanvas::drawDisplayItemList( 266 void SkiaPaintCanvas::drawDisplayItemList(
267 scoped_refptr<DisplayItemList> display_item_list) { 267 scoped_refptr<DisplayItemList> display_item_list) {
268 display_item_list->Raster(canvas_, nullptr); 268 display_item_list->Raster(canvas_, nullptr);
269 } 269 }
270 270
271 void SkiaPaintCanvas::drawPicture(sk_sp<const PaintRecord> record, 271 void SkiaPaintCanvas::drawPicture(sk_sp<const PaintRecord> record) {
272 const SkMatrix* matrix, 272 record->playback(canvas_);
273 const PaintFlags* flags) {
274 canvas_->drawPicture(ToSkPicture(record.get()), matrix, ToSkPaint(flags));
275 } 273 }
276 274
277 bool SkiaPaintCanvas::isClipEmpty() const { 275 bool SkiaPaintCanvas::isClipEmpty() const {
278 return canvas_->isClipEmpty(); 276 return canvas_->isClipEmpty();
279 } 277 }
280 278
281 bool SkiaPaintCanvas::isClipRect() const { 279 bool SkiaPaintCanvas::isClipRect() const {
282 return canvas_->isClipRect(); 280 return canvas_->isClipRect();
283 } 281 }
284 282
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 SkData* data) { 315 SkData* data) {
318 SkAnnotateNamedDestination(canvas_, point, data); 316 SkAnnotateNamedDestination(canvas_, point, data);
319 } 317 }
320 318
321 void SkiaPaintCanvas::AnnotateLinkToDestination(const SkRect& rect, 319 void SkiaPaintCanvas::AnnotateLinkToDestination(const SkRect& rect,
322 SkData* data) { 320 SkData* data) {
323 SkAnnotateLinkToDestination(canvas_, rect, data); 321 SkAnnotateLinkToDestination(canvas_, rect, data);
324 } 322 }
325 323
326 } // namespace cc 324 } // namespace cc
OLDNEW
« no previous file with comments | « cc/paint/skia_paint_canvas.h ('k') | third_party/WebKit/Source/platform/graphics/PaintGeneratedImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698