ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / content / test / fake_compositor_dependencies.cc
blobe33b7ef1ac9a7c468f2ad9f9ebeff5518083c3ed
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
3 // found in the LICENSE file.
5 #include "content/test/fake_compositor_dependencies.h"
7 #include "base/message_loop/message_loop_proxy.h"
8 #include "cc/test/fake_external_begin_frame_source.h"
9 #include "third_party/khronos/GLES2/gl2.h"
11 namespace content {
13 FakeCompositorDependencies::FakeCompositorDependencies()
14 : use_single_thread_scheduler_(true) {
17 bool FakeCompositorDependencies::IsImplSidePaintingEnabled() {
18 return true;
21 bool FakeCompositorDependencies::IsGpuRasterizationForced() {
22 return false;
25 bool FakeCompositorDependencies::IsGpuRasterizationEnabled() {
26 return false;
29 bool FakeCompositorDependencies::IsThreadedGpuRasterizationEnabled() {
30 return false;
33 int FakeCompositorDependencies::GetGpuRasterizationMSAASampleCount() {
34 return 0;
37 bool FakeCompositorDependencies::IsLcdTextEnabled() {
38 return false;
41 bool FakeCompositorDependencies::IsDistanceFieldTextEnabled() {
42 return false;
45 bool FakeCompositorDependencies::IsZeroCopyEnabled() {
46 return false;
49 bool FakeCompositorDependencies::IsOneCopyEnabled() {
50 return true;
53 bool FakeCompositorDependencies::IsElasticOverscrollEnabled() {
54 return false;
57 bool FakeCompositorDependencies::UseSingleThreadScheduler() {
58 return use_single_thread_scheduler_;
61 uint32 FakeCompositorDependencies::GetImageTextureTarget() {
62 return GL_TEXTURE_2D;
65 scoped_refptr<base::SingleThreadTaskRunner>
66 FakeCompositorDependencies::GetCompositorMainThreadTaskRunner() {
67 return base::MessageLoopProxy::current();
70 scoped_refptr<base::SingleThreadTaskRunner>
71 FakeCompositorDependencies::GetCompositorImplThreadTaskRunner() {
72 return nullptr; // Currently never threaded compositing in unit tests.
75 cc::SharedBitmapManager* FakeCompositorDependencies::GetSharedBitmapManager() {
76 return &shared_bitmap_manager_;
79 gpu::GpuMemoryBufferManager*
80 FakeCompositorDependencies::GetGpuMemoryBufferManager() {
81 return &gpu_memory_buffer_manager_;
84 RendererScheduler* FakeCompositorDependencies::GetRendererScheduler() {
85 return &renderer_scheduler_;
88 cc::ContextProvider*
89 FakeCompositorDependencies::GetSharedMainThreadContextProvider() {
90 NOTREACHED();
91 return nullptr;
94 scoped_ptr<cc::BeginFrameSource>
95 FakeCompositorDependencies::CreateExternalBeginFrameSource(int routing_id) {
96 double refresh_rate = 200.0;
97 return make_scoped_ptr(new cc::FakeExternalBeginFrameSource(refresh_rate));
100 } // namespace content