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

Side by Side Diff: skia/ext/pixel_ref_utils.cc

Issue 331283002: stop calling deprecated setConfig (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase + android typo 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/image_operations_unittest.cc ('k') | skia/ext/skia_utils_mac.mm » ('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 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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 354
355 } // namespace 355 } // namespace
356 356
357 void PixelRefUtils::GatherDiscardablePixelRefs( 357 void PixelRefUtils::GatherDiscardablePixelRefs(
358 SkPicture* picture, 358 SkPicture* picture,
359 std::vector<PositionPixelRef>* pixel_refs) { 359 std::vector<PositionPixelRef>* pixel_refs) {
360 pixel_refs->clear(); 360 pixel_refs->clear();
361 DiscardablePixelRefSet pixel_ref_set(pixel_refs); 361 DiscardablePixelRefSet pixel_ref_set(pixel_refs);
362 362
363 SkBitmap empty_bitmap; 363 SkBitmap empty_bitmap;
364 empty_bitmap.setConfig( 364 empty_bitmap.setInfo(SkImageInfo::MakeUnknown(picture->width(), picture->heigh t()));
365 SkBitmap::kNo_Config, picture->width(), picture->height());
366 365
367 GatherPixelRefDevice device(empty_bitmap, &pixel_ref_set); 366 GatherPixelRefDevice device(empty_bitmap, &pixel_ref_set);
368 SkNoSaveLayerCanvas canvas(&device); 367 SkNoSaveLayerCanvas canvas(&device);
369 368
370 canvas.clipRect(SkRect::MakeWH(picture->width(), picture->height()), 369 canvas.clipRect(SkRect::MakeWH(picture->width(), picture->height()),
371 SkRegion::kIntersect_Op, 370 SkRegion::kIntersect_Op,
372 false); 371 false);
373 canvas.drawPicture(picture); 372 canvas.drawPicture(picture);
374 } 373 }
375 374
376 } // namespace skia 375 } // namespace skia
OLDNEW
« no previous file with comments | « skia/ext/image_operations_unittest.cc ('k') | skia/ext/skia_utils_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698