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

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

Issue 10826238: Ensure that the correct open gl context is made current before attempting to write to the open (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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/dxva_video_decode_accelerator.cc
===================================================================
--- content/common/gpu/media/dxva_video_decode_accelerator.cc (revision 150635)
+++ content/common/gpu/media/dxva_video_decode_accelerator.cc (working copy)
@@ -499,12 +499,14 @@
}
DXVAVideoDecodeAccelerator::DXVAVideoDecodeAccelerator(
- media::VideoDecodeAccelerator::Client* client)
+ media::VideoDecodeAccelerator::Client* client,
+ const base::Callback<bool(void)>& make_context_current)
: client_(client),
egl_config_(NULL),
state_(kUninitialized),
pictures_requested_(false),
- inputs_before_decode_(0) {
+ inputs_before_decode_(0),
+ make_context_current_(make_context_current) {
memset(&input_stream_info_, 0, sizeof(input_stream_info_));
memset(&output_stream_info_, 0, sizeof(output_stream_info_));
}
@@ -965,6 +967,11 @@
if (pending_output_samples_.empty())
return;
+ if (!make_context_current_.Run()) {
+ StopOnError(media::VideoDecodeAccelerator::PLATFORM_FAILURE);
+ return;
+ }
+
OutputBuffers::iterator index;
for (index = output_picture_buffers_.begin();

Powered by Google App Engine
This is Rietveld 408576698