| Index: src/gpu/gl/win/SkNativeGLContext_win.cpp
|
| diff --git a/src/gpu/gl/win/SkNativeGLContext_win.cpp b/src/gpu/gl/win/SkNativeGLContext_win.cpp
|
| index bae97a780c0b09e78d5108a7eaab4619128b96cb..97b957a0807ef90b894a98886f1632f5c499b5cf 100644
|
| --- a/src/gpu/gl/win/SkNativeGLContext_win.cpp
|
| +++ b/src/gpu/gl/win/SkNativeGLContext_win.cpp
|
| @@ -47,7 +47,7 @@ void SkNativeGLContext::destroyGLContext() {
|
| }
|
| }
|
|
|
| -const GrGLInterface* SkNativeGLContext::createGLContext() {
|
| +const GrGLInterface* SkNativeGLContext::createGLContext(GrGLStandard forcedStandard) {
|
| HINSTANCE hInstance = (HINSTANCE)GetModuleHandle(NULL);
|
|
|
| if (!gWC) {
|
| @@ -85,9 +85,13 @@ const GrGLInterface* SkNativeGLContext::createGLContext() {
|
| this->destroyGLContext();
|
| return NULL;
|
| }
|
| + // Requesting a Core profile would bar us from using NVPR. So we request
|
| + // compatibility profile or GL ES.
|
| + SkWGLContextRequest contextType =
|
| + kGLES_GrGLStandard == forcedStandard ?
|
| + kGLES_SkWGLContextRequest : kGLPreferCompatibilityProfile_SkWGLContextRequest;
|
|
|
| - // Requesting a Core profile would bar us from using NVPR. So we pass false.
|
| - if (!(fGlRenderContext = SkCreateWGLContext(fDeviceContext, 0, false))) {
|
| + if (!(fGlRenderContext = SkCreateWGLContext(fDeviceContext, 0, contextType))) {
|
| SkDebugf("Could not create rendering context.\n");
|
| this->destroyGLContext();
|
| return NULL;
|
|
|