From 485a12003ab48b54965d6f7172f3183358919d8e Mon Sep 17 00:00:00 2001 From: csmartdalton Date: Wed, 13 Jul 2016 10:16:32 -0700 Subject: 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 --- src/gpu/GrGpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gpu/GrGpu.h') diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h index be8a59a738..dce41fd4c2 100644 --- a/src/gpu/GrGpu.h +++ b/src/gpu/GrGpu.h @@ -137,7 +137,7 @@ public: GrRenderTarget* wrapBackendTextureAsRenderTarget(const GrBackendTextureDesc&); /** - * Creates a buffer. + * Creates a buffer in GPU memory. For a client-side buffer use GrBuffer::CreateCPUBacked. * * @param size size of buffer to create. * @param intendedType hint to the graphics subsystem about what the buffer will be used for. -- cgit v1.2.3