| 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" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 mus::Window* window, | 32 mus::Window* window, |
| 33 mus::mojom::SurfaceType surface_type) | 33 mus::mojom::SurfaceType surface_type) |
| 34 : surface_binding_(connector, window, surface_type), | 34 : surface_binding_(connector, window, surface_type), |
| 35 next_surface_id_namespace_(1u) {} | 35 next_surface_id_namespace_(1u) {} |
| 36 | 36 |
| 37 SurfaceContextFactory::~SurfaceContextFactory() {} | 37 SurfaceContextFactory::~SurfaceContextFactory() {} |
| 38 | 38 |
| 39 void SurfaceContextFactory::CreateOutputSurface( | 39 void SurfaceContextFactory::CreateOutputSurface( |
| 40 base::WeakPtr<ui::Compositor> compositor) { | 40 base::WeakPtr<ui::Compositor> compositor) { |
| 41 // NOTIMPLEMENTED(); | 41 // NOTIMPLEMENTED(); |
| 42 compositor->SetOutputSurface(surface_binding_.CreateOutputSurface()); | 42 std::unique_ptr<cc::OutputSurface> surface = |
| 43 surface_binding_.CreateOutputSurface(); |
| 44 if (surface) |
| 45 compositor->SetOutputSurface(std::move(surface)); |
| 43 } | 46 } |
| 44 | 47 |
| 45 std::unique_ptr<ui::Reflector> SurfaceContextFactory::CreateReflector( | 48 std::unique_ptr<ui::Reflector> SurfaceContextFactory::CreateReflector( |
| 46 ui::Compositor* mirroed_compositor, | 49 ui::Compositor* mirroed_compositor, |
| 47 ui::Layer* mirroring_layer) { | 50 ui::Layer* mirroring_layer) { |
| 48 // NOTIMPLEMENTED(); | 51 // NOTIMPLEMENTED(); |
| 49 return base::WrapUnique(new FakeReflector); | 52 return base::WrapUnique(new FakeReflector); |
| 50 } | 53 } |
| 51 | 54 |
| 52 void SurfaceContextFactory::RemoveReflector(ui::Reflector* reflector) { | 55 void SurfaceContextFactory::RemoveReflector(ui::Reflector* reflector) { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 // NOTIMPLEMENTED(); | 100 // NOTIMPLEMENTED(); |
| 98 return nullptr; | 101 return nullptr; |
| 99 } | 102 } |
| 100 | 103 |
| 101 void SurfaceContextFactory::ResizeDisplay(ui::Compositor* compositor, | 104 void SurfaceContextFactory::ResizeDisplay(ui::Compositor* compositor, |
| 102 const gfx::Size& size) { | 105 const gfx::Size& size) { |
| 103 // NOTIMPLEMENTED(); | 106 // NOTIMPLEMENTED(); |
| 104 } | 107 } |
| 105 | 108 |
| 106 } // namespace views | 109 } // namespace views |
| OLD | NEW |