| 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 "SkTypes.h" | 8 #include "SkTypes.h" |
| 9 #if defined(SK_BUILD_FOR_WIN32) | 9 #if defined(SK_BUILD_FOR_WIN32) |
| 10 | 10 |
| 11 #include "gl/GrGLInterface.h" | 11 #include "gl/GrGLInterface.h" |
| 12 #include "gl/GrGLAssembleInterface.h" | 12 #include "gl/GrGLAssembleInterface.h" |
| 13 #include "gl/GrGLUtil.h" | 13 #include "gl/GrGLUtil.h" |
| 14 #define WIN32_LEAN_AND_MEAN | 14 #define WIN32_LEAN_AND_MEAN |
| 15 #include <windows.h> | 15 #include <windows.h> |
| 16 | 16 |
| 17 class AutoLibraryUnload { | 17 class AutoLibraryUnload { |
| 18 public: | 18 public: |
| 19 AutoLibraryUnload(const char* moduleName) { | 19 AutoLibraryUnload(const char* moduleName) { |
| 20 fModule = LoadLibrary(moduleName); | 20 fModule = LoadLibraryA(moduleName); |
| 21 } | 21 } |
| 22 ~AutoLibraryUnload() { | 22 ~AutoLibraryUnload() { |
| 23 if (fModule) { | 23 if (fModule) { |
| 24 FreeLibrary(fModule); | 24 FreeLibrary(fModule); |
| 25 } | 25 } |
| 26 } | 26 } |
| 27 HMODULE get() const { return fModule; } | 27 HMODULE get() const { return fModule; } |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 HMODULE fModule; | 30 HMODULE fModule; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 | 82 |
| 83 if (kGLES_GrGLStandard == standard) { | 83 if (kGLES_GrGLStandard == standard) { |
| 84 return GrGLAssembleGLESInterface(&getter, win_get_gl_proc); | 84 return GrGLAssembleGLESInterface(&getter, win_get_gl_proc); |
| 85 } else if (kGL_GrGLStandard == standard) { | 85 } else if (kGL_GrGLStandard == standard) { |
| 86 return GrGLAssembleGLInterface(&getter, win_get_gl_proc); | 86 return GrGLAssembleGLInterface(&getter, win_get_gl_proc); |
| 87 } | 87 } |
| 88 return nullptr; | 88 return nullptr; |
| 89 } | 89 } |
| 90 | 90 |
| 91 #endif//defined(SK_BUILD_FOR_WIN32) | 91 #endif//defined(SK_BUILD_FOR_WIN32) |
| OLD | NEW |