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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 1548443002: Introducing gpu::CommandBufferId as a distinct, IdType<...>-based type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@type-safe-save-package-id-self-contained
Patch Set: Rebasing... Created 4 years, 10 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 (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
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
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
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.h ('k') | gpu/command_buffer/service/in_process_command_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698