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

Side by Side Diff: src/gpu/gl/mac/SkNativeGLContext_mac.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/iOS/SkNativeGLContext_iOS.mm ('k') | src/gpu/gl/mesa/SkMesaGLContext.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 #include "gl/SkNativeGLContext.h" 8 #include "gl/SkNativeGLContext.h"
9 #include "AvailabilityMacros.h" 9 #include "AvailabilityMacros.h"
10 10
(...skipping 14 matching lines...) Expand all
25 SkNativeGLContext::~SkNativeGLContext() { 25 SkNativeGLContext::~SkNativeGLContext() {
26 this->destroyGLContext(); 26 this->destroyGLContext();
27 } 27 }
28 28
29 void SkNativeGLContext::destroyGLContext() { 29 void SkNativeGLContext::destroyGLContext() {
30 if (NULL != fContext) { 30 if (NULL != fContext) {
31 CGLReleaseContext(fContext); 31 CGLReleaseContext(fContext);
32 } 32 }
33 } 33 }
34 34
35 const GrGLInterface* SkNativeGLContext::createGLContext(GrGLStandard forcedGpuAP I) { 35 const GrGLInterface* SkNativeGLContext::createGLContext() {
36 SkASSERT(NULL == fContext); 36 SkASSERT(NULL == fContext);
37 if (kGLES_GrGLStandard == forcedGpuAPI) {
38 return NULL;
39 }
40 37
41 CGLPixelFormatAttribute attributes[] = { 38 CGLPixelFormatAttribute attributes[] = {
42 #if MAC_OS_X_VERSION_10_7 39 #if MAC_OS_X_VERSION_10_7
43 kCGLPFAOpenGLProfile, (CGLPixelFormatAttribute) kCGLOGLPVersion_3_2_Core , 40 kCGLPFAOpenGLProfile, (CGLPixelFormatAttribute) kCGLOGLPVersion_3_2_Core ,
44 #endif 41 #endif
45 kCGLPFADoubleBuffer, 42 kCGLPFADoubleBuffer,
46 (CGLPixelFormatAttribute)0 43 (CGLPixelFormatAttribute)0
47 }; 44 };
48 CGLPixelFormatObj pixFormat; 45 CGLPixelFormatObj pixFormat;
49 GLint npix; 46 GLint npix;
(...skipping 25 matching lines...) Expand all
75 return interface; 72 return interface;
76 } 73 }
77 74
78 void SkNativeGLContext::makeCurrent() const { 75 void SkNativeGLContext::makeCurrent() const {
79 CGLSetCurrentContext(fContext); 76 CGLSetCurrentContext(fContext);
80 } 77 }
81 78
82 void SkNativeGLContext::swapBuffers() const { 79 void SkNativeGLContext::swapBuffers() const {
83 CGLFlushDrawable(fContext); 80 CGLFlushDrawable(fContext);
84 } 81 }
OLDNEW
« no previous file with comments | « src/gpu/gl/iOS/SkNativeGLContext_iOS.mm ('k') | src/gpu/gl/mesa/SkMesaGLContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698