| 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 12819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12830 const gles2::cmds::WaitSyncTokenCHROMIUM& c = | 12830 const gles2::cmds::WaitSyncTokenCHROMIUM& c = |
| 12831 *static_cast<const gles2::cmds::WaitSyncTokenCHROMIUM*>(cmd_data); | 12831 *static_cast<const gles2::cmds::WaitSyncTokenCHROMIUM*>(cmd_data); |
| 12832 | 12832 |
| 12833 const gpu::CommandBufferNamespace kMinNamespaceId = | 12833 const gpu::CommandBufferNamespace kMinNamespaceId = |
| 12834 gpu::CommandBufferNamespace::INVALID; | 12834 gpu::CommandBufferNamespace::INVALID; |
| 12835 const gpu::CommandBufferNamespace kMaxNamespaceId = | 12835 const gpu::CommandBufferNamespace kMaxNamespaceId = |
| 12836 gpu::CommandBufferNamespace::NUM_COMMAND_BUFFER_NAMESPACES; | 12836 gpu::CommandBufferNamespace::NUM_COMMAND_BUFFER_NAMESPACES; |
| 12837 | 12837 |
| 12838 gpu::CommandBufferNamespace namespace_id = | 12838 gpu::CommandBufferNamespace namespace_id = |
| 12839 static_cast<gpu::CommandBufferNamespace>(c.namespace_id); | 12839 static_cast<gpu::CommandBufferNamespace>(c.namespace_id); |
| 12840 if ((namespace_id < static_cast<int32_t>(kMinNamespaceId)) && | 12840 if ((namespace_id < static_cast<int32_t>(kMinNamespaceId)) || |
| 12841 (namespace_id >= static_cast<int32_t>(kMaxNamespaceId))) { | 12841 (namespace_id >= static_cast<int32_t>(kMaxNamespaceId))) { |
| 12842 namespace_id = gpu::CommandBufferNamespace::INVALID; | 12842 namespace_id = gpu::CommandBufferNamespace::INVALID; |
| 12843 } | 12843 } |
| 12844 const CommandBufferId command_buffer_id = | 12844 const CommandBufferId command_buffer_id = |
| 12845 CommandBufferId::FromUnsafeValue(c.command_buffer_id()); | 12845 CommandBufferId::FromUnsafeValue(c.command_buffer_id()); |
| 12846 const uint64_t release = c.release_count(); | 12846 const uint64_t release = c.release_count(); |
| 12847 if (wait_fence_sync_callback_.is_null()) | 12847 if (wait_fence_sync_callback_.is_null()) |
| 12848 return error::kNoError; | 12848 return error::kNoError; |
| 12849 | 12849 |
| 12850 return wait_fence_sync_callback_.Run(namespace_id, command_buffer_id, release) | 12850 return wait_fence_sync_callback_.Run(namespace_id, command_buffer_id, release) |
| (...skipping 3097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15948 } | 15948 } |
| 15949 | 15949 |
| 15950 // Include the auto-generated part of this file. We split this because it means | 15950 // Include the auto-generated part of this file. We split this because it means |
| 15951 // we can easily edit the non-auto generated parts right here in this file | 15951 // we can easily edit the non-auto generated parts right here in this file |
| 15952 // instead of having to edit some template or the code generator. | 15952 // instead of having to edit some template or the code generator. |
| 15953 #include "base/macros.h" | 15953 #include "base/macros.h" |
| 15954 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 15954 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 15955 | 15955 |
| 15956 } // namespace gles2 | 15956 } // namespace gles2 |
| 15957 } // namespace gpu | 15957 } // namespace gpu |
| OLD | NEW |