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

Side by Side Diff: src/gpu/gl/angle/SkANGLEGLContext.cpp

Issue 351583002: Revert of Support using OpenGL ES context on desktop (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « src/gpu/gl/android/SkNativeGLContext_android.cpp ('k') | src/gpu/gl/debug/SkDebugGLContext.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 2012 Google Inc. 3 * Copyright 2012 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/SkANGLEGLContext.h" 9 #include "gl/SkANGLEGLContext.h"
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 if (fSurface) { 45 if (fSurface) {
46 eglDestroySurface(fDisplay, fSurface); 46 eglDestroySurface(fDisplay, fSurface);
47 fSurface = EGL_NO_SURFACE; 47 fSurface = EGL_NO_SURFACE;
48 } 48 }
49 49
50 //TODO should we close the display? 50 //TODO should we close the display?
51 fDisplay = EGL_NO_DISPLAY; 51 fDisplay = EGL_NO_DISPLAY;
52 } 52 }
53 } 53 }
54 54
55 const GrGLInterface* SkANGLEGLContext::createGLContext(GrGLStandard forcedGpuAPI ) { 55 const GrGLInterface* SkANGLEGLContext::createGLContext() {
56 if (kGL_GrGLStandard == forcedGpuAPI) {
57 return NULL;
58 }
59 56
60 fDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY); 57 fDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
61 58
62 EGLint majorVersion; 59 EGLint majorVersion;
63 EGLint minorVersion; 60 EGLint minorVersion;
64 eglInitialize(fDisplay, &majorVersion, &minorVersion); 61 eglInitialize(fDisplay, &majorVersion, &minorVersion);
65 62
66 EGLint numConfigs; 63 EGLint numConfigs;
67 static const EGLint configAttribs[] = { 64 static const EGLint configAttribs[] = {
68 EGL_SURFACE_TYPE, EGL_PBUFFER_BIT, 65 EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 if (!eglMakeCurrent(fDisplay, fSurface, fSurface, fContext)) { 104 if (!eglMakeCurrent(fDisplay, fSurface, fSurface, fContext)) {
108 SkDebugf("Could not set the context.\n"); 105 SkDebugf("Could not set the context.\n");
109 } 106 }
110 } 107 }
111 108
112 void SkANGLEGLContext::swapBuffers() const { 109 void SkANGLEGLContext::swapBuffers() const {
113 if (!eglSwapBuffers(fDisplay, fSurface)) { 110 if (!eglSwapBuffers(fDisplay, fSurface)) {
114 SkDebugf("Could not complete eglSwapBuffers.\n"); 111 SkDebugf("Could not complete eglSwapBuffers.\n");
115 } 112 }
116 } 113 }
OLDNEW
« no previous file with comments | « src/gpu/gl/android/SkNativeGLContext_android.cpp ('k') | src/gpu/gl/debug/SkDebugGLContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698