Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
native_window.cc
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
6
7namespace impeller::android {
8
10 if (window_.get()) {
11 GetProcTable().ANativeWindow_acquire(window_.get());
12 }
13}
14
16
18 return window_.is_valid();
19}
20
22 if (!IsValid()) {
23 return {};
24 }
25 const int32_t width = ANativeWindow_getWidth(window_.get());
26 const int32_t height = ANativeWindow_getHeight(window_.get());
27 return ISize::MakeWH(std::max(width, 0), std::max(height, 0));
28}
29
31 return window_.get();
32}
33
34} // namespace impeller::android
bool is_valid() const
const T & get() const
ANativeWindow * GetHandle() const
NativeWindow(ANativeWindow *window)
GLFWwindow * window
Definition main.cc:45
const ProcTable & GetProcTable()
Definition proc_table.cc:12
int32_t height
int32_t width
static constexpr TSize MakeWH(Type width, Type height)
Definition size.h:34
struct ANativeWindow ANativeWindow