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

Unified Diff: media/gpu/vaapi_video_decode_accelerator.cc

Issue 2019333004: Revert of Plumb decoded video pixel format from GPU process to renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 | « media/gpu/vaapi_video_decode_accelerator.h ('k') | media/gpu/video_decode_accelerator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/vaapi_video_decode_accelerator.cc
diff --git a/media/gpu/vaapi_video_decode_accelerator.cc b/media/gpu/vaapi_video_decode_accelerator.cc
index f5cd0b2a6d701c573c43461ebe67b65ae113743f..cbf1796db167891402ee265e68414fc4f76f3b61 100644
--- a/media/gpu/vaapi_video_decode_accelerator.cc
+++ b/media/gpu/vaapi_video_decode_accelerator.cc
@@ -637,18 +637,6 @@
TryFinishSurfaceSetChange();
}
-static VideoPixelFormat BufferFormatToVideoPixelFormat(
- gfx::BufferFormat format) {
- switch (format) {
- case gfx::BufferFormat::BGRA_8888:
- return PIXEL_FORMAT_ARGB;
-
- default:
- LOG(FATAL) << "Add more cases as needed";
- return PIXEL_FORMAT_UNKNOWN;
- }
-}
-
void VaapiVideoDecodeAccelerator::TryFinishSurfaceSetChange() {
DCHECK_EQ(message_loop_, base::MessageLoop::current());
@@ -688,12 +676,10 @@
DVLOG(1) << "Requesting " << requested_num_pics_
<< " pictures of size: " << requested_pic_size_.ToString();
- VideoPixelFormat format =
- BufferFormatToVideoPixelFormat(kOutputPictureFormat);
message_loop_->PostTask(
- FROM_HERE, base::Bind(&Client::ProvidePictureBuffers, client_,
- requested_num_pics_, format, 1, requested_pic_size_,
- VaapiPicture::GetGLTextureTarget()));
+ FROM_HERE,
+ base::Bind(&Client::ProvidePictureBuffers, client_, requested_num_pics_,
+ 1, requested_pic_size_, VaapiPicture::GetGLTextureTarget()));
}
void VaapiVideoDecodeAccelerator::Decode(
@@ -1056,6 +1042,22 @@
const base::WeakPtr<Client>& decode_client,
const scoped_refptr<base::SingleThreadTaskRunner>& decode_task_runner) {
return false;
+}
+
+static VideoPixelFormat BufferFormatToVideoPixelFormat(
+ gfx::BufferFormat format) {
+ switch (format) {
+ case gfx::BufferFormat::BGRA_8888:
+ return PIXEL_FORMAT_ARGB;
+
+ default:
+ LOG(FATAL) << "Add more cases as needed";
+ return PIXEL_FORMAT_UNKNOWN;
+ }
+}
+
+VideoPixelFormat VaapiVideoDecodeAccelerator::GetOutputFormat() const {
+ return BufferFormatToVideoPixelFormat(kOutputPictureFormat);
}
bool VaapiVideoDecodeAccelerator::DecodeSurface(
« no previous file with comments | « media/gpu/vaapi_video_decode_accelerator.h ('k') | media/gpu/video_decode_accelerator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698