Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
shell
platform
windows
testing
view_modifier.h
Go to the documentation of this file.
1
// Copyright 2013 The Flutter 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.
4
5
#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_VIEW_MODIFIER_H_
6
#define FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_VIEW_MODIFIER_H_
7
8
#include "flutter/fml/macros.h"
9
#include "flutter/shell/platform/windows/egl/window_surface.h"
10
#include "flutter/shell/platform/windows/flutter_windows_view.h"
11
12
namespace
flutter
{
13
14
// A test utility class providing the ability to access and alter various
15
// private fields in a |FlutterWindowsView| instance.
16
class
ViewModifier
{
17
public
:
18
explicit
ViewModifier
(
FlutterWindowsView
* view) : view_(view) {}
19
20
// Override the EGL surface used by the view.
21
//
22
// Modifications are to the view, and will last for the lifetime of the
23
// view unless overwritten again.
24
void
SetSurface
(std::unique_ptr<egl::WindowSurface>
surface
) {
25
view_->surface_ = std::move(
surface
);
26
}
27
28
private
:
29
FlutterWindowsView
* view_;
30
31
FML_DISALLOW_COPY_AND_ASSIGN
(
ViewModifier
);
32
};
33
34
}
// namespace flutter
35
36
#endif
// FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_VIEW_MODIFIER_H_
flutter::FlutterWindowsView
Definition
flutter_windows_view.h:34
flutter::ViewModifier
Definition
view_modifier.h:16
flutter::ViewModifier::ViewModifier
ViewModifier(FlutterWindowsView *view)
Definition
view_modifier.h:18
flutter::ViewModifier::SetSurface
void SetSurface(std::unique_ptr< egl::WindowSurface > surface)
Definition
view_modifier.h:24
surface
VkSurfaceKHR surface
Definition
main.cc:49
FML_DISALLOW_COPY_AND_ASSIGN
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition
macros.h:27
flutter
Definition
asset_manager.cc:10
Generated on Fri Apr 26 2024 06:14:34 for Flutter Engine by
1.9.8