forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_compositor_dependencies.cc
83 lines (62 loc) · 2.06 KB
/
fake_compositor_dependencies.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/test/fake_compositor_dependencies.h"
#include <stddef.h>
#include "base/single_thread_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
#include "cc/test/test_ukm_recorder_factory.h"
#include "third_party/khronos/GLES2/gl2.h"
#include "ui/gfx/buffer_types.h"
namespace content {
FakeCompositorDependencies::FakeCompositorDependencies() {
}
FakeCompositorDependencies::~FakeCompositorDependencies() {
}
bool FakeCompositorDependencies::IsGpuRasterizationForced() {
return false;
}
int FakeCompositorDependencies::GetGpuRasterizationMSAASampleCount() {
return 0;
}
bool FakeCompositorDependencies::IsLcdTextEnabled() {
return false;
}
bool FakeCompositorDependencies::IsZeroCopyEnabled() {
return true;
}
bool FakeCompositorDependencies::IsPartialRasterEnabled() {
return false;
}
bool FakeCompositorDependencies::IsGpuMemoryBufferCompositorResourcesEnabled() {
return false;
}
bool FakeCompositorDependencies::IsElasticOverscrollEnabled() {
return true;
}
scoped_refptr<base::SingleThreadTaskRunner>
FakeCompositorDependencies::GetCompositorMainThreadTaskRunner() {
return base::ThreadTaskRunnerHandle::Get();
}
scoped_refptr<base::SingleThreadTaskRunner>
FakeCompositorDependencies::GetCompositorImplThreadTaskRunner() {
return nullptr; // Currently never threaded compositing in unit tests.
}
blink::scheduler::WebMainThreadScheduler*
FakeCompositorDependencies::GetWebMainThreadScheduler() {
return &renderer_scheduler_;
}
cc::TaskGraphRunner* FakeCompositorDependencies::GetTaskGraphRunner() {
return &task_graph_runner_;
}
bool FakeCompositorDependencies::IsThreadedAnimationEnabled() {
return true;
}
bool FakeCompositorDependencies::IsScrollAnimatorEnabled() {
return false;
}
std::unique_ptr<cc::UkmRecorderFactory>
FakeCompositorDependencies::CreateUkmRecorderFactory() {
return std::make_unique<cc::TestUkmRecorderFactory>();
}
} // namespace content