| 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 "blimp/engine/app/ui/blimp_ui_context_factory.h" | 5 #include "blimp/engine/app/ui/blimp_ui_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 "third_party/khronos/GLES2/gl2.h" | 10 #include "third_party/khronos/GLES2/gl2.h" |
| 11 #include "ui/compositor/reflector.h" | 11 #include "ui/compositor/reflector.h" |
| 12 | 12 |
| 13 namespace blimp { | 13 namespace blimp { |
| 14 namespace engine { | 14 namespace engine { |
| 15 | 15 |
| 16 BlimpUiContextFactory::BlimpUiContextFactory() | 16 BlimpUiContextFactory::BlimpUiContextFactory() |
| 17 : next_surface_id_namespace_(1u) {} | 17 : next_surface_id_namespace_(1u), |
| 18 surface_manager_(new cc::SurfaceManager) {} |
| 18 | 19 |
| 19 BlimpUiContextFactory::~BlimpUiContextFactory() {} | 20 BlimpUiContextFactory::~BlimpUiContextFactory() {} |
| 20 | 21 |
| 21 void BlimpUiContextFactory::CreateOutputSurface( | 22 void BlimpUiContextFactory::CreateOutputSurface( |
| 22 base::WeakPtr<ui::Compositor> compositor) { | 23 base::WeakPtr<ui::Compositor> compositor) { |
| 23 NOTIMPLEMENTED(); | 24 NOTIMPLEMENTED(); |
| 24 } | 25 } |
| 25 | 26 |
| 26 scoped_ptr<ui::Reflector> BlimpUiContextFactory::CreateReflector( | 27 scoped_ptr<ui::Reflector> BlimpUiContextFactory::CreateReflector( |
| 27 ui::Compositor* mirroed_compositor, | 28 ui::Compositor* mirroed_compositor, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 62 |
| 62 gpu::GpuMemoryBufferManager* | 63 gpu::GpuMemoryBufferManager* |
| 63 BlimpUiContextFactory::GetGpuMemoryBufferManager() { | 64 BlimpUiContextFactory::GetGpuMemoryBufferManager() { |
| 64 return nullptr; | 65 return nullptr; |
| 65 } | 66 } |
| 66 | 67 |
| 67 cc::TaskGraphRunner* BlimpUiContextFactory::GetTaskGraphRunner() { | 68 cc::TaskGraphRunner* BlimpUiContextFactory::GetTaskGraphRunner() { |
| 68 return &task_graph_runner_; | 69 return &task_graph_runner_; |
| 69 } | 70 } |
| 70 | 71 |
| 72 cc::SurfaceManager* GetSurfaceManager() { |
| 73 return surface_manager_.get(); |
| 74 } |
| 75 |
| 71 scoped_ptr<cc::SurfaceIdAllocator> | 76 scoped_ptr<cc::SurfaceIdAllocator> |
| 72 BlimpUiContextFactory::CreateSurfaceIdAllocator() { | 77 BlimpUiContextFactory::CreateSurfaceIdAllocator() { |
| 73 return make_scoped_ptr( | 78 scoped_ptr<cc::SurfaceIdAllocator> allocator = |
| 74 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); | 79 make_scoped_ptr(new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); |
| 80 allocator->RegisterSurfaceIdNamespace(surface_manager_.get()); |
| 81 return allocator; |
| 75 } | 82 } |
| 76 | 83 |
| 77 void BlimpUiContextFactory::ResizeDisplay(ui::Compositor* compositor, | 84 void BlimpUiContextFactory::ResizeDisplay(ui::Compositor* compositor, |
| 78 const gfx::Size& size) { | 85 const gfx::Size& size) { |
| 79 NOTIMPLEMENTED(); | 86 NOTIMPLEMENTED(); |
| 80 } | 87 } |
| 81 | 88 |
| 82 } // namespace engine | 89 } // namespace engine |
| 83 } // namespace blimp | 90 } // namespace blimp |
| OLD | NEW |