Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | List of all members
flutter::AndroidNativeWindow Class Reference

#include <android_native_window.h>

Inheritance diagram for flutter::AndroidNativeWindow:
fml::RefCountedThreadSafe< AndroidNativeWindow > fml::internal::RefCountedThreadSafeBase

Public Types

using Handle = std::nullptr_t
 

Public Member Functions

bool IsValid () const
 
Handle handle () const
 
SkISize GetSize () const
 
bool IsFakeWindow () const
 
- Public Member Functions inherited from fml::RefCountedThreadSafe< AndroidNativeWindow >
void Release () const
 
- Public Member Functions inherited from fml::internal::RefCountedThreadSafeBase
void AddRef () const
 
bool HasOneRef () const
 
void AssertHasOneRef () const
 

Additional Inherited Members

- Protected Member Functions inherited from fml::RefCountedThreadSafe< AndroidNativeWindow >
 RefCountedThreadSafe ()
 
 ~RefCountedThreadSafe ()
 
- Protected Member Functions inherited from fml::internal::RefCountedThreadSafeBase
 RefCountedThreadSafeBase ()
 
 ~RefCountedThreadSafeBase ()
 
bool Release () const
 
void Adopt ()
 

Detailed Description

Definition at line 20 of file android_native_window.h.

Member Typedef Documentation

◆ Handle

using flutter::AndroidNativeWindow::Handle = std::nullptr_t

Definition at line 26 of file android_native_window.h.

Member Function Documentation

◆ GetSize()

SkISize flutter::AndroidNativeWindow::GetSize ( ) const

Definition at line 32 of file android_native_window.cc.

32 {
33#if FML_OS_ANDROID
34 return window_ == nullptr ? SkISize::Make(0, 0)
35 : SkISize::Make(ANativeWindow_getWidth(window_),
36 ANativeWindow_getHeight(window_));
37#else // FML_OS_ANDROID
38 return SkISize::Make(0, 0);
39#endif // FML_OS_ANDROID
40}
SK_API sk_sp< SkDocument > Make(SkWStream *dst, const SkSerialProcs *=nullptr, std::function< void(const SkPicture *)> onEndPage=nullptr)
Definition: SkSize.h:16
static constexpr SkISize Make(int32_t w, int32_t h)
Definition: SkSize.h:20

◆ handle()

AndroidNativeWindow::Handle flutter::AndroidNativeWindow::handle ( ) const

Definition at line 28 of file android_native_window.cc.

28 {
29 return window_;
30}

◆ IsFakeWindow()

bool flutter::AndroidNativeWindow::IsFakeWindow ( ) const
inline

Returns true when this AndroidNativeWindow is not backed by a real window (used for testing).

Definition at line 37 of file android_native_window.h.

37{ return is_fake_window_; }

◆ IsValid()

bool flutter::AndroidNativeWindow::IsValid ( ) const

Definition at line 24 of file android_native_window.cc.

24 {
25 return window_ != nullptr;
26}

The documentation for this class was generated from the following files: