Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: src/gpu/vk/GrVkGpu.h

Issue 1888473002: Use transfer buffer for BatchAtlas texture copies Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase to ToT Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/vk/GrVkCaps.cpp ('k') | src/gpu/vk/GrVkGpu.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 void onResolveRenderTarget(GrRenderTarget* target) override; 134 void onResolveRenderTarget(GrRenderTarget* target) override;
135 135
136 void submitSecondaryCommandBuffer(GrVkSecondaryCommandBuffer*, 136 void submitSecondaryCommandBuffer(GrVkSecondaryCommandBuffer*,
137 const GrVkRenderPass*, 137 const GrVkRenderPass*,
138 const VkClearValue*, 138 const VkClearValue*,
139 GrVkRenderTarget*, 139 GrVkRenderTarget*,
140 const SkIRect& bounds); 140 const SkIRect& bounds);
141 141
142 void finishDrawTarget() override; 142 void finishDrawTarget() override;
143 143
144 GrFence SK_WARN_UNUSED_RESULT insertFence() const override;
145 bool waitFence(GrFence) const override;
146 void deleteFence(GrFence) const override;
147
144 void generateMipmap(GrVkTexture* tex); 148 void generateMipmap(GrVkTexture* tex);
145 149
146 bool updateBuffer(GrVkBuffer* buffer, const void* src, VkDeviceSize offset, VkDeviceSize size); 150 bool updateBuffer(GrVkBuffer* buffer, const void* src, VkDeviceSize offset, VkDeviceSize size);
147 151
148 // Heaps 152 // Heaps
149 enum Heap { 153 enum Heap {
150 kLinearImage_Heap = 0, 154 kLinearImage_Heap = 0,
151 // We separate out small (i.e., <= 16K) images to reduce fragmentation 155 // We separate out small (i.e., <= 16K) images to reduce fragmentation
152 // in the main heap. 156 // in the main heap.
153 kOptimalImage_Heap, 157 kOptimalImage_Heap,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 bool onReadPixels(GrSurface* surface, 196 bool onReadPixels(GrSurface* surface,
193 int left, int top, int width, int height, 197 int left, int top, int width, int height,
194 GrPixelConfig, 198 GrPixelConfig,
195 void* buffer, 199 void* buffer,
196 size_t rowBytes) override; 200 size_t rowBytes) override;
197 201
198 bool onWritePixels(GrSurface* surface, 202 bool onWritePixels(GrSurface* surface,
199 int left, int top, int width, int height, 203 int left, int top, int width, int height,
200 GrPixelConfig config, const SkTArray<GrMipLevel>&) overri de; 204 GrPixelConfig config, const SkTArray<GrMipLevel>&) overri de;
201 205
202 bool onTransferPixels(GrSurface*, 206 bool onTransferPixels(GrTexture*,
203 int left, int top, int width, int height, 207 int left, int top, int width, int height,
204 GrPixelConfig config, GrBuffer* transferBuffer, 208 GrPixelConfig config, GrBuffer* transferBuffer,
205 size_t offset, size_t rowBytes) override { return fals e; } 209 size_t offset, size_t rowBytes) override;
206 210
207 // Ends and submits the current command buffer to the queue and then creates a new command 211 // Ends and submits the current command buffer to the queue and then creates a new command
208 // buffer and begins it. If sync is set to kForce_SyncQueue, the function wi ll wait for all 212 // buffer and begins it. If sync is set to kForce_SyncQueue, the function wi ll wait for all
209 // work in the queue to finish before returning. 213 // work in the queue to finish before returning.
210 void submitCommandBuffer(SyncQueue sync); 214 void submitCommandBuffer(SyncQueue sync);
211 215
212 void copySurfaceAsCopyImage(GrSurface* dst, 216 void copySurfaceAsCopyImage(GrSurface* dst,
213 GrSurface* src, 217 GrSurface* src,
214 GrVkImage* dstImage, 218 GrVkImage* dstImage,
215 GrVkImage* srcImage, 219 GrVkImage* srcImage,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 #else 281 #else
278 // Shaderc compiler used for compiling glsl in spirv. We only want to create the compiler once 282 // Shaderc compiler used for compiling glsl in spirv. We only want to create the compiler once
279 // since there is significant overhead to the first compile of any compiler. 283 // since there is significant overhead to the first compile of any compiler.
280 shaderc_compiler_t fCompiler; 284 shaderc_compiler_t fCompiler;
281 #endif 285 #endif
282 286
283 typedef GrGpu INHERITED; 287 typedef GrGpu INHERITED;
284 }; 288 };
285 289
286 #endif 290 #endif
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkCaps.cpp ('k') | src/gpu/vk/GrVkGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698