forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmock_angle_surface_manager.h
More file actions
41 lines (32 loc) · 1.32 KB
/
mock_angle_surface_manager.h
File metadata and controls
41 lines (32 loc) · 1.32 KB
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
// Copyright 2013 The Flutter 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 FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_MOCK_ANGLE_SURFACE_MANAGER_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_MOCK_ANGLE_SURFACE_MANAGER_H_
#include "flutter/fml/macros.h"
#include "flutter/shell/platform/windows/angle_surface_manager.h"
#include "gmock/gmock.h"
namespace flutter {
namespace testing {
/// Mock for the |AngleSurfaceManager| base class.
class MockAngleSurfaceManager : public AngleSurfaceManager {
public:
MockAngleSurfaceManager() : AngleSurfaceManager(false) {}
MOCK_METHOD(bool,
CreateSurface,
(WindowsRenderTarget*, EGLint, EGLint),
(override));
MOCK_METHOD(void,
ResizeSurface,
(WindowsRenderTarget*, EGLint, EGLint, bool),
(override));
MOCK_METHOD(void, DestroySurface, (), (override));
MOCK_METHOD(bool, MakeCurrent, (), (override));
MOCK_METHOD(bool, ClearCurrent, (), (override));
MOCK_METHOD(void, SetVSyncEnabled, (bool), (override));
private:
FML_DISALLOW_COPY_AND_ASSIGN(MockAngleSurfaceManager);
};
} // namespace testing
} // namespace flutter
#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_MOCK_ANGLE_SURFACE_MANAGER_H_