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

Side by Side Diff: src/gpu/gl/mac/SkCreatePlatformGLContext_mac.cpp

Issue 1604993005: Add ability to wire up sharelist in glcontext creation (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: feedback inc Created 4 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
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 "SkTypes.h" 8 #include "SkTypes.h"
9 #if defined(SK_BUILD_FOR_MAC) 9 #if defined(SK_BUILD_FOR_MAC)
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 void MacGLContext::onPlatformSwapBuffers() const { 102 void MacGLContext::onPlatformSwapBuffers() const {
103 CGLFlushDrawable(fContext); 103 CGLFlushDrawable(fContext);
104 } 104 }
105 105
106 GrGLFuncPtr MacGLContext::onPlatformGetProcAddress(const char* procName) const { 106 GrGLFuncPtr MacGLContext::onPlatformGetProcAddress(const char* procName) const {
107 return reinterpret_cast<GrGLFuncPtr>(dlsym(fGLLibrary, procName)); 107 return reinterpret_cast<GrGLFuncPtr>(dlsym(fGLLibrary, procName));
108 } 108 }
109 109
110 } // anonymous namespace 110 } // anonymous namespace
111 111
112 SkGLContext* SkCreatePlatformGLContext(GrGLStandard forcedGpuAPI) { 112 SkGLContext* SkCreatePlatformGLContext(GrGLStandard forcedGpuAPI, SkGLContext* s hareContext) {
113 SkASSERT(!shareContext);
114 if (shareContext) {
115 return nullptr;
116 }
117
113 if (kGLES_GrGLStandard == forcedGpuAPI) { 118 if (kGLES_GrGLStandard == forcedGpuAPI) {
114 return nullptr; 119 return nullptr;
115 } 120 }
116 MacGLContext* ctx = new MacGLContext; 121 MacGLContext* ctx = new MacGLContext;
117 if (!ctx->isValid()) { 122 if (!ctx->isValid()) {
118 delete ctx; 123 delete ctx;
119 return nullptr; 124 return nullptr;
120 } 125 }
121 return ctx; 126 return ctx;
122 } 127 }
123 128
124 #endif//defined(SK_BUILD_FOR_MAC) 129 #endif//defined(SK_BUILD_FOR_MAC)
OLDNEW
« no previous file with comments | « src/gpu/gl/iOS/SkCreatePlatformGLContext_iOS.mm ('k') | src/gpu/gl/nacl/SkCreatePlatformGLContext_nacl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698