25#define SK_WGL_DRAW_TO_WINDOW 0x2001
26#define SK_WGL_ACCELERATION 0x2003
27#define SK_WGL_SUPPORT_OPENGL 0x2010
28#define SK_WGL_DOUBLE_BUFFER 0x2011
29#define SK_WGL_COLOR_BITS 0x2014
30#define SK_WGL_RED_BITS 0x2015
31#define SK_WGL_GREEN_BITS 0x2017
32#define SK_WGL_BLUE_BITS 0x2019
33#define SK_WGL_ALPHA_BITS 0x201B
34#define SK_WGL_STENCIL_BITS 0x2023
35#define SK_WGL_FULL_ACCELERATION 0x2027
36#define SK_WGL_SAMPLE_BUFFERS 0x2041
37#define SK_WGL_SAMPLES 0x2042
38#define SK_WGL_CONTEXT_MAJOR_VERSION 0x2091
39#define SK_WGL_CONTEXT_MINOR_VERSION 0x2092
40#define SK_WGL_CONTEXT_LAYER_PLANE 0x2093
41#define SK_WGL_CONTEXT_FLAGS 0x2094
42#define SK_WGL_CONTEXT_PROFILE_MASK 0x9126
43#define SK_WGL_CONTEXT_DEBUG_BIT 0x0001
44#define SK_WGL_CONTEXT_FORWARD_COMPATIBLE_BIT 0x0002
45#define SK_WGL_CONTEXT_CORE_PROFILE_BIT 0x00000001
46#define SK_WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002
47#define SK_WGL_CONTEXT_ES2_PROFILE_BIT 0x00000004
48#define SK_ERROR_INVALID_VERSION 0x2095
49#define SK_ERROR_INVALID_PROFILE 0x2096
94 int desiredSampleCount)
const;
96 typedef const char* (
WINAPI *GetExtensionsStringProc)(HDC);
97 typedef BOOL (
WINAPI *ChoosePixelFormatProc)(HDC,
const int *,
const FLOAT *,
UINT,
int *,
UINT *);
100 typedef HGLRC (
WINAPI *CreateContextAttribsProc)(HDC, HGLRC,
const int *);
102 typedef HPBUFFER (
WINAPI* CreatePbufferProc)(HDC,
int ,
int,
int,
const int*);
103 typedef HDC (
WINAPI* GetPbufferDCProc)(HPBUFFER);
104 typedef int (
WINAPI* ReleasePbufferDCProc)(HPBUFFER, HDC);
105 typedef BOOL (
WINAPI* DestroyPbufferProc)(HPBUFFER);
107 static GetExtensionsStringProc fGetExtensionsString;
108 static ChoosePixelFormatProc fChoosePixelFormat;
109 static GetPixelFormatAttribfvProc fGetPixelFormatAttribfv;
110 static GetPixelFormatAttribivProc fGetPixelFormatAttribiv;
111 static CreateContextAttribsProc fCreateContextAttribs;
112 static SwapIntervalProc fSwapInterval;
113 static CreatePbufferProc fCreatePbuffer;
114 static GetPbufferDCProc fGetPbufferDC;
115 static ReleasePbufferDCProc fReleasePbufferDC;
116 static DestroyPbufferProc fDestroyPbuffer;
137 HGLRC shareContext =
nullptr);
HGLRC SkCreateWGLContext(HDC dc, int msaaSampleCount, bool deepColor, SkWGLContextRequest context, HGLRC shareContext=nullptr)
@ kGLES_SkWGLContextRequest
@ kGLPreferCompatibilityProfile_SkWGLContextRequest
@ kGLPreferCoreProfile_SkWGLContextRequest
int releasePbufferDC(HPBUFFER, HDC) const
HPBUFFER createPbuffer(HDC, int, int, int, const int *) const
BOOL swapInterval(int interval) const
BOOL choosePixelFormat(HDC hdc, const int *, const FLOAT *, UINT, int *, UINT *) const
int selectFormat(const int formats[], int formatCount, HDC dc, int desiredSampleCount) const
const char * getExtensionsString(HDC hdc) const
bool hasExtension(HDC dc, const char *ext) const
BOOL getPixelFormatAttribiv(HDC, int, int, UINT, const int *, int *) const
BOOL destroyPbuffer(HPBUFFER) const
HGLRC createContextAttribs(HDC, HGLRC, const int *) const
BOOL getPixelFormatAttribfv(HDC hdc, int, int, UINT, const int *, FLOAT *) const
HDC getPbufferDC(HPBUFFER) const
static sk_sp< SkWGLPbufferContext > Create(HDC parentDC, SkWGLContextRequest contextType, HGLRC shareContext)
~SkWGLPbufferContext() override