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

Unified Diff: mojo/gles2/command_buffer_client_impl.cc

Issue 1469873003: Allow wait in CommandBufferClientImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/gles2/command_buffer_client_impl.cc
diff --git a/mojo/gles2/command_buffer_client_impl.cc b/mojo/gles2/command_buffer_client_impl.cc
index c6990b26e3f3bc16b2e4907a94489ac4e7c7f0ae..e2191235abbdb752af985fbe45129840dd56b529 100644
--- a/mojo/gles2/command_buffer_client_impl.cc
+++ b/mojo/gles2/command_buffer_client_impl.cc
@@ -56,12 +56,14 @@ class CommandBufferClientImpl::SyncClientImpl
: initialized_successfully_(false), binding_(this, ptr, async_waiter) {}
bool WaitForInitialization() {
+ base::ThreadRestrictions::ScopedAllowWait wait;
if (!binding_.WaitForIncomingMethodCall())
return false;
return initialized_successfully_;
}
mus::mojom::CommandBufferStatePtr WaitForProgress() {
+ base::ThreadRestrictions::ScopedAllowWait wait;
if (!binding_.WaitForIncomingMethodCall())
return mus::mojom::CommandBufferStatePtr();
return command_buffer_state_.Pass();
@@ -100,6 +102,7 @@ class CommandBufferClientImpl::SyncPointClientImpl
: sync_point_(0u), binding_(this, ptr, async_waiter) {}
uint32_t WaitForInsertSyncPoint() {
+ base::ThreadRestrictions::ScopedAllowWait wait;
if (!binding_.WaitForIncomingMethodCall())
return 0u;
uint32_t result = sync_point_;
@@ -142,8 +145,6 @@ CommandBufferClientImpl::CommandBufferClientImpl(
CommandBufferClientImpl::~CommandBufferClientImpl() {}
bool CommandBufferClientImpl::Initialize() {
- base::ThreadRestrictions::ScopedAllowWait wait;
-
const size_t kSharedStateSize = sizeof(gpu::CommandBufferSharedState);
void* memory = NULL;
mojo::ScopedSharedBufferHandle duped;
@@ -332,7 +333,6 @@ int32_t CommandBufferClientImpl::CreateGpuMemoryBufferImage(
}
uint32_t CommandBufferClientImpl::InsertSyncPoint() {
- base::ThreadRestrictions::ScopedAllowWait wait;
command_buffer_->InsertSyncPoint(true);
return sync_point_client_impl_->WaitForInsertSyncPoint();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698