aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrOnFlushResourceProvider.h
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2017-07-14 08:48:57 -0600
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-14 15:22:34 +0000
commite9e91dde4e39b085f11d0dc9688c6b63d0410b41 (patch)
tree256b8d1535cd0660bccc60412ada47f6925230b7 /src/gpu/GrOnFlushResourceProvider.h
parent477d0efcf2d90c70a87c5a126349e76ac57d9649 (diff)
Add "findOrMakeStaticBuffer" to GrOnFlushResourceProvider
Bug: skia: Change-Id: If381c91f40566e6630799ea9985c48e2b738596e Reviewed-on: https://skia-review.googlesource.com/23420 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'src/gpu/GrOnFlushResourceProvider.h')
-rw-r--r--src/gpu/GrOnFlushResourceProvider.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gpu/GrOnFlushResourceProvider.h b/src/gpu/GrOnFlushResourceProvider.h
index fdf34fe40a..e2c0b73075 100644
--- a/src/gpu/GrOnFlushResourceProvider.h
+++ b/src/gpu/GrOnFlushResourceProvider.h
@@ -71,6 +71,10 @@ public:
// Creates a GPU buffer with a "dynamic" access pattern.
sk_sp<GrBuffer> makeBuffer(GrBufferType, size_t, const void* data = nullptr);
+ // Either finds and refs, or creates a static GPU buffer with the given data.
+ sk_sp<GrBuffer> findOrMakeStaticBuffer(const GrUniqueKey&, GrBufferType,
+ size_t, const void* data);
+
const GrCaps* caps() const;
private: