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

Side by Side Diff: cc/trees/thread_proxy.cc

Issue 14301021: cc: Don't pass simple well-defined classes by reference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « cc/trees/thread_proxy.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/trees/thread_proxy.h" 5 #include "cc/trees/thread_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "cc/base/thread.h" 10 #include "cc/base/thread.h"
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 448
449 layer_tree_host_impl_->SendManagedMemoryStats( 449 layer_tree_host_impl_->SendManagedMemoryStats(
450 layer_tree_host_->contents_texture_manager()->MemoryVisibleBytes(), 450 layer_tree_host_->contents_texture_manager()->MemoryVisibleBytes(),
451 layer_tree_host_->contents_texture_manager()-> 451 layer_tree_host_->contents_texture_manager()->
452 MemoryVisibleAndNearbyBytes(), 452 MemoryVisibleAndNearbyBytes(),
453 layer_tree_host_->contents_texture_manager()->MemoryUseBytes()); 453 layer_tree_host_->contents_texture_manager()->MemoryUseBytes());
454 } 454 }
455 455
456 bool ThreadProxy::IsInsideDraw() { return inside_draw_; } 456 bool ThreadProxy::IsInsideDraw() { return inside_draw_; }
457 457
458 void ThreadProxy::SetNeedsRedraw(const gfx::Rect& damage_rect) { 458 void ThreadProxy::SetNeedsRedraw(gfx::Rect damage_rect) {
459 DCHECK(IsMainThread()); 459 DCHECK(IsMainThread());
460 TRACE_EVENT0("cc", "ThreadProxy::SetNeedsRedraw"); 460 TRACE_EVENT0("cc", "ThreadProxy::SetNeedsRedraw");
461 Proxy::ImplThread()->PostTask(base::Bind( 461 Proxy::ImplThread()->PostTask(base::Bind(
462 &ThreadProxy::SetViewportDamageOnImplThread, 462 &ThreadProxy::SetViewportDamageOnImplThread,
463 impl_thread_weak_ptr_, damage_rect)); 463 impl_thread_weak_ptr_, damage_rect));
464 Proxy::ImplThread()->PostTask(base::Bind( 464 Proxy::ImplThread()->PostTask(base::Bind(
465 &ThreadProxy::SetNeedsRedrawOnImplThread, impl_thread_weak_ptr_)); 465 &ThreadProxy::SetNeedsRedrawOnImplThread, impl_thread_weak_ptr_));
466 } 466 }
467 467
468 void ThreadProxy::SetDeferCommits(bool defer_commits) { 468 void ThreadProxy::SetDeferCommits(bool defer_commits) {
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 layer_tree_host_impl_->resource_provider()); 1155 layer_tree_host_impl_->resource_provider());
1156 layer_tree_host_impl_->EnableVSyncNotification(false); 1156 layer_tree_host_impl_->EnableVSyncNotification(false);
1157 input_handler_on_impl_thread_.reset(); 1157 input_handler_on_impl_thread_.reset();
1158 layer_tree_host_impl_.reset(); 1158 layer_tree_host_impl_.reset();
1159 scheduler_on_impl_thread_.reset(); 1159 scheduler_on_impl_thread_.reset();
1160 weak_factory_on_impl_thread_.InvalidateWeakPtrs(); 1160 weak_factory_on_impl_thread_.InvalidateWeakPtrs();
1161 vsync_client_ = NULL; 1161 vsync_client_ = NULL;
1162 completion->Signal(); 1162 completion->Signal();
1163 } 1163 }
1164 1164
1165 void ThreadProxy::SetViewportDamageOnImplThread(const gfx::Rect& damage_rect) { 1165 void ThreadProxy::SetViewportDamageOnImplThread(gfx::Rect damage_rect) {
1166 DCHECK(IsImplThread()); 1166 DCHECK(IsImplThread());
1167 layer_tree_host_impl_->SetViewportDamage(damage_rect); 1167 layer_tree_host_impl_->SetViewportDamage(damage_rect);
1168 } 1168 }
1169 1169
1170 size_t ThreadProxy::MaxPartialTextureUpdates() const { 1170 size_t ThreadProxy::MaxPartialTextureUpdates() const {
1171 return ResourceUpdateController::MaxPartialTextureUpdates(); 1171 return ResourceUpdateController::MaxPartialTextureUpdates();
1172 } 1172 }
1173 1173
1174 void ThreadProxy::RecreateOutputSurfaceOnImplThread( 1174 void ThreadProxy::RecreateOutputSurfaceOnImplThread(
1175 CompletionEvent* completion, 1175 CompletionEvent* completion,
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1349 1349
1350 void ThreadProxy::DidReceiveLastInputEventForVSync( 1350 void ThreadProxy::DidReceiveLastInputEventForVSync(
1351 base::TimeTicks frame_time) { 1351 base::TimeTicks frame_time) {
1352 if (render_vsync_notification_enabled_) { 1352 if (render_vsync_notification_enabled_) {
1353 TRACE_EVENT0("cc", "ThreadProxy::DidReceiveLastInputEventForVSync"); 1353 TRACE_EVENT0("cc", "ThreadProxy::DidReceiveLastInputEventForVSync");
1354 DidVSync(frame_time); 1354 DidVSync(frame_time);
1355 } 1355 }
1356 } 1356 }
1357 1357
1358 } // namespace cc 1358 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698