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/message_loop/message_loop_proxy.h" |
8 #include "cc/test/fake_external_begin_frame_source.h" | 8 #include "cc/test/fake_external_begin_frame_source.h" |
9 #include "third_party/khronos/GLES2/gl2.h" | 9 #include "third_party/khronos/GLES2/gl2.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 | 12 |
13 FakeCompositorDependencies::FakeCompositorDependencies() { | 13 FakeCompositorDependencies::FakeCompositorDependencies() |
| 14 : use_single_thread_scheduler_(true) { |
14 } | 15 } |
15 | 16 |
16 bool FakeCompositorDependencies::IsImplSidePaintingEnabled() { | 17 bool FakeCompositorDependencies::IsImplSidePaintingEnabled() { |
17 return true; | 18 return true; |
18 } | 19 } |
19 | 20 |
20 bool FakeCompositorDependencies::IsGpuRasterizationForced() { | 21 bool FakeCompositorDependencies::IsGpuRasterizationForced() { |
21 return false; | 22 return false; |
22 } | 23 } |
23 | 24 |
(...skipping 14 matching lines...) Expand all Loading... |
38 } | 39 } |
39 | 40 |
40 bool FakeCompositorDependencies::IsOneCopyEnabled() { | 41 bool FakeCompositorDependencies::IsOneCopyEnabled() { |
41 return true; | 42 return true; |
42 } | 43 } |
43 | 44 |
44 bool FakeCompositorDependencies::IsElasticOverscrollEnabled() { | 45 bool FakeCompositorDependencies::IsElasticOverscrollEnabled() { |
45 return false; | 46 return false; |
46 } | 47 } |
47 | 48 |
| 49 bool FakeCompositorDependencies::UseSingleThreadScheduler() { |
| 50 return use_single_thread_scheduler_; |
| 51 } |
| 52 |
48 uint32 FakeCompositorDependencies::GetImageTextureTarget() { | 53 uint32 FakeCompositorDependencies::GetImageTextureTarget() { |
49 return GL_TEXTURE_2D; | 54 return GL_TEXTURE_2D; |
50 } | 55 } |
51 | 56 |
52 scoped_refptr<base::SingleThreadTaskRunner> | 57 scoped_refptr<base::SingleThreadTaskRunner> |
53 FakeCompositorDependencies::GetCompositorMainThreadTaskRunner() { | 58 FakeCompositorDependencies::GetCompositorMainThreadTaskRunner() { |
54 return base::MessageLoopProxy::current(); | 59 return base::MessageLoopProxy::current(); |
55 } | 60 } |
56 | 61 |
57 scoped_refptr<base::SingleThreadTaskRunner> | 62 scoped_refptr<base::SingleThreadTaskRunner> |
(...skipping 20 matching lines...) Expand all Loading... |
78 return nullptr; | 83 return nullptr; |
79 } | 84 } |
80 | 85 |
81 scoped_ptr<cc::BeginFrameSource> | 86 scoped_ptr<cc::BeginFrameSource> |
82 FakeCompositorDependencies::CreateExternalBeginFrameSource(int routing_id) { | 87 FakeCompositorDependencies::CreateExternalBeginFrameSource(int routing_id) { |
83 double refresh_rate = 200.0; | 88 double refresh_rate = 200.0; |
84 return make_scoped_ptr(new cc::FakeExternalBeginFrameSource(refresh_rate)); | 89 return make_scoped_ptr(new cc::FakeExternalBeginFrameSource(refresh_rate)); |
85 } | 90 } |
86 | 91 |
87 } // namespace content | 92 } // namespace content |
OLD | NEW |