summaryrefslogtreecommitdiffstats
path: root/gpu/GLES2/gl2chromium.h
diff options
context:
space:
mode:
authorkkinnunen <kkinnunen@nvidia.com>2014-08-26 03:19:57 -0700
committerCommit bot <commit-bot@chromium.org>2014-08-26 10:21:08 +0000
commit337d59638d630d0892b444ca2ab0a2989921d00e (patch)
tree1c1013028e5d34ae32f73b8515239a753f3b979f /gpu/GLES2/gl2chromium.h
parentfe6080fcd10b713bb913553ba8186b36d3b4785b (diff)
downloadchromium_src-337d59638d630d0892b444ca2ab0a2989921d00e.zip
chromium_src-337d59638d630d0892b444ca2ab0a2989921d00e.tar.gz
chromium_src-337d59638d630d0892b444ca2ab0a2989921d00e.tar.bz2
Add initial support for NV_path_rendering extension to gpu command buffer
Add initial support for NV_path_rendering extension to gpu command buffer. This is needed in order to support NV_path_rendering implementation in Skia. Implement this by creating a new GL ES pseudo-extension called CHROMIUM_path_rendering. The CHROMIUM_path_rendering extension will be exposed to clients only if the context is not a webgl context, NV_path_rendering extension is present. Also, EXT_direct_state_access extension must be present for Open GL. Add matrix functions needed to support the feature: void glMatrixLoadfEXT(GLenum matrixMode, const GLfloat* m) void glMatrixLoadIdentityEXT(GLenum matrixMode) NV_path_rendering needs these functions to implement transformations for the path drawing. Changes the build_gles2_cmd_buffer.py to be able to generate context state variables that are arrays. The state variable is defined to be an an array when its default value is an array. Changes the build_gles2_cmd_buffer.py to round the float GL state variables with round() when querying them with GetInteger. The values GL_*_CHROMIUM tokens added match the values of corresponding GL_*_NV tokens from the NV_path_rendering extensions. This is why the values are passed after validation to the receiving GL function, without any mapping. BUG=344330 Review URL: https://codereview.chromium.org/169603002 Cr-Commit-Position: refs/heads/master@{#291878}
Diffstat (limited to 'gpu/GLES2/gl2chromium.h')
-rw-r--r--gpu/GLES2/gl2chromium.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gpu/GLES2/gl2chromium.h b/gpu/GLES2/gl2chromium.h
index 42889dd..0dc648d 100644
--- a/gpu/GLES2/gl2chromium.h
+++ b/gpu/GLES2/gl2chromium.h
@@ -10,6 +10,10 @@
#include <GLES2/gl2platform.h>
#define GL_CONTEXT_LOST 0x300E
+#define GL_PATH_MODELVIEW_CHROMIUM 0x1700
+#define GL_PATH_PROJECTION_CHROMIUM 0x1701
+#define GL_PATH_MODELVIEW_MATRIX_CHROMIUM 0x0BA6
+#define GL_PATH_PROJECTION_MATRIX_CHROMIUM 0x0BA7
#if defined(GLES2_USE_MOJO)
#define GLES2_GET_FUN(name) MojoGLES2gl ## name