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

Unified Diff: content/common/gpu/image_transport_surface.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: content/common/gpu/image_transport_surface.cc
diff --git a/content/common/gpu/image_transport_surface.cc b/content/common/gpu/image_transport_surface.cc
index 1b1428b02f0a82d901616908265aa87c8b2394ca..911b7278a9ea469be1eeea85d0d51cc659bb5b91 100644
--- a/content/common/gpu/image_transport_surface.cc
+++ b/content/common/gpu/image_transport_surface.cc
@@ -30,7 +30,8 @@ void ImageTransportSurface::GetRegionsToCopy(
const gfx::Rect& previous_damage_rect,
const gfx::Rect& new_damage_rect,
std::vector<gfx::Rect>* regions) {
- gfx::Rect intersection = previous_damage_rect.Intersect(new_damage_rect);
+ gfx::Rect intersection = previous_damage_rect;
+ intersection.Intersect(new_damage_rect);
if (intersection.IsEmpty()) {
regions->push_back(previous_damage_rect);

Powered by Google App Engine
This is Rietveld 408576698