Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
ThreadedSurface Class Referencefinal

#include <Surface.h>

Inheritance diagram for ThreadedSurface:
Surface SkRefCnt SkRefCntBase

Public Member Functions

 ThreadedSurface (JNIEnv *env, jobject surface)
 
- Public Member Functions inherited from Surface
virtual void release (JNIEnv *)=0
 
virtual void flushAndSubmit ()=0
 
virtual SkCanvasgetCanvas ()=0
 
int width () const
 
int height () const
 
sk_sp< SkImagemakeImageSnapshot () const
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Additional Inherited Members

- Protected Attributes inherited from Surface
sk_sp< SkSurfacefSurface
 

Detailed Description

Definition at line 59 of file Surface.h.

Constructor & Destructor Documentation

◆ ThreadedSurface()

ThreadedSurface::ThreadedSurface ( JNIEnv *  env,
jobject  surface 
)

Definition at line 48 of file Surface.cpp.

49 : fThread(std::make_unique<SurfaceThread>()) {
50 ANativeWindow* window = ANativeWindow_fromSurface(env, surface);
51 fWidth = ANativeWindow_getWidth(window);
52 fHeight = ANativeWindow_getHeight(window);
53
55 message.fNativeWindow = window;
56 message.fWindowSurface = &fWindowSurface;
57 fThread->postMessage(message);
58}
@ kInitialize
Definition: SurfaceThread.h:23
GLFWwindow * window
Definition: main.cc:45
VkSurfaceKHR surface
Definition: main.cc:49
Win32Message message
Definition: __init__.py:1
struct ANativeWindow ANativeWindow

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