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 mojo::View* view) | 30 mus::View* view) |
31 : surface_binding_(shell, view), | 31 : surface_binding_(shell, view), next_surface_id_namespace_(1u) {} |
32 next_surface_id_namespace_(1u) { | |
33 } | |
34 | 32 |
35 SurfaceContextFactory::~SurfaceContextFactory() { | 33 SurfaceContextFactory::~SurfaceContextFactory() { |
36 } | 34 } |
37 | 35 |
38 void SurfaceContextFactory::CreateOutputSurface( | 36 void SurfaceContextFactory::CreateOutputSurface( |
39 base::WeakPtr<ui::Compositor> compositor) { | 37 base::WeakPtr<ui::Compositor> compositor) { |
40 NOTIMPLEMENTED(); | 38 NOTIMPLEMENTED(); |
41 compositor->SetOutputSurface(surface_binding_.CreateOutputSurface()); | 39 compositor->SetOutputSurface(surface_binding_.CreateOutputSurface()); |
42 } | 40 } |
43 | 41 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 return make_scoped_ptr( | 89 return make_scoped_ptr( |
92 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); | 90 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); |
93 } | 91 } |
94 | 92 |
95 void SurfaceContextFactory::ResizeDisplay(ui::Compositor* compositor, | 93 void SurfaceContextFactory::ResizeDisplay(ui::Compositor* compositor, |
96 const gfx::Size& size) { | 94 const gfx::Size& size) { |
97 NOTIMPLEMENTED(); | 95 NOTIMPLEMENTED(); |
98 } | 96 } |
99 | 97 |
100 } // namespace mandoline | 98 } // namespace mandoline |
OLD | NEW |