Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Unified Diff: gpu/command_buffer/build_gles2_cmd_buffer.py

Issue 169403005: command_buffer: Implement path rendering functions for CHROMIUM_path_rendering (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nv-pr-02-texgen
Patch Set: improve parameter validation and write up the extension .txt file Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/build_gles2_cmd_buffer.py
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
index 0015c553b67981a7f9a7ae7b6cb718f8096a54e1..ea882e127eae717076eecaa2b9bc5fc2b833e88c 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -509,6 +509,31 @@ _STATES = {
},
],
},
+ 'PathStencilFuncCHROMIUM': {
+ 'type': 'Normal',
+ 'func': 'PathStencilFuncNV',
+ 'extension_flag': 'chromium_path_rendering',
+ 'states': [
+ {
+ 'name': 'stencil_path_func',
+ 'type': 'GLenum',
+ 'enum': 'GL_PATH_STENCIL_FUNC_CHROMIUM',
+ 'default': 'GL_ALWAYS',
+ },
+ {
+ 'name': 'stencil_path_ref',
+ 'type': 'GLint',
+ 'enum': 'GL_PATH_STENCIL_REF_CHROMIUM',
+ 'default': '0',
+ },
+ {
+ 'name': 'stencil_path_mask',
+ 'type': 'GLuint',
+ 'enum': 'GL_PATH_STENCIL_VALUE_MASK_CHROMIUM',
+ 'default': '0xFFFFFFFFU',
+ },
+ ],
+ },
}
# This is a list of enum names and their valid values. It is used to map
@@ -1065,6 +1090,69 @@ _ENUM_LISTS = {
'GL_INT',
],
},
+ 'PathCoordType': {
+ 'type': 'GLenum',
+ 'valid': [
+ 'GL_FLOAT',
+ ],
+ },
+ 'PathCoverMode': {
+ 'type': 'GLenum',
+ 'valid': [
+ 'GL_BOUNDING_BOX_CHROMIUM',
+ ],
+ },
+ 'PathCoverModeInstanced': {
+ 'type': 'GLenum',
+ 'valid': [
+ 'GL_BOUNDING_BOX_OF_BOUNDING_BOXES_CHROMIUM',
+ ],
+ },
+ 'PathFillMode': {
+ 'type': 'GLenum',
+ 'valid': [
+ 'GL_INVERT',
+ 'GL_COUNT_UP_CHROMIUM',
+ 'GL_COUNT_DOWN_CHROMIUM',
+ ],
+ },
+ 'PathGenMode': {
+ 'type': 'GLenum',
+ 'valid': [
+ 'GL_OBJECT_LINEAR_CHROMIUM',
+ 'GL_EYE_LINEAR_CHROMIUM',
+ ],
+ },
+ 'PathNameType': {
+ 'type': 'GLenum',
+ 'valid': [
+ 'GL_UNSIGNED_INT'
+ ],
+ },
+ 'PathParameter': {
+ 'type': 'GLenum',
+ 'valid': [
+ 'GL_PATH_STROKE_WIDTH_CHROMIUM',
+ 'GL_PATH_INITIAL_END_CAP_CHROMIUM',
+ 'GL_PATH_TERMINAL_END_CAP_CHROMIUM',
+ 'GL_PATH_JOIN_STYLE_CHROMIUM',
+ 'GL_PATH_MITER_LIMIT_CHROMIUM',
+ ]
+ },
+ 'PathTransformType': {
+ 'type': 'GLenum',
+ 'valid': [
+ 'GL_NONE',
+ 'GL_TRANSLATE_X_CHROMIUM',
+ 'GL_TRANSLATE_Y_CHROMIUM',
+ 'GL_TRANSLATE_2D_CHROMIUM',
+ 'GL_TRANSLATE_3D_CHROMIUM',
+ 'GL_AFFINE_2D_CHROMIUM',
+ 'GL_AFFINE_3D_CHROMIUM',
+ 'GL_TRANSPOSE_AFFINE_2D_CHROMIUM',
+ 'GL_TRANSPOSE_AFFINE_3D_CHROMIUM',
+ ],
+ },
'ReadPixelType': {
'type': 'GLenum',
'valid': [
@@ -2599,6 +2687,92 @@ _FUNCTION_INFO = {
'chromium': True,
'extension': True,
},
+ 'GenPathsCHROMIUM': {
+ 'type': 'Custom',
+ 'cmd_args':
+ 'GLsizei range, GLuint* client_ids',
+ 'immediate': False, # FIXME: cannot create immediate command
piman 2014/04/24 22:26:36 nit: in chromium code, we use TODO rather than FIX
+ # because it will use original args instead of
+ # cmd_args
+ 'unit_test': False, # FIXME: see above
+ 'chromium': True,
+ 'extension': True,
+ },
+ 'DeletePathsCHROMIUM': {
+ 'decoder_func': 'DeletePathsCHROMIUMHelper',
+ 'unit_test': False, # FIXME: see above
+ 'chromium': True,
+ 'extension': True,
+ },
+ 'PathCommandsCHROMIUM': {
+ 'type': 'Manual',
+ 'immediate': False,
+ 'chromium': True,
+ 'extension': True,
+ },
+ 'PathParameterfCHROMIUM': {
+ 'type': 'Custom',
+ 'chromium': True,
+ 'extension': True,
+ },
+ 'PathParameteriCHROMIUM': {
+ 'type': 'Custom',
+ 'chromium': True,
+ 'extension': True,
+ },
+ 'PathStencilFuncCHROMIUM': {
+ 'type': 'StateSet',
+ 'state': 'PathStencilFuncCHROMIUM',
+ 'decoder_func': 'glPathStencilFuncNV',
+ 'chromium': True,
+ 'extension': True,
+ },
+ 'StencilFillPathCHROMIUM': {
+ 'type': 'Custom',
+ 'chromium': True,
+ 'extension': True,
+ },
+ 'StencilFillPathInstancedCHROMIUM': {
+ 'type': 'Custom',
+ 'chromium': True,
+ 'extension': True,
+ },
+ 'StencilStrokePathCHROMIUM': {
+ 'type': 'Custom',
+ 'chromium': True,
+ 'extension': True,
+ },
+ 'StencilStrokePathInstancedCHROMIUM': {
+ 'type': 'Custom',
+ 'chromium': True,
+ 'extension': True,
+ },
+ 'PathTexGenCHROMIUM': {
+ 'type': 'Manual',
+ 'immediate': False,
+ 'chromium': True,
+ 'extension': True,
+ },
+ 'CoverFillPathCHROMIUM': {
+ 'type': 'Custom',
+ 'chromium': True,
+ 'extension': True,
+ },
+ 'CoverFillPathInstancedCHROMIUM': {
+ 'type': 'Custom',
+ 'chromium': True,
+ 'extension': True,
+ },
+ 'CoverStrokePathCHROMIUM': {
+ 'type': 'Custom',
+ 'chromium': True,
+ 'extension': True,
+ },
+ 'CoverStrokePathInstancedCHROMIUM': {
+ 'type': 'Custom',
+ 'chromium': True,
+ 'extension': True,
+ },
}
def Grouper(n, iterable, fillvalue=None):

Powered by Google App Engine
This is Rietveld 408576698