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

Side by Side Diff: media/gpu/ipc/service/gpu_video_decode_accelerator.cc

Issue 2023343002: Migrate WaitableEvent to enum-based constructor in media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Patch Set: Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/gpu/ipc/service/gpu_video_decode_accelerator.h" 5 #include "media/gpu/ipc/service/gpu_video_decode_accelerator.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 }; 154 };
155 155
156 GpuVideoDecodeAccelerator::GpuVideoDecodeAccelerator( 156 GpuVideoDecodeAccelerator::GpuVideoDecodeAccelerator(
157 int32_t host_route_id, 157 int32_t host_route_id,
158 gpu::GpuCommandBufferStub* stub, 158 gpu::GpuCommandBufferStub* stub,
159 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) 159 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner)
160 : host_route_id_(host_route_id), 160 : host_route_id_(host_route_id),
161 stub_(stub), 161 stub_(stub),
162 texture_target_(0), 162 texture_target_(0),
163 textures_per_buffer_(0), 163 textures_per_buffer_(0),
164 filter_removed_(true, false), 164 filter_removed_(base::WaitableEvent::ResetPolicy::MANUAL,
165 base::WaitableEvent::InitialState::NOT_SIGNALED),
165 child_task_runner_(base::ThreadTaskRunnerHandle::Get()), 166 child_task_runner_(base::ThreadTaskRunnerHandle::Get()),
166 io_task_runner_(io_task_runner), 167 io_task_runner_(io_task_runner),
167 weak_factory_for_io_(this) { 168 weak_factory_for_io_(this) {
168 DCHECK(stub_); 169 DCHECK(stub_);
169 stub_->AddDestructionObserver(this); 170 stub_->AddDestructionObserver(this);
170 get_gl_context_cb_ = base::Bind(&GetGLContext, stub_->AsWeakPtr()); 171 get_gl_context_cb_ = base::Bind(&GetGLContext, stub_->AsWeakPtr());
171 make_context_current_cb_ = 172 make_context_current_cb_ =
172 base::Bind(&MakeDecoderContextCurrent, stub_->AsWeakPtr()); 173 base::Bind(&MakeDecoderContextCurrent, stub_->AsWeakPtr());
173 #if (defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_MACOSX) 174 #if (defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_MACOSX)
174 bind_image_cb_ = base::Bind(&BindImage, stub_->AsWeakPtr()); 175 bind_image_cb_ = base::Bind(&BindImage, stub_->AsWeakPtr());
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 GLenum target = texture_ref->texture()->target(); 513 GLenum target = texture_ref->texture()->target();
513 gpu::gles2::TextureManager* texture_manager = 514 gpu::gles2::TextureManager* texture_manager =
514 stub_->decoder()->GetContextGroup()->texture_manager(); 515 stub_->decoder()->GetContextGroup()->texture_manager();
515 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0)); 516 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0));
516 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); 517 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true);
517 } 518 }
518 uncleared_textures_.erase(it); 519 uncleared_textures_.erase(it);
519 } 520 }
520 521
521 } // namespace media 522 } // namespace media
OLDNEW
« no previous file with comments | « media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698