Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: include/utils/SkWGL.h

Issue 319043005: Support using OpenGL ES context on desktop (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add docs Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkRefCnt.h" 9 #include "SkRefCnt.h"
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 typedef BOOL (WINAPI *GetPixelFormatAttribfvProc)(HDC hdc, int, int, UINT, c onst int*, FLOAT*); 97 typedef BOOL (WINAPI *GetPixelFormatAttribfvProc)(HDC hdc, int, int, UINT, c onst int*, FLOAT*);
98 typedef HGLRC (WINAPI *CreateContextAttribsProc)(HDC hDC, HGLRC, const int * ); 98 typedef HGLRC (WINAPI *CreateContextAttribsProc)(HDC hDC, HGLRC, const int * );
99 99
100 GetExtensionsStringProc fGetExtensionsString; 100 GetExtensionsStringProc fGetExtensionsString;
101 ChoosePixelFormatProc fChoosePixelFormat; 101 ChoosePixelFormatProc fChoosePixelFormat;
102 GetPixelFormatAttribfvProc fGetPixelFormatAttribfv; 102 GetPixelFormatAttribfvProc fGetPixelFormatAttribfv;
103 GetPixelFormatAttribivProc fGetPixelFormatAttribiv; 103 GetPixelFormatAttribivProc fGetPixelFormatAttribiv;
104 CreateContextAttribsProc fCreateContextAttribs; 104 CreateContextAttribsProc fCreateContextAttribs;
105 }; 105 };
106 106
107 enum SkWGLContextRequest {
108 /** Requests to create core profile context if possible, otherwise
109 compatibility profile. */
110 kGLPreferCoreProfile_SkWGLContextRequest,
111 /** Requests to create compatibility profile context if possible, otherwise
112 core profile. */
113 kGLPreferCompatibilityProfile_SkWGLContextRequest,
114 /** Requests to create GL ES profile context. */
115 kGLES_SkWGLContextRequest
116 };
107 /** 117 /**
108 * Helper to create an OpenGL context for a DC using WGL. Configs with a sample count >= to 118 * Helper to create an OpenGL context for a DC using WGL. Configs with a sample count >= to
109 * msaaSampleCount are preferred but if none is available then a context with a lower sample count 119 * msaaSampleCount are preferred but if none is available then a context with a lower sample count
110 * (including non-MSAA) will be created. If preferCoreProfile is true but a core profile cannot be 120 * (including non-MSAA) will be created. If preferCoreProfile is true but a core profile cannot be
111 * created then a compatible profile context will be created. 121 * created then a compatible profile context will be created.
112 */ 122 */
113 HGLRC SkCreateWGLContext(HDC dc, int msaaSampleCount, bool preferCoreProfile); 123 HGLRC SkCreateWGLContext(HDC dc, int msaaSampleCount, SkWGLContextRequest contex t);
114 124
115 #endif 125 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698