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

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

Issue 2268993003: [Command Buffer] Coding style: FrameBuffer -> Framebuffer to be comformant (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code rebase Created 4 years, 3 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 93 }
94 94
95 error::Error GLES2DecoderImpl::HandleBindFramebuffer( 95 error::Error GLES2DecoderImpl::HandleBindFramebuffer(
96 uint32_t immediate_data_size, 96 uint32_t immediate_data_size,
97 const void* cmd_data) { 97 const void* cmd_data) {
98 const gles2::cmds::BindFramebuffer& c = 98 const gles2::cmds::BindFramebuffer& c =
99 *static_cast<const gles2::cmds::BindFramebuffer*>(cmd_data); 99 *static_cast<const gles2::cmds::BindFramebuffer*>(cmd_data);
100 (void)c; 100 (void)c;
101 GLenum target = static_cast<GLenum>(c.target); 101 GLenum target = static_cast<GLenum>(c.target);
102 GLuint framebuffer = c.framebuffer; 102 GLuint framebuffer = c.framebuffer;
103 if (!validators_->frame_buffer_target.IsValid(target)) { 103 if (!validators_->framebuffer_target.IsValid(target)) {
104 LOCAL_SET_GL_ERROR_INVALID_ENUM("glBindFramebuffer", target, "target"); 104 LOCAL_SET_GL_ERROR_INVALID_ENUM("glBindFramebuffer", target, "target");
105 return error::kNoError; 105 return error::kNoError;
106 } 106 }
107 DoBindFramebuffer(target, framebuffer); 107 DoBindFramebuffer(target, framebuffer);
108 return error::kNoError; 108 return error::kNoError;
109 } 109 }
110 110
111 error::Error GLES2DecoderImpl::HandleBindRenderbuffer( 111 error::Error GLES2DecoderImpl::HandleBindRenderbuffer(
112 uint32_t immediate_data_size, 112 uint32_t immediate_data_size,
113 const void* cmd_data) { 113 const void* cmd_data) {
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 const gles2::cmds::CheckFramebufferStatus& c = 336 const gles2::cmds::CheckFramebufferStatus& c =
337 *static_cast<const gles2::cmds::CheckFramebufferStatus*>(cmd_data); 337 *static_cast<const gles2::cmds::CheckFramebufferStatus*>(cmd_data);
338 (void)c; 338 (void)c;
339 GLenum target = static_cast<GLenum>(c.target); 339 GLenum target = static_cast<GLenum>(c.target);
340 typedef cmds::CheckFramebufferStatus::Result Result; 340 typedef cmds::CheckFramebufferStatus::Result Result;
341 Result* result_dst = GetSharedMemoryAs<Result*>( 341 Result* result_dst = GetSharedMemoryAs<Result*>(
342 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst)); 342 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst));
343 if (!result_dst) { 343 if (!result_dst) {
344 return error::kOutOfBounds; 344 return error::kOutOfBounds;
345 } 345 }
346 if (!validators_->frame_buffer_target.IsValid(target)) { 346 if (!validators_->framebuffer_target.IsValid(target)) {
347 LOCAL_SET_GL_ERROR_INVALID_ENUM("glCheckFramebufferStatus", target, 347 LOCAL_SET_GL_ERROR_INVALID_ENUM("glCheckFramebufferStatus", target,
348 "target"); 348 "target");
349 return error::kNoError; 349 return error::kNoError;
350 } 350 }
351 *result_dst = DoCheckFramebufferStatus(target); 351 *result_dst = DoCheckFramebufferStatus(target);
352 return error::kNoError; 352 return error::kNoError;
353 } 353 }
354 354
355 error::Error GLES2DecoderImpl::HandleClear(uint32_t immediate_data_size, 355 error::Error GLES2DecoderImpl::HandleClear(uint32_t immediate_data_size,
356 const void* cmd_data) { 356 const void* cmd_data) {
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after
1450 error::Error GLES2DecoderImpl::HandleFramebufferRenderbuffer( 1450 error::Error GLES2DecoderImpl::HandleFramebufferRenderbuffer(
1451 uint32_t immediate_data_size, 1451 uint32_t immediate_data_size,
1452 const void* cmd_data) { 1452 const void* cmd_data) {
1453 const gles2::cmds::FramebufferRenderbuffer& c = 1453 const gles2::cmds::FramebufferRenderbuffer& c =
1454 *static_cast<const gles2::cmds::FramebufferRenderbuffer*>(cmd_data); 1454 *static_cast<const gles2::cmds::FramebufferRenderbuffer*>(cmd_data);
1455 (void)c; 1455 (void)c;
1456 GLenum target = static_cast<GLenum>(c.target); 1456 GLenum target = static_cast<GLenum>(c.target);
1457 GLenum attachment = static_cast<GLenum>(c.attachment); 1457 GLenum attachment = static_cast<GLenum>(c.attachment);
1458 GLenum renderbuffertarget = static_cast<GLenum>(c.renderbuffertarget); 1458 GLenum renderbuffertarget = static_cast<GLenum>(c.renderbuffertarget);
1459 GLuint renderbuffer = c.renderbuffer; 1459 GLuint renderbuffer = c.renderbuffer;
1460 if (!validators_->frame_buffer_target.IsValid(target)) { 1460 if (!validators_->framebuffer_target.IsValid(target)) {
1461 LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferRenderbuffer", target, 1461 LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferRenderbuffer", target,
1462 "target"); 1462 "target");
1463 return error::kNoError; 1463 return error::kNoError;
1464 } 1464 }
1465 if (!validators_->attachment.IsValid(attachment)) { 1465 if (!validators_->attachment.IsValid(attachment)) {
1466 LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferRenderbuffer", attachment, 1466 LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferRenderbuffer", attachment,
1467 "attachment"); 1467 "attachment");
1468 return error::kNoError; 1468 return error::kNoError;
1469 } 1469 }
1470 if (!validators_->render_buffer_target.IsValid(renderbuffertarget)) { 1470 if (!validators_->render_buffer_target.IsValid(renderbuffertarget)) {
(...skipping 10 matching lines...) Expand all
1481 uint32_t immediate_data_size, 1481 uint32_t immediate_data_size,
1482 const void* cmd_data) { 1482 const void* cmd_data) {
1483 const gles2::cmds::FramebufferTexture2D& c = 1483 const gles2::cmds::FramebufferTexture2D& c =
1484 *static_cast<const gles2::cmds::FramebufferTexture2D*>(cmd_data); 1484 *static_cast<const gles2::cmds::FramebufferTexture2D*>(cmd_data);
1485 (void)c; 1485 (void)c;
1486 GLenum target = static_cast<GLenum>(c.target); 1486 GLenum target = static_cast<GLenum>(c.target);
1487 GLenum attachment = static_cast<GLenum>(c.attachment); 1487 GLenum attachment = static_cast<GLenum>(c.attachment);
1488 GLenum textarget = static_cast<GLenum>(c.textarget); 1488 GLenum textarget = static_cast<GLenum>(c.textarget);
1489 GLuint texture = c.texture; 1489 GLuint texture = c.texture;
1490 GLint level = static_cast<GLint>(c.level); 1490 GLint level = static_cast<GLint>(c.level);
1491 if (!validators_->frame_buffer_target.IsValid(target)) { 1491 if (!validators_->framebuffer_target.IsValid(target)) {
1492 LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferTexture2D", target, "target"); 1492 LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferTexture2D", target, "target");
1493 return error::kNoError; 1493 return error::kNoError;
1494 } 1494 }
1495 if (!validators_->attachment.IsValid(attachment)) { 1495 if (!validators_->attachment.IsValid(attachment)) {
1496 LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferTexture2D", attachment, 1496 LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferTexture2D", attachment,
1497 "attachment"); 1497 "attachment");
1498 return error::kNoError; 1498 return error::kNoError;
1499 } 1499 }
1500 if (!validators_->texture_target.IsValid(textarget)) { 1500 if (!validators_->texture_target.IsValid(textarget)) {
1501 LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferTexture2D", textarget, 1501 LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferTexture2D", textarget,
(...skipping 10 matching lines...) Expand all
1512 if (!unsafe_es3_apis_enabled()) 1512 if (!unsafe_es3_apis_enabled())
1513 return error::kUnknownCommand; 1513 return error::kUnknownCommand;
1514 const gles2::cmds::FramebufferTextureLayer& c = 1514 const gles2::cmds::FramebufferTextureLayer& c =
1515 *static_cast<const gles2::cmds::FramebufferTextureLayer*>(cmd_data); 1515 *static_cast<const gles2::cmds::FramebufferTextureLayer*>(cmd_data);
1516 (void)c; 1516 (void)c;
1517 GLenum target = static_cast<GLenum>(c.target); 1517 GLenum target = static_cast<GLenum>(c.target);
1518 GLenum attachment = static_cast<GLenum>(c.attachment); 1518 GLenum attachment = static_cast<GLenum>(c.attachment);
1519 GLuint texture = c.texture; 1519 GLuint texture = c.texture;
1520 GLint level = static_cast<GLint>(c.level); 1520 GLint level = static_cast<GLint>(c.level);
1521 GLint layer = static_cast<GLint>(c.layer); 1521 GLint layer = static_cast<GLint>(c.layer);
1522 if (!validators_->frame_buffer_target.IsValid(target)) { 1522 if (!validators_->framebuffer_target.IsValid(target)) {
1523 LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferTextureLayer", target, 1523 LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferTextureLayer", target,
1524 "target"); 1524 "target");
1525 return error::kNoError; 1525 return error::kNoError;
1526 } 1526 }
1527 if (!validators_->attachment.IsValid(attachment)) { 1527 if (!validators_->attachment.IsValid(attachment)) {
1528 LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferTextureLayer", attachment, 1528 LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferTextureLayer", attachment,
1529 "attachment"); 1529 "attachment");
1530 return error::kNoError; 1530 return error::kNoError;
1531 } 1531 }
1532 DoFramebufferTextureLayer(target, attachment, texture, level, layer); 1532 DoFramebufferTextureLayer(target, attachment, texture, level, layer);
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
1882 (void)c; 1882 (void)c;
1883 GLenum target = static_cast<GLenum>(c.target); 1883 GLenum target = static_cast<GLenum>(c.target);
1884 GLenum attachment = static_cast<GLenum>(c.attachment); 1884 GLenum attachment = static_cast<GLenum>(c.attachment);
1885 GLenum pname = static_cast<GLenum>(c.pname); 1885 GLenum pname = static_cast<GLenum>(c.pname);
1886 typedef cmds::GetFramebufferAttachmentParameteriv::Result Result; 1886 typedef cmds::GetFramebufferAttachmentParameteriv::Result Result;
1887 GLsizei num_values = 0; 1887 GLsizei num_values = 0;
1888 GetNumValuesReturnedForGLGet(pname, &num_values); 1888 GetNumValuesReturnedForGLGet(pname, &num_values);
1889 Result* result = GetSharedMemoryAs<Result*>( 1889 Result* result = GetSharedMemoryAs<Result*>(
1890 c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); 1890 c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values));
1891 GLint* params = result ? result->GetData() : NULL; 1891 GLint* params = result ? result->GetData() : NULL;
1892 if (!validators_->frame_buffer_target.IsValid(target)) { 1892 if (!validators_->framebuffer_target.IsValid(target)) {
1893 LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetFramebufferAttachmentParameteriv", 1893 LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetFramebufferAttachmentParameteriv",
1894 target, "target"); 1894 target, "target");
1895 return error::kNoError; 1895 return error::kNoError;
1896 } 1896 }
1897 if (!validators_->attachment_query.IsValid(attachment)) { 1897 if (!validators_->attachment_query.IsValid(attachment)) {
1898 LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetFramebufferAttachmentParameteriv", 1898 LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetFramebufferAttachmentParameteriv",
1899 attachment, "attachment"); 1899 attachment, "attachment");
1900 return error::kNoError; 1900 return error::kNoError;
1901 } 1901 }
1902 if (!validators_->frame_buffer_parameter.IsValid(pname)) { 1902 if (!validators_->framebuffer_parameter.IsValid(pname)) {
1903 LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetFramebufferAttachmentParameteriv", 1903 LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetFramebufferAttachmentParameteriv",
1904 pname, "pname"); 1904 pname, "pname");
1905 return error::kNoError; 1905 return error::kNoError;
1906 } 1906 }
1907 if (params == NULL) { 1907 if (params == NULL) {
1908 return error::kOutOfBounds; 1908 return error::kOutOfBounds;
1909 } 1909 }
1910 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetFramebufferAttachmentParameteriv"); 1910 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetFramebufferAttachmentParameteriv");
1911 // Check that the client initialized the result. 1911 // Check that the client initialized the result.
1912 if (result->size != 0) { 1912 if (result->size != 0) {
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
2532 uint32_t data_size = 0; 2532 uint32_t data_size = 0;
2533 if (count >= 0 && 2533 if (count >= 0 &&
2534 !GLES2Util::ComputeDataSize(count, sizeof(GLenum), 1, &data_size)) { 2534 !GLES2Util::ComputeDataSize(count, sizeof(GLenum), 1, &data_size)) {
2535 return error::kOutOfBounds; 2535 return error::kOutOfBounds;
2536 } 2536 }
2537 if (data_size > immediate_data_size) { 2537 if (data_size > immediate_data_size) {
2538 return error::kOutOfBounds; 2538 return error::kOutOfBounds;
2539 } 2539 }
2540 const GLenum* attachments = 2540 const GLenum* attachments =
2541 GetImmediateDataAs<const GLenum*>(c, data_size, immediate_data_size); 2541 GetImmediateDataAs<const GLenum*>(c, data_size, immediate_data_size);
2542 if (!validators_->frame_buffer_target.IsValid(target)) { 2542 if (!validators_->framebuffer_target.IsValid(target)) {
2543 LOCAL_SET_GL_ERROR_INVALID_ENUM("glInvalidateFramebuffer", target, 2543 LOCAL_SET_GL_ERROR_INVALID_ENUM("glInvalidateFramebuffer", target,
2544 "target"); 2544 "target");
2545 return error::kNoError; 2545 return error::kNoError;
2546 } 2546 }
2547 if (count < 0) { 2547 if (count < 0) {
2548 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glInvalidateFramebuffer", 2548 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glInvalidateFramebuffer",
2549 "count < 0"); 2549 "count < 0");
2550 return error::kNoError; 2550 return error::kNoError;
2551 } 2551 }
2552 if (attachments == NULL) { 2552 if (attachments == NULL) {
(...skipping 21 matching lines...) Expand all
2574 } 2574 }
2575 if (data_size > immediate_data_size) { 2575 if (data_size > immediate_data_size) {
2576 return error::kOutOfBounds; 2576 return error::kOutOfBounds;
2577 } 2577 }
2578 const GLenum* attachments = 2578 const GLenum* attachments =
2579 GetImmediateDataAs<const GLenum*>(c, data_size, immediate_data_size); 2579 GetImmediateDataAs<const GLenum*>(c, data_size, immediate_data_size);
2580 GLint x = static_cast<GLint>(c.x); 2580 GLint x = static_cast<GLint>(c.x);
2581 GLint y = static_cast<GLint>(c.y); 2581 GLint y = static_cast<GLint>(c.y);
2582 GLsizei width = static_cast<GLsizei>(c.width); 2582 GLsizei width = static_cast<GLsizei>(c.width);
2583 GLsizei height = static_cast<GLsizei>(c.height); 2583 GLsizei height = static_cast<GLsizei>(c.height);
2584 if (!validators_->frame_buffer_target.IsValid(target)) { 2584 if (!validators_->framebuffer_target.IsValid(target)) {
2585 LOCAL_SET_GL_ERROR_INVALID_ENUM("glInvalidateSubFramebuffer", target, 2585 LOCAL_SET_GL_ERROR_INVALID_ENUM("glInvalidateSubFramebuffer", target,
2586 "target"); 2586 "target");
2587 return error::kNoError; 2587 return error::kNoError;
2588 } 2588 }
2589 if (count < 0) { 2589 if (count < 0) {
2590 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glInvalidateSubFramebuffer", 2590 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glInvalidateSubFramebuffer",
2591 "count < 0"); 2591 "count < 0");
2592 return error::kNoError; 2592 return error::kNoError;
2593 } 2593 }
2594 if (attachments == NULL) { 2594 if (attachments == NULL) {
(...skipping 2105 matching lines...) Expand 10 before | Expand all | Expand 10 after
4700 if (!features().multisampled_render_to_texture) { 4700 if (!features().multisampled_render_to_texture) {
4701 return error::kUnknownCommand; 4701 return error::kUnknownCommand;
4702 } 4702 }
4703 4703
4704 GLenum target = static_cast<GLenum>(c.target); 4704 GLenum target = static_cast<GLenum>(c.target);
4705 GLenum attachment = static_cast<GLenum>(c.attachment); 4705 GLenum attachment = static_cast<GLenum>(c.attachment);
4706 GLenum textarget = static_cast<GLenum>(c.textarget); 4706 GLenum textarget = static_cast<GLenum>(c.textarget);
4707 GLuint texture = c.texture; 4707 GLuint texture = c.texture;
4708 GLint level = static_cast<GLint>(c.level); 4708 GLint level = static_cast<GLint>(c.level);
4709 GLsizei samples = static_cast<GLsizei>(c.samples); 4709 GLsizei samples = static_cast<GLsizei>(c.samples);
4710 if (!validators_->frame_buffer_target.IsValid(target)) { 4710 if (!validators_->framebuffer_target.IsValid(target)) {
4711 LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferTexture2DMultisampleEXT", 4711 LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferTexture2DMultisampleEXT",
4712 target, "target"); 4712 target, "target");
4713 return error::kNoError; 4713 return error::kNoError;
4714 } 4714 }
4715 if (!validators_->attachment.IsValid(attachment)) { 4715 if (!validators_->attachment.IsValid(attachment)) {
4716 LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferTexture2DMultisampleEXT", 4716 LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferTexture2DMultisampleEXT",
4717 attachment, "attachment"); 4717 attachment, "attachment");
4718 return error::kNoError; 4718 return error::kNoError;
4719 } 4719 }
4720 if (!validators_->texture_target.IsValid(textarget)) { 4720 if (!validators_->texture_target.IsValid(textarget)) {
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
5678 state_.enable_flags.cached_sample_alpha_to_one_ext = enabled; 5678 state_.enable_flags.cached_sample_alpha_to_one_ext = enabled;
5679 return true; 5679 return true;
5680 } 5680 }
5681 return false; 5681 return false;
5682 default: 5682 default:
5683 NOTREACHED(); 5683 NOTREACHED();
5684 return false; 5684 return false;
5685 } 5685 }
5686 } 5686 }
5687 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ 5687 #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_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698