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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 GrVkImage* dstImage, | 185 GrVkImage* dstImage, |
186 GrVkImage* srcImage, | 186 GrVkImage* srcImage, |
187 const SkIRect& srcRect, | 187 const SkIRect& srcRect, |
188 const SkIPoint& dstPoint); | 188 const SkIPoint& dstPoint); |
189 | 189 |
190 void copySurfaceAsDraw(GrSurface* dst, | 190 void copySurfaceAsDraw(GrSurface* dst, |
191 GrSurface* src, | 191 GrSurface* src, |
192 const SkIRect& srcRect, | 192 const SkIRect& srcRect, |
193 const SkIPoint& dstPoint); | 193 const SkIPoint& dstPoint); |
194 | 194 |
195 // helper for onCreateTexture and writeTexturePixels | 195 // helpers for onCreateTexture and writeTexturePixels |
196 bool uploadTexData(GrVkTexture* tex, | 196 bool uploadTexDataLinear(GrVkTexture* tex, |
197 int left, int top, int width, int height, | 197 int left, int top, int width, int height, |
198 GrPixelConfig dataConfig, | 198 GrPixelConfig dataConfig, |
199 const void* data, | 199 const void* data, |
200 size_t rowBytes); | 200 size_t rowBytes); |
| 201 bool uploadTexDataOptimal(GrVkTexture* tex, |
| 202 int left, int top, int width, int height, |
| 203 GrPixelConfig dataConfig, |
| 204 const SkTArray<GrMipLevel>&); |
201 | 205 |
202 SkAutoTUnref<const GrVkBackendContext> fBackendContext; | 206 SkAutoTUnref<const GrVkBackendContext> fBackendContext; |
203 SkAutoTUnref<GrVkCaps> fVkCaps; | 207 SkAutoTUnref<GrVkCaps> fVkCaps; |
204 | 208 |
205 // These Vulkan objects are provided by the client, and also stored in fBack
endContext. | 209 // These Vulkan objects are provided by the client, and also stored in fBack
endContext. |
206 // They're copied here for convenient access. | 210 // They're copied here for convenient access. |
207 VkInstance fVkInstance; | 211 VkInstance fVkInstance; |
208 VkDevice fDevice; | 212 VkDevice fDevice; |
209 VkQueue fQueue; // Must be Graphics queue | 213 VkQueue fQueue; // Must be Graphics queue |
210 | 214 |
(...skipping 10 matching lines...) Expand all Loading... |
221 | 225 |
222 // Shaderc compiler used for compiling glsl in spirv. We only want to create
the compiler once | 226 // Shaderc compiler used for compiling glsl in spirv. We only want to create
the compiler once |
223 // since there is significant overhead to the first compile of any compiler. | 227 // since there is significant overhead to the first compile of any compiler. |
224 shaderc_compiler_t fCompiler; | 228 shaderc_compiler_t fCompiler; |
225 | 229 |
226 | 230 |
227 typedef GrGpu INHERITED; | 231 typedef GrGpu INHERITED; |
228 }; | 232 }; |
229 | 233 |
230 #endif | 234 #endif |
OLD | NEW |