| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef GrGLInterface_DEFINED | 8 #ifndef GrGLInterface_DEFINED |
| 9 #define GrGLInterface_DEFINED | 9 #define GrGLInterface_DEFINED |
| 10 | 10 |
| 11 #include "GrGLFunctions.h" | 11 #include "GrGLFunctions.h" |
| 12 #include "SkRefCnt.h" | 12 #include "SkRefCnt.h" |
| 13 | 13 |
| 14 //////////////////////////////////////////////////////////////////////////////// | 14 //////////////////////////////////////////////////////////////////////////////// |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * Classifies GL contexts by which standard they implement (currently as Desktop | 17 * Classifies GL contexts by which standard they implement (currently as Desktop |
| 18 * vs. ES). | 18 * vs. ES). |
| 19 */ | 19 */ |
| 20 enum GrGLStandard { | 20 enum GrGLStandard { |
| 21 kNone_GrGLStandard, | 21 kNone_GrGLStandard, |
| 22 kGL_GrGLStandard, | 22 kGL_GrGLStandard, |
| 23 kGLES_GrGLStandard, | 23 kGLES_GrGLStandard, |
| 24 }; | 24 }; |
| 25 | 25 |
| 26 // Temporary alias until Chromium can be updated. | 26 // Temporary aliases until Chromium can be updated. |
| 27 typedef GrGLStandard GrGLBinding; |
| 27 static const GrGLStandard kES2_GrGLBinding = kGLES_GrGLStandard; | 28 static const GrGLStandard kES2_GrGLBinding = kGLES_GrGLStandard; |
| 29 static const GrGLStandard kDesktop_GrGLBinding = kGL_GrGLStandard; |
| 28 | 30 |
| 29 //////////////////////////////////////////////////////////////////////////////// | 31 //////////////////////////////////////////////////////////////////////////////// |
| 30 | 32 |
| 31 /** | 33 /** |
| 32 * Rather than depend on platform-specific GL headers and libraries, we require | 34 * Rather than depend on platform-specific GL headers and libraries, we require |
| 33 * the client to provide a struct of GL function pointers. This struct can be | 35 * the client to provide a struct of GL function pointers. This struct can be |
| 34 * specified per-GrContext as a parameter to GrContext::Create. If NULL is | 36 * specified per-GrContext as a parameter to GrContext::Create. If NULL is |
| 35 * passed to Create then a "default" GL interface is created. If the default is | 37 * passed to Create then a "default" GL interface is created. If the default is |
| 36 * also NULL GrContext creation will fail. | 38 * also NULL GrContext creation will fail. |
| 37 * | 39 * |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 | 346 |
| 345 // Per-GL func callback | 347 // Per-GL func callback |
| 346 #if GR_GL_PER_GL_FUNC_CALLBACK | 348 #if GR_GL_PER_GL_FUNC_CALLBACK |
| 347 GrGLInterfaceCallbackProc fCallback; | 349 GrGLInterfaceCallbackProc fCallback; |
| 348 GrGLInterfaceCallbackData fCallbackData; | 350 GrGLInterfaceCallbackData fCallbackData; |
| 349 #endif | 351 #endif |
| 350 | 352 |
| 351 }; | 353 }; |
| 352 | 354 |
| 353 #endif | 355 #endif |
| OLD | NEW |