| 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 "ui/views/mus/surface_context_factory.h" | 5 #include "ui/views/mus/surface_context_factory.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "cc/output/output_surface.h" | 8 #include "cc/output/output_surface.h" |
| 9 #include "cc/resources/shared_bitmap_manager.h" | 9 #include "cc/resources/shared_bitmap_manager.h" |
| 10 #include "cc/surfaces/surface_id_allocator.h" | 10 #include "cc/surfaces/surface_id_allocator.h" |
| 11 #include "services/shell/public/interfaces/connector.mojom.h" | |
| 12 #include "services/ui/public/cpp/window.h" | 11 #include "services/ui/public/cpp/window.h" |
| 13 #include "ui/compositor/reflector.h" | 12 #include "ui/compositor/reflector.h" |
| 14 #include "ui/gl/gl_bindings.h" | 13 #include "ui/gl/gl_bindings.h" |
| 15 | 14 |
| 16 namespace views { | 15 namespace views { |
| 17 namespace { | 16 namespace { |
| 18 | 17 |
| 19 class FakeReflector : public ui::Reflector { | 18 class FakeReflector : public ui::Reflector { |
| 20 public: | 19 public: |
| 21 FakeReflector() {} | 20 FakeReflector() {} |
| 22 ~FakeReflector() override {} | 21 ~FakeReflector() override {} |
| 23 void OnMirroringCompositorResized() override {} | 22 void OnMirroringCompositorResized() override {} |
| 24 void AddMirroringLayer(ui::Layer* layer) override {} | 23 void AddMirroringLayer(ui::Layer* layer) override {} |
| 25 void RemoveMirroringLayer(ui::Layer* layer) override {} | 24 void RemoveMirroringLayer(ui::Layer* layer) override {} |
| 26 }; | 25 }; |
| 27 | 26 |
| 28 } // namespace | 27 } // namespace |
| 29 | 28 |
| 30 SurfaceContextFactory::SurfaceContextFactory( | 29 SurfaceContextFactory::SurfaceContextFactory( |
| 31 shell::Connector* connector, | |
| 32 ui::Window* window, | 30 ui::Window* window, |
| 33 ui::mojom::SurfaceType surface_type) | 31 ui::mojom::SurfaceType surface_type) |
| 34 : surface_binding_(connector, window, surface_type), | 32 : surface_binding_(window, surface_type), next_surface_id_namespace_(1u) {} |
| 35 next_surface_id_namespace_(1u) {} | |
| 36 | 33 |
| 37 SurfaceContextFactory::~SurfaceContextFactory() {} | 34 SurfaceContextFactory::~SurfaceContextFactory() {} |
| 38 | 35 |
| 39 void SurfaceContextFactory::CreateOutputSurface( | 36 void SurfaceContextFactory::CreateOutputSurface( |
| 40 base::WeakPtr<ui::Compositor> compositor) { | 37 base::WeakPtr<ui::Compositor> compositor) { |
| 41 // NOTIMPLEMENTED(); | 38 // NOTIMPLEMENTED(); |
| 42 std::unique_ptr<cc::OutputSurface> surface = | 39 std::unique_ptr<cc::OutputSurface> surface = |
| 43 surface_binding_.CreateOutputSurface(); | 40 surface_binding_.CreateOutputSurface(); |
| 44 if (surface) | 41 if (surface) |
| 45 compositor->SetOutputSurface(std::move(surface)); | 42 compositor->SetOutputSurface(std::move(surface)); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 // NOTIMPLEMENTED(); | 95 // NOTIMPLEMENTED(); |
| 99 return nullptr; | 96 return nullptr; |
| 100 } | 97 } |
| 101 | 98 |
| 102 void SurfaceContextFactory::ResizeDisplay(ui::Compositor* compositor, | 99 void SurfaceContextFactory::ResizeDisplay(ui::Compositor* compositor, |
| 103 const gfx::Size& size) { | 100 const gfx::Size& size) { |
| 104 // NOTIMPLEMENTED(); | 101 // NOTIMPLEMENTED(); |
| 105 } | 102 } |
| 106 | 103 |
| 107 } // namespace views | 104 } // namespace views |
| OLD | NEW |