| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 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 #ifndef UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ | |
| 6 #define UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ | |
| 7 | |
| 8 #include "cc/test/test_gpu_memory_buffer_manager.h" | |
| 9 #include "cc/test/test_shared_bitmap_manager.h" | |
| 10 #include "ui/compositor/compositor.h" | |
| 11 | |
| 12 namespace base { | |
| 13 class Thread; | |
| 14 } | |
| 15 | |
| 16 namespace webkit { | |
| 17 namespace gpu { | |
| 18 class ContextProviderInProcess; | |
| 19 } | |
| 20 } | |
| 21 | |
| 22 namespace ui { | |
| 23 | |
| 24 class InProcessContextFactory : public ContextFactory { | |
| 25 public: | |
| 26 InProcessContextFactory(); | |
| 27 ~InProcessContextFactory() override; | |
| 28 | |
| 29 // ContextFactory implementation | |
| 30 scoped_ptr<cc::OutputSurface> CreateOutputSurface( | |
| 31 Compositor* compositor, | |
| 32 bool software_fallback) override; | |
| 33 | |
| 34 scoped_refptr<Reflector> CreateReflector(Compositor* mirrored_compositor, | |
| 35 Layer* mirroring_layer) override; | |
| 36 void RemoveReflector(scoped_refptr<Reflector> reflector) override; | |
| 37 | |
| 38 scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider() override; | |
| 39 void RemoveCompositor(Compositor* compositor) override; | |
| 40 bool DoesCreateTestContexts() override; | |
| 41 cc::SharedBitmapManager* GetSharedBitmapManager() override; | |
| 42 cc::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override; | |
| 43 base::MessageLoopProxy* GetCompositorMessageLoop() override; | |
| 44 scoped_ptr<cc::SurfaceIdAllocator> CreateSurfaceIdAllocator() override; | |
| 45 | |
| 46 private: | |
| 47 scoped_ptr<base::Thread> compositor_thread_; | |
| 48 scoped_refptr<webkit::gpu::ContextProviderInProcess> | |
| 49 shared_main_thread_contexts_; | |
| 50 cc::TestSharedBitmapManager shared_bitmap_manager_; | |
| 51 cc::TestGpuMemoryBufferManager gpu_memory_buffer_manager_; | |
| 52 uint32_t next_surface_id_namespace_; | |
| 53 | |
| 54 DISALLOW_COPY_AND_ASSIGN(InProcessContextFactory); | |
| 55 }; | |
| 56 | |
| 57 } // namespace ui | |
| 58 | |
| 59 #endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ | |
| OLD | NEW |