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

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

Issue 298753004: Fix an early return and the error status in glLoseContextCHROMIUM impl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cmd-buffer-missing-early-returns
Patch Set: Created 6 years, 7 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 3380 matching lines...) Expand 10 before | Expand all | Expand 10 after
3391 GL_INVALID_VALUE, "glDiscardFramebufferEXT", "count < 0"); 3391 GL_INVALID_VALUE, "glDiscardFramebufferEXT", "count < 0");
3392 return error::kNoError; 3392 return error::kNoError;
3393 } 3393 }
3394 if (attachments == NULL) { 3394 if (attachments == NULL) {
3395 return error::kOutOfBounds; 3395 return error::kOutOfBounds;
3396 } 3396 }
3397 DoDiscardFramebufferEXT(target, count, attachments); 3397 DoDiscardFramebufferEXT(target, count, attachments);
3398 return error::kNoError; 3398 return error::kNoError;
3399 } 3399 }
3400 3400
3401 error::Error GLES2DecoderImpl::HandleLoseContextCHROMIUM(
3402 uint32_t immediate_data_size,
3403 const gles2::cmds::LoseContextCHROMIUM& c) {
3404 GLenum current = static_cast<GLenum>(c.current);
3405 GLenum other = static_cast<GLenum>(c.other);
3406 if (!validators_->reset_status.IsValid(current)) {
3407 LOCAL_SET_GL_ERROR_INVALID_ENUM(
3408 "glLoseContextCHROMIUM", current, "current");
3409 return error::kNoError;
3410 }
3411 if (!validators_->reset_status.IsValid(other)) {
3412 LOCAL_SET_GL_ERROR_INVALID_ENUM("glLoseContextCHROMIUM", other, "other");
3413 return error::kNoError;
3414 }
3415 DoLoseContextCHROMIUM(current, other);
3416 return error::kNoError;
3417 }
3418
3401 error::Error GLES2DecoderImpl::HandleDrawBuffersEXT( 3419 error::Error GLES2DecoderImpl::HandleDrawBuffersEXT(
3402 uint32_t immediate_data_size, 3420 uint32_t immediate_data_size,
3403 const gles2::cmds::DrawBuffersEXT& c) { 3421 const gles2::cmds::DrawBuffersEXT& c) {
3404 GLsizei count = static_cast<GLsizei>(c.count); 3422 GLsizei count = static_cast<GLsizei>(c.count);
3405 uint32_t data_size; 3423 uint32_t data_size;
3406 if (!ComputeDataSize(count, sizeof(GLenum), 1, &data_size)) { 3424 if (!ComputeDataSize(count, sizeof(GLenum), 1, &data_size)) {
3407 return error::kOutOfBounds; 3425 return error::kOutOfBounds;
3408 } 3426 }
3409 const GLenum* bufs = GetSharedMemoryAs<const GLenum*>( 3427 const GLenum* bufs = GetSharedMemoryAs<const GLenum*>(
3410 c.bufs_shm_id, c.bufs_shm_offset, data_size); 3428 c.bufs_shm_id, c.bufs_shm_offset, data_size);
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
3514 state_.ignore_cached_state) { 3532 state_.ignore_cached_state) {
3515 framebuffer_state_.clear_state_dirty = true; 3533 framebuffer_state_.clear_state_dirty = true;
3516 } 3534 }
3517 return false; 3535 return false;
3518 default: 3536 default:
3519 NOTREACHED(); 3537 NOTREACHED();
3520 return false; 3538 return false;
3521 } 3539 }
3522 } 3540 }
3523 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ 3541 #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.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698