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

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

Issue 1751323002: Allow multiple texture ids per picture buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: content/common/gpu/media/android_copying_backing_strategy.cc
diff --git a/content/common/gpu/media/android_copying_backing_strategy.cc b/content/common/gpu/media/android_copying_backing_strategy.cc
index bb877b270a9d394c8a56f3180a6686ab7eb68874..b5216154829559901301d8d3bc9fe32d7c575e8c 100644
--- a/content/common/gpu/media/android_copying_backing_strategy.cc
+++ b/content/common/gpu/media/android_copying_backing_strategy.cc
@@ -117,7 +117,8 @@ void AndroidCopyingBackingStrategy::UseCodecBufferForPictureBuffer(
float transform_matrix[16];
surface_texture_->GetTransformMatrix(transform_matrix);
- uint32_t picture_buffer_texture_id = picture_buffer.texture_id();
+ DCHECK_LE(1u, picture_buffer.texture_ids().size());
+ uint32_t picture_buffer_texture_id = picture_buffer.texture_ids()[0];
// Defer initializing the CopyTextureCHROMIUMResourceManager until it is
// needed because it takes 10s of milliseconds to initialize.
@@ -169,7 +170,8 @@ void AndroidCopyingBackingStrategy::UpdatePictureBufferSize(
// 2) Update the GL texture via glTexImage2D. This step assumes the caller
// has made our GL context current.
- glBindTexture(GL_TEXTURE_2D, picture_buffer->texture_id());
+ DCHECK_LE(1u, picture_buffer->texture_ids().size());
+ glBindTexture(GL_TEXTURE_2D, picture_buffer->texture_ids()[0]);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, new_size.width(), new_size.height(),
0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
state_provider_->GetGlDecoder()->RestoreActiveTextureUnitBinding(

Powered by Google App Engine
This is Rietveld 408576698