OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 | 8 |
9 #ifndef GrVkProgram_DEFINED | 9 #ifndef GrVkProgram_DEFINED |
10 #define GrVkProgram_DEFINED | 10 #define GrVkProgram_DEFINED |
(...skipping 15 matching lines...) Expand all Loading... |
26 class GrVkUniformBuffer; | 26 class GrVkUniformBuffer; |
27 | 27 |
28 class GrVkProgram : public SkRefCnt { | 28 class GrVkProgram : public SkRefCnt { |
29 public: | 29 public: |
30 typedef GrGLSLProgramBuilder::BuiltinUniformHandles BuiltinUniformHandles; | 30 typedef GrGLSLProgramBuilder::BuiltinUniformHandles BuiltinUniformHandles; |
31 | 31 |
32 ~GrVkProgram(); | 32 ~GrVkProgram(); |
33 | 33 |
34 GrVkPipeline* vkPipeline() const { return fPipeline; } | 34 GrVkPipeline* vkPipeline() const { return fPipeline; } |
35 | 35 |
36 void setData(const GrVkGpu*, const GrPrimitiveProcessor&, const GrPipeline&)
; | 36 void setData(GrVkGpu*, const GrPrimitiveProcessor&, const GrPipeline&); |
37 | 37 |
38 void bind(const GrVkGpu* gpu, GrVkCommandBuffer* commandBuffer); | 38 void bind(const GrVkGpu* gpu, GrVkCommandBuffer* commandBuffer); |
39 | 39 |
40 void addUniformResources(GrVkCommandBuffer&); | 40 void addUniformResources(GrVkCommandBuffer&); |
41 | 41 |
42 void freeGPUResources(const GrVkGpu* gpu); | 42 void freeGPUResources(const GrVkGpu* gpu); |
43 | 43 |
44 // This releases resources the only a given instance of a GrVkProgram needs
to hold onto and do | 44 // This releases resources the only a given instance of a GrVkProgram needs
to hold onto and do |
45 // don't need to survive across new uses of the program. | 45 // don't need to survive across new uses of the program. |
46 void freeTempResources(const GrVkGpu* gpu); | 46 void freeTempResources(const GrVkGpu* gpu); |
(...skipping 14 matching lines...) Expand all Loading... |
61 const UniformInfoArray& uniforms, | 61 const UniformInfoArray& uniforms, |
62 uint32_t vertexUniformSize, | 62 uint32_t vertexUniformSize, |
63 uint32_t fragmentUniformSize, | 63 uint32_t fragmentUniformSize, |
64 uint32_t numSamplers, | 64 uint32_t numSamplers, |
65 GrGLSLPrimitiveProcessor* geometryProcessor, | 65 GrGLSLPrimitiveProcessor* geometryProcessor, |
66 GrGLSLXferProcessor* xferProcessor, | 66 GrGLSLXferProcessor* xferProcessor, |
67 const GrGLSLFragProcs& fragmentProcessors); | 67 const GrGLSLFragProcs& fragmentProcessors); |
68 | 68 |
69 void writeUniformBuffers(const GrVkGpu* gpu); | 69 void writeUniformBuffers(const GrVkGpu* gpu); |
70 | 70 |
71 void writeSamplers(const GrVkGpu* gpu, const SkTArray<const GrTextureAccess*
>& textureBindings); | 71 void writeSamplers(GrVkGpu* gpu, const SkTArray<const GrTextureAccess*>& tex
tureBindings); |
72 | 72 |
73 | 73 |
74 /** | 74 /** |
75 * We use the RT's size and origin to adjust from Skia device space to OpenGL
normalized device | 75 * We use the RT's size and origin to adjust from Skia device space to OpenGL
normalized device |
76 * space and to make device space positions have the correct origin for proce
ssors that require | 76 * space and to make device space positions have the correct origin for proce
ssors that require |
77 * them. | 77 * them. |
78 */ | 78 */ |
79 struct RenderTargetState { | 79 struct RenderTargetState { |
80 SkISize fRenderTargetSize; | 80 SkISize fRenderTargetSize; |
81 GrSurfaceOrigin fRenderTargetOrigin; | 81 GrSurfaceOrigin fRenderTargetOrigin; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 GrVkProgramDataManager fProgramDataManager; | 152 GrVkProgramDataManager fProgramDataManager; |
153 | 153 |
154 #ifdef SK_DEBUG | 154 #ifdef SK_DEBUG |
155 int fNumSamplers; | 155 int fNumSamplers; |
156 #endif | 156 #endif |
157 | 157 |
158 friend class GrVkProgramBuilder; | 158 friend class GrVkProgramBuilder; |
159 }; | 159 }; |
160 | 160 |
161 #endif | 161 #endif |
OLD | NEW |