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

Unified Diff: ppapi/utility/graphics/paint_manager.cc

Issue 11110004: Make gfx::Rect class operations consistently mutate the class they are called on. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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
Index: ppapi/utility/graphics/paint_manager.cc
diff --git a/ppapi/utility/graphics/paint_manager.cc b/ppapi/utility/graphics/paint_manager.cc
index 85892bc66ee6a5a8e062873af0855ac06ceae1c6..6354cf6d253cc1f395711eed1669d0cb8376935a 100644
--- a/ppapi/utility/graphics/paint_manager.cc
+++ b/ppapi/utility/graphics/paint_manager.cc
@@ -77,7 +77,8 @@ void PaintManager::InvalidateRect(const Rect& rect) {
PP_DCHECK(!graphics_.is_null() || has_pending_resize_);
// Clip the rect to the device area.
- Rect clipped_rect = rect.Intersect(Rect(GetEffectiveSize()));
+ Rect clipped_rect = rect;
+ clipped_rect.Intersect(Rect(GetEffectiveSize()));
if (clipped_rect.IsEmpty())
return; // Nothing to do.

Powered by Google App Engine
This is Rietveld 408576698