| 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) { | |
| 15 } | 14 } |
| 16 | 15 |
| 17 FakeCompositorDependencies::~FakeCompositorDependencies() { | 16 FakeCompositorDependencies::~FakeCompositorDependencies() { |
| 18 } | 17 } |
| 19 | 18 |
| 20 bool FakeCompositorDependencies::IsImplSidePaintingEnabled() { | 19 bool FakeCompositorDependencies::IsImplSidePaintingEnabled() { |
| 21 return true; | 20 return true; |
| 22 } | 21 } |
| 23 | 22 |
| 24 bool FakeCompositorDependencies::IsGpuRasterizationForced() { | 23 bool FakeCompositorDependencies::IsGpuRasterizationForced() { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 35 | 34 |
| 36 bool FakeCompositorDependencies::IsLcdTextEnabled() { | 35 bool FakeCompositorDependencies::IsLcdTextEnabled() { |
| 37 return false; | 36 return false; |
| 38 } | 37 } |
| 39 | 38 |
| 40 bool FakeCompositorDependencies::IsDistanceFieldTextEnabled() { | 39 bool FakeCompositorDependencies::IsDistanceFieldTextEnabled() { |
| 41 return false; | 40 return false; |
| 42 } | 41 } |
| 43 | 42 |
| 44 bool FakeCompositorDependencies::IsZeroCopyEnabled() { | 43 bool FakeCompositorDependencies::IsZeroCopyEnabled() { |
| 45 return false; | 44 return true; |
| 46 } | 45 } |
| 47 | 46 |
| 48 bool FakeCompositorDependencies::IsOneCopyEnabled() { | 47 bool FakeCompositorDependencies::IsOneCopyEnabled() { |
| 49 return true; | 48 return false; |
| 50 } | 49 } |
| 51 | 50 |
| 52 bool FakeCompositorDependencies::IsElasticOverscrollEnabled() { | 51 bool FakeCompositorDependencies::IsElasticOverscrollEnabled() { |
| 53 return false; | 52 return false; |
| 54 } | 53 } |
| 55 | 54 |
| 56 bool FakeCompositorDependencies::UseSingleThreadScheduler() { | |
| 57 return use_single_thread_scheduler_; | |
| 58 } | |
| 59 | |
| 60 uint32 FakeCompositorDependencies::GetImageTextureTarget() { | 55 uint32 FakeCompositorDependencies::GetImageTextureTarget() { |
| 61 return GL_TEXTURE_2D; | 56 return GL_TEXTURE_2D; |
| 62 } | 57 } |
| 63 | 58 |
| 64 scoped_refptr<base::SingleThreadTaskRunner> | 59 scoped_refptr<base::SingleThreadTaskRunner> |
| 65 FakeCompositorDependencies::GetCompositorMainThreadTaskRunner() { | 60 FakeCompositorDependencies::GetCompositorMainThreadTaskRunner() { |
| 66 return base::MessageLoopProxy::current(); | 61 return base::MessageLoopProxy::current(); |
| 67 } | 62 } |
| 68 | 63 |
| 69 scoped_refptr<base::SingleThreadTaskRunner> | 64 scoped_refptr<base::SingleThreadTaskRunner> |
| (...skipping 29 matching lines...) Expand all Loading... |
| 99 | 94 |
| 100 cc::TaskGraphRunner* FakeCompositorDependencies::GetTaskGraphRunner() { | 95 cc::TaskGraphRunner* FakeCompositorDependencies::GetTaskGraphRunner() { |
| 101 return &task_graph_runner_; | 96 return &task_graph_runner_; |
| 102 } | 97 } |
| 103 | 98 |
| 104 bool FakeCompositorDependencies::IsGatherPixelRefsEnabled() { | 99 bool FakeCompositorDependencies::IsGatherPixelRefsEnabled() { |
| 105 return false; | 100 return false; |
| 106 } | 101 } |
| 107 | 102 |
| 108 } // namespace content | 103 } // namespace content |
| OLD | NEW |