| 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 "content/browser/compositor/image_transport_factory.h" |
| 10 #include "third_party/khronos/GLES2/gl2.h" | 11 #include "third_party/khronos/GLES2/gl2.h" |
| 11 #include "ui/compositor/reflector.h" | 12 #include "ui/compositor/reflector.h" |
| 12 | 13 |
| 13 namespace blimp { | 14 namespace blimp { |
| 14 namespace engine { | 15 namespace engine { |
| 15 | 16 |
| 16 BlimpUiContextFactory::BlimpUiContextFactory() | 17 BlimpUiContextFactory::BlimpUiContextFactory() |
| 17 : next_surface_id_namespace_(1u) {} | 18 : next_surface_id_namespace_(1u) {} |
| 18 | 19 |
| 19 BlimpUiContextFactory::~BlimpUiContextFactory() {} | 20 BlimpUiContextFactory::~BlimpUiContextFactory() {} |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 71 scoped_ptr<cc::SurfaceIdAllocator> | 72 scoped_ptr<cc::SurfaceIdAllocator> |
| 72 BlimpUiContextFactory::CreateSurfaceIdAllocator() { | 73 BlimpUiContextFactory::CreateSurfaceIdAllocator() { |
| 73 return make_scoped_ptr( | 74 scoped_ptr<cc::SurfaceIdAllocator> allocator( |
| 74 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); | 75 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); |
| 76 content::ImageTransportFactory* factory = |
| 77 content::ImageTransportFactory::GetInstance(); |
| 78 if (factory->GetSurfaceManager()) |
| 79 allocator->RegisterSurfaceIdNamespace(factory->GetSurfaceManager()); |
| 80 return allocator; |
| 75 } | 81 } |
| 76 | 82 |
| 77 void BlimpUiContextFactory::ResizeDisplay(ui::Compositor* compositor, | 83 void BlimpUiContextFactory::ResizeDisplay(ui::Compositor* compositor, |
| 78 const gfx::Size& size) { | 84 const gfx::Size& size) { |
| 79 NOTIMPLEMENTED(); | 85 NOTIMPLEMENTED(); |
| 80 } | 86 } |
| 81 | 87 |
| 82 } // namespace engine | 88 } // namespace engine |
| 83 } // namespace blimp | 89 } // namespace blimp |
| OLD | NEW |