| 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 2e4d28a2d59522d84a5367df1e7e4708d61ad90d..426a51f4e6d1a0528f5ef2549855bffe38a9f83c 100644
|
| --- a/gpu/command_buffer/service/context_state_impl_autogen.h
|
| +++ b/gpu/command_buffer/service/context_state_impl_autogen.h
|
| @@ -53,6 +53,38 @@ void ContextState::Initialize() {
|
| hint_generate_mipmap = GL_DONT_CARE;
|
| hint_fragment_shader_derivative = GL_DONT_CARE;
|
| line_width = 1.0f;
|
| + modelview_matrix[0] = 0.0f;
|
| + modelview_matrix[1] = 0.0f;
|
| + modelview_matrix[2] = 0.0f;
|
| + modelview_matrix[3] = 0.0f;
|
| + modelview_matrix[4] = 0.0f;
|
| + modelview_matrix[5] = 0.0f;
|
| + modelview_matrix[6] = 0.0f;
|
| + modelview_matrix[7] = 0.0f;
|
| + modelview_matrix[8] = 0.0f;
|
| + modelview_matrix[9] = 0.0f;
|
| + modelview_matrix[10] = 0.0f;
|
| + modelview_matrix[11] = 0.0f;
|
| + modelview_matrix[12] = 0.0f;
|
| + modelview_matrix[13] = 0.0f;
|
| + modelview_matrix[14] = 0.0f;
|
| + modelview_matrix[15] = 0.0f;
|
| + projection_matrix[0] = 0.0f;
|
| + projection_matrix[1] = 0.0f;
|
| + projection_matrix[2] = 0.0f;
|
| + projection_matrix[3] = 0.0f;
|
| + projection_matrix[4] = 0.0f;
|
| + projection_matrix[5] = 0.0f;
|
| + projection_matrix[6] = 0.0f;
|
| + projection_matrix[7] = 0.0f;
|
| + projection_matrix[8] = 0.0f;
|
| + projection_matrix[9] = 0.0f;
|
| + projection_matrix[10] = 0.0f;
|
| + projection_matrix[11] = 0.0f;
|
| + projection_matrix[12] = 0.0f;
|
| + projection_matrix[13] = 0.0f;
|
| + projection_matrix[14] = 0.0f;
|
| + projection_matrix[15] = 0.0f;
|
| pack_alignment = 4;
|
| unpack_alignment = 4;
|
| polygon_offset_factor = 0.0f;
|
| @@ -179,6 +211,16 @@ void ContextState::InitState(const ContextState* prev_state) const {
|
| hint_fragment_shader_derivative);
|
| if ((line_width != prev_state->line_width))
|
| glLineWidth(line_width);
|
| + if (feature_info_->feature_flags().chromium_path_rendering)
|
| + if (memcmp(prev_state->modelview_matrix,
|
| + modelview_matrix,
|
| + sizeof(GLfloat) * 16))
|
| + glMatrixLoadfEXT(GL_MODELVIEW_CHROMIUM, modelview_matrix);
|
| + if (feature_info_->feature_flags().chromium_path_rendering)
|
| + if (memcmp(prev_state->projection_matrix,
|
| + projection_matrix,
|
| + sizeof(GLfloat) * 16))
|
| + glMatrixLoadfEXT(GL_PROJECTION_CHROMIUM, projection_matrix);
|
| if (prev_state->pack_alignment != pack_alignment)
|
| glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment);
|
| if (prev_state->unpack_alignment != unpack_alignment)
|
| @@ -253,6 +295,10 @@ void ContextState::InitState(const ContextState* prev_state) const {
|
| glHint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES,
|
| hint_fragment_shader_derivative);
|
| glLineWidth(line_width);
|
| + if (feature_info_->feature_flags().chromium_path_rendering)
|
| + glMatrixLoadfEXT(GL_MODELVIEW_CHROMIUM, modelview_matrix);
|
| + if (feature_info_->feature_flags().chromium_path_rendering)
|
| + glMatrixLoadfEXT(GL_PROJECTION_CHROMIUM, projection_matrix);
|
| glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment);
|
| glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment);
|
| glPolygonOffset(polygon_offset_factor, polygon_offset_units);
|
| @@ -429,6 +475,22 @@ bool ContextState::GetStateAsGLint(GLenum pname,
|
| params[0] = static_cast<GLint>(line_width);
|
| }
|
| return true;
|
| + case GL_MODELVIEW_MATRIX_CHROMIUM:
|
| + *num_written = 16;
|
| + if (params) {
|
| + for (size_t i = 0; i < 16; ++i) {
|
| + params[i] = static_cast<GLint>(modelview_matrix[i]);
|
| + }
|
| + }
|
| + return true;
|
| + case GL_PROJECTION_MATRIX_CHROMIUM:
|
| + *num_written = 16;
|
| + if (params) {
|
| + for (size_t i = 0; i < 16; ++i) {
|
| + params[i] = static_cast<GLint>(projection_matrix[i]);
|
| + }
|
| + }
|
| + return true;
|
| case GL_PACK_ALIGNMENT:
|
| *num_written = 1;
|
| if (params) {
|
| @@ -754,6 +816,18 @@ bool ContextState::GetStateAsGLfloat(GLenum pname,
|
| params[0] = static_cast<GLfloat>(line_width);
|
| }
|
| return true;
|
| + case GL_MODELVIEW_MATRIX_CHROMIUM:
|
| + *num_written = 16;
|
| + if (params) {
|
| + memcpy(params, modelview_matrix, sizeof(GLfloat) * 16);
|
| + }
|
| + return true;
|
| + case GL_PROJECTION_MATRIX_CHROMIUM:
|
| + *num_written = 16;
|
| + if (params) {
|
| + memcpy(params, projection_matrix, sizeof(GLfloat) * 16);
|
| + }
|
| + return true;
|
| case GL_PACK_ALIGNMENT:
|
| *num_written = 1;
|
| if (params) {
|
|
|