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

Side by Side Diff: src/gpu/gl/win/SkNativeGLContext_win.cpp

Issue 144003006: Turn NVPR on by default (but off in tools). (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix vs 2010 x86 debugger builds Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp ('k') | tests/GLInterfaceValidation.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "gl/SkNativeGLContext.h" 9 #include "gl/SkNativeGLContext.h"
10 #include "SkWGL.h" 10 #include "SkWGL.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 SkDebugf("Could not create window.\n"); 79 SkDebugf("Could not create window.\n");
80 return NULL; 80 return NULL;
81 } 81 }
82 82
83 if (!(fDeviceContext = GetDC(fWindow))) { 83 if (!(fDeviceContext = GetDC(fWindow))) {
84 SkDebugf("Could not get device context.\n"); 84 SkDebugf("Could not get device context.\n");
85 this->destroyGLContext(); 85 this->destroyGLContext();
86 return NULL; 86 return NULL;
87 } 87 }
88 88
89 // We don't want the core profile when using NV path rendering (since 89 // Requesting a Core profile would bar us from using NVPR. So we pass false.
90 // NV path rendering relies on fixed function calls) 90 if (!(fGlRenderContext = SkCreateWGLContext(fDeviceContext, 0, false))) {
91 if (!(fGlRenderContext = SkCreateWGLContext(fDeviceContext, 0,
92 !GR_GL_USE_NV_PATH_RENDERING))) {
93 SkDebugf("Could not create rendering context.\n"); 91 SkDebugf("Could not create rendering context.\n");
94 this->destroyGLContext(); 92 this->destroyGLContext();
95 return NULL; 93 return NULL;
96 } 94 }
97 95
98 if (!(wglMakeCurrent(fDeviceContext, fGlRenderContext))) { 96 if (!(wglMakeCurrent(fDeviceContext, fGlRenderContext))) {
99 SkDebugf("Could not set the context.\n"); 97 SkDebugf("Could not set the context.\n");
100 this->destroyGLContext(); 98 this->destroyGLContext();
101 return NULL; 99 return NULL;
102 } 100 }
(...skipping 11 matching lines...) Expand all
114 if (!wglMakeCurrent(fDeviceContext, fGlRenderContext)) { 112 if (!wglMakeCurrent(fDeviceContext, fGlRenderContext)) {
115 SkDebugf("Could not create rendering context.\n"); 113 SkDebugf("Could not create rendering context.\n");
116 } 114 }
117 } 115 }
118 116
119 void SkNativeGLContext::swapBuffers() const { 117 void SkNativeGLContext::swapBuffers() const {
120 if (!SwapBuffers(fDeviceContext)) { 118 if (!SwapBuffers(fDeviceContext)) {
121 SkDebugf("Could not complete SwapBuffers.\n"); 119 SkDebugf("Could not complete SwapBuffers.\n");
122 } 120 }
123 } 121 }
OLDNEW
« no previous file with comments | « src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp ('k') | tests/GLInterfaceValidation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698