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

Side by Side Diff: gpu/ipc/service/gpu_command_buffer_stub.cc

Issue 2550583002: gpu: Thread-safe command buffer state lookup. (Closed)
Patch Set: jbauman's review Created 4 years 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
« no previous file with comments | « gpu/ipc/in_process_command_buffer.cc ('k') | ppapi/proxy/ppapi_command_buffer_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ipc/service/gpu_command_buffer_stub.h" 5 #include "gpu/ipc/service/gpu_command_buffer_stub.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 } 940 }
941 941
942 gles2::MailboxManager* mailbox_manager = 942 gles2::MailboxManager* mailbox_manager =
943 context_group_->mailbox_manager(); 943 context_group_->mailbox_manager();
944 if (mailbox_manager->UsesSync() && MakeCurrent()) { 944 if (mailbox_manager->UsesSync() && MakeCurrent()) {
945 SyncToken sync_token(CommandBufferNamespace::GPU_IO, 0, 945 SyncToken sync_token(CommandBufferNamespace::GPU_IO, 0,
946 command_buffer_id_, release); 946 command_buffer_id_, release);
947 mailbox_manager->PushTextureUpdates(sync_token); 947 mailbox_manager->PushTextureUpdates(sync_token);
948 } 948 }
949 949
950 command_buffer_->SetReleaseCount(release);
950 sync_point_client_->ReleaseFenceSync(release); 951 sync_point_client_->ReleaseFenceSync(release);
951 } 952 }
952 953
953 void GpuCommandBufferStub::OnDescheduleUntilFinished() { 954 void GpuCommandBufferStub::OnDescheduleUntilFinished() {
954 DCHECK(executor_->scheduled()); 955 DCHECK(executor_->scheduled());
955 DCHECK(executor_->HasPollingWork()); 956 DCHECK(executor_->HasPollingWork());
956 957
957 executor_->SetScheduled(false); 958 executor_->SetScheduled(false);
958 channel_->OnStreamRescheduled(stream_id_, false); 959 channel_->OnStreamRescheduled(stream_id_, false);
959 } 960 }
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1144 command_buffer_->GetLastState().error == error::kLostContext) 1145 command_buffer_->GetLastState().error == error::kLostContext)
1145 return; 1146 return;
1146 1147
1147 command_buffer_->SetContextLostReason(error::kUnknown); 1148 command_buffer_->SetContextLostReason(error::kUnknown);
1148 if (decoder_) 1149 if (decoder_)
1149 decoder_->MarkContextLost(error::kUnknown); 1150 decoder_->MarkContextLost(error::kUnknown);
1150 command_buffer_->SetParseError(error::kLostContext); 1151 command_buffer_->SetParseError(error::kLostContext);
1151 } 1152 }
1152 1153
1153 } // namespace gpu 1154 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/in_process_command_buffer.cc ('k') | ppapi/proxy/ppapi_command_buffer_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698