From 7d8235620cf6094b281029a519a76ce0cb41c466 Mon Sep 17 00:00:00 2001 From: reed Date: Fri, 17 Jul 2015 10:05:51 -0700 Subject: api refactor: switch to modern variants of drawBitmapRect drawBItmapRect has a long history of tweaks to its api (intrect, floatrects, flags -> constraints, etc.). This CL brings these call-sites up2date, allowing Skia (later) to remove a swath of legacy compatibility methods/types. https://codereview.chromium.org/1237233007/ has already landed in Blink. BUG= CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel TBR=danakj@chromium.org Review URL: https://codereview.chromium.org/1224263006 Cr-Commit-Position: refs/heads/master@{#339274} --- components/favicon_base/favicon_util.cc | 3 +-- components/favicon_base/select_favicon_frames.cc | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'components/favicon_base') diff --git a/components/favicon_base/favicon_util.cc b/components/favicon_base/favicon_util.cc index dea071f..3f1196e 100644 --- a/components/favicon_base/favicon_util.cc +++ b/components/favicon_base/favicon_util.cc @@ -123,8 +123,7 @@ SkBitmap ResizeBitmapByDownsamplingIfPossible( SkCanvas canvas(bitmap); canvas.drawBitmapRect( - best_bitmap, NULL, - SkRect::MakeFromIRect(SkIRect::MakeWH(desired_size, desired_size))); + best_bitmap, SkRect::MakeIWH(desired_size, desired_size)); return bitmap; } return skia::ImageOperations::Resize(best_bitmap, diff --git a/components/favicon_base/select_favicon_frames.cc b/components/favicon_base/select_favicon_frames.cc index 1a1e526..f53e839 100644 --- a/components/favicon_base/select_favicon_frames.cc +++ b/components/favicon_base/select_favicon_frames.cc @@ -42,8 +42,7 @@ SkBitmap SampleNearestNeighbor(const SkBitmap& contents, int desired_size) { { SkCanvas canvas(bitmap); canvas.drawBitmapRect( - contents, NULL, - SkRect::MakeFromIRect(SkIRect::MakeWH(desired_size, desired_size))); + contents, SkRect::MakeIWH(desired_size, desired_size)); } return bitmap; -- cgit v1.1