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