OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "mandoline/ui/aura/surface_context_factory.h" | 5 #include "mandoline/ui/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 "components/view_manager/public/cpp/view.h" | 10 #include "components/view_manager/public/cpp/view.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 ~FakeReflector() override {} | 21 ~FakeReflector() override {} |
22 void OnMirroringCompositorResized() override {} | 22 void OnMirroringCompositorResized() override {} |
23 void AddMirroringLayer(ui::Layer* layer) override {} | 23 void AddMirroringLayer(ui::Layer* layer) override {} |
24 void RemoveMirroringLayer(ui::Layer* layer) override {} | 24 void RemoveMirroringLayer(ui::Layer* layer) override {} |
25 }; | 25 }; |
26 | 26 |
27 } | 27 } |
28 | 28 |
29 SurfaceContextFactory::SurfaceContextFactory(mojo::Shell* shell, | 29 SurfaceContextFactory::SurfaceContextFactory(mojo::Shell* shell, |
30 mojo::View* view) | 30 mojo::View* view) |
31 : surface_binding_(shell, view) { | 31 : surface_binding_(shell, view), |
| 32 next_surface_id_namespace_(1u) { |
32 } | 33 } |
33 | 34 |
34 SurfaceContextFactory::~SurfaceContextFactory() { | 35 SurfaceContextFactory::~SurfaceContextFactory() { |
35 } | 36 } |
36 | 37 |
37 void SurfaceContextFactory::CreateOutputSurface( | 38 void SurfaceContextFactory::CreateOutputSurface( |
38 base::WeakPtr<ui::Compositor> compositor) { | 39 base::WeakPtr<ui::Compositor> compositor) { |
39 NOTIMPLEMENTED(); | 40 NOTIMPLEMENTED(); |
40 compositor->SetOutputSurface(surface_binding_.CreateOutputSurface()); | 41 compositor->SetOutputSurface(surface_binding_.CreateOutputSurface()); |
41 } | 42 } |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 return nullptr; | 82 return nullptr; |
82 } | 83 } |
83 | 84 |
84 cc::TaskGraphRunner* SurfaceContextFactory::GetTaskGraphRunner() { | 85 cc::TaskGraphRunner* SurfaceContextFactory::GetTaskGraphRunner() { |
85 NOTIMPLEMENTED(); | 86 NOTIMPLEMENTED(); |
86 return nullptr; | 87 return nullptr; |
87 } | 88 } |
88 | 89 |
89 scoped_ptr<cc::SurfaceIdAllocator> | 90 scoped_ptr<cc::SurfaceIdAllocator> |
90 SurfaceContextFactory::CreateSurfaceIdAllocator() { | 91 SurfaceContextFactory::CreateSurfaceIdAllocator() { |
91 NOTIMPLEMENTED(); | 92 return make_scoped_ptr( |
92 return nullptr; | 93 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); |
93 } | 94 } |
94 | 95 |
95 void SurfaceContextFactory::ResizeDisplay(ui::Compositor* compositor, | 96 void SurfaceContextFactory::ResizeDisplay(ui::Compositor* compositor, |
96 const gfx::Size& size) { | 97 const gfx::Size& size) { |
97 NOTIMPLEMENTED(); | 98 NOTIMPLEMENTED(); |
98 } | 99 } |
99 | 100 |
100 } // namespace mandoline | 101 } // namespace mandoline |
OLD | NEW |