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

Unified Diff: cc/trees/single_thread_proxy.cc

Issue 93663004: [#2] Pass gfx structs by const ref (gfx::Rect, gfx::RectF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT, fix builds on non-linux platforms! Created 6 years, 11 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 | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/single_thread_proxy.cc
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index e7dd9f1bde5a83b587e89f9b97ec6f49674cea84..8bdd7653d57fef3cb77cc408de3a1e3f4ee82bff 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -56,7 +56,8 @@ SingleThreadProxy::~SingleThreadProxy() {
DCHECK(!layer_tree_host_impl_);
}
-bool SingleThreadProxy::CompositeAndReadback(void* pixels, gfx::Rect rect) {
+bool SingleThreadProxy::CompositeAndReadback(void* pixels,
+ const gfx::Rect& rect) {
TRACE_EVENT0("cc", "SingleThreadProxy::CompositeAndReadback");
DCHECK(Proxy::IsMainThread());
@@ -242,7 +243,7 @@ void SingleThreadProxy::SetNeedsCommit() {
client_->ScheduleComposite();
}
-void SingleThreadProxy::SetNeedsRedraw(gfx::Rect damage_rect) {
+void SingleThreadProxy::SetNeedsRedraw(const gfx::Rect& damage_rect) {
SetNeedsRedrawRectOnImplThread(damage_rect);
client_->ScheduleComposite();
}
@@ -297,7 +298,8 @@ void SingleThreadProxy::SetNeedsManageTilesOnImplThread() {
NOTREACHED();
}
-void SingleThreadProxy::SetNeedsRedrawRectOnImplThread(gfx::Rect damage_rect) {
+void SingleThreadProxy::SetNeedsRedrawRectOnImplThread(
+ const gfx::Rect& damage_rect) {
// TODO(brianderson): Once we move render_widget scheduling into this class,
// we can treat redraw requests more efficiently than CommitAndRedraw
// requests.
@@ -425,7 +427,7 @@ void SingleThreadProxy::ForceSerializeOnSwapBuffers() {
bool SingleThreadProxy::CommitAndComposite(
base::TimeTicks frame_begin_time,
- gfx::Rect device_viewport_damage_rect,
+ const gfx::Rect& device_viewport_damage_rect,
bool for_readback,
LayerTreeHostImpl::FrameData* frame) {
DCHECK(Proxy::IsMainThread());
@@ -488,7 +490,7 @@ void SingleThreadProxy::UpdateBackgroundAnimateTicking() {
bool SingleThreadProxy::DoComposite(
scoped_refptr<ContextProvider> offscreen_context_provider,
base::TimeTicks frame_begin_time,
- gfx::Rect device_viewport_damage_rect,
+ const gfx::Rect& device_viewport_damage_rect,
bool for_readback,
LayerTreeHostImpl::FrameData* frame) {
DCHECK(!layer_tree_host_->output_surface_lost());
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698