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

Unified 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, 6 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 side-by-side diff with in-line comments
Download patch
Index: include/utils/SkWGL.h
diff --git a/include/utils/SkWGL.h b/include/utils/SkWGL.h
index 5f630a16892a48d6a9debaf22983b96066f246df..5272f17c87088b58ef3148824c0ca82de962e8c9 100644
--- a/include/utils/SkWGL.h
+++ b/include/utils/SkWGL.h
@@ -104,12 +104,22 @@ private:
CreateContextAttribsProc fCreateContextAttribs;
};
+enum SkWGLContextRequest {
+ /** Requests to create core profile context if possible, otherwise
+ compatibility profile. */
+ kGLPreferCoreProfile_SkWGLContextRequest,
+ /** Requests to create compatibility profile context if possible, otherwise
+ core profile. */
+ kGLPreferCompatibilityProfile_SkWGLContextRequest,
+ /** Requests to create GL ES profile context. */
+ kGLES_SkWGLContextRequest
+};
/**
* Helper to create an OpenGL context for a DC using WGL. Configs with a sample count >= to
* msaaSampleCount are preferred but if none is available then a context with a lower sample count
* (including non-MSAA) will be created. If preferCoreProfile is true but a core profile cannot be
* created then a compatible profile context will be created.
*/
-HGLRC SkCreateWGLContext(HDC dc, int msaaSampleCount, bool preferCoreProfile);
+HGLRC SkCreateWGLContext(HDC dc, int msaaSampleCount, SkWGLContextRequest context);
#endif

Powered by Google App Engine
This is Rietveld 408576698