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

Side by Side Diff: ui/compositor/test/in_process_context_factory.cc

Issue 2382873002: Replace usage of SurfaceId's client_id with FrameSinkId (Closed)
Patch Set: Fix android_webview Created 4 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 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 "ui/compositor/test/in_process_context_factory.h" 5 #include "ui/compositor/test/in_process_context_factory.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 246
247 gpu::GpuMemoryBufferManager* 247 gpu::GpuMemoryBufferManager*
248 InProcessContextFactory::GetGpuMemoryBufferManager() { 248 InProcessContextFactory::GetGpuMemoryBufferManager() {
249 return &gpu_memory_buffer_manager_; 249 return &gpu_memory_buffer_manager_;
250 } 250 }
251 251
252 cc::TaskGraphRunner* InProcessContextFactory::GetTaskGraphRunner() { 252 cc::TaskGraphRunner* InProcessContextFactory::GetTaskGraphRunner() {
253 return &task_graph_runner_; 253 return &task_graph_runner_;
254 } 254 }
255 255
256 uint32_t InProcessContextFactory::AllocateSurfaceClientId() { 256 cc::FrameSinkId InProcessContextFactory::AllocateFrameSinkId() {
257 return next_surface_client_id_++; 257 return cc::FrameSinkId(next_surface_client_id_++, 0);
258 } 258 }
259 259
260 cc::SurfaceManager* InProcessContextFactory::GetSurfaceManager() { 260 cc::SurfaceManager* InProcessContextFactory::GetSurfaceManager() {
261 return surface_manager_; 261 return surface_manager_;
262 } 262 }
263 263
264 void InProcessContextFactory::SetDisplayVisible(ui::Compositor* compositor, 264 void InProcessContextFactory::SetDisplayVisible(ui::Compositor* compositor,
265 bool visible) { 265 bool visible) {
266 if (!per_compositor_data_.count(compositor)) 266 if (!per_compositor_data_.count(compositor))
267 return; 267 return;
268 per_compositor_data_[compositor]->SetVisible(visible); 268 per_compositor_data_[compositor]->SetVisible(visible);
269 } 269 }
270 270
271 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor, 271 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor,
272 const gfx::Size& size) { 272 const gfx::Size& size) {
273 if (!per_compositor_data_.count(compositor)) 273 if (!per_compositor_data_.count(compositor))
274 return; 274 return;
275 per_compositor_data_[compositor]->Resize(size); 275 per_compositor_data_[compositor]->Resize(size);
276 } 276 }
277 277
278 void InProcessContextFactory::AddObserver(ContextFactoryObserver* observer) { 278 void InProcessContextFactory::AddObserver(ContextFactoryObserver* observer) {
279 observer_list_.AddObserver(observer); 279 observer_list_.AddObserver(observer);
280 } 280 }
281 281
282 void InProcessContextFactory::RemoveObserver(ContextFactoryObserver* observer) { 282 void InProcessContextFactory::RemoveObserver(ContextFactoryObserver* observer) {
283 observer_list_.RemoveObserver(observer); 283 observer_list_.RemoveObserver(observer);
284 } 284 }
285 285
286 } // namespace ui 286 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698