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

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

Issue 12533007: Use vertex array objects on core profiles. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Use vertex array objects on core profiles. Created 7 years, 9 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
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 if (!(fGlRenderContext = SkCreateWGLContext(fDeviceContext, 0, false))) { 89 if (!(fGlRenderContext = SkCreateWGLContext(fDeviceContext, 0, true))) {
90 SkDebugf("Could not create rendering context.\n"); 90 SkDebugf("Could not create rendering context.\n");
91 this->destroyGLContext(); 91 this->destroyGLContext();
92 return NULL; 92 return NULL;
93 } 93 }
94 94
95 if (!(wglMakeCurrent(fDeviceContext, fGlRenderContext))) { 95 if (!(wglMakeCurrent(fDeviceContext, fGlRenderContext))) {
96 SkDebugf("Could not set the context.\n"); 96 SkDebugf("Could not set the context.\n");
97 this->destroyGLContext(); 97 this->destroyGLContext();
98 return NULL; 98 return NULL;
99 } 99 }
100 const GrGLInterface* interface = GrGLCreateNativeInterface(); 100 const GrGLInterface* interface = GrGLCreateNativeInterface();
101 if (NULL == interface) { 101 if (NULL == interface) {
102 SkDebugf("Could not create GL interface.\n"); 102 SkDebugf("Could not create GL interface.\n");
103 this->destroyGLContext(); 103 this->destroyGLContext();
104 return NULL; 104 return NULL;
105 } 105 }
106 106
107 return interface; 107 return interface;
108 } 108 }
109 109
110 void SkNativeGLContext::makeCurrent() const { 110 void SkNativeGLContext::makeCurrent() const {
111 if (!wglMakeCurrent(fDeviceContext, fGlRenderContext)) { 111 if (!wglMakeCurrent(fDeviceContext, fGlRenderContext)) {
112 SkDebugf("Could not create rendering context.\n"); 112 SkDebugf("Could not create rendering context.\n");
113 } 113 }
114 } 114 }
OLDNEW
« src/gpu/gl/GrGpuGL.h ('K') | « src/gpu/gl/mac/SkNativeGLContext_mac.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698