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

Unified Diff: content/common/gpu/gpu_channel_manager.cc

Issue 1414793018: Revert of Converted video frame and image callbacks to use new sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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_channel_manager.h ('k') | content/common/gpu/gpu_command_buffer_stub.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_channel_manager.cc
diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc
index 3f603a61a03248132ba69c0b7eb9a535032439d6..4d9c43510fa8e8c76f45e98630e6ff273006d6f1 100644
--- a/content/common/gpu/gpu_channel_manager.cc
+++ b/content/common/gpu/gpu_channel_manager.cc
@@ -60,7 +60,6 @@
this,
GpuMemoryManager::kDefaultMaxSurfacesWithFrontbufferSoftLimit),
sync_point_manager_(sync_point_manager),
- sync_point_client_waiter_(new gpu::SyncPointClientWaiter),
gpu_memory_buffer_factory_(gpu_memory_buffer_factory),
weak_factory_(this) {
DCHECK(task_runner);
@@ -228,22 +227,17 @@
void GpuChannelManager::OnDestroyGpuMemoryBuffer(
gfx::GpuMemoryBufferId id,
int client_id,
- const gpu::SyncToken& sync_token) {
- if (sync_token.HasData()) {
- scoped_refptr<gpu::SyncPointClientState> release_state =
- sync_point_manager()->GetSyncPointClientState(
- sync_token.namespace_id(), sync_token.command_buffer_id());
- if (release_state) {
- sync_point_client_waiter_->Wait(
- release_state.get(), sync_token.release_count(),
- base::Bind(&GpuChannelManager::DestroyGpuMemoryBuffer,
- base::Unretained(this), id, client_id));
- return;
- }
- }
-
- // No sync token or invalid sync token, destroy immediately.
- DestroyGpuMemoryBuffer(id, client_id);
+ int32 sync_point) {
+ if (!sync_point) {
+ DestroyGpuMemoryBuffer(id, client_id);
+ } else {
+ sync_point_manager()->AddSyncPointCallback(
+ sync_point,
+ base::Bind(&GpuChannelManager::DestroyGpuMemoryBuffer,
+ base::Unretained(this),
+ id,
+ client_id));
+ }
}
void GpuChannelManager::OnUpdateValueState(
« no previous file with comments | « content/common/gpu/gpu_channel_manager.h ('k') | content/common/gpu/gpu_command_buffer_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698