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

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

Issue 137023008: Add support for Tegra V4L2 VDA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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/v4l2_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/v4l2_video_decode_accelerator.cc b/content/common/gpu/media/v4l2_video_decode_accelerator.cc
index 992e6afe61942cad230fdd6ada7991d48cba7a2b..eaff117e2033e67fdbe85f76867ae7b09d01ac4f 100644
--- a/content/common/gpu/media/v4l2_video_decode_accelerator.cc
+++ b/content/common/gpu/media/v4l2_video_decode_accelerator.cc
@@ -357,9 +357,8 @@ void V4L2VideoDecodeAccelerator::AssignPictureBuffers(
attrs[13] = output_record.fds[1];
attrs[15] = 0;
attrs[17] = frame_buffer_size_.width();
-
- EGLImageKHR egl_image = eglCreateImageKHR(
- egl_display_, EGL_NO_CONTEXT, EGL_LINUX_DMA_BUF_EXT, NULL, attrs);
+ EGLImageKHR egl_image = device_->CreateEGLImage(
+ egl_display_, attrs, buffers[i].texture_id(), i);
if (egl_image == EGL_NO_IMAGE_KHR) {
DLOG(ERROR) << "AssignPictureBuffers(): could not create EGLImageKHR";
// Ownership of EGLImages allocated in previous iterations of this loop
@@ -369,9 +368,6 @@ void V4L2VideoDecodeAccelerator::AssignPictureBuffers(
return;
}
- glBindTexture(GL_TEXTURE_EXTERNAL_OES, buffers[i].texture_id());
- glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, egl_image);
-
output_record.egl_image = egl_image;
output_record.picture_id = buffers[i].id();
free_output_buffers_.push(i);
@@ -1758,7 +1754,7 @@ bool V4L2VideoDecodeAccelerator::CreateOutputBuffers() {
client_,
output_buffer_map_.size(),
frame_buffer_size_,
- GL_TEXTURE_EXTERNAL_OES));
+ device_->GetTextureTarget()));
// Wait for the client to call AssignPictureBuffers() on the Child thread.
// We do this, because if we continue decoding without finishing buffer

Powered by Google App Engine
This is Rietveld 408576698