aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/instanced/GLInstancedRendering.h
diff options
context:
space:
mode:
authorGravatar csmartdalton <csmartdalton@google.com>2016-07-13 10:16:32 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-13 10:16:32 -0700
commit485a12003ab48b54965d6f7172f3183358919d8e (patch)
tree090548d2a98d35849dfbedeafa10020507f3194c /src/gpu/instanced/GLInstancedRendering.h
parent6c3ada96ab2326f2119e1e9f44fbc8b0aeadbae8 (diff)
Add resource provider flag to avoid client-side buffers
On some platforms, a newly-created buffer was liable to be CPU backed. This would break code that expected a VBO (aka instanced rendering). This change adds an optional flag to GrResourceProvider that requires a buffer to be created in GPU memory. It also moves the CPU backing logic into Gr land in order to properly cache real VBOs on platforms that prefer client-side buffers. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2143333002 Review-Url: https://codereview.chromium.org/2143333002
Diffstat (limited to 'src/gpu/instanced/GLInstancedRendering.h')
-rw-r--r--src/gpu/instanced/GLInstancedRendering.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gpu/instanced/GLInstancedRendering.h b/src/gpu/instanced/GLInstancedRendering.h
index 569e6e3160..3b87b0485a 100644
--- a/src/gpu/instanced/GLInstancedRendering.h
+++ b/src/gpu/instanced/GLInstancedRendering.h
@@ -44,8 +44,8 @@ private:
};
GrGLuint fVertexArrayID;
- SkAutoTUnref<GrGLBuffer> fInstanceBuffer;
- SkAutoTUnref<GrGLBuffer> fDrawIndirectBuffer;
+ SkAutoTUnref<GrBuffer> fInstanceBuffer;
+ SkAutoTUnref<GrBuffer> fDrawIndirectBuffer;
SkAutoSTMalloc<1024, GLDrawCmdInfo> fGLDrawCmdsInfo;
uint32_t fInstanceAttribsBufferUniqueId;
int fInstanceAttribsBaseInstance;