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

Side by Side Diff: skia/ext/pixel_ref_utils.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 | « skia/ext/benchmarking_canvas.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "skia/ext/pixel_ref_utils.h" 5 #include "skia/ext/pixel_ref_utils.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "third_party/skia/include/core/SkBitmapDevice.h" 9 #include "third_party/skia/include/core/SkBitmapDevice.h"
10 #include "third_party/skia/include/core/SkCanvas.h" 10 #include "third_party/skia/include/core/SkCanvas.h"
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 SkBitmap empty_bitmap; 363 SkBitmap empty_bitmap;
364 empty_bitmap.setConfig( 364 empty_bitmap.setConfig(
365 SkBitmap::kNo_Config, picture->width(), picture->height()); 365 SkBitmap::kNo_Config, picture->width(), picture->height());
366 366
367 GatherPixelRefDevice device(empty_bitmap, &pixel_ref_set); 367 GatherPixelRefDevice device(empty_bitmap, &pixel_ref_set);
368 SkNoSaveLayerCanvas canvas(&device); 368 SkNoSaveLayerCanvas canvas(&device);
369 369
370 canvas.clipRect(SkRect::MakeWH(picture->width(), picture->height()), 370 canvas.clipRect(SkRect::MakeWH(picture->width(), picture->height()),
371 SkRegion::kIntersect_Op, 371 SkRegion::kIntersect_Op,
372 false); 372 false);
373 canvas.drawPicture(*picture); 373 canvas.drawPicture(picture);
374 } 374 }
375 375
376 } // namespace skia 376 } // namespace skia
OLDNEW
« no previous file with comments | « skia/ext/benchmarking_canvas.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698