diff options
author | reed <reed@google.com> | 2015-07-17 10:05:51 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-17 17:06:33 +0000 |
commit | 7d8235620cf6094b281029a519a76ce0cb41c466 (patch) | |
tree | cec8957bd8d09f6fae847027c6796d093d08d8d4 /components/favicon_base | |
parent | 264f8d41596d249c2472606ee6cc01664d235420 (diff) | |
download | chromium_src-7d8235620cf6094b281029a519a76ce0cb41c466.zip chromium_src-7d8235620cf6094b281029a519a76ce0cb41c466.tar.gz chromium_src-7d8235620cf6094b281029a519a76ce0cb41c466.tar.bz2 |
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}
Diffstat (limited to 'components/favicon_base')
-rw-r--r-- | components/favicon_base/favicon_util.cc | 3 | ||||
-rw-r--r-- | components/favicon_base/select_favicon_frames.cc | 3 |
2 files changed, 2 insertions, 4 deletions
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; |