aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-10-06 15:59:27 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-06 20:28:00 +0000
commite1da1d9a7dfa6c9ebdcbd2845acebd045edd2a6f (patch)
tree9d7b53269a0b9d96a43358377d9906b774af3a29 /include/private
parent567d6f4b4bd9ef50fa09c1449d6789ed701fc079 (diff)
Add option to create a deferred render target context with mips
We need this since we have texture generators that draw the base level but nothing more. Thus we want them to be able to directly draw into a pre allocated mipped target instead of doing a copy later. TBR: bsalomon@google.com Bug: skia: Change-Id: I1dfae0da7153b21b30fdfa51a7061fc255739a1e Reviewed-on: https://skia-review.googlesource.com/54100 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'include/private')
-rw-r--r--include/private/GrSurfaceProxy.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h
index 0c65055611..57724c4e2b 100644
--- a/include/private/GrSurfaceProxy.h
+++ b/include/private/GrSurfaceProxy.h
@@ -194,6 +194,15 @@ public:
SkDestinationSurfaceColorMode mipColorMode =
SkDestinationSurfaceColorMode::kLegacy);
+ /**
+ * Like the call above but there are no texels to upload. A texture proxy is returned that
+ * simply has space allocated for the mips. We will allocated the full amount of mip levels
+ * based on the width and height in the GrSurfaceDesc.
+ */
+ static sk_sp<GrTextureProxy> MakeDeferredMipMap(GrResourceProvider*,
+ const GrSurfaceDesc& desc, SkBudgeted budgeted);
+
+
// TODO: need to refine ownership semantics of 'srcData' if we're in completely
// deferred mode
static sk_sp<GrTextureProxy> MakeDeferred(GrResourceProvider*,