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

Unified Diff: gpu/ipc/service/gpu_channel_manager.cc

Issue 2722883002: gpu: Allow waiting on sync tokens without sync token client. (Closed)
Patch Set: review Created 3 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 | « gpu/ipc/service/gpu_channel_manager.h ('k') | gpu/ipc/service/gpu_channel_test_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/service/gpu_channel_manager.cc
diff --git a/gpu/ipc/service/gpu_channel_manager.cc b/gpu/ipc/service/gpu_channel_manager.cc
index 2ca665f9803b5aa46132d4a6c01211f8695005af..a6a099c63003f08250e56b31fa7c6635aaca2171 100644
--- a/gpu/ipc/service/gpu_channel_manager.cc
+++ b/gpu/ipc/service/gpu_channel_manager.cc
@@ -64,8 +64,6 @@ GpuChannelManager::GpuChannelManager(
mailbox_manager_(gles2::MailboxManager::Create(gpu_preferences)),
gpu_memory_manager_(this),
sync_point_manager_(sync_point_manager),
- sync_point_client_waiter_(
- sync_point_manager->CreateSyncPointClientWaiter()),
gpu_memory_buffer_factory_(gpu_memory_buffer_factory),
gpu_feature_info_(gpu_feature_info),
exiting_for_lost_context_(false),
@@ -174,21 +172,13 @@ void GpuChannelManager::DestroyGpuMemoryBuffer(
gfx::GpuMemoryBufferId id,
int client_id,
const SyncToken& sync_token) {
- if (sync_token.HasData()) {
- scoped_refptr<SyncPointClientState> release_state =
- sync_point_manager()->GetSyncPointClientState(
- sync_token.namespace_id(), sync_token.command_buffer_id());
- if (release_state) {
- sync_point_client_waiter_->WaitOutOfOrder(
- release_state.get(), sync_token.release_count(),
+ if (!sync_point_manager_->WaitOutOfOrder(
+ sync_token,
base::Bind(&GpuChannelManager::InternalDestroyGpuMemoryBuffer,
- base::Unretained(this), id, client_id));
- return;
- }
+ base::Unretained(this), id, client_id))) {
+ // No sync token or invalid sync token, destroy immediately.
+ InternalDestroyGpuMemoryBuffer(id, client_id);
}
-
- // No sync token or invalid sync token, destroy immediately.
- InternalDestroyGpuMemoryBuffer(id, client_id);
}
void GpuChannelManager::PopulateShaderCache(const std::string& program_proto) {
« no previous file with comments | « gpu/ipc/service/gpu_channel_manager.h ('k') | gpu/ipc/service/gpu_channel_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698