Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / content / test / fake_compositor_dependencies.cc
blobe33554d969e5c27aec76f33ff8e3f21e29bb7e2d
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/single_thread_task_runner.h"
8 #include "base/thread_task_runner_handle.h"
9 #include "cc/test/fake_external_begin_frame_source.h"
10 #include "third_party/khronos/GLES2/gl2.h"
12 namespace content {
14 FakeCompositorDependencies::FakeCompositorDependencies() {
17 FakeCompositorDependencies::~FakeCompositorDependencies() {
20 bool FakeCompositorDependencies::IsGpuRasterizationForced() {
21 return false;
24 bool FakeCompositorDependencies::IsGpuRasterizationEnabled() {
25 return false;
28 int FakeCompositorDependencies::GetGpuRasterizationMSAASampleCount() {
29 return 0;
32 bool FakeCompositorDependencies::IsLcdTextEnabled() {
33 return false;
36 bool FakeCompositorDependencies::IsDistanceFieldTextEnabled() {
37 return false;
40 bool FakeCompositorDependencies::IsZeroCopyEnabled() {
41 return true;
44 bool FakeCompositorDependencies::IsOneCopyEnabled() {
45 return false;
48 bool FakeCompositorDependencies::IsElasticOverscrollEnabled() {
49 return false;
52 uint32 FakeCompositorDependencies::GetImageTextureTarget() {
53 return GL_TEXTURE_2D;
56 scoped_refptr<base::SingleThreadTaskRunner>
57 FakeCompositorDependencies::GetCompositorMainThreadTaskRunner() {
58 return base::ThreadTaskRunnerHandle::Get();
61 scoped_refptr<base::SingleThreadTaskRunner>
62 FakeCompositorDependencies::GetCompositorImplThreadTaskRunner() {
63 return nullptr; // Currently never threaded compositing in unit tests.
66 cc::SharedBitmapManager* FakeCompositorDependencies::GetSharedBitmapManager() {
67 return &shared_bitmap_manager_;
70 gpu::GpuMemoryBufferManager*
71 FakeCompositorDependencies::GetGpuMemoryBufferManager() {
72 return &gpu_memory_buffer_manager_;
75 scheduler::RendererScheduler*
76 FakeCompositorDependencies::GetRendererScheduler() {
77 return &renderer_scheduler_;
80 cc::ContextProvider*
81 FakeCompositorDependencies::GetSharedMainThreadContextProvider() {
82 NOTREACHED();
83 return nullptr;
86 scoped_ptr<cc::BeginFrameSource>
87 FakeCompositorDependencies::CreateExternalBeginFrameSource(int routing_id) {
88 double refresh_rate = 200.0;
89 return make_scoped_ptr(new cc::FakeExternalBeginFrameSource(refresh_rate));
92 cc::TaskGraphRunner* FakeCompositorDependencies::GetTaskGraphRunner() {
93 return &task_graph_runner_;
96 bool FakeCompositorDependencies::IsGatherPixelRefsEnabled() {
97 return false;
100 } // namespace content