OLD | NEW |
| (Empty) |
1 /* | |
2 * Copyright 2011 Google Inc. | |
3 * | |
4 * Use of this source code is governed by a BSD-style license that can be | |
5 * found in the LICENSE file. | |
6 */ | |
7 | |
8 #include "gl/GrGLAssembleInterface.h" | |
9 #include "../GrGLUtil.h" | |
10 | |
11 #include "osmesa_wrapper.h" | |
12 | |
13 static GrGLFuncPtr osmesa_get(void* ctx, const char name[]) { | |
14 SkASSERT(nullptr == ctx); | |
15 SkASSERT(OSMesaGetCurrentContext()); | |
16 return OSMesaGetProcAddress(name); | |
17 } | |
18 | |
19 const GrGLInterface* GrGLCreateMesaInterface() { | |
20 if (nullptr == OSMesaGetCurrentContext()) { | |
21 return nullptr; | |
22 } | |
23 return GrGLAssembleInterface(nullptr, osmesa_get); | |
24 } | |
OLD | NEW |