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

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

Issue 2095493002: Improve sync object related command handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improve sync object related command handling. Created 4 years, 6 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
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 const gles2::cmds::FenceSync& c = 1411 const gles2::cmds::FenceSync& c =
1412 *static_cast<const gles2::cmds::FenceSync*>(cmd_data); 1412 *static_cast<const gles2::cmds::FenceSync*>(cmd_data);
1413 (void)c; 1413 (void)c;
1414 GLenum condition = static_cast<GLenum>(c.condition); 1414 GLenum condition = static_cast<GLenum>(c.condition);
1415 GLbitfield flags = static_cast<GLbitfield>(c.flags); 1415 GLbitfield flags = static_cast<GLbitfield>(c.flags);
1416 uint32_t client_id = c.client_id; 1416 uint32_t client_id = c.client_id;
1417 GLsync service_id = 0; 1417 GLsync service_id = 0;
1418 if (group_->GetSyncServiceId(client_id, &service_id)) { 1418 if (group_->GetSyncServiceId(client_id, &service_id)) {
1419 return error::kInvalidArguments; 1419 return error::kInvalidArguments;
1420 } 1420 }
1421 service_id = glFenceSync(condition, flags); 1421 service_id = DoFenceSync(condition, flags);
1422 if (service_id) { 1422 if (service_id) {
1423 group_->AddSyncId(client_id, service_id); 1423 group_->AddSyncId(client_id, service_id);
1424 } 1424 }
1425 return error::kNoError; 1425 return error::kNoError;
1426 } 1426 }
1427 1427
1428 error::Error GLES2DecoderImpl::HandleFinish(uint32_t immediate_data_size, 1428 error::Error GLES2DecoderImpl::HandleFinish(uint32_t immediate_data_size,
1429 const void* cmd_data) { 1429 const void* cmd_data) {
1430 const gles2::cmds::Finish& c = 1430 const gles2::cmds::Finish& c =
1431 *static_cast<const gles2::cmds::Finish*>(cmd_data); 1431 *static_cast<const gles2::cmds::Finish*>(cmd_data);
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
2228 if (values == NULL) { 2228 if (values == NULL) {
2229 return error::kOutOfBounds; 2229 return error::kOutOfBounds;
2230 } 2230 }
2231 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetSynciv"); 2231 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetSynciv");
2232 // Check that the client initialized the result. 2232 // Check that the client initialized the result.
2233 if (result->size != 0) { 2233 if (result->size != 0) {
2234 return error::kInvalidArguments; 2234 return error::kInvalidArguments;
2235 } 2235 }
2236 GLsync service_sync = 0; 2236 GLsync service_sync = 0;
2237 if (!group_->GetSyncServiceId(sync, &service_sync)) { 2237 if (!group_->GetSyncServiceId(sync, &service_sync)) {
2238 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glGetSynciv", "invalid sync id"); 2238 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glGetSynciv", "invalid sync id");
2239 return error::kNoError; 2239 return error::kNoError;
2240 } 2240 }
2241 glGetSynciv(service_sync, pname, num_values, nullptr, values); 2241 glGetSynciv(service_sync, pname, num_values, nullptr, values);
2242 GLenum error = LOCAL_PEEK_GL_ERROR("GetSynciv"); 2242 GLenum error = LOCAL_PEEK_GL_ERROR("GetSynciv");
2243 if (error == GL_NO_ERROR) { 2243 if (error == GL_NO_ERROR) {
2244 result->SetNumResults(num_values); 2244 result->SetNumResults(num_values);
2245 } 2245 }
2246 return error::kNoError; 2246 return error::kNoError;
2247 } 2247 }
2248 2248
(...skipping 3376 matching lines...) Expand 10 before | Expand all | Expand 10 after
5625 state_.enable_flags.cached_sample_alpha_to_one_ext = enabled; 5625 state_.enable_flags.cached_sample_alpha_to_one_ext = enabled;
5626 return true; 5626 return true;
5627 } 5627 }
5628 return false; 5628 return false;
5629 default: 5629 default:
5630 NOTREACHED(); 5630 NOTREACHED();
5631 return false; 5631 return false;
5632 } 5632 }
5633 } 5633 }
5634 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ 5634 #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') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698