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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 WritePixelTempDrawInfo*) override; | 75 WritePixelTempDrawInfo*) override; |
76 | 76 |
77 bool onCopySurface(GrSurface* dst, | 77 bool onCopySurface(GrSurface* dst, |
78 GrSurface* src, | 78 GrSurface* src, |
79 const SkIRect& srcRect, | 79 const SkIRect& srcRect, |
80 const SkIPoint& dstPoint) override; | 80 const SkIPoint& dstPoint) override; |
81 | 81 |
82 void onGetMultisampleSpecs(GrRenderTarget* rt, const GrStencilSettings&, | 82 void onGetMultisampleSpecs(GrRenderTarget* rt, const GrStencilSettings&, |
83 int* effectiveSampleCnt, SamplePattern*) override
; | 83 int* effectiveSampleCnt, SamplePattern*) override
; |
84 | 84 |
85 bool initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) const
override; | 85 bool initDescForDstCopy(const GrRenderTarget* src, GrSurfaceDesc* desc) cons
t override; |
86 | 86 |
87 void xferBarrier(GrRenderTarget*, GrXferBarrierType) override {} | 87 void xferBarrier(GrRenderTarget*, GrXferBarrierType) override {} |
88 | 88 |
89 GrBackendObject createTestingOnlyBackendTexture(void* pixels, int w, int h, | 89 GrBackendObject createTestingOnlyBackendTexture(void* pixels, int w, int h, |
90 GrPixelConfig config, | 90 GrPixelConfig config, |
91 bool isRenderTarget) overrid
e; | 91 bool isRenderTarget) overrid
e; |
92 bool isTestingOnlyBackendTexture(GrBackendObject id) const override; | 92 bool isTestingOnlyBackendTexture(GrBackendObject id) const override; |
93 void deleteTestingOnlyBackendTexture(GrBackendObject id, bool abandonTexture
) override; | 93 void deleteTestingOnlyBackendTexture(GrBackendObject id, bool abandonTexture
) override; |
94 | 94 |
95 GrStencilAttachment* createStencilAttachmentForRenderTarget(const GrRenderTa
rget*, | 95 GrStencilAttachment* createStencilAttachmentForRenderTarget(const GrRenderTa
rget*, |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 const SkIRect& srcRect, | 213 const SkIRect& srcRect, |
214 const SkIPoint& dstPoint); | 214 const SkIPoint& dstPoint); |
215 | 215 |
216 void copySurfaceAsBlit(GrSurface* dst, | 216 void copySurfaceAsBlit(GrSurface* dst, |
217 GrSurface* src, | 217 GrSurface* src, |
218 GrVkImage* dstImage, | 218 GrVkImage* dstImage, |
219 GrVkImage* srcImage, | 219 GrVkImage* srcImage, |
220 const SkIRect& srcRect, | 220 const SkIRect& srcRect, |
221 const SkIPoint& dstPoint); | 221 const SkIPoint& dstPoint); |
222 | 222 |
| 223 void copySurfaceAsResolve(GrSurface* dst, |
| 224 GrSurface* src, |
| 225 const SkIRect& srcRect, |
| 226 const SkIPoint& dstPoint); |
| 227 |
223 void copySurfaceAsDraw(GrSurface* dst, | 228 void copySurfaceAsDraw(GrSurface* dst, |
224 GrSurface* src, | 229 GrSurface* src, |
225 const SkIRect& srcRect, | 230 const SkIRect& srcRect, |
226 const SkIPoint& dstPoint); | 231 const SkIPoint& dstPoint); |
227 | 232 |
228 // helpers for onCreateTexture and writeTexturePixels | 233 // helpers for onCreateTexture and writeTexturePixels |
229 bool uploadTexDataLinear(GrVkTexture* tex, | 234 bool uploadTexDataLinear(GrVkTexture* tex, |
230 int left, int top, int width, int height, | 235 int left, int top, int width, int height, |
231 GrPixelConfig dataConfig, | 236 GrPixelConfig dataConfig, |
232 const void* data, | 237 const void* data, |
233 size_t rowBytes); | 238 size_t rowBytes); |
234 bool uploadTexDataOptimal(GrVkTexture* tex, | 239 bool uploadTexDataOptimal(GrVkTexture* tex, |
235 int left, int top, int width, int height, | 240 int left, int top, int width, int height, |
236 GrPixelConfig dataConfig, | 241 GrPixelConfig dataConfig, |
237 const SkTArray<GrMipLevel>&); | 242 const SkTArray<GrMipLevel>&); |
238 | 243 |
| 244 void resolveImage(GrVkRenderTarget* dst, |
| 245 GrVkRenderTarget* src, |
| 246 const SkIRect& srcRect, |
| 247 const SkIPoint& dstPoint); |
| 248 |
239 SkAutoTUnref<const GrVkBackendContext> fBackendContext; | 249 SkAutoTUnref<const GrVkBackendContext> fBackendContext; |
240 SkAutoTUnref<GrVkCaps> fVkCaps; | 250 SkAutoTUnref<GrVkCaps> fVkCaps; |
241 | 251 |
242 // These Vulkan objects are provided by the client, and also stored in fBack
endContext. | 252 // These Vulkan objects are provided by the client, and also stored in fBack
endContext. |
243 // They're copied here for convenient access. | 253 // They're copied here for convenient access. |
244 VkDevice fDevice; | 254 VkDevice fDevice; |
245 VkQueue fQueue; // Must be Graphics queue | 255 VkQueue fQueue; // Must be Graphics queue |
246 | 256 |
247 // Created by GrVkGpu | 257 // Created by GrVkGpu |
248 GrVkResourceProvider fResourceProvider; | 258 GrVkResourceProvider fResourceProvider; |
(...skipping 13 matching lines...) Expand all Loading... |
262 #else | 272 #else |
263 // Shaderc compiler used for compiling glsl in spirv. We only want to create
the compiler once | 273 // Shaderc compiler used for compiling glsl in spirv. We only want to create
the compiler once |
264 // since there is significant overhead to the first compile of any compiler. | 274 // since there is significant overhead to the first compile of any compiler. |
265 shaderc_compiler_t fCompiler; | 275 shaderc_compiler_t fCompiler; |
266 #endif | 276 #endif |
267 | 277 |
268 typedef GrGpu INHERITED; | 278 typedef GrGpu INHERITED; |
269 }; | 279 }; |
270 | 280 |
271 #endif | 281 #endif |
OLD | NEW |