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 "content/test/fake_compositor_dependencies.h" | 5 #include "content/test/fake_compositor_dependencies.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 gpu::GpuMemoryBufferManager* | 83 gpu::GpuMemoryBufferManager* |
84 FakeCompositorDependencies::GetGpuMemoryBufferManager() { | 84 FakeCompositorDependencies::GetGpuMemoryBufferManager() { |
85 return &gpu_memory_buffer_manager_; | 85 return &gpu_memory_buffer_manager_; |
86 } | 86 } |
87 | 87 |
88 blink::scheduler::RendererScheduler* | 88 blink::scheduler::RendererScheduler* |
89 FakeCompositorDependencies::GetRendererScheduler() { | 89 FakeCompositorDependencies::GetRendererScheduler() { |
90 return &renderer_scheduler_; | 90 return &renderer_scheduler_; |
91 } | 91 } |
92 | 92 |
93 std::unique_ptr<cc::BeginFrameSource> | |
94 FakeCompositorDependencies::CreateExternalBeginFrameSource(int routing_id) { | |
95 double refresh_rate = 200.0; | |
96 bool tick_automatically = true; | |
97 return base::MakeUnique<cc::FakeExternalBeginFrameSource>(refresh_rate, | |
98 tick_automatically); | |
99 } | |
100 | |
101 cc::ImageSerializationProcessor* | 93 cc::ImageSerializationProcessor* |
102 FakeCompositorDependencies::GetImageSerializationProcessor() { | 94 FakeCompositorDependencies::GetImageSerializationProcessor() { |
103 return nullptr; | 95 return nullptr; |
104 } | 96 } |
105 | 97 |
106 cc::TaskGraphRunner* FakeCompositorDependencies::GetTaskGraphRunner() { | 98 cc::TaskGraphRunner* FakeCompositorDependencies::GetTaskGraphRunner() { |
107 return &task_graph_runner_; | 99 return &task_graph_runner_; |
108 } | 100 } |
109 | 101 |
110 bool FakeCompositorDependencies::AreImageDecodeTasksEnabled() { | 102 bool FakeCompositorDependencies::AreImageDecodeTasksEnabled() { |
111 return false; | 103 return false; |
112 } | 104 } |
113 | 105 |
114 bool FakeCompositorDependencies::IsThreadedAnimationEnabled() { | 106 bool FakeCompositorDependencies::IsThreadedAnimationEnabled() { |
115 return true; | 107 return true; |
116 } | 108 } |
117 | 109 |
118 } // namespace content | 110 } // namespace content |
OLD | NEW |