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

Unified Diff: gpu/command_buffer/service/in_process_command_buffer.cc

Issue 2023333002: Migrate WaitableEvent to enum-based constructor in gpu/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Patch Set: 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 | « gpu/command_buffer/common/gles2_cmd_format_test.cc ('k') | gpu/command_buffer/tests/egl_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/in_process_command_buffer.cc
diff --git a/gpu/command_buffer/service/in_process_command_buffer.cc b/gpu/command_buffer/service/in_process_command_buffer.cc
index ad390a937986099b237619505d8246ef7c6c4769..2d8ea6c72dd2641ef632947e3e826e1a9da33ed9 100644
--- a/gpu/command_buffer/service/in_process_command_buffer.cc
+++ b/gpu/command_buffer/service/in_process_command_buffer.cc
@@ -205,9 +205,11 @@ InProcessCommandBuffer::InProcessCommandBuffer(
gpu_memory_buffer_manager_(nullptr),
next_fence_sync_release_(1),
flushed_fence_sync_release_(0),
- flush_event_(false, false),
+ flush_event_(base::WaitableEvent::ResetPolicy::AUTOMATIC,
+ base::WaitableEvent::InitialState::NOT_SIGNALED),
service_(GetInitialService(service)),
- fence_sync_wait_event_(false, false),
+ fence_sync_wait_event_(base::WaitableEvent::ResetPolicy::AUTOMATIC,
+ base::WaitableEvent::InitialState::NOT_SIGNALED),
client_thread_weak_ptr_factory_(this),
gpu_thread_weak_ptr_factory_(this) {
DCHECK(service_.get());
@@ -282,7 +284,9 @@ bool InProcessCommandBuffer::Initialize(
base::Unretained(this),
params);
- base::WaitableEvent completion(true, false);
+ base::WaitableEvent completion(
+ base::WaitableEvent::ResetPolicy::MANUAL,
+ base::WaitableEvent::InitialState::NOT_SIGNALED);
bool result = false;
QueueTask(
base::Bind(&RunTaskWithResult<bool>, init_task, &result, &completion));
@@ -431,7 +435,9 @@ void InProcessCommandBuffer::Destroy() {
CheckSequencedThread();
client_thread_weak_ptr_factory_.InvalidateWeakPtrs();
gpu_control_client_ = nullptr;
- base::WaitableEvent completion(true, false);
+ base::WaitableEvent completion(
+ base::WaitableEvent::ResetPolicy::MANUAL,
+ base::WaitableEvent::InitialState::NOT_SIGNALED);
bool result = false;
base::Callback<bool(void)> destroy_task = base::Bind(
&InProcessCommandBuffer::DestroyOnGpuThread, base::Unretained(this));
@@ -611,7 +617,9 @@ void InProcessCommandBuffer::SetGetBuffer(int32_t shm_id) {
if (last_state_.error != gpu::error::kNoError)
return;
- base::WaitableEvent completion(true, false);
+ base::WaitableEvent completion(
+ base::WaitableEvent::ResetPolicy::MANUAL,
+ base::WaitableEvent::InitialState::NOT_SIGNALED);
base::Closure task =
base::Bind(&InProcessCommandBuffer::SetGetBufferOnGpuThread,
base::Unretained(this), shm_id, &completion);
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_format_test.cc ('k') | gpu/command_buffer/tests/egl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698