Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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
12namespace flutter {
13
14// A test utility class providing the ability to access and alter various
15// private fields in a |FlutterWindowsView| instance.
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
32};
33
34} // namespace flutter
35
36#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_VIEW_MODIFIER_H_
ViewModifier(FlutterWindowsView *view)
void SetSurface(std::unique_ptr< egl::WindowSurface > surface)
VkSurfaceKHR surface
Definition main.cc:49
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:27