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

Unified Diff: content/common/gpu/media/fake_video_decode_accelerator.cc

Issue 1832123002: Revert of Introduce GpuVideoDecodeAcceleratorFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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: content/common/gpu/media/fake_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/fake_video_decode_accelerator.cc b/content/common/gpu/media/fake_video_decode_accelerator.cc
index 48e7925b6143db4145dbcbf70e2f3e0a42943794..230c4f34c86e48bbf2f73e852a7297cc4ae6c3af 100644
--- a/content/common/gpu/media/fake_video_decode_accelerator.cc
+++ b/content/common/gpu/media/fake_video_decode_accelerator.cc
@@ -29,14 +29,17 @@
(media::limits::kMaxVideoFrames & 1u);
FakeVideoDecodeAccelerator::FakeVideoDecodeAccelerator(
- const gfx::Size& size,
- const MakeGLContextCurrentCallback& make_context_current_cb)
+ gfx::GLContext* gl,
+ gfx::Size size,
+ const base::Callback<bool(void)>& make_context_current)
: child_task_runner_(base::ThreadTaskRunnerHandle::Get()),
client_(NULL),
- make_context_current_cb_(make_context_current_cb),
+ make_context_current_(make_context_current),
+ gl_(gl),
frame_buffer_size_(size),
flushing_(false),
- weak_this_factory_(this) {}
+ weak_this_factory_(this) {
+}
FakeVideoDecodeAccelerator::~FakeVideoDecodeAccelerator() {
}
@@ -100,7 +103,7 @@
memset(black_data.get(),
0,
frame_buffer_size_.width() * frame_buffer_size_.height() * 4);
- if (!make_context_current_cb_.Run()) {
+ if (!make_context_current_.Run()) {
LOG(ERROR) << "ReusePictureBuffer(): could not make context current";
return;
}
@@ -159,10 +162,8 @@
delete this;
}
-bool FakeVideoDecodeAccelerator::TryToSetupDecodeOnSeparateThread(
- const base::WeakPtr<Client>& decode_client,
- const scoped_refptr<base::SingleThreadTaskRunner>& decode_task_runner) {
- return false;
+bool FakeVideoDecodeAccelerator::CanDecodeOnIOThread() {
+ return true;
}
void FakeVideoDecodeAccelerator::DoPictureReady() {
« no previous file with comments | « content/common/gpu/media/fake_video_decode_accelerator.h ('k') | content/common/gpu/media/gpu_video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698