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

Unified Diff: media/gpu/ipc/service/gpu_video_decode_accelerator.cc

Issue 2711903002: Set the type of hardware decoded texture to UNSIGNED_BYTE (Closed)
Patch Set: add DCHECK Created 3 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/ipc/service/gpu_video_decode_accelerator.cc
diff --git a/media/gpu/ipc/service/gpu_video_decode_accelerator.cc b/media/gpu/ipc/service/gpu_video_decode_accelerator.cc
index 9ed062425b8dcd79d368431f901a9f3cea02cb3f..cb61aceda8af7b7430fbaf07f2441b1bfddbdd12 100644
--- a/media/gpu/ipc/service/gpu_video_decode_accelerator.cc
+++ b/media/gpu/ipc/service/gpu_video_decode_accelerator.cc
@@ -450,7 +450,7 @@ void GpuVideoDecodeAccelerator::OnAssignPictureBuffers(
texture_manager->SetLevelInfo(texture_ref, texture_target_, 0, GL_RGBA,
texture_dimensions_.width(),
texture_dimensions_.height(), 1, 0,
- GL_RGBA, 0, gfx::Rect());
+ GL_RGBA, GL_UNSIGNED_BYTE, gfx::Rect());
} else {
// For other targets, texture dimensions should already be defined.
GLsizei width = 0, height = 0;
@@ -467,9 +467,10 @@ void GpuVideoDecodeAccelerator::OnAssignPictureBuffers(
GLenum format =
video_decode_accelerator_.get()->GetSurfaceInternalFormat();
if (format != GL_RGBA) {
+ DCHECK(format == GL_BGRA_EXT);
qiankun 2017/03/14 16:13:27 Add a DCHECK to make sure GL_UNSIGNED_BYTE is corr
texture_manager->SetLevelInfo(texture_ref, texture_target_, 0, format,
- width, height, 1, 0, format, 0,
- gfx::Rect());
+ width, height, 1, 0, format,
+ GL_UNSIGNED_BYTE, gfx::Rect());
}
}
service_ids.push_back(texture_ref->service_id());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698