Make some GrSurfaceProxy and GrTextureProxy methods easier to access
Move peek[Surface|Texture|RenderTarget]() from GrSurfaceProxyPriv to
to GrSurfaceProxy.
Move proxyMipMapped(), textureType(), and hasRestrictedSampling()
from GrTextureProxyPriv to GrTextureProxy.
Change-Id: I259114d0508c4613d55f7f1faccac362fa6fb281
Reviewed-on: https://skia-review.googlesource.com/144641
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/include/private/GrTextureProxy.h b/include/private/GrTextureProxy.h
index 3846954..4df0263 100644
--- a/include/private/GrTextureProxy.h
+++ b/include/private/GrTextureProxy.h
@@ -36,6 +36,13 @@
// generation later.
GrMipMapped mipMapped() const;
+ // Returns the GrMipMapped value of the proxy from creation time regardless of whether it has
+ // been instantiated or not.
+ GrMipMapped proxyMipMapped() const { return fMipMapped; }
+
+ GrTextureType textureType() const { return fTextureType; }
+ /** If true then the texture does not support MIP maps and only supports clamp wrap mode. */
+ bool hasRestrictedSampling() const { return GrTextureTypeHasRestrictedSampling(fTextureType); }
/**
* Return the texture proxy's unique key. It will be invalid if the proxy doesn't have one.
*/