| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 GrProgramDesc_DEFINED | 8 #ifndef GrProgramDesc_DEFINED |
| 9 #define GrProgramDesc_DEFINED | 9 #define GrProgramDesc_DEFINED |
| 10 | 10 |
| 11 #include "GrColor.h" | 11 #include "GrColor.h" |
| 12 #include "GrTypesPriv.h" | 12 #include "GrTypesPriv.h" |
| 13 #include "SkChecksum.h" | 13 #include "SkChecksum.h" |
| 14 | 14 |
| 15 class GrGpuGL; | 15 class GrGLGpu; |
| 16 | 16 |
| 17 /** This class describes a program to generate. It also serves as a program cach
e key. Very little | 17 /** This class describes a program to generate. It also serves as a program cach
e key. Very little |
| 18 of this is GL-specific. The GL-specific parts could be factored out into a s
ubclass. */ | 18 of this is GL-specific. The GL-specific parts could be factored out into a s
ubclass. */ |
| 19 class GrProgramDesc { | 19 class GrProgramDesc { |
| 20 public: | 20 public: |
| 21 // Creates an uninitialized key that must be populated by GrGpu::buildProgra
mDesc() | 21 // Creates an uninitialized key that must be populated by GrGpu::buildProgra
mDesc() |
| 22 GrProgramDesc() {} | 22 GrProgramDesc() {} |
| 23 | 23 |
| 24 // Returns this as a uint32_t array to be used as a key in the program cache
. | 24 // Returns this as a uint32_t array to be used as a key in the program cache
. |
| 25 const uint32_t* asKey() const { | 25 const uint32_t* asKey() const { |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 kPreAllocSize = kHeaderOffset + kHeaderSize + | 135 kPreAllocSize = kHeaderOffset + kHeaderSize + |
| 136 kMaxPreallocProcessors * sizeof(uint32_t) * kIntsPerProc
essor, | 136 kMaxPreallocProcessors * sizeof(uint32_t) * kIntsPerProc
essor, |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 SkSTArray<kPreAllocSize, uint8_t, true> fKey; | 139 SkSTArray<kPreAllocSize, uint8_t, true> fKey; |
| 140 | 140 |
| 141 friend class GrGLProgramDescBuilder; | 141 friend class GrGLProgramDescBuilder; |
| 142 }; | 142 }; |
| 143 | 143 |
| 144 #endif | 144 #endif |
| OLD | NEW |