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

Unified Diff: components/mus/gles2/command_buffer_local.cc

Issue 1331843005: Implemented new fence syncs which replaces the old sync points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Forgot to remove cmd buffer helper functios and replace with gpu control ones Created 5 years, 3 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
Index: components/mus/gles2/command_buffer_local.cc
diff --git a/components/mus/gles2/command_buffer_local.cc b/components/mus/gles2/command_buffer_local.cc
index 27442cb3834f78d4e51ea8d1198a36339121a765..bd89db6aa309abdd1d5e9820b0e5b0779084700b 100644
--- a/components/mus/gles2/command_buffer_local.cc
+++ b/components/mus/gles2/command_buffer_local.cc
@@ -32,6 +32,7 @@ CommandBufferLocal::CommandBufferLocal(CommandBufferLocalClient* client,
: widget_(widget),
gpu_state_(gpu_state),
client_(client),
+ next_fence_sync_release_(1),
weak_factory_(this) {}
CommandBufferLocal::~CommandBufferLocal() {
@@ -220,6 +221,18 @@ uint64_t CommandBufferLocal::GetCommandBufferID() const {
return 0;
}
+uint32_t CommandBufferLocal::GenerateFenceSyncRelease() {
+ return next_fence_sync_release_++;
+}
+
+bool CommandBufferLocal::IsFenceSyncRelease(uint32_t release) {
+ return release > 0 && release < next_fence_sync_release_;
+}
+
+bool CommandBufferLocal::IsFenceSyncFlushed(uint32_t release) {
+ return IsFenceSyncRelease(release);
+}
+
void CommandBufferLocal::PumpCommands() {
if (!decoder_->MakeCurrent()) {
command_buffer_->SetContextLostReason(decoder_->GetContextLostReason());

Powered by Google App Engine
This is Rietveld 408576698