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

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

Issue 128123002: gpu: Early return GpuCommandBufferStub::OnWaitSyncPoint() if the sync point is retired. (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Fix nits Created 6 years, 11 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 | « no previous file | content/common/gpu/sync_point_manager.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 44eaf90cc85fb3634f118576f716f868d6d02ccf..181edc57825a2f89e435e74087a5e2518d2c32cc 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -768,13 +768,16 @@ void GpuCommandBufferStub::OnRetireSyncPoint(uint32 sync_point) {
}
bool GpuCommandBufferStub::OnWaitSyncPoint(uint32 sync_point) {
+ GpuChannelManager* manager = channel_->gpu_channel_manager();
+ if (manager->sync_point_manager()->IsSyncPointRetired(sync_point))
+ return true;
+
if (sync_point_wait_count_ == 0) {
TRACE_EVENT_ASYNC_BEGIN1("gpu", "WaitSyncPoint", this,
"GpuCommandBufferStub", this);
}
scheduler_->SetScheduled(false);
++sync_point_wait_count_;
- GpuChannelManager* manager = channel_->gpu_channel_manager();
manager->sync_point_manager()->AddSyncPointCallback(
sync_point,
base::Bind(&GpuCommandBufferStub::OnSyncPointRetired,
« no previous file with comments | « no previous file | content/common/gpu/sync_point_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698