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

Side by Side Diff: content/browser/renderer_host/accelerated_surface_container_mac.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: cc/ fixes 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/accelerated_surface_container_mac.h" 5 #include "content/browser/renderer_host/accelerated_surface_container_mac.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/browser/renderer_host/accelerated_surface_container_manager_ma c.h" 8 #include "content/browser/renderer_host/accelerated_surface_container_manager_ma c.h"
9 #include "ui/surface/io_surface_support_mac.h" 9 #include "ui/surface/io_surface_support_mac.h"
10 #include "webkit/plugins/npapi/webplugin.h" 10 #include "webkit/plugins/npapi/webplugin.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 221
222 void AcceleratedSurfaceContainerMac::set_was_painted_to(uint64 surface_handle) { 222 void AcceleratedSurfaceContainerMac::set_was_painted_to(uint64 surface_handle) {
223 set_was_painted_to_common(surface_handle); 223 set_was_painted_to_common(surface_handle);
224 update_rect_ = gfx::Rect(); 224 update_rect_ = gfx::Rect();
225 } 225 }
226 226
227 void AcceleratedSurfaceContainerMac::set_was_painted_to( 227 void AcceleratedSurfaceContainerMac::set_was_painted_to(
228 uint64 surface_handle, 228 uint64 surface_handle,
229 const gfx::Rect& update_rect) { 229 const gfx::Rect& update_rect) {
230 set_was_painted_to_common(surface_handle); 230 set_was_painted_to_common(surface_handle);
231 update_rect_ = update_rect_.Union(update_rect); 231 update_rect_.Union(update_rect);
232 } 232 }
233 233
234 void AcceleratedSurfaceContainerMac::EnqueueTextureForDeletion() { 234 void AcceleratedSurfaceContainerMac::EnqueueTextureForDeletion() {
235 if (texture_) { 235 if (texture_) {
236 DCHECK(texture_pending_deletion_ == 0); 236 DCHECK(texture_pending_deletion_ == 0);
237 texture_pending_deletion_ = texture_; 237 texture_pending_deletion_ = texture_;
238 texture_ = 0; 238 texture_ = 0;
239 } 239 }
240 } 240 }
241 241
(...skipping 11 matching lines...) Expand all
253 surface_.reset(surface); 253 surface_.reset(surface);
254 surface_handle_ = surface_handle; 254 surface_handle_ = surface_handle;
255 surface_width_ = io_surface_support->IOSurfaceGetWidth(surface_); 255 surface_width_ = io_surface_support->IOSurfaceGetWidth(surface_);
256 surface_height_ = io_surface_support->IOSurfaceGetHeight(surface_); 256 surface_height_ = io_surface_support->IOSurfaceGetHeight(surface_);
257 EnqueueTextureForDeletion(); 257 EnqueueTextureForDeletion();
258 } 258 }
259 } 259 }
260 } 260 }
261 was_painted_to_ = true; 261 was_painted_to_ = true;
262 } 262 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/window_sizer/window_sizer_common_unittest.cc ('k') | content/browser/renderer_host/backing_store_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698