| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "blimp/engine/app/ui/blimp_ui_context_factory.h" | |
| 6 | |
| 7 #include "cc/output/output_surface.h" | |
| 8 #include "cc/resources/shared_bitmap_manager.h" | |
| 9 #include "cc/surfaces/surface_id_allocator.h" | |
| 10 #include "content/browser/compositor/image_transport_factory.h" | |
| 11 #include "third_party/khronos/GLES2/gl2.h" | |
| 12 #include "ui/compositor/reflector.h" | |
| 13 | |
| 14 namespace blimp { | |
| 15 namespace engine { | |
| 16 | |
| 17 BlimpUiContextFactory::BlimpUiContextFactory() | |
| 18 : next_surface_id_namespace_(1u) {} | |
| 19 | |
| 20 BlimpUiContextFactory::~BlimpUiContextFactory() {} | |
| 21 | |
| 22 void BlimpUiContextFactory::CreateOutputSurface( | |
| 23 base::WeakPtr<ui::Compositor> compositor) { | |
| 24 } | |
| 25 | |
| 26 scoped_ptr<ui::Reflector> BlimpUiContextFactory::CreateReflector( | |
| 27 ui::Compositor* mirroed_compositor, | |
| 28 ui::Layer* mirroring_layer) { | |
| 29 NOTREACHED(); | |
| 30 return nullptr; | |
| 31 } | |
| 32 | |
| 33 void BlimpUiContextFactory::RemoveReflector(ui::Reflector* reflector) { | |
| 34 NOTREACHED(); | |
| 35 } | |
| 36 | |
| 37 scoped_refptr<cc::ContextProvider> | |
| 38 BlimpUiContextFactory::SharedMainThreadContextProvider() { | |
| 39 NOTREACHED(); | |
| 40 return nullptr; | |
| 41 } | |
| 42 | |
| 43 void BlimpUiContextFactory::RemoveCompositor(ui::Compositor* compositor) { | |
| 44 NOTIMPLEMENTED(); | |
| 45 } | |
| 46 | |
| 47 bool BlimpUiContextFactory::DoesCreateTestContexts() { | |
| 48 return false; | |
| 49 } | |
| 50 | |
| 51 uint32_t BlimpUiContextFactory::GetImageTextureTarget(gfx::BufferFormat format, | |
| 52 gfx::BufferUsage usage) { | |
| 53 // No GpuMemoryBuffer support, so just return GL_TEXTURE_2D. | |
| 54 return GL_TEXTURE_2D; | |
| 55 } | |
| 56 | |
| 57 cc::SharedBitmapManager* BlimpUiContextFactory::GetSharedBitmapManager() { | |
| 58 return nullptr; | |
| 59 } | |
| 60 | |
| 61 gpu::GpuMemoryBufferManager* | |
| 62 BlimpUiContextFactory::GetGpuMemoryBufferManager() { | |
| 63 return nullptr; | |
| 64 } | |
| 65 | |
| 66 cc::TaskGraphRunner* BlimpUiContextFactory::GetTaskGraphRunner() { | |
| 67 return &task_graph_runner_; | |
| 68 } | |
| 69 | |
| 70 scoped_ptr<cc::SurfaceIdAllocator> | |
| 71 BlimpUiContextFactory::CreateSurfaceIdAllocator() { | |
| 72 scoped_ptr<cc::SurfaceIdAllocator> allocator( | |
| 73 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); | |
| 74 content::ImageTransportFactory* factory = | |
| 75 content::ImageTransportFactory::GetInstance(); | |
| 76 if (factory->GetSurfaceManager()) | |
| 77 allocator->RegisterSurfaceIdNamespace(factory->GetSurfaceManager()); | |
| 78 return allocator; | |
| 79 } | |
| 80 | |
| 81 void BlimpUiContextFactory::ResizeDisplay(ui::Compositor* compositor, | |
| 82 const gfx::Size& size) { | |
| 83 } | |
| 84 | |
| 85 } // namespace engine | |
| 86 } // namespace blimp | |
| OLD | NEW |