| 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 "base/single_thread_task_runner.h" | 7 #include "base/single_thread_task_runner.h" |
| 8 #include "base/thread_task_runner_handle.h" | 8 #include "base/thread_task_runner_handle.h" |
| 9 #include "cc/test/fake_external_begin_frame_source.h" | 9 #include "cc/test/fake_external_begin_frame_source.h" |
| 10 #include "third_party/khronos/GLES2/gl2.h" | 10 #include "third_party/khronos/GLES2/gl2.h" |
| 11 #include "ui/gfx/buffer_types.h" |
| 11 | 12 |
| 12 namespace content { | 13 namespace content { |
| 13 | 14 |
| 14 FakeCompositorDependencies::FakeCompositorDependencies() { | 15 FakeCompositorDependencies::FakeCompositorDependencies() { |
| 15 } | 16 } |
| 16 | 17 |
| 17 FakeCompositorDependencies::~FakeCompositorDependencies() { | 18 FakeCompositorDependencies::~FakeCompositorDependencies() { |
| 18 } | 19 } |
| 19 | 20 |
| 20 bool FakeCompositorDependencies::IsGpuRasterizationForced() { | 21 bool FakeCompositorDependencies::IsGpuRasterizationForced() { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 41 return true; | 42 return true; |
| 42 } | 43 } |
| 43 | 44 |
| 44 bool FakeCompositorDependencies::IsOneCopyEnabled() { | 45 bool FakeCompositorDependencies::IsOneCopyEnabled() { |
| 45 return false; | 46 return false; |
| 46 } | 47 } |
| 47 | 48 |
| 48 bool FakeCompositorDependencies::IsElasticOverscrollEnabled() { | 49 bool FakeCompositorDependencies::IsElasticOverscrollEnabled() { |
| 49 return false; | 50 return false; |
| 50 } | 51 } |
| 51 | 52 std::vector<unsigned> FakeCompositorDependencies::GetImageTextureTargets() { |
| 52 uint32 FakeCompositorDependencies::GetImageTextureTarget() { | 53 return std::vector<unsigned>(static_cast<size_t>(gfx::BufferFormat::LAST) + 1, |
| 53 return GL_TEXTURE_2D; | 54 GL_TEXTURE_2D); |
| 54 } | 55 } |
| 55 | 56 |
| 56 scoped_refptr<base::SingleThreadTaskRunner> | 57 scoped_refptr<base::SingleThreadTaskRunner> |
| 57 FakeCompositorDependencies::GetCompositorMainThreadTaskRunner() { | 58 FakeCompositorDependencies::GetCompositorMainThreadTaskRunner() { |
| 58 return base::ThreadTaskRunnerHandle::Get(); | 59 return base::ThreadTaskRunnerHandle::Get(); |
| 59 } | 60 } |
| 60 | 61 |
| 61 scoped_refptr<base::SingleThreadTaskRunner> | 62 scoped_refptr<base::SingleThreadTaskRunner> |
| 62 FakeCompositorDependencies::GetCompositorImplThreadTaskRunner() { | 63 FakeCompositorDependencies::GetCompositorImplThreadTaskRunner() { |
| 63 return nullptr; // Currently never threaded compositing in unit tests. | 64 return nullptr; // Currently never threaded compositing in unit tests. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 91 | 92 |
| 92 cc::TaskGraphRunner* FakeCompositorDependencies::GetTaskGraphRunner() { | 93 cc::TaskGraphRunner* FakeCompositorDependencies::GetTaskGraphRunner() { |
| 93 return &task_graph_runner_; | 94 return &task_graph_runner_; |
| 94 } | 95 } |
| 95 | 96 |
| 96 bool FakeCompositorDependencies::IsGatherPixelRefsEnabled() { | 97 bool FakeCompositorDependencies::IsGatherPixelRefsEnabled() { |
| 97 return false; | 98 return false; |
| 98 } | 99 } |
| 99 | 100 |
| 100 } // namespace content | 101 } // namespace content |
| OLD | NEW |