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

Side by Side Diff: mojo/aura/surface_context_factory.cc

Issue 648413004: Make browser GPU channel creation async. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « mojo/aura/surface_context_factory.h ('k') | ui/compositor/compositor.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 "mojo/aura/surface_context_factory.h" 5 #include "mojo/aura/surface_context_factory.h"
6 6
7 #include "cc/output/output_surface.h" 7 #include "cc/output/output_surface.h"
8 #include "cc/resources/shared_bitmap_manager.h" 8 #include "cc/resources/shared_bitmap_manager.h"
9 #include "cc/surfaces/surface_id_allocator.h" 9 #include "cc/surfaces/surface_id_allocator.h"
10 #include "mojo/public/interfaces/application/shell.mojom.h" 10 #include "mojo/public/interfaces/application/shell.mojom.h"
11 #include "mojo/services/public/cpp/view_manager/view.h" 11 #include "mojo/services/public/cpp/view_manager/view.h"
12 #include "ui/compositor/reflector.h" 12 #include "ui/compositor/reflector.h"
13 13
14 namespace mojo { 14 namespace mojo {
15 15
16 SurfaceContextFactory::SurfaceContextFactory(Shell* shell, View* view) 16 SurfaceContextFactory::SurfaceContextFactory(Shell* shell, View* view)
17 : surface_binding_(shell, view) { 17 : surface_binding_(shell, view) {
18 } 18 }
19 19
20 SurfaceContextFactory::~SurfaceContextFactory() { 20 SurfaceContextFactory::~SurfaceContextFactory() {
21 } 21 }
22 22
23 scoped_ptr<cc::OutputSurface> SurfaceContextFactory::CreateOutputSurface( 23 void SurfaceContextFactory::CreateOutputSurface(
24 ui::Compositor* compositor, 24 base::WeakPtr<ui::Compositor> compositor,
25 bool software_fallback) { 25 bool software_fallback) {
26 return surface_binding_.CreateOutputSurface(); 26 compositor->SetOutputSurface(surface_binding_.CreateOutputSurface());
27 } 27 }
28 28
29 scoped_refptr<ui::Reflector> SurfaceContextFactory::CreateReflector( 29 scoped_refptr<ui::Reflector> SurfaceContextFactory::CreateReflector(
30 ui::Compositor* mirroed_compositor, 30 ui::Compositor* mirroed_compositor,
31 ui::Layer* mirroring_layer) { 31 ui::Layer* mirroring_layer) {
32 return new ui::Reflector(); 32 return new ui::Reflector();
33 } 33 }
34 34
35 void SurfaceContextFactory::RemoveReflector( 35 void SurfaceContextFactory::RemoveReflector(
36 scoped_refptr<ui::Reflector> reflector) { 36 scoped_refptr<ui::Reflector> reflector) {
(...skipping 22 matching lines...) Expand all
59 base::MessageLoopProxy* SurfaceContextFactory::GetCompositorMessageLoop() { 59 base::MessageLoopProxy* SurfaceContextFactory::GetCompositorMessageLoop() {
60 return nullptr; 60 return nullptr;
61 } 61 }
62 62
63 scoped_ptr<cc::SurfaceIdAllocator> 63 scoped_ptr<cc::SurfaceIdAllocator>
64 SurfaceContextFactory::CreateSurfaceIdAllocator() { 64 SurfaceContextFactory::CreateSurfaceIdAllocator() {
65 return nullptr; 65 return nullptr;
66 } 66 }
67 67
68 } // namespace mojo 68 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/aura/surface_context_factory.h ('k') | ui/compositor/compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698