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

Unified Diff: media/gpu/dxva_picture_buffer_win.cc

Issue 2462393002: Use texture ids passed from ARC as service ids in ArcGVDA (Closed)
Patch Set: Fixup DXVA Created 4 years, 1 month 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 | « chrome/gpu/arc_gpu_video_decode_accelerator.cc ('k') | media/gpu/dxva_video_decode_accelerator_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/dxva_picture_buffer_win.cc
diff --git a/media/gpu/dxva_picture_buffer_win.cc b/media/gpu/dxva_picture_buffer_win.cc
index 9518b5b75bbe42cdbcaae2c303545b3cd62e6d94..e0a37830907230183d5ee9a2de82ad200567ad33 100644
--- a/media/gpu/dxva_picture_buffer_win.cc
+++ b/media/gpu/dxva_picture_buffer_win.cc
@@ -113,6 +113,9 @@ bool DXVAPictureBuffer::BindSampleToTexture(
bool PbufferPictureBuffer::Initialize(const DXVAVideoDecodeAccelerator& decoder,
EGLConfig egl_config) {
+ RETURN_ON_FAILURE(!picture_buffer_.service_texture_ids().empty(),
+ "No service texture ids provided", false);
+
EGLDisplay egl_display = gl::GLSurfaceEGL::GetHardwareDisplay();
EGLint use_rgb = 1;
eglGetConfigAttrib(egl_display, egl_config, EGL_BIND_TO_TEXTURE_RGB,
@@ -349,6 +352,9 @@ EGLStreamPictureBuffer::~EGLStreamPictureBuffer() {
}
bool EGLStreamPictureBuffer::Initialize() {
+ RETURN_ON_FAILURE(picture_buffer_.service_texture_ids().size() >= 2,
+ "Not enough texture ids provided", false);
+
EGLDisplay egl_display = gl::GLSurfaceEGL::GetHardwareDisplay();
const EGLint stream_attributes[] = {
EGL_CONSUMER_LATENCY_USEC_KHR,
@@ -456,6 +462,9 @@ EGLStreamCopyPictureBuffer::~EGLStreamCopyPictureBuffer() {
bool EGLStreamCopyPictureBuffer::Initialize(
const DXVAVideoDecodeAccelerator& decoder) {
+ RETURN_ON_FAILURE(picture_buffer_.service_texture_ids().size() >= 2,
+ "Not enough texture ids provided", false);
+
EGLDisplay egl_display = gl::GLSurfaceEGL::GetHardwareDisplay();
const EGLint stream_attributes[] = {
EGL_CONSUMER_LATENCY_USEC_KHR,
« no previous file with comments | « chrome/gpu/arc_gpu_video_decode_accelerator.cc ('k') | media/gpu/dxva_video_decode_accelerator_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698