| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| 6 | 6 |
| 7 #include <limits.h> | 7 #include <limits.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <stdio.h> | 10 #include <stdio.h> |
| (...skipping 13133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13144 const gles2::cmds::WaitSyncTokenCHROMIUM& c = | 13144 const gles2::cmds::WaitSyncTokenCHROMIUM& c = |
| 13145 *static_cast<const gles2::cmds::WaitSyncTokenCHROMIUM*>(cmd_data); | 13145 *static_cast<const gles2::cmds::WaitSyncTokenCHROMIUM*>(cmd_data); |
| 13146 | 13146 |
| 13147 const gpu::CommandBufferNamespace kMinNamespaceId = | 13147 const gpu::CommandBufferNamespace kMinNamespaceId = |
| 13148 gpu::CommandBufferNamespace::INVALID; | 13148 gpu::CommandBufferNamespace::INVALID; |
| 13149 const gpu::CommandBufferNamespace kMaxNamespaceId = | 13149 const gpu::CommandBufferNamespace kMaxNamespaceId = |
| 13150 gpu::CommandBufferNamespace::NUM_COMMAND_BUFFER_NAMESPACES; | 13150 gpu::CommandBufferNamespace::NUM_COMMAND_BUFFER_NAMESPACES; |
| 13151 | 13151 |
| 13152 gpu::CommandBufferNamespace namespace_id = | 13152 gpu::CommandBufferNamespace namespace_id = |
| 13153 static_cast<gpu::CommandBufferNamespace>(c.namespace_id); | 13153 static_cast<gpu::CommandBufferNamespace>(c.namespace_id); |
| 13154 if ((namespace_id < static_cast<int32_t>(kMinNamespaceId)) && | 13154 if ((namespace_id < static_cast<int32_t>(kMinNamespaceId)) || |
| 13155 (namespace_id >= static_cast<int32_t>(kMaxNamespaceId))) { | 13155 (namespace_id >= static_cast<int32_t>(kMaxNamespaceId))) { |
| 13156 namespace_id = gpu::CommandBufferNamespace::INVALID; | 13156 namespace_id = gpu::CommandBufferNamespace::INVALID; |
| 13157 } | 13157 } |
| 13158 const CommandBufferId command_buffer_id = | 13158 const CommandBufferId command_buffer_id = |
| 13159 CommandBufferId::FromUnsafeValue(c.command_buffer_id()); | 13159 CommandBufferId::FromUnsafeValue(c.command_buffer_id()); |
| 13160 const uint64_t release = c.release_count(); | 13160 const uint64_t release = c.release_count(); |
| 13161 if (wait_fence_sync_callback_.is_null()) | 13161 if (wait_fence_sync_callback_.is_null()) |
| 13162 return error::kNoError; | 13162 return error::kNoError; |
| 13163 | 13163 |
| 13164 return wait_fence_sync_callback_.Run(namespace_id, command_buffer_id, release) | 13164 return wait_fence_sync_callback_.Run(namespace_id, command_buffer_id, release) |
| (...skipping 3170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16335 } | 16335 } |
| 16336 | 16336 |
| 16337 // Include the auto-generated part of this file. We split this because it means | 16337 // Include the auto-generated part of this file. We split this because it means |
| 16338 // we can easily edit the non-auto generated parts right here in this file | 16338 // we can easily edit the non-auto generated parts right here in this file |
| 16339 // instead of having to edit some template or the code generator. | 16339 // instead of having to edit some template or the code generator. |
| 16340 #include "base/macros.h" | 16340 #include "base/macros.h" |
| 16341 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 16341 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 16342 | 16342 |
| 16343 } // namespace gles2 | 16343 } // namespace gles2 |
| 16344 } // namespace gpu | 16344 } // namespace gpu |
| OLD | NEW |