Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
skwindow::WindowContext Class Referenceabstract

#include <WindowContext.h>

Inheritance diagram for skwindow::WindowContext:
skwindow::internal::GLWindowContext skwindow::internal::GraphiteDawnWindowContext skwindow::internal::GraphiteMetalWindowContext skwindow::internal::MetalWindowContext skwindow::internal::RasterWindowContext skwindow::internal::ANGLEWindowContext

Public Member Functions

 WindowContext (const DisplayParams &)
 
virtual ~WindowContext ()
 
virtual sk_sp< SkSurfacegetBackbufferSurface ()=0
 
void swapBuffers ()
 
virtual bool isValid ()=0
 
virtual void resize (int w, int h)=0
 
virtual void activate (bool isActive)
 
const DisplayParamsgetDisplayParams ()
 
virtual void setDisplayParams (const DisplayParams &params)=0
 
GrDirectContextdirectContext () const
 
int width () const
 
int height () const
 
SkISize dimensions () const
 
int sampleCount () const
 
int stencilBits () const
 

Protected Member Functions

virtual bool isGpuContext ()
 
virtual void onSwapBuffers ()=0
 

Protected Attributes

sk_sp< GrDirectContextfContext
 
int fWidth
 
int fHeight
 
DisplayParams fDisplayParams
 
int fSampleCount = 1
 
int fStencilBits = 0
 

Detailed Description

Definition at line 26 of file WindowContext.h.

Constructor & Destructor Documentation

◆ WindowContext()

skwindow::WindowContext::WindowContext ( const DisplayParams params)

Definition at line 18 of file WindowContext.cpp.

DisplayParams fDisplayParams
const EmbeddedViewParams * params

◆ ~WindowContext()

skwindow::WindowContext::~WindowContext ( )
virtual

Definition at line 21 of file WindowContext.cpp.

21{}

Member Function Documentation

◆ activate()

virtual void skwindow::WindowContext::activate ( bool  isActive)
inlinevirtual

Reimplemented in skwindow::internal::GraphiteMetalWindowContext.

Definition at line 40 of file WindowContext.h.

40{}

◆ dimensions()

SkISize skwindow::WindowContext::dimensions ( ) const
inline

Definition at line 53 of file WindowContext.h.

◆ directContext()

GrDirectContext * skwindow::WindowContext::directContext ( ) const
inline

Definition at line 45 of file WindowContext.h.

45{ return fContext.get(); }
T * get() const
Definition SkRefCnt.h:303
sk_sp< GrDirectContext > fContext

◆ getBackbufferSurface()

virtual sk_sp< SkSurface > skwindow::WindowContext::getBackbufferSurface ( )
pure virtual

◆ getDisplayParams()

const DisplayParams & skwindow::WindowContext::getDisplayParams ( )
inline

Definition at line 42 of file WindowContext.h.

42{ return fDisplayParams; }

◆ height()

int skwindow::WindowContext::height ( ) const
inline

Definition at line 52 of file WindowContext.h.

52{ return fHeight; }

◆ isGpuContext()

virtual bool skwindow::WindowContext::isGpuContext ( )
inlineprotectedvirtual

Reimplemented in skwindow::internal::GraphiteDawnWindowContext, and skwindow::internal::RasterWindowContext.

Definition at line 58 of file WindowContext.h.

58{ return true; }

◆ isValid()

virtual bool skwindow::WindowContext::isValid ( )
pure virtual

◆ onSwapBuffers()

virtual void skwindow::WindowContext::onSwapBuffers ( )
protectedpure virtual

◆ resize()

virtual void skwindow::WindowContext::resize ( int  w,
int  h 
)
pure virtual

◆ sampleCount()

int skwindow::WindowContext::sampleCount ( ) const
inline

Definition at line 54 of file WindowContext.h.

◆ setDisplayParams()

virtual void skwindow::WindowContext::setDisplayParams ( const DisplayParams params)
pure virtual

◆ stencilBits()

int skwindow::WindowContext::stencilBits ( ) const
inline

Definition at line 55 of file WindowContext.h.

◆ swapBuffers()

void skwindow::WindowContext::swapBuffers ( )

Definition at line 23 of file WindowContext.cpp.

23 {
24 this->onSwapBuffers();
25}
virtual void onSwapBuffers()=0

◆ width()

int skwindow::WindowContext::width ( ) const
inline

Definition at line 51 of file WindowContext.h.

51{ return fWidth; }

Member Data Documentation

◆ fContext

sk_sp<GrDirectContext> skwindow::WindowContext::fContext
protected

Definition at line 62 of file WindowContext.h.

◆ fDisplayParams

DisplayParams skwindow::WindowContext::fDisplayParams
protected

Definition at line 70 of file WindowContext.h.

◆ fHeight

int skwindow::WindowContext::fHeight
protected

Definition at line 69 of file WindowContext.h.

◆ fSampleCount

int skwindow::WindowContext::fSampleCount = 1
protected

Definition at line 75 of file WindowContext.h.

◆ fStencilBits

int skwindow::WindowContext::fStencilBits = 0
protected

Definition at line 76 of file WindowContext.h.

◆ fWidth

int skwindow::WindowContext::fWidth
protected

Definition at line 68 of file WindowContext.h.


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