aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-07-10 12:06:05 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-11 13:23:41 +0000
commit8e8c755f56e5dbaf0f87d88a775632010b32e974 (patch)
tree46c394f09dd769c97d9aeab796c706ecdab0f979 /include/private
parent810c2b657e5d19c38fe5316bd83bdd5ca2c323cf (diff)
Move GrResourceProvider::createMipMappedTexture to GrSurfaceProxy::MakeDeferredMipMap
Although this adds a new method to GrResourceProvider, it is a slight improvement in that it removes some GrProxy stuff from GrResourceProvider (which arguably should only deal in GrSurface-derived classes). Bug: skia: Change-Id: I6d097ed178cd2aa5662770a164135bf2553b80e6 Reviewed-on: https://skia-review.googlesource.com/22023 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include/private')
-rw-r--r--include/private/GrSurfaceProxy.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h
index 4e23c9ee47..c016cfe798 100644
--- a/include/private/GrSurfaceProxy.h
+++ b/include/private/GrSurfaceProxy.h
@@ -180,6 +180,20 @@ public:
const GrSurfaceDesc&, SkBackingFit,
SkBudgeted, uint32_t flags = 0);
+ /**
+ * Creates a proxy that will be mipmapped.
+ *
+ * @param desc Description of the texture properties.
+ * @param budgeted Does the texture count against the resource cache budget?
+ * @param texels A contiguous array of mipmap levels
+ * @param mipLevelCount The amount of elements in the texels array
+ */
+ static sk_sp<GrTextureProxy> MakeDeferredMipMap(GrResourceProvider*,
+ const GrSurfaceDesc& desc, SkBudgeted budgeted,
+ const GrMipLevel* texels, int mipLevelCount,
+ SkDestinationSurfaceColorMode mipColorMode =
+ SkDestinationSurfaceColorMode::kLegacy);
+
// TODO: need to refine ownership semantics of 'srcData' if we're in completely
// deferred mode
static sk_sp<GrTextureProxy> MakeDeferred(GrResourceProvider*,