Continue making Ganesh use absolute texture coordinates - take 2
The idea here is that the GrCoordTransform will actually hold a GrTextureProxy (rather than a GrTexture) and then, in GrGLSLPrimitiveProcessor::GetTransformMatrix, use the instantiated width & height (when uploading the transform matrix)
Relanding of: https://skia-review.googlesource.com/c/6977/
Change-Id: Ibc9b9e354f7fc23b1a6e6e4fe7c9fe3cef771c02
Reviewed-on: https://skia-review.googlesource.com/7265
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index 02f53e7..54c799a 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -97,13 +97,14 @@
GrTexture* SkImage_Gpu::asTextureRef(GrContext* ctx, const GrSamplerParams& params,
SkColorSpace* dstColorSpace,
- sk_sp<SkColorSpace>* texColorSpace) const {
+ sk_sp<SkColorSpace>* texColorSpace,
+ SkScalar scaleAdjust[2]) const {
if (texColorSpace) {
*texColorSpace = this->fColorSpace;
}
GrTextureAdjuster adjuster(this->peekTexture(), this->alphaType(), this->bounds(),
this->uniqueID(), this->fColorSpace.get());
- return adjuster.refTextureSafeForParams(params, nullptr);
+ return adjuster.refTextureSafeForParams(params, nullptr, scaleAdjust);
}
static void apply_premul(const SkImageInfo& info, void* pixels, size_t rowBytes) {