diff options
author | bsalomon <bsalomon@google.com> | 2015-10-19 09:03:23 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-19 09:03:23 -0700 |
commit | 2fc11d39d187f932aeeb8f6220089326df75e9a1 (patch) | |
tree | 870aea0ab7cadbf0eda12228b833465ad61068cb | |
parent | 9f8904d2fdde2fac2d2be4af7b19de9e5ad3fc3c (diff) |
Move definitions of GrGL basic types (e.g. GrGLenum) to their own header.
Review URL: https://codereview.chromium.org/1410333003
-rw-r--r-- | gyp/gpu.gypi | 1 | ||||
-rw-r--r-- | include/gpu/gl/GrGLFunctions.h | 53 | ||||
-rw-r--r-- | include/gpu/gl/GrGLTypes.h | 61 | ||||
-rw-r--r-- | src/gpu/gl/GrGLBufferImpl.h | 2 | ||||
-rw-r--r-- | src/gpu/gl/GrGLNameAllocator.h | 2 | ||||
-rw-r--r-- | src/gpu/gl/GrGLNoOpInterface.h | 2 | ||||
-rw-r--r-- | src/gpu/gl/GrGLPath.h | 2 | ||||
-rw-r--r-- | src/gpu/gl/GrGLPathRange.h | 2 | ||||
-rw-r--r-- | src/gpu/gl/GrGLPathRendering.h | 2 | ||||
-rw-r--r-- | src/gpu/gl/GrGLVertexArray.h | 2 |
10 files changed, 70 insertions, 59 deletions
diff --git a/gyp/gpu.gypi b/gyp/gpu.gypi index d0a3e919db..090478f806 100644 --- a/gyp/gpu.gypi +++ b/gyp/gpu.gypi @@ -54,6 +54,7 @@ '<(skia_include_path)/gpu/gl/GrGLFunctions.h', '<(skia_include_path)/gpu/gl/GrGLInterface.h', '<(skia_include_path)/gpu/gl/GrGLSLPrettyPrint.h', + '<(skia_include_path)/gpu/gl/GrGLTypes.h', '<(skia_src_path)/gpu/GrAutoLocaleSetter.h', '<(skia_src_path)/gpu/GrAllocator.h', diff --git a/include/gpu/gl/GrGLFunctions.h b/include/gpu/gl/GrGLFunctions.h index b96a4e50a5..5fbbc2f261 100644 --- a/include/gpu/gl/GrGLFunctions.h +++ b/include/gpu/gl/GrGLFunctions.h @@ -9,61 +9,10 @@ #ifndef GrGLFunctions_DEFINED #define GrGLFunctions_DEFINED -#include "GrGLConfig.h" - +#include "GrGLTypes.h" extern "C" { -//////////////////////////////////////////////////////////////////////////////// - -/** - * Classifies GL contexts by which standard they implement (currently as Desktop - * vs. ES). - */ -enum GrGLStandard { - kNone_GrGLStandard, - kGL_GrGLStandard, - kGLES_GrGLStandard, -}; -static const int kGrGLStandardCnt = 3; - -/////////////////////////////////////////////////////////////////////////////// - -/** - * Declares typedefs for all the GL functions used in GrGLInterface - */ - -typedef unsigned int GrGLenum; -typedef unsigned char GrGLboolean; -typedef unsigned int GrGLbitfield; -typedef signed char GrGLbyte; -typedef char GrGLchar; -typedef short GrGLshort; -typedef int GrGLint; -typedef int GrGLsizei; -typedef int64_t GrGLint64; -typedef unsigned char GrGLubyte; -typedef unsigned short GrGLushort; -typedef unsigned int GrGLuint; -typedef uint64_t GrGLuint64; -typedef float GrGLfloat; -typedef float GrGLclampf; -typedef double GrGLdouble; -typedef double GrGLclampd; -typedef void GrGLvoid; -#ifndef SK_IGNORE_64BIT_OPENGL_CHANGES -#ifdef _WIN64 -typedef signed long long int GrGLintptr; -typedef signed long long int GrGLsizeiptr; -#else -typedef signed long int GrGLintptr; -typedef signed long int GrGLsizeiptr; -#endif -#else -typedef signed long int GrGLintptr; -typedef signed long int GrGLsizeiptr; -#endif - typedef void (GR_GL_FUNCTION_TYPE* GRGLDEBUGPROC)(GrGLenum source, GrGLenum type, GrGLuint id, diff --git a/include/gpu/gl/GrGLTypes.h b/include/gpu/gl/GrGLTypes.h new file mode 100644 index 0000000000..e2eadb393d --- /dev/null +++ b/include/gpu/gl/GrGLTypes.h @@ -0,0 +1,61 @@ + +/* + * Copyright 2015 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef GrGLTypes_DEFINED +#define GrGLTypes_DEFINED + +#include "GrGLConfig.h" + +/** + * Classifies GL contexts by which standard they implement (currently as OpenGL vs. OpenGL ES). + */ +enum GrGLStandard { + kNone_GrGLStandard, + kGL_GrGLStandard, + kGLES_GrGLStandard, +}; +static const int kGrGLStandardCnt = 3; + +/////////////////////////////////////////////////////////////////////////////// + +/** + * Declares typedefs for all the GL functions used in GrGLInterface + */ + +typedef unsigned int GrGLenum; +typedef unsigned char GrGLboolean; +typedef unsigned int GrGLbitfield; +typedef signed char GrGLbyte; +typedef char GrGLchar; +typedef short GrGLshort; +typedef int GrGLint; +typedef int GrGLsizei; +typedef int64_t GrGLint64; +typedef unsigned char GrGLubyte; +typedef unsigned short GrGLushort; +typedef unsigned int GrGLuint; +typedef uint64_t GrGLuint64; +typedef float GrGLfloat; +typedef float GrGLclampf; +typedef double GrGLdouble; +typedef double GrGLclampd; +typedef void GrGLvoid; +#ifndef SK_IGNORE_64BIT_OPENGL_CHANGES +#ifdef _WIN64 +typedef signed long long int GrGLintptr; +typedef signed long long int GrGLsizeiptr; +#else +typedef signed long int GrGLintptr; +typedef signed long int GrGLsizeiptr; +#endif +#else +typedef signed long int GrGLintptr; +typedef signed long int GrGLsizeiptr; +#endif + +#endif diff --git a/src/gpu/gl/GrGLBufferImpl.h b/src/gpu/gl/GrGLBufferImpl.h index 5526ff93f1..f72b99cc79 100644 --- a/src/gpu/gl/GrGLBufferImpl.h +++ b/src/gpu/gl/GrGLBufferImpl.h @@ -9,7 +9,7 @@ #define GrGLBufferImpl_DEFINED #include "SkTypes.h" -#include "gl/GrGLFunctions.h" +#include "gl/GrGLTypes.h" class GrGLGpu; diff --git a/src/gpu/gl/GrGLNameAllocator.h b/src/gpu/gl/GrGLNameAllocator.h index 1c2c26e59f..8b0b2a244a 100644 --- a/src/gpu/gl/GrGLNameAllocator.h +++ b/src/gpu/gl/GrGLNameAllocator.h @@ -10,7 +10,7 @@ #define GrGLNameAllocator_DEFINED #include "SkRefCnt.h" -#include "gl/GrGLFunctions.h" +#include "gl/GrGLTypes.h" /** * This class assumes ownership of an explicit range of OpenGL object names and diff --git a/src/gpu/gl/GrGLNoOpInterface.h b/src/gpu/gl/GrGLNoOpInterface.h index d90a9b17e3..627de63d7d 100644 --- a/src/gpu/gl/GrGLNoOpInterface.h +++ b/src/gpu/gl/GrGLNoOpInterface.h @@ -9,7 +9,7 @@ #define GrGLNoOpInterface_DEFINED #include "gl/GrGLDefines.h" -#include "gl/GrGLFunctions.h" +#include "gl/GrGLTypes.h" // These are constants/functions that are common to the Null and Debug GL interface implementations. diff --git a/src/gpu/gl/GrGLPath.h b/src/gpu/gl/GrGLPath.h index b394050277..b5346fd4bb 100644 --- a/src/gpu/gl/GrGLPath.h +++ b/src/gpu/gl/GrGLPath.h @@ -10,7 +10,7 @@ #define GrGLPath_DEFINED #include "../GrPath.h" -#include "gl/GrGLFunctions.h" +#include "gl/GrGLTypes.h" class GrGLGpu; diff --git a/src/gpu/gl/GrGLPathRange.h b/src/gpu/gl/GrGLPathRange.h index 22dd1c0572..c9d4845c44 100644 --- a/src/gpu/gl/GrGLPathRange.h +++ b/src/gpu/gl/GrGLPathRange.h @@ -11,7 +11,7 @@ #include "../GrPathRange.h" #include "GrStrokeInfo.h" -#include "gl/GrGLFunctions.h" +#include "gl/GrGLTypes.h" class GrGLGpu; diff --git a/src/gpu/gl/GrGLPathRendering.h b/src/gpu/gl/GrGLPathRendering.h index 5996e906bd..651ddeea5d 100644 --- a/src/gpu/gl/GrGLPathRendering.h +++ b/src/gpu/gl/GrGLPathRendering.h @@ -11,8 +11,8 @@ #include "SkRefCnt.h" #include "GrPathRendering.h" #include "GrStencil.h" -#include "gl/GrGLFunctions.h" #include "gl/GrGLProgram.h" +#include "gl/GrGLTypes.h" class GrGLNameAllocator; class GrGLGpu; diff --git a/src/gpu/gl/GrGLVertexArray.h b/src/gpu/gl/GrGLVertexArray.h index 66bc14297e..ebdb681e34 100644 --- a/src/gpu/gl/GrGLVertexArray.h +++ b/src/gpu/gl/GrGLVertexArray.h @@ -10,7 +10,7 @@ #include "GrTypesPriv.h" #include "gl/GrGLDefines.h" -#include "gl/GrGLFunctions.h" +#include "gl/GrGLTypes.h" #include "SkTArray.h" class GrGLVertexBuffer; |