From 96966a5a1ffc2f03eef1b5523308299aa4195f50 Mon Sep 17 00:00:00 2001 From: "bsalomon@google.com" Date: Thu, 21 Feb 2013 16:34:21 +0000 Subject: Use CPU arrays for dynamic indices/vertices on ARM GPUs. Review URL: https://codereview.appspot.com/7365047 git-svn-id: http://skia.googlecode.com/svn/trunk@7810 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/gpu/gl/GrGLConfig.h | 8 ++++++++ include/gpu/gl/GrGLConfig_chrome.h | 3 +++ 2 files changed, 11 insertions(+) (limited to 'include') diff --git a/include/gpu/gl/GrGLConfig.h b/include/gpu/gl/GrGLConfig.h index 20d9031264..ea2403728b 100644 --- a/include/gpu/gl/GrGLConfig.h +++ b/include/gpu/gl/GrGLConfig.h @@ -96,6 +96,10 @@ * GR_GL_USE_NV_PATH_RENDERING: Enable experimental support for * GL_NV_path_rendering. There are known issues with clipping, non-AA paths, and * perspective. + * + * GR_GL_MUST_USE_VBO: Indicates that all vertices and indices must be rendered + * from VBOs. Chromium's command buffer doesn't allow glVertexAttribArray with + * ARARY_BUFFER 0 bound or glDrawElements with ELEMENT_ARRAY_BUFFER 0 bound. */ #if !defined(GR_GL_LOG_CALLS) @@ -146,6 +150,10 @@ #define GR_GL_USE_NV_PATH_RENDERING 0 #endif +#if !defined(GR_GL_MUST_USE_VBO) + #define GR_GL_MUST_USE_VBO 0 +#endif + /** * There is a strange bug that occurs on Macs with NVIDIA GPUs. We don't * fully understand it. When (element) array buffers are continually diff --git a/include/gpu/gl/GrGLConfig_chrome.h b/include/gpu/gl/GrGLConfig_chrome.h index 50ea34c6d3..3a74abadb0 100644 --- a/include/gpu/gl/GrGLConfig_chrome.h +++ b/include/gpu/gl/GrGLConfig_chrome.h @@ -34,4 +34,7 @@ // CheckFramebufferStatus in chrome synchronizes the gpu and renderer processes. #define GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT 1 +// Non-VBO vertices and indices are not allowed in Chromium. +#define GR_GL_MUST_USE_VBO 1 + #endif -- cgit v1.2.3