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

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: 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 12599 matching lines...) Expand 10 before | Expand all | Expand 10 after
12610 const gpu::CommandBufferNamespace kMinNamespaceId = 12610 const gpu::CommandBufferNamespace kMinNamespaceId =
12611 gpu::CommandBufferNamespace::INVALID; 12611 gpu::CommandBufferNamespace::INVALID;
12612 const gpu::CommandBufferNamespace kMaxNamespaceId = 12612 const gpu::CommandBufferNamespace kMaxNamespaceId =
12613 gpu::CommandBufferNamespace::NUM_COMMAND_BUFFER_NAMESPACES; 12613 gpu::CommandBufferNamespace::NUM_COMMAND_BUFFER_NAMESPACES;
12614 12614
12615 const gpu::CommandBufferNamespace namespace_id = 12615 const gpu::CommandBufferNamespace namespace_id =
12616 ((c.namespace_id >= static_cast<int32_t>(kMinNamespaceId)) && 12616 ((c.namespace_id >= static_cast<int32_t>(kMinNamespaceId)) &&
12617 (c.namespace_id < static_cast<int32_t>(kMaxNamespaceId))) 12617 (c.namespace_id < static_cast<int32_t>(kMaxNamespaceId)))
12618 ? static_cast<gpu::CommandBufferNamespace>(c.namespace_id) 12618 ? static_cast<gpu::CommandBufferNamespace>(c.namespace_id)
12619 : gpu::CommandBufferNamespace::INVALID; 12619 : gpu::CommandBufferNamespace::INVALID;
12620 const uint64_t command_buffer_id = c.command_buffer_id(); 12620 const CommandBufferId command_buffer_id =
12621 CommandBufferId::FromUnsafeValue(c.command_buffer_id());
12621 const uint64_t release = c.release_count(); 12622 const uint64_t release = c.release_count();
12622 if (wait_fence_sync_callback_.is_null()) 12623 if (wait_fence_sync_callback_.is_null())
12623 return error::kNoError; 12624 return error::kNoError;
12624 12625
12625 return wait_fence_sync_callback_.Run(namespace_id, command_buffer_id, release) 12626 return wait_fence_sync_callback_.Run(namespace_id, command_buffer_id, release)
12626 ? error::kNoError 12627 ? error::kNoError
12627 : error::kDeferCommandUntilLater; 12628 : error::kDeferCommandUntilLater;
12628 } 12629 }
12629 12630
12630 error::Error GLES2DecoderImpl::HandleDiscardBackbufferCHROMIUM( 12631 error::Error GLES2DecoderImpl::HandleDiscardBackbufferCHROMIUM(
(...skipping 2953 matching lines...) Expand 10 before | Expand all | Expand 10 after
15584 } 15585 }
15585 15586
15586 // Include the auto-generated part of this file. We split this because it means 15587 // Include the auto-generated part of this file. We split this because it means
15587 // we can easily edit the non-auto generated parts right here in this file 15588 // we can easily edit the non-auto generated parts right here in this file
15588 // instead of having to edit some template or the code generator. 15589 // instead of having to edit some template or the code generator.
15589 #include "base/macros.h" 15590 #include "base/macros.h"
15590 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 15591 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
15591 15592
15592 } // namespace gles2 15593 } // namespace gles2
15593 } // namespace gpu 15594 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698