OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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/compositor/test/in_process_context_factory.h" | 5 #include "ui/compositor/test/in_process_context_factory.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/threading/thread.h" | 8 #include "base/threading/thread.h" |
9 #include "cc/surfaces/surface_id_allocator.h" | 9 #include "cc/surfaces/surface_id_allocator.h" |
10 #include "cc/test/pixel_test_output_surface.h" | 10 #include "cc/test/pixel_test_output_surface.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 } | 91 } |
92 | 92 |
93 void InProcessContextFactory::RemoveCompositor(Compositor* compositor) {} | 93 void InProcessContextFactory::RemoveCompositor(Compositor* compositor) {} |
94 | 94 |
95 bool InProcessContextFactory::DoesCreateTestContexts() { return false; } | 95 bool InProcessContextFactory::DoesCreateTestContexts() { return false; } |
96 | 96 |
97 cc::SharedBitmapManager* InProcessContextFactory::GetSharedBitmapManager() { | 97 cc::SharedBitmapManager* InProcessContextFactory::GetSharedBitmapManager() { |
98 return &shared_bitmap_manager_; | 98 return &shared_bitmap_manager_; |
99 } | 99 } |
100 | 100 |
101 cc::GpuMemoryBufferManager* | 101 gpu::GpuMemoryBufferManager* |
102 InProcessContextFactory::GetGpuMemoryBufferManager() { | 102 InProcessContextFactory::GetGpuMemoryBufferManager() { |
103 return &gpu_memory_buffer_manager_; | 103 return &gpu_memory_buffer_manager_; |
104 } | 104 } |
105 | 105 |
106 base::MessageLoopProxy* InProcessContextFactory::GetCompositorMessageLoop() { | 106 base::MessageLoopProxy* InProcessContextFactory::GetCompositorMessageLoop() { |
107 if (!compositor_thread_) | 107 if (!compositor_thread_) |
108 return NULL; | 108 return NULL; |
109 return compositor_thread_->message_loop_proxy().get(); | 109 return compositor_thread_->message_loop_proxy().get(); |
110 } | 110 } |
111 | 111 |
112 scoped_ptr<cc::SurfaceIdAllocator> | 112 scoped_ptr<cc::SurfaceIdAllocator> |
113 InProcessContextFactory::CreateSurfaceIdAllocator() { | 113 InProcessContextFactory::CreateSurfaceIdAllocator() { |
114 return make_scoped_ptr( | 114 return make_scoped_ptr( |
115 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); | 115 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); |
116 } | 116 } |
117 | 117 |
118 } // namespace ui | 118 } // namespace ui |
OLD | NEW |