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

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: 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 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 3489 matching lines...) Expand 10 before | Expand all | Expand 10 after
3500 GLenum matrixMode = static_cast<GLenum>(c.matrixMode); 3500 GLenum matrixMode = static_cast<GLenum>(c.matrixMode);
3501 if (!validators_->matrix_mode.IsValid(matrixMode)) { 3501 if (!validators_->matrix_mode.IsValid(matrixMode)) {
3502 LOCAL_SET_GL_ERROR_INVALID_ENUM( 3502 LOCAL_SET_GL_ERROR_INVALID_ENUM(
3503 "glMatrixLoadIdentityCHROMIUM", matrixMode, "matrixMode"); 3503 "glMatrixLoadIdentityCHROMIUM", matrixMode, "matrixMode");
3504 return error::kNoError; 3504 return error::kNoError;
3505 } 3505 }
3506 DoMatrixLoadIdentityCHROMIUM(matrixMode); 3506 DoMatrixLoadIdentityCHROMIUM(matrixMode);
3507 return error::kNoError; 3507 return error::kNoError;
3508 } 3508 }
3509 3509
3510 error::Error GLES2DecoderImpl::HandleDeletePathsCHROMIUM(
3511 uint32 immediate_data_size,
3512 const gles2::cmds::DeletePathsCHROMIUM& c) {
3513 GLuint path = c.path;
3514 GLsizei range = static_cast<GLsizei>(c.range);
3515 if (range < 0) {
3516 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glDeletePathsCHROMIUM", "range < 0");
3517 return error::kNoError;
3518 }
3519 DeletePathsCHROMIUMHelper(path, range);
3520 return error::kNoError;
3521 }
3522
3523 error::Error GLES2DecoderImpl::HandlePathStencilFuncCHROMIUM(
3524 uint32 immediate_data_size,
3525 const gles2::cmds::PathStencilFuncCHROMIUM& c) {
3526 GLenum func = static_cast<GLenum>(c.func);
3527 GLint ref = static_cast<GLint>(c.ref);
3528 GLuint mask = static_cast<GLuint>(c.mask);
3529 if (!validators_->cmp_function.IsValid(func)) {
3530 LOCAL_SET_GL_ERROR_INVALID_ENUM("glPathStencilFuncCHROMIUM", func, "func");
3531 return error::kNoError;
3532 }
3533 if (state_.stencil_path_func != func || state_.stencil_path_ref != ref ||
3534 state_.stencil_path_mask != mask) {
3535 state_.stencil_path_func = func;
3536 state_.stencil_path_ref = ref;
3537 state_.stencil_path_mask = mask;
3538 glPathStencilFuncNV(func, ref, mask);
3539 }
3540 return error::kNoError;
3541 }
3542
3510 bool GLES2DecoderImpl::SetCapabilityState(GLenum cap, bool enabled) { 3543 bool GLES2DecoderImpl::SetCapabilityState(GLenum cap, bool enabled) {
3511 switch (cap) { 3544 switch (cap) {
3512 case GL_BLEND: 3545 case GL_BLEND:
3513 state_.enable_flags.blend = enabled; 3546 state_.enable_flags.blend = enabled;
3514 return true; 3547 return true;
3515 case GL_CULL_FACE: 3548 case GL_CULL_FACE:
3516 state_.enable_flags.cull_face = enabled; 3549 state_.enable_flags.cull_face = enabled;
3517 return true; 3550 return true;
3518 case GL_DEPTH_TEST: 3551 case GL_DEPTH_TEST:
3519 if (state_.enable_flags.depth_test != enabled) { 3552 if (state_.enable_flags.depth_test != enabled) {
(...skipping 24 matching lines...) Expand all
3544 state_.enable_flags.stencil_test = enabled; 3577 state_.enable_flags.stencil_test = enabled;
3545 framebuffer_state_.clear_state_dirty = true; 3578 framebuffer_state_.clear_state_dirty = true;
3546 } 3579 }
3547 return false; 3580 return false;
3548 default: 3581 default:
3549 NOTREACHED(); 3582 NOTREACHED();
3550 return false; 3583 return false;
3551 } 3584 }
3552 } 3585 }
3553 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ 3586 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698