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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_autogen.h

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: fix windows build Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file is auto-generated from 5 // This file is auto-generated from
6 // gpu/command_buffer/build_gles2_cmd_buffer.py 6 // gpu/command_buffer/build_gles2_cmd_buffer.py
7 // It's formatted by clang-format using chromium coding style: 7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename 8 // clang-format -i -style=chromium filename
9 // DO NOT EDIT! 9 // DO NOT EDIT!
10 10
(...skipping 4928 matching lines...) Expand 10 before | Expand all | Expand 10 after
4939 GLenum matrixMode = static_cast<GLenum>(c.matrixMode); 4939 GLenum matrixMode = static_cast<GLenum>(c.matrixMode);
4940 if (!validators_->matrix_mode.IsValid(matrixMode)) { 4940 if (!validators_->matrix_mode.IsValid(matrixMode)) {
4941 LOCAL_SET_GL_ERROR_INVALID_ENUM("glMatrixLoadIdentityCHROMIUM", matrixMode, 4941 LOCAL_SET_GL_ERROR_INVALID_ENUM("glMatrixLoadIdentityCHROMIUM", matrixMode,
4942 "matrixMode"); 4942 "matrixMode");
4943 return error::kNoError; 4943 return error::kNoError;
4944 } 4944 }
4945 DoMatrixLoadIdentityCHROMIUM(matrixMode); 4945 DoMatrixLoadIdentityCHROMIUM(matrixMode);
4946 return error::kNoError; 4946 return error::kNoError;
4947 } 4947 }
4948 4948
4949 error::Error GLES2DecoderImpl::HandleIsPathCHROMIUM(
4950 uint32_t immediate_data_size,
4951 const void* cmd_data) {
4952 const gles2::cmds::IsPathCHROMIUM& c =
4953 *static_cast<const gles2::cmds::IsPathCHROMIUM*>(cmd_data);
4954 (void)c;
4955 if (!features().chromium_path_rendering) {
4956 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glIsPathCHROMIUM",
4957 "function not available");
4958 return error::kNoError;
4959 }
4960
4961 GLuint path = c.path;
4962 typedef cmds::IsPathCHROMIUM::Result Result;
4963 Result* result_dst = GetSharedMemoryAs<Result*>(
4964 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst));
4965 if (!result_dst) {
4966 return error::kOutOfBounds;
4967 }
4968 *result_dst = DoIsPathCHROMIUM(path);
4969 return error::kNoError;
4970 }
4971
4972 error::Error GLES2DecoderImpl::HandlePathStencilFuncCHROMIUM(
4973 uint32_t immediate_data_size,
4974 const void* cmd_data) {
4975 const gles2::cmds::PathStencilFuncCHROMIUM& c =
4976 *static_cast<const gles2::cmds::PathStencilFuncCHROMIUM*>(cmd_data);
4977 (void)c;
4978 if (!features().chromium_path_rendering) {
4979 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glPathStencilFuncCHROMIUM",
4980 "function not available");
4981 return error::kNoError;
4982 }
4983
4984 GLenum func = static_cast<GLenum>(c.func);
4985 GLint ref = static_cast<GLint>(c.ref);
4986 GLuint mask = static_cast<GLuint>(c.mask);
4987 if (!validators_->cmp_function.IsValid(func)) {
4988 LOCAL_SET_GL_ERROR_INVALID_ENUM("glPathStencilFuncCHROMIUM", func, "func");
4989 return error::kNoError;
4990 }
4991 if (state_.stencil_path_func != func || state_.stencil_path_ref != ref ||
4992 state_.stencil_path_mask != mask) {
4993 state_.stencil_path_func = func;
4994 state_.stencil_path_ref = ref;
4995 state_.stencil_path_mask = mask;
4996 glPathStencilFuncNV(func, ref, mask);
4997 }
4998 return error::kNoError;
4999 }
5000
4949 error::Error GLES2DecoderImpl::HandleBlendBarrierKHR( 5001 error::Error GLES2DecoderImpl::HandleBlendBarrierKHR(
4950 uint32_t immediate_data_size, 5002 uint32_t immediate_data_size,
4951 const void* cmd_data) { 5003 const void* cmd_data) {
4952 const gles2::cmds::BlendBarrierKHR& c = 5004 const gles2::cmds::BlendBarrierKHR& c =
4953 *static_cast<const gles2::cmds::BlendBarrierKHR*>(cmd_data); 5005 *static_cast<const gles2::cmds::BlendBarrierKHR*>(cmd_data);
4954 (void)c; 5006 (void)c;
4955 if (!features().blend_equation_advanced) { 5007 if (!features().blend_equation_advanced) {
4956 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glBlendBarrierKHR", 5008 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glBlendBarrierKHR",
4957 "function not available"); 5009 "function not available");
4958 return error::kNoError; 5010 return error::kNoError;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
5049 state_.enable_flags.cached_primitive_restart_fixed_index = enabled; 5101 state_.enable_flags.cached_primitive_restart_fixed_index = enabled;
5050 return true; 5102 return true;
5051 } 5103 }
5052 return false; 5104 return false;
5053 default: 5105 default:
5054 NOTREACHED(); 5106 NOTREACHED();
5055 return false; 5107 return false;
5056 } 5108 }
5057 } 5109 }
5058 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ 5110 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698