aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-09 13:20:48 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-09 13:20:48 +0000
commit1c6affbd1c986c77f17152782fee8b0b329a8e77 (patch)
treeaf74f8c60a759cfa3b2060e3f2121971d68e541d /src
parent1ae9111f33db7640ce87d55156c1b6d491237db2 (diff)
Fix GL context creation on Windows when NV path rendering
Diffstat (limited to 'src')
-rw-r--r--src/gpu/gl/GrGLCaps.cpp1
-rw-r--r--src/gpu/gl/win/SkNativeGLContext_win.cpp5
2 files changed, 5 insertions, 1 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 8833a05aef..beee39dc43 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -311,6 +311,7 @@ void GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
fPathRenderingSupport = GR_GL_USE_NV_PATH_RENDERING &&
ctxInfo.hasExtension("GL_NV_path_rendering");
+ SkASSERT(!fPathRenderingSupport || fFixedFunctionSupport);
fDstReadInShaderSupport = kNone_FBFetchType != fFBFetchType;
diff --git a/src/gpu/gl/win/SkNativeGLContext_win.cpp b/src/gpu/gl/win/SkNativeGLContext_win.cpp
index 392c2bc97d..08061d50c0 100644
--- a/src/gpu/gl/win/SkNativeGLContext_win.cpp
+++ b/src/gpu/gl/win/SkNativeGLContext_win.cpp
@@ -86,7 +86,10 @@ const GrGLInterface* SkNativeGLContext::createGLContext() {
return NULL;
}
- if (!(fGlRenderContext = SkCreateWGLContext(fDeviceContext, 0, true))) {
+ // We don't want the core profile when using NV path rendering (since
+ // NV path rendering relies on fixed function calls)
+ if (!(fGlRenderContext = SkCreateWGLContext(fDeviceContext, 0,
+ !GR_GL_USE_NV_PATH_RENDERING))) {
SkDebugf("Could not create rendering context.\n");
this->destroyGLContext();
return NULL;