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

Side by Side Diff: content/browser/compositor/browser_compositor_output_surface.cc

Issue 145313006: [#7] Pass gfx structs by const ref (gfx::Size) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/compositor/browser_compositor_output_surface.h" 5 #include "content/browser/compositor/browser_compositor_output_surface.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 if (!OutputSurface::BindToClient(client)) 74 if (!OutputSurface::BindToClient(client))
75 return false; 75 return false;
76 76
77 output_surface_map_->AddWithID(this, surface_id_); 77 output_surface_map_->AddWithID(this, surface_id_);
78 if (reflector_) 78 if (reflector_)
79 reflector_->OnSourceSurfaceReady(surface_id_); 79 reflector_->OnSourceSurfaceReady(surface_id_);
80 return true; 80 return true;
81 } 81 }
82 82
83 void BrowserCompositorOutputSurface::Reshape(gfx::Size size, 83 void BrowserCompositorOutputSurface::Reshape(const gfx::Size& size,
84 float scale_factor) { 84 float scale_factor) {
85 OutputSurface::Reshape(size, scale_factor); 85 OutputSurface::Reshape(size, scale_factor);
86 if (reflector_.get()) 86 if (reflector_.get())
87 reflector_->OnReshape(size); 87 reflector_->OnReshape(size);
88 } 88 }
89 89
90 void BrowserCompositorOutputSurface::OnUpdateVSyncParameters( 90 void BrowserCompositorOutputSurface::OnUpdateVSyncParameters(
91 base::TimeTicks timebase, 91 base::TimeTicks timebase,
92 base::TimeDelta interval) { 92 base::TimeDelta interval) {
93 DCHECK(CalledOnValidThread()); 93 DCHECK(CalledOnValidThread());
94 DCHECK(HasClient()); 94 DCHECK(HasClient());
95 OnVSyncParametersChanged(timebase, interval); 95 OnVSyncParametersChanged(timebase, interval);
96 compositor_message_loop_->PostTask( 96 compositor_message_loop_->PostTask(
97 FROM_HERE, 97 FROM_HERE,
98 base::Bind(&ui::Compositor::OnUpdateVSyncParameters, 98 base::Bind(&ui::Compositor::OnUpdateVSyncParameters,
99 compositor_, timebase, interval)); 99 compositor_, timebase, interval));
100 } 100 }
101 101
102 void BrowserCompositorOutputSurface::SetReflector(ReflectorImpl* reflector) { 102 void BrowserCompositorOutputSurface::SetReflector(ReflectorImpl* reflector) {
103 reflector_ = reflector; 103 reflector_ = reflector;
104 } 104 }
105 105
106 } // namespace content 106 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698