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

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

Issue 24152009: Allow rendering from non-stream GL_TEXTURE_EXTERNAL_OES (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@git-svn
Patch Set: eead63fe Rebase. Created 7 years, 3 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/exynos_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/exynos_video_decode_accelerator.cc b/content/common/gpu/media/exynos_video_decode_accelerator.cc
index edce5f3ef8bcb6b08fb4aadc7ccb1cc1c34c4c5c..26794a47b8fbb5d1fb1af19632795372eaf2fafa 100644
--- a/content/common/gpu/media/exynos_video_decode_accelerator.cc
+++ b/content/common/gpu/media/exynos_video_decode_accelerator.cc
@@ -241,8 +241,7 @@ ExynosVideoDecodeAccelerator::ExynosVideoDecodeAccelerator(
make_context_current_(make_context_current),
egl_display_(egl_display),
egl_context_(egl_context),
- video_profile_(media::VIDEO_CODEC_PROFILE_UNKNOWN) {
-}
+ video_profile_(media::VIDEO_CODEC_PROFILE_UNKNOWN) {}
ExynosVideoDecodeAccelerator::~ExynosVideoDecodeAccelerator() {
DCHECK(!decoder_thread_.IsRunning());
@@ -440,14 +439,6 @@ void ExynosVideoDecodeAccelerator::AssignPictureBuffers(
return;
}
- for (size_t i = 0; i < buffers.size(); ++i) {
- if (buffers[i].size() != frame_buffer_size_) {
- DLOG(ERROR) << "AssignPictureBuffers(): invalid buffer size";
- NOTIFY_ERROR(INVALID_ARGUMENT);
- return;
- }
- }
-
if (!make_context_current_.Run()) {
DLOG(ERROR) << "AssignPictureBuffers(): could not make context current";
NOTIFY_ERROR(PLATFORM_FAILURE);
@@ -464,12 +455,16 @@ void ExynosVideoDecodeAccelerator::AssignPictureBuffers(
Display* x_display = base::MessagePumpForUI::GetDefaultXDisplay();
gfx::ScopedTextureBinder bind_restore(GL_TEXTURE_2D, 0);
for (size_t i = 0; i < pic_buffers_ref->picture_buffers.size(); ++i) {
+ DCHECK(buffers[i].size() == frame_buffer_size_);
PictureBufferArrayRef::PictureBufferRef& buffer =
pic_buffers_ref->picture_buffers[i];
// Create the X pixmap and then create an EGLImageKHR from it, so we can
// get dma_buf backing.
- Pixmap pixmap = XCreatePixmap(x_display, RootWindow(x_display, 0),
- buffers[i].size().width(), buffers[i].size().height(), 32);
+ Pixmap pixmap = XCreatePixmap(x_display,
+ RootWindow(x_display, 0),
+ frame_buffer_size_.width(),
+ frame_buffer_size_.height(),
+ 32);
if (!pixmap) {
DLOG(ERROR) << "AssignPictureBuffers(): could not create X pixmap";
NOTIFY_ERROR(PLATFORM_FAILURE);

Powered by Google App Engine
This is Rietveld 408576698