aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/vk
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2018-04-24 16:29:16 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-24 20:58:06 +0000
commitff134f20aeeac3394d2e92d08a6eb495f87d2f1a (patch)
treefe6519a22ad4251efe534868cab00ac82d8f3a7a /src/gpu/vk
parenta11f7d0a5991bd991698ec5375850e9c69e2692b (diff)
Compile with latest clang 7.
Changes to warnings in clang introduced by https://reviews.llvm.org/D43322 and https://reviews.llvm.org/D44883 cause warning as error failures when building Skia. In particular this addresses return-std-move-in-c++11 and self-assign-overloaded. Change-Id: I680318098d8af1b64fba464585c7cdfcfcf39d66 Reviewed-on: https://skia-review.googlesource.com/123582 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src/gpu/vk')
-rw-r--r--src/gpu/vk/GrVkGpu.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
index ff0f5bcbe3..bc47ae6558 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -838,7 +838,7 @@ sk_sp<GrTexture> GrVkGpu::onCreateTexture(const GrSurfaceDesc& desc, SkBudgeted
VK_ACCESS_TRANSFER_WRITE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, false);
this->currentCommandBuffer()->clearColorImage(this, tex.get(), &zeroClearColor, 1, &range);
}
- return tex;
+ return std::move(tex);
}
////////////////////////////////////////////////////////////////////////////////
@@ -960,7 +960,7 @@ sk_sp<GrRenderTarget> GrVkGpu::onWrapBackendRenderTarget(const GrBackendRenderTa
SkASSERT(tgt->canAttemptStencilAttachment());
}
- return tgt;
+ return std::move(tgt);
}
sk_sp<GrRenderTarget> GrVkGpu::onWrapBackendTextureAsRenderTarget(const GrBackendTexture& tex,
@@ -987,9 +987,7 @@ sk_sp<GrRenderTarget> GrVkGpu::onWrapBackendTextureAsRenderTarget(const GrBacken
sk_sp<GrVkImageLayout> layout = tex.getGrVkImageLayout();
SkASSERT(layout);
- sk_sp<GrVkRenderTarget> tgt = GrVkRenderTarget::MakeWrappedRenderTarget(this, desc, imageInfo,
- std::move(layout));
- return tgt;
+ return GrVkRenderTarget::MakeWrappedRenderTarget(this, desc, imageInfo, std::move(layout));
}
void GrVkGpu::generateMipmap(GrVkTexture* tex, GrSurfaceOrigin texOrigin) {