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

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

Issue 1959183003: Add GetSurfaceManager to ui::ContextFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « ui/compositor/test/in_process_context_factory.h ('k') | ui/views/mus/surface_context_factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 245
246 std::unique_ptr<cc::SurfaceIdAllocator> 246 std::unique_ptr<cc::SurfaceIdAllocator>
247 InProcessContextFactory::CreateSurfaceIdAllocator() { 247 InProcessContextFactory::CreateSurfaceIdAllocator() {
248 std::unique_ptr<cc::SurfaceIdAllocator> allocator( 248 std::unique_ptr<cc::SurfaceIdAllocator> allocator(
249 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); 249 new cc::SurfaceIdAllocator(next_surface_id_namespace_++));
250 if (surface_manager_) 250 if (surface_manager_)
251 allocator->RegisterSurfaceIdNamespace(surface_manager_); 251 allocator->RegisterSurfaceIdNamespace(surface_manager_);
252 return allocator; 252 return allocator;
253 } 253 }
254 254
255 cc::SurfaceManager* InProcessContextFactory::GetSurfaceManager() {
256 return surface_manager_;
257 }
258
255 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor, 259 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor,
256 const gfx::Size& size) { 260 const gfx::Size& size) {
257 if (!per_compositor_data_.count(compositor)) 261 if (!per_compositor_data_.count(compositor))
258 return; 262 return;
259 per_compositor_data_[compositor]->display()->Resize(size); 263 per_compositor_data_[compositor]->display()->Resize(size);
260 } 264 }
261 265
262 } // namespace ui 266 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/test/in_process_context_factory.h ('k') | ui/views/mus/surface_context_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698