Update GrSurfaceProxy::Copy to return a view.
Additionally this changes updates GrRenderTargetContext drawTexture to take
a view. This was done since there were a bunch of places where the result
of the copy goes straight to the drawTexture call.
Bug: skia:9556
Change-Id: If7094eb51ed343620011d03b86d603e3c6289c17
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267856
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrTextureAdjuster.cpp b/src/gpu/GrTextureAdjuster.cpp
index 66f6266..d15a5ea 100644
--- a/src/gpu/GrTextureAdjuster.cpp
+++ b/src/gpu/GrTextureAdjuster.cpp
@@ -53,7 +53,8 @@
sk_sp<GrTextureProxy> copy;
if (copyForMipsOnly) {
- copy = GrCopyBaseMipMapToTextureProxy(this->context(), proxy.get(), this->colorType());
+ copy = GrCopyBaseMipMapToTextureProxy(this->context(), proxy.get(),
+ this->originalProxy()->origin(), this->colorType());
} else {
copy = CopyOnGpu(this->context(), std::move(proxy), this->colorType(),
copyParams, willBeMipped);