Flutter Engine
The Flutter Engine
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());
28}
29
31 return window_.get();
32}
33
34} // namespace impeller::android
bool is_valid() const
Definition: unique_object.h:89
const T & get() const
Definition: unique_object.h:87
ANativeWindow * GetHandle() const
NativeWindow(ANativeWindow *window)
Definition: native_window.cc:9
GLFWwindow * window
Definition: main.cc:45
static float max(float r, float g, float b)
Definition: hsl.cpp:49
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