| 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 | 8 |
| 9 #if SK_SUPPORT_GPU | 9 #if SK_SUPPORT_GPU |
| 10 #include "GrContext.h" | 10 #include "GrContext.h" |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 } | 199 } |
| 200 return device; | 200 return device; |
| 201 } | 201 } |
| 202 | 202 |
| 203 #if SK_SUPPORT_GPU | 203 #if SK_SUPPORT_GPU |
| 204 GrContextFactory gContextFactory; | 204 GrContextFactory gContextFactory; |
| 205 typedef GrContextFactory::GLContextType GLContextType; | 205 typedef GrContextFactory::GLContextType GLContextType; |
| 206 static const GLContextType kNative = GrContextFactory::kNative_GLContextType; | 206 static const GLContextType kNative = GrContextFactory::kNative_GLContextType; |
| 207 #if SK_ANGLE | 207 #if SK_ANGLE |
| 208 static const GLContextType kANGLE = GrContextFactory::kANGLE_GLContextType; | 208 static const GLContextType kANGLE = GrContextFactory::kANGLE_GLContextType; |
| 209 #else | |
| 210 static const GLContextType kANGLE = kNative; | |
| 211 #endif | 209 #endif |
| 212 static const GLContextType kDebug = GrContextFactory::kDebug_GLContextType; | 210 static const GLContextType kDebug = GrContextFactory::kDebug_GLContextType; |
| 213 static const GLContextType kNull = GrContextFactory::kNull_GLContextType; | 211 static const GLContextType kNull = GrContextFactory::kNull_GLContextType; |
| 214 #else | 212 #else |
| 215 typedef int GLContextType; | 213 typedef int GLContextType; |
| 216 static const GLContextType kNative = 0, kANGLE = 0, kDebug = 0, kNull = 0; | 214 static const GLContextType kNative = 0, kANGLE = 0, kDebug = 0, kNull = 0; |
| 217 #endif | 215 #endif |
| 218 | 216 |
| 219 #ifdef SK_DEBUG | 217 #ifdef SK_DEBUG |
| 220 static const bool kIsDebug = true; | 218 static const bool kIsDebug = true; |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 gContextFactory.destroyContexts(); | 705 gContextFactory.destroyContexts(); |
| 708 #endif | 706 #endif |
| 709 return 0; | 707 return 0; |
| 710 } | 708 } |
| 711 | 709 |
| 712 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 710 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
| 713 int main(int argc, char * const argv[]) { | 711 int main(int argc, char * const argv[]) { |
| 714 return tool_main(argc, (char**) argv); | 712 return tool_main(argc, (char**) argv); |
| 715 } | 713 } |
| 716 #endif | 714 #endif |
| OLD | NEW |