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 #ifndef GrVkGpu_DEFINED | 8 #ifndef GrVkGpu_DEFINED |
9 #define GrVkGpu_DEFINED | 9 #define GrVkGpu_DEFINED |
10 | 10 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, GrGpuResourc
e::LifeCycle, | 129 GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, GrGpuResourc
e::LifeCycle, |
130 const SkTArray<GrMipLevel>&) override {
return NULL; } | 130 const SkTArray<GrMipLevel>&) override {
return NULL; } |
131 | 131 |
132 GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapOwnership
) override; | 132 GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapOwnership
) override; |
133 | 133 |
134 GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&, | 134 GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&, |
135 GrWrapOwnership) override; | 135 GrWrapOwnership) override; |
136 GrRenderTarget* onWrapBackendTextureAsRenderTarget(const GrBackendTextureDes
c&, | 136 GrRenderTarget* onWrapBackendTextureAsRenderTarget(const GrBackendTextureDes
c&, |
137 GrWrapOwnership) override
{ return NULL; } | 137 GrWrapOwnership) override
{ return NULL; } |
138 | 138 |
139 GrBuffer* onCreateBuffer(GrBufferType, size_t size, GrAccessPattern) overrid
e; | 139 GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) override; |
| 140 GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) override; |
| 141 GrTransferBuffer* onCreateTransferBuffer(size_t size, TransferType type) ove
rride; |
140 | 142 |
141 void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) override; | 143 void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) override; |
142 | 144 |
143 void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideCli
p) override; | 145 void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideCli
p) override; |
144 | 146 |
145 void onDraw(const GrPipeline&, | 147 void onDraw(const GrPipeline&, |
146 const GrPrimitiveProcessor&, | 148 const GrPrimitiveProcessor&, |
147 const GrMesh*, | 149 const GrMesh*, |
148 int meshCount) override; | 150 int meshCount) override; |
149 | 151 |
150 bool onReadPixels(GrSurface* surface, | 152 bool onReadPixels(GrSurface* surface, |
151 int left, int top, int width, int height, | 153 int left, int top, int width, int height, |
152 GrPixelConfig, | 154 GrPixelConfig, |
153 void* buffer, | 155 void* buffer, |
154 size_t rowBytes) override; | 156 size_t rowBytes) override; |
155 | 157 |
156 bool onWritePixels(GrSurface* surface, | 158 bool onWritePixels(GrSurface* surface, |
157 int left, int top, int width, int height, | 159 int left, int top, int width, int height, |
158 GrPixelConfig config, const SkTArray<GrMipLevel>&) overri
de; | 160 GrPixelConfig config, const SkTArray<GrMipLevel>&) overri
de; |
159 | 161 |
160 bool onTransferPixels(GrSurface*, | 162 bool onTransferPixels(GrSurface*, |
161 int left, int top, int width, int height, | 163 int left, int top, int width, int height, |
162 GrPixelConfig config, GrBuffer* transferBuffer, | 164 GrPixelConfig config, GrTransferBuffer* buffer, |
163 size_t offset, size_t rowBytes) override { return fals
e; } | 165 size_t offset, size_t rowBytes) override { return fals
e; } |
164 | 166 |
165 void onResolveRenderTarget(GrRenderTarget* target) override {} | 167 void onResolveRenderTarget(GrRenderTarget* target) override {} |
166 | 168 |
167 bool prepareDrawState(const GrPipeline&, | 169 bool prepareDrawState(const GrPipeline&, |
168 const GrPrimitiveProcessor&, | 170 const GrPrimitiveProcessor&, |
169 GrPrimitiveType, | 171 GrPrimitiveType, |
170 const GrVkRenderPass&, | 172 const GrVkRenderPass&, |
171 GrVkPipelineState** pipelineState); | 173 GrVkPipelineState** pipelineState); |
172 | 174 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 | 219 |
218 // Shaderc compiler used for compiling glsl in spirv. We only want to create
the compiler once | 220 // Shaderc compiler used for compiling glsl in spirv. We only want to create
the compiler once |
219 // since there is significant overhead to the first compile of any compiler. | 221 // since there is significant overhead to the first compile of any compiler. |
220 shaderc_compiler_t fCompiler; | 222 shaderc_compiler_t fCompiler; |
221 | 223 |
222 | 224 |
223 typedef GrGpu INHERITED; | 225 typedef GrGpu INHERITED; |
224 }; | 226 }; |
225 | 227 |
226 #endif | 228 #endif |
OLD | NEW |