forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_compositor_dependencies.h
57 lines (48 loc) · 2.22 KB
/
fake_compositor_dependencies.h
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
// 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.
#ifndef CONTENT_TEST_FAKE_COMPOSITOR_DEPENDENCIES_H_
#define CONTENT_TEST_FAKE_COMPOSITOR_DEPENDENCIES_H_
#include "cc/test/test_gpu_memory_buffer_manager.h"
#include "cc/test/test_shared_bitmap_manager.h"
#include "cc/test/test_task_graph_runner.h"
#include "content/renderer/gpu/compositor_dependencies.h"
#include "content/test/fake_renderer_scheduler.h"
namespace content {
class FakeCompositorDependencies : public CompositorDependencies {
public:
FakeCompositorDependencies();
~FakeCompositorDependencies() override;
// CompositorDependencies implementation.
bool IsGpuRasterizationForced() override;
bool IsGpuRasterizationEnabled() override;
int GetGpuRasterizationMSAASampleCount() override;
bool IsLcdTextEnabled() override;
bool IsDistanceFieldTextEnabled() override;
bool IsZeroCopyEnabled() override;
bool IsPartialRasterEnabled() override;
bool IsGpuMemoryBufferCompositorResourcesEnabled() override;
bool IsElasticOverscrollEnabled() override;
std::vector<unsigned> GetImageTextureTargets() override;
scoped_refptr<base::SingleThreadTaskRunner>
GetCompositorMainThreadTaskRunner() override;
scoped_refptr<base::SingleThreadTaskRunner>
GetCompositorImplThreadTaskRunner() override;
cc::SharedBitmapManager* GetSharedBitmapManager() override;
gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override;
scheduler::RendererScheduler* GetRendererScheduler() override;
cc::ContextProvider* GetSharedMainThreadContextProvider() override;
scoped_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource(
int routing_id) override;
cc::TaskGraphRunner* GetTaskGraphRunner() override;
bool AreImageDecodeTasksEnabled() override;
bool IsThreadedAnimationEnabled() override;
private:
cc::TestSharedBitmapManager shared_bitmap_manager_;
cc::TestGpuMemoryBufferManager gpu_memory_buffer_manager_;
cc::TestTaskGraphRunner task_graph_runner_;
FakeRendererScheduler renderer_scheduler_;
DISALLOW_COPY_AND_ASSIGN(FakeCompositorDependencies);
};
} // namespace content
#endif // CONTENT_TEST_FAKE_COMPOSITOR_DEPENDENCIES_H_