| Index: gpu/command_buffer/service/context_state_impl_autogen.h
|
| diff --git a/gpu/command_buffer/service/context_state_impl_autogen.h b/gpu/command_buffer/service/context_state_impl_autogen.h
|
| index 1b1e5fe43015499a315fd3f16efb6294f66f4b78..e908f20406025b038c1a20701006b8181ad5f5c3 100644
|
| --- a/gpu/command_buffer/service/context_state_impl_autogen.h
|
| +++ b/gpu/command_buffer/service/context_state_impl_autogen.h
|
| @@ -100,6 +100,9 @@ void ContextState::Initialize() {
|
| projection_matrix[13] = 0.0f;
|
| projection_matrix[14] = 0.0f;
|
| projection_matrix[15] = 1.0f;
|
| + stencil_path_func = GL_ALWAYS;
|
| + stencil_path_ref = 0;
|
| + stencil_path_mask = 0xFFFFFFFFU;
|
| pack_alignment = 4;
|
| unpack_alignment = 4;
|
| polygon_offset_factor = 0.0f;
|
| @@ -253,6 +256,12 @@ void ContextState::InitState(const ContextState* prev_state) const {
|
| glMatrixLoadfEXT(GL_PATH_PROJECTION_CHROMIUM, projection_matrix);
|
| }
|
| }
|
| + if (feature_info_->feature_flags().chromium_path_rendering)
|
| + if ((stencil_path_func != prev_state->stencil_path_func) ||
|
| + (stencil_path_ref != prev_state->stencil_path_ref) ||
|
| + (stencil_path_mask != prev_state->stencil_path_mask))
|
| + glPathStencilFuncNV(
|
| + stencil_path_func, stencil_path_ref, stencil_path_mask);
|
| if (prev_state->pack_alignment != pack_alignment) {
|
| glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment);
|
| }
|
| @@ -340,6 +349,9 @@ void ContextState::InitState(const ContextState* prev_state) const {
|
| if (feature_info_->feature_flags().chromium_path_rendering) {
|
| glMatrixLoadfEXT(GL_PATH_PROJECTION_CHROMIUM, projection_matrix);
|
| }
|
| + if (feature_info_->feature_flags().chromium_path_rendering)
|
| + glPathStencilFuncNV(
|
| + stencil_path_func, stencil_path_ref, stencil_path_mask);
|
| glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment);
|
| glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment);
|
| glPolygonOffset(polygon_offset_factor, polygon_offset_units);
|
| @@ -532,6 +544,24 @@ bool ContextState::GetStateAsGLint(GLenum pname,
|
| }
|
| }
|
| return true;
|
| + case GL_PATH_STENCIL_FUNC_CHROMIUM:
|
| + *num_written = 1;
|
| + if (params) {
|
| + params[0] = static_cast<GLint>(stencil_path_func);
|
| + }
|
| + return true;
|
| + case GL_PATH_STENCIL_REF_CHROMIUM:
|
| + *num_written = 1;
|
| + if (params) {
|
| + params[0] = static_cast<GLint>(stencil_path_ref);
|
| + }
|
| + return true;
|
| + case GL_PATH_STENCIL_VALUE_MASK_CHROMIUM:
|
| + *num_written = 1;
|
| + if (params) {
|
| + params[0] = static_cast<GLint>(stencil_path_mask);
|
| + }
|
| + return true;
|
| case GL_PACK_ALIGNMENT:
|
| *num_written = 1;
|
| if (params) {
|
| @@ -869,6 +899,24 @@ bool ContextState::GetStateAsGLfloat(GLenum pname,
|
| memcpy(params, projection_matrix, sizeof(GLfloat) * 16);
|
| }
|
| return true;
|
| + case GL_PATH_STENCIL_FUNC_CHROMIUM:
|
| + *num_written = 1;
|
| + if (params) {
|
| + params[0] = static_cast<GLfloat>(stencil_path_func);
|
| + }
|
| + return true;
|
| + case GL_PATH_STENCIL_REF_CHROMIUM:
|
| + *num_written = 1;
|
| + if (params) {
|
| + params[0] = static_cast<GLfloat>(stencil_path_ref);
|
| + }
|
| + return true;
|
| + case GL_PATH_STENCIL_VALUE_MASK_CHROMIUM:
|
| + *num_written = 1;
|
| + if (params) {
|
| + params[0] = static_cast<GLfloat>(stencil_path_mask);
|
| + }
|
| + return true;
|
| case GL_PACK_ALIGNMENT:
|
| *num_written = 1;
|
| if (params) {
|
|
|