From 18166eeaf2d088d494c4273b88107544166046fd Mon Sep 17 00:00:00 2001 From: Robert Phillips Date: Thu, 1 Jun 2017 12:55:44 -0400 Subject: Omnibus: Push instantiation of GrTextures later (post TextureSampler) Split into: https://skia-review.googlesource.com/c/10485/ (More GrSurfaceProxy-clean up) https://skia-review.googlesource.com/c/15819/ (Expand GrTextureProxy to handle highestFilterMode) https://skia-review.googlesource.com/c/16714/ (Switch ImageStorageAccess over to GrTextureProxies) https://skia-review.googlesource.com/c/16908/ (Convert DstTexture to DstProxy) Change-Id: I6cf3ba0f3bf0e1908d36749bc83571c066ddd568 Reviewed-on: https://skia-review.googlesource.com/10484 Reviewed-by: Brian Salomon Commit-Queue: Robert Phillips --- src/gpu/effects/GrBitmapTextGeoProc.cpp | 2 +- src/gpu/effects/GrDistanceFieldGeoProc.cpp | 4 ++-- src/gpu/effects/GrSingleTextureEffect.h | 5 +---- src/gpu/effects/GrTextureDomain.cpp | 2 +- 4 files changed, 5 insertions(+), 8 deletions(-) (limited to 'src/gpu/effects') diff --git a/src/gpu/effects/GrBitmapTextGeoProc.cpp b/src/gpu/effects/GrBitmapTextGeoProc.cpp index 93b4a0f836..eb9b7b8c7d 100644 --- a/src/gpu/effects/GrBitmapTextGeoProc.cpp +++ b/src/gpu/effects/GrBitmapTextGeoProc.cpp @@ -98,7 +98,7 @@ public: // Currently we hardcode numbers to convert atlas coordinates to normalized floating point SkASSERT(gp.numTextureSamplers() == 1); - GrTexture* atlas = gp.textureSampler(0).texture(); + GrTextureProxy* atlas = gp.textureSampler(0).proxy(); if (atlas) { b->add32(atlas->width()); b->add32(atlas->height()); diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.cpp b/src/gpu/effects/GrDistanceFieldGeoProc.cpp index 6101c4115f..51c4b55c83 100644 --- a/src/gpu/effects/GrDistanceFieldGeoProc.cpp +++ b/src/gpu/effects/GrDistanceFieldGeoProc.cpp @@ -202,7 +202,7 @@ public: // Currently we hardcode numbers to convert atlas coordinates to normalized floating point SkASSERT(gp.numTextureSamplers() == 1); - GrTexture* atlas = gp.textureSampler(0).texture(); + GrTextureProxy* atlas = gp.textureSampler(0).proxy(); if (atlas) { b->add32(atlas->width()); b->add32(atlas->height()); @@ -757,7 +757,7 @@ public: // Currently we hardcode numbers to convert atlas coordinates to normalized floating point SkASSERT(gp.numTextureSamplers() == 1); - GrTexture* atlas = gp.textureSampler(0).texture(); + GrTextureProxy* atlas = gp.textureSampler(0).proxy(); if (atlas) { b->add32(atlas->width()); b->add32(atlas->height()); diff --git a/src/gpu/effects/GrSingleTextureEffect.h b/src/gpu/effects/GrSingleTextureEffect.h index d3ba0157e7..8c16d3342d 100644 --- a/src/gpu/effects/GrSingleTextureEffect.h +++ b/src/gpu/effects/GrSingleTextureEffect.h @@ -24,10 +24,7 @@ class GrSingleTextureEffect : public GrFragmentProcessor { public: SkString dumpInfo() const override { SkString str; - // MDB TODO: this should just print out the uniqueID of the proxy - str.appendf("Texture: %d", fTextureSampler.peekTexture() - ? fTextureSampler.peekTexture()->uniqueID().asUInt() - : -1); + str.appendf("Texture: %d", fTextureSampler.proxy()->uniqueID().asUInt()); return str; } diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp index 1a6db7a9af..ebe4f040ac 100644 --- a/src/gpu/effects/GrTextureDomain.cpp +++ b/src/gpu/effects/GrTextureDomain.cpp @@ -441,7 +441,7 @@ GrGLSLFragmentProcessor* GrDeviceSpaceTextureDecalFragmentProcessor::onCreateGLS bool GrDeviceSpaceTextureDecalFragmentProcessor::onIsEqual(const GrFragmentProcessor& fp) const { const GrDeviceSpaceTextureDecalFragmentProcessor& dstdfp = fp.cast(); - return dstdfp.fTextureSampler.texture() == fTextureSampler.texture() && + return dstdfp.fTextureSampler.proxy() == fTextureSampler.proxy() && dstdfp.fDeviceSpaceOffset == fDeviceSpaceOffset && dstdfp.fTextureDomain == fTextureDomain; } -- cgit v1.2.3