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

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: rebase and cleanup ids Created 6 years, 2 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 3284 matching lines...) Expand 10 before | Expand all | Expand 10 after
3295 GLenum matrixMode = static_cast<GLenum>(c.matrixMode); 3295 GLenum matrixMode = static_cast<GLenum>(c.matrixMode);
3296 if (!validators_->matrix_mode.IsValid(matrixMode)) { 3296 if (!validators_->matrix_mode.IsValid(matrixMode)) {
3297 LOCAL_SET_GL_ERROR_INVALID_ENUM( 3297 LOCAL_SET_GL_ERROR_INVALID_ENUM(
3298 "glMatrixLoadIdentityCHROMIUM", matrixMode, "matrixMode"); 3298 "glMatrixLoadIdentityCHROMIUM", matrixMode, "matrixMode");
3299 return error::kNoError; 3299 return error::kNoError;
3300 } 3300 }
3301 DoMatrixLoadIdentityCHROMIUM(matrixMode); 3301 DoMatrixLoadIdentityCHROMIUM(matrixMode);
3302 return error::kNoError; 3302 return error::kNoError;
3303 } 3303 }
3304 3304
3305 error::Error GLES2DecoderImpl::HandleIsPathCHROMIUM(
3306 uint32_t immediate_data_size,
3307 const void* cmd_data) {
3308 const gles2::cmds::IsPathCHROMIUM& c =
3309 *static_cast<const gles2::cmds::IsPathCHROMIUM*>(cmd_data);
3310 (void)c;
3311 if (!features().chromium_path_rendering) {
3312 LOCAL_SET_GL_ERROR(
3313 GL_INVALID_OPERATION, "glIsPathCHROMIUM", "function not available");
3314 return error::kNoError;
3315 }
3316
3317 GLuint path = c.path;
3318 typedef cmds::IsPathCHROMIUM::Result Result;
3319 Result* result_dst = GetSharedMemoryAs<Result*>(
3320 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst));
3321 if (!result_dst) {
3322 return error::kOutOfBounds;
3323 }
3324 *result_dst = DoIsPathCHROMIUM(path);
3325 return error::kNoError;
3326 }
3327
3328 error::Error GLES2DecoderImpl::HandlePathStencilFuncCHROMIUM(
3329 uint32_t immediate_data_size,
3330 const void* cmd_data) {
3331 const gles2::cmds::PathStencilFuncCHROMIUM& c =
3332 *static_cast<const gles2::cmds::PathStencilFuncCHROMIUM*>(cmd_data);
3333 (void)c;
3334 if (!features().chromium_path_rendering) {
3335 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION,
3336 "glPathStencilFuncCHROMIUM",
3337 "function not available");
3338 return error::kNoError;
3339 }
3340
3341 GLenum func = static_cast<GLenum>(c.func);
3342 GLint ref = static_cast<GLint>(c.ref);
3343 GLuint mask = static_cast<GLuint>(c.mask);
3344 if (!validators_->cmp_function.IsValid(func)) {
3345 LOCAL_SET_GL_ERROR_INVALID_ENUM("glPathStencilFuncCHROMIUM", func, "func");
3346 return error::kNoError;
3347 }
3348 if (state_.stencil_path_func != func || state_.stencil_path_ref != ref ||
3349 state_.stencil_path_mask != mask) {
3350 state_.stencil_path_func = func;
3351 state_.stencil_path_ref = ref;
3352 state_.stencil_path_mask = mask;
3353 glPathStencilFuncNV(func, ref, mask);
3354 }
3355 return error::kNoError;
3356 }
3357
3305 bool GLES2DecoderImpl::SetCapabilityState(GLenum cap, bool enabled) { 3358 bool GLES2DecoderImpl::SetCapabilityState(GLenum cap, bool enabled) {
3306 switch (cap) { 3359 switch (cap) {
3307 case GL_BLEND: 3360 case GL_BLEND:
3308 state_.enable_flags.blend = enabled; 3361 state_.enable_flags.blend = enabled;
3309 if (state_.enable_flags.cached_blend != enabled || 3362 if (state_.enable_flags.cached_blend != enabled ||
3310 state_.ignore_cached_state) { 3363 state_.ignore_cached_state) {
3311 state_.enable_flags.cached_blend = enabled; 3364 state_.enable_flags.cached_blend = enabled;
3312 return true; 3365 return true;
3313 } 3366 }
3314 return false; 3367 return false;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
3373 state_.ignore_cached_state) { 3426 state_.ignore_cached_state) {
3374 framebuffer_state_.clear_state_dirty = true; 3427 framebuffer_state_.clear_state_dirty = true;
3375 } 3428 }
3376 return false; 3429 return false;
3377 default: 3430 default:
3378 NOTREACHED(); 3431 NOTREACHED();
3379 return false; 3432 return false;
3380 } 3433 }
3381 } 3434 }
3382 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ 3435 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698