OLD | NEW |
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/SkGLContext.h" | 8 #include "gl/SkGLContext.h" |
9 | 9 |
10 #include <X11/Xlib.h> | 10 #include <X11/Xlib.h> |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 glXSwapBuffers(fDisplay, fGlxPixmap); | 325 glXSwapBuffers(fDisplay, fGlxPixmap); |
326 } | 326 } |
327 | 327 |
328 GrGLFuncPtr GLXGLContext::onPlatformGetProcAddress(const char* procName) const { | 328 GrGLFuncPtr GLXGLContext::onPlatformGetProcAddress(const char* procName) const { |
329 return glXGetProcAddress(reinterpret_cast<const GLubyte*>(procName)); | 329 return glXGetProcAddress(reinterpret_cast<const GLubyte*>(procName)); |
330 } | 330 } |
331 | 331 |
332 } // anonymous namespace | 332 } // anonymous namespace |
333 | 333 |
334 SkGLContext* SkCreatePlatformGLContext(GrGLStandard forcedGpuAPI) { | 334 SkGLContext* SkCreatePlatformGLContext(GrGLStandard forcedGpuAPI) { |
335 GLXGLContext* ctx = SkNEW_ARGS(GLXGLContext, (forcedGpuAPI)); | 335 GLXGLContext *ctx = new GLXGLContext(forcedGpuAPI); |
336 if (!ctx->isValid()) { | 336 if (!ctx->isValid()) { |
337 SkDELETE(ctx); | 337 delete ctx; |
338 return NULL; | 338 return NULL; |
339 } | 339 } |
340 return ctx; | 340 return ctx; |
341 } | 341 } |
OLD | NEW |