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/mus/public/cpp/view.h" | 10 #include "components/mus/public/cpp/view.h" |
11 #include "mojo/application/public/interfaces/shell.mojom.h" | 11 #include "mojo/application/public/interfaces/shell.mojom.h" |
12 #include "ui/compositor/reflector.h" | 12 #include "ui/compositor/reflector.h" |
13 #include "ui/gl/gl_bindings.h" | 13 #include "ui/gl/gl_bindings.h" |
14 | 14 |
15 namespace mandoline { | 15 namespace mandoline { |
16 namespace { | 16 namespace { |
17 | 17 |
18 class FakeReflector : public ui::Reflector { | 18 class FakeReflector : public ui::Reflector { |
19 public: | 19 public: |
20 FakeReflector() {} | 20 FakeReflector() {} |
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 mus::View* view) | 30 mojo::View* view) |
31 : surface_binding_(shell, view), next_surface_id_namespace_(1u) {} | 31 : surface_binding_(shell, view), |
| 32 next_surface_id_namespace_(1u) { |
| 33 } |
32 | 34 |
33 SurfaceContextFactory::~SurfaceContextFactory() { | 35 SurfaceContextFactory::~SurfaceContextFactory() { |
34 } | 36 } |
35 | 37 |
36 void SurfaceContextFactory::CreateOutputSurface( | 38 void SurfaceContextFactory::CreateOutputSurface( |
37 base::WeakPtr<ui::Compositor> compositor) { | 39 base::WeakPtr<ui::Compositor> compositor) { |
38 NOTIMPLEMENTED(); | 40 NOTIMPLEMENTED(); |
39 compositor->SetOutputSurface(surface_binding_.CreateOutputSurface()); | 41 compositor->SetOutputSurface(surface_binding_.CreateOutputSurface()); |
40 } | 42 } |
41 | 43 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 return make_scoped_ptr( | 91 return make_scoped_ptr( |
90 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); | 92 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); |
91 } | 93 } |
92 | 94 |
93 void SurfaceContextFactory::ResizeDisplay(ui::Compositor* compositor, | 95 void SurfaceContextFactory::ResizeDisplay(ui::Compositor* compositor, |
94 const gfx::Size& size) { | 96 const gfx::Size& size) { |
95 NOTIMPLEMENTED(); | 97 NOTIMPLEMENTED(); |
96 } | 98 } |
97 | 99 |
98 } // namespace mandoline | 100 } // namespace mandoline |
OLD | NEW |