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

Unified Diff: content/common/gpu/gpu_command_buffer_stub.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.h ('k') | content/common/id_type.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_command_buffer_stub.cc
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index d0ed3d1c42908ca3b99bd7de42dc60870fad4c93..61512aaffa1cf9591157723301e12993ba948bc1 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -156,8 +156,9 @@ DevToolsChannelData::CreateForChannel(GpuChannel* channel) {
return new DevToolsChannelData(res.release());
}
-uint64_t GetCommandBufferID(int channel_id, int32_t route_id) {
- return (static_cast<uint64_t>(channel_id) << 32) | route_id;
+gpu::CommandBufferId GetCommandBufferID(int channel_id, int32_t route_id) {
+ return gpu::CommandBufferId::FromUnsafeValue(
+ (static_cast<uint64_t>(channel_id) << 32) | route_id);
}
gfx::GLSurface::Format GetSurfaceFormatFromAttribute(
@@ -227,8 +228,8 @@ GpuCommandBufferStub::GpuCommandBufferStub(
attrib_parser.bind_generates_resource);
} else {
context_group_ = new gpu::gles2::ContextGroup(
- mailbox_manager,
- new GpuCommandBufferMemoryTracker(channel, command_buffer_id_),
+ mailbox_manager, new GpuCommandBufferMemoryTracker(
+ channel, command_buffer_id_.GetUnsafeValue()),
channel_->gpu_channel_manager()->shader_translator_cache(),
channel_->gpu_channel_manager()->framebuffer_completeness_cache(), NULL,
subscription_ref_set, pending_valuebuffer_state,
@@ -914,7 +915,7 @@ void GpuCommandBufferStub::OnCreateVideoEncoder(
void GpuCommandBufferStub::PullTextureUpdates(
gpu::CommandBufferNamespace namespace_id,
- uint64_t command_buffer_id,
+ gpu::CommandBufferId command_buffer_id,
uint32_t release) {
gpu::gles2::MailboxManager* mailbox_manager =
context_group_->mailbox_manager();
@@ -981,7 +982,7 @@ void GpuCommandBufferStub::OnFenceSyncRelease(uint64_t release) {
bool GpuCommandBufferStub::OnWaitFenceSync(
gpu::CommandBufferNamespace namespace_id,
- uint64_t command_buffer_id,
+ gpu::CommandBufferId command_buffer_id,
uint64_t release) {
DCHECK(!waiting_for_sync_point_);
DCHECK(scheduler_->scheduled());
@@ -1015,7 +1016,7 @@ bool GpuCommandBufferStub::OnWaitFenceSync(
void GpuCommandBufferStub::OnWaitFenceSyncCompleted(
gpu::CommandBufferNamespace namespace_id,
- uint64_t command_buffer_id,
+ gpu::CommandBufferId command_buffer_id,
uint64_t release) {
DCHECK(waiting_for_sync_point_);
TRACE_EVENT_ASYNC_END1("gpu", "WaitFenceSync", this, "GpuCommandBufferStub",
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.h ('k') | content/common/id_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698