Index: src/gpu/vk/GrVkGpu.cpp |
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp |
index e5d24fc5806ff8044a55da6416b311f9c9bcb8f3..ca1bb10636e91d4c552c7d93ab697f543bccc067 100644 |
--- a/src/gpu/vk/GrVkGpu.cpp |
+++ b/src/gpu/vk/GrVkGpu.cpp |
@@ -425,9 +425,9 @@ bool GrVkGpu::uploadTexDataLinear(GrVkTexture* tex, |
} |
bool GrVkGpu::uploadTexDataOptimal(GrVkTexture* tex, |
- int left, int top, int width, int height, |
- GrPixelConfig dataConfig, |
- const SkTArray<GrMipLevel>& texels) { |
+ int left, int top, int width, int height, |
+ GrPixelConfig dataConfig, |
+ const SkTArray<GrMipLevel>& texels) { |
SkASSERT(!tex->isLinearTiled()); |
// The assumption is either that we have no mipmaps, or that our rect is the entire texture |
SkASSERT(1 == texels.count() || |
@@ -661,6 +661,20 @@ GrTexture* GrVkGpu::onCreateTexture(const GrSurfaceDesc& desc, SkBudgeted budget |
//////////////////////////////////////////////////////////////////////////////// |
+bool GrVkGpu::updateBuffer(GrVkBuffer* buffer, const void* src, size_t srcSizeInBytes) { |
+ |
+ // Update the buffer |
+ fCurrentCmdBuffer->updateBuffer(this, buffer, 0, srcSizeInBytes, src); |
+ |
+ // Submit the current command buffer to the Queue |
+ // TODO: batch these? |
+ this->submitCommandBuffer(kSkip_SyncQueue); |
egdaniel
2016/06/30 13:51:19
why then need to submit the command buffer here?
jvanverth1
2016/06/30 14:56:38
Done.
|
+ |
+ return true; |
+} |
+ |
+//////////////////////////////////////////////////////////////////////////////// |
+ |
static GrSurfaceOrigin resolve_origin(GrSurfaceOrigin origin) { |
// By default, all textures in Vk use TopLeft |
if (kDefault_GrSurfaceOrigin == origin) { |