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 12652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12663 const gpu::CommandBufferNamespace kMinNamespaceId = | 12663 const gpu::CommandBufferNamespace kMinNamespaceId = |
12664 gpu::CommandBufferNamespace::INVALID; | 12664 gpu::CommandBufferNamespace::INVALID; |
12665 const gpu::CommandBufferNamespace kMaxNamespaceId = | 12665 const gpu::CommandBufferNamespace kMaxNamespaceId = |
12666 gpu::CommandBufferNamespace::NUM_COMMAND_BUFFER_NAMESPACES; | 12666 gpu::CommandBufferNamespace::NUM_COMMAND_BUFFER_NAMESPACES; |
12667 | 12667 |
12668 const gpu::CommandBufferNamespace namespace_id = | 12668 const gpu::CommandBufferNamespace namespace_id = |
12669 ((c.namespace_id >= static_cast<int32_t>(kMinNamespaceId)) && | 12669 ((c.namespace_id >= static_cast<int32_t>(kMinNamespaceId)) && |
12670 (c.namespace_id < static_cast<int32_t>(kMaxNamespaceId))) | 12670 (c.namespace_id < static_cast<int32_t>(kMaxNamespaceId))) |
12671 ? static_cast<gpu::CommandBufferNamespace>(c.namespace_id) | 12671 ? static_cast<gpu::CommandBufferNamespace>(c.namespace_id) |
12672 : gpu::CommandBufferNamespace::INVALID; | 12672 : gpu::CommandBufferNamespace::INVALID; |
12673 const uint64_t command_buffer_id = c.command_buffer_id(); | 12673 const CommandBufferId command_buffer_id = |
| 12674 CommandBufferId::FromUnsafeValue(c.command_buffer_id()); |
12674 const uint64_t release = c.release_count(); | 12675 const uint64_t release = c.release_count(); |
12675 if (wait_fence_sync_callback_.is_null()) | 12676 if (wait_fence_sync_callback_.is_null()) |
12676 return error::kNoError; | 12677 return error::kNoError; |
12677 | 12678 |
12678 return wait_fence_sync_callback_.Run(namespace_id, command_buffer_id, release) | 12679 return wait_fence_sync_callback_.Run(namespace_id, command_buffer_id, release) |
12679 ? error::kNoError | 12680 ? error::kNoError |
12680 : error::kDeferCommandUntilLater; | 12681 : error::kDeferCommandUntilLater; |
12681 } | 12682 } |
12682 | 12683 |
12683 error::Error GLES2DecoderImpl::HandleDiscardBackbufferCHROMIUM( | 12684 error::Error GLES2DecoderImpl::HandleDiscardBackbufferCHROMIUM( |
(...skipping 2970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15654 } | 15655 } |
15655 | 15656 |
15656 // Include the auto-generated part of this file. We split this because it means | 15657 // Include the auto-generated part of this file. We split this because it means |
15657 // we can easily edit the non-auto generated parts right here in this file | 15658 // we can easily edit the non-auto generated parts right here in this file |
15658 // instead of having to edit some template or the code generator. | 15659 // instead of having to edit some template or the code generator. |
15659 #include "base/macros.h" | 15660 #include "base/macros.h" |
15660 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 15661 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
15661 | 15662 |
15662 } // namespace gles2 | 15663 } // namespace gles2 |
15663 } // namespace gpu | 15664 } // namespace gpu |
OLD | NEW |