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

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

Issue 2028193002: Migrate WaitableEvent to enum-based constructor in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Patch Set: rm comment explaining true/false Created 4 years, 7 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 | « components/leveldb/leveldb_mojo_proxy.cc ('k') | components/mus/gles2/gpu_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4e12586219d00edb34f7748220919091eb1412bf..7ad0d5847ffdf191f1e8c13b455219669322b00b 100644
--- a/components/mus/gles2/command_buffer_local.cc
+++ b/components/mus/gles2/command_buffer_local.cc
@@ -101,7 +101,8 @@ void CommandBufferLocal::Destroy() {
// too. Additionally we need to make sure we are deleted before returning,
// otherwise we may attempt to use the AcceleratedWidget which has since been
// destroyed.
- base::WaitableEvent event(true, false);
+ base::WaitableEvent event(base::WaitableEvent::ResetPolicy::MANUAL,
+ base::WaitableEvent::InitialState::NOT_SIGNALED);
gpu_state_->command_buffer_task_runner()->PostTask(
driver_.get(), base::Bind(&CommandBufferLocal::DeleteOnGpuThread,
base::Unretained(this), &event));
@@ -111,7 +112,8 @@ void CommandBufferLocal::Destroy() {
bool CommandBufferLocal::Initialize() {
DCHECK(CalledOnValidThread());
base::ThreadRestrictions::ScopedAllowWait allow_wait;
- base::WaitableEvent event(true, false);
+ base::WaitableEvent event(base::WaitableEvent::ResetPolicy::MANUAL,
+ base::WaitableEvent::InitialState::NOT_SIGNALED);
bool result = false;
gpu_state_->command_buffer_task_runner()->task_runner()->PostTask(
FROM_HERE,
@@ -431,7 +433,8 @@ void CommandBufferLocal::TryUpdateState() {
void CommandBufferLocal::MakeProgressAndUpdateState() {
base::ThreadRestrictions::ScopedAllowWait allow_wait;
- base::WaitableEvent event(true, false);
+ base::WaitableEvent event(base::WaitableEvent::ResetPolicy::MANUAL,
+ base::WaitableEvent::InitialState::NOT_SIGNALED);
gpu::CommandBuffer::State state;
gpu_state_->command_buffer_task_runner()->PostTask(
driver_.get(),
« no previous file with comments | « components/leveldb/leveldb_mojo_proxy.cc ('k') | components/mus/gles2/gpu_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698