| 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/message_loop/message_loop_proxy.h" | 7 #include "base/single_thread_task_runner.h" |
| 8 #include "base/thread_task_runner_handle.h" |
| 8 #include "cc/test/fake_external_begin_frame_source.h" | 9 #include "cc/test/fake_external_begin_frame_source.h" |
| 9 #include "third_party/khronos/GLES2/gl2.h" | 10 #include "third_party/khronos/GLES2/gl2.h" |
| 10 | 11 |
| 11 namespace content { | 12 namespace content { |
| 12 | 13 |
| 13 FakeCompositorDependencies::FakeCompositorDependencies() { | 14 FakeCompositorDependencies::FakeCompositorDependencies() { |
| 14 } | 15 } |
| 15 | 16 |
| 16 FakeCompositorDependencies::~FakeCompositorDependencies() { | 17 FakeCompositorDependencies::~FakeCompositorDependencies() { |
| 17 } | 18 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 bool FakeCompositorDependencies::IsElasticOverscrollEnabled() { | 52 bool FakeCompositorDependencies::IsElasticOverscrollEnabled() { |
| 52 return false; | 53 return false; |
| 53 } | 54 } |
| 54 | 55 |
| 55 uint32 FakeCompositorDependencies::GetImageTextureTarget() { | 56 uint32 FakeCompositorDependencies::GetImageTextureTarget() { |
| 56 return GL_TEXTURE_2D; | 57 return GL_TEXTURE_2D; |
| 57 } | 58 } |
| 58 | 59 |
| 59 scoped_refptr<base::SingleThreadTaskRunner> | 60 scoped_refptr<base::SingleThreadTaskRunner> |
| 60 FakeCompositorDependencies::GetCompositorMainThreadTaskRunner() { | 61 FakeCompositorDependencies::GetCompositorMainThreadTaskRunner() { |
| 61 return base::MessageLoopProxy::current(); | 62 return base::ThreadTaskRunnerHandle::Get(); |
| 62 } | 63 } |
| 63 | 64 |
| 64 scoped_refptr<base::SingleThreadTaskRunner> | 65 scoped_refptr<base::SingleThreadTaskRunner> |
| 65 FakeCompositorDependencies::GetCompositorImplThreadTaskRunner() { | 66 FakeCompositorDependencies::GetCompositorImplThreadTaskRunner() { |
| 66 return nullptr; // Currently never threaded compositing in unit tests. | 67 return nullptr; // Currently never threaded compositing in unit tests. |
| 67 } | 68 } |
| 68 | 69 |
| 69 cc::SharedBitmapManager* FakeCompositorDependencies::GetSharedBitmapManager() { | 70 cc::SharedBitmapManager* FakeCompositorDependencies::GetSharedBitmapManager() { |
| 70 return &shared_bitmap_manager_; | 71 return &shared_bitmap_manager_; |
| 71 } | 72 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 94 | 95 |
| 95 cc::TaskGraphRunner* FakeCompositorDependencies::GetTaskGraphRunner() { | 96 cc::TaskGraphRunner* FakeCompositorDependencies::GetTaskGraphRunner() { |
| 96 return &task_graph_runner_; | 97 return &task_graph_runner_; |
| 97 } | 98 } |
| 98 | 99 |
| 99 bool FakeCompositorDependencies::IsGatherPixelRefsEnabled() { | 100 bool FakeCompositorDependencies::IsGatherPixelRefsEnabled() { |
| 100 return false; | 101 return false; |
| 101 } | 102 } |
| 102 | 103 |
| 103 } // namespace content | 104 } // namespace content |
| OLD | NEW |