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

Unified Diff: ui/gfx/blit.cc

Issue 11270042: Add non-member non-mutating methods for common gfx::Rect operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/app_list/search_result_view.cc ('k') | ui/gfx/image/image_skia_operations.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/blit.cc
diff --git a/ui/gfx/blit.cc b/ui/gfx/blit.cc
index 0c6e6b6bca82466971c593695317bc1c385d6e48..41da3f54f8a741365c62216ece2ee3d9be0ebd11 100644
--- a/ui/gfx/blit.cc
+++ b/ui/gfx/blit.cc
@@ -152,8 +152,8 @@ void ScrollCanvas(SkCanvas* canvas,
SkAutoLockPixels lock(bitmap);
// We expect all coords to be inside the canvas, so clip here.
- gfx::Rect clip = in_clip;
- clip.Intersect(gfx::Rect(0, 0, bitmap.width(), bitmap.height()));
+ gfx::Rect clip = gfx::IntersectRects(
+ in_clip, gfx::Rect(0, 0, bitmap.width(), bitmap.height()));
// Compute the set of pixels we'll actually end up painting.
gfx::Rect dest_rect = clip;
« no previous file with comments | « ui/app_list/search_result_view.cc ('k') | ui/gfx/image/image_skia_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698