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

Unified Diff: media/gpu/avda_codec_image.cc

Issue 2005103004: AVDACodecImages keep their backing SurfaceTexture alive (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@neverdetach
Patch Set: Comments and add a DCHECK for glGetError after glDelete Created 4 years, 6 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 | « media/gpu/avda_codec_image.h ('k') | media/gpu/avda_shared_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/avda_codec_image.cc
diff --git a/media/gpu/avda_codec_image.cc b/media/gpu/avda_codec_image.cc
index 60bba2eab2edd5929fc3e7b1b72af3513825b32f..44172527356a0269bf99dea1291f74495718d683 100644
--- a/media/gpu/avda_codec_image.cc
+++ b/media/gpu/avda_codec_image.cc
@@ -8,10 +8,9 @@
#include <memory>
-#include "gpu/command_buffer/service/context_group.h"
-#include "gpu/command_buffer/service/context_state.h"
#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
#include "gpu/command_buffer/service/texture_manager.h"
+#include "media/base/android/sdk_media_codec_bridge.h"
#include "media/gpu/avda_shared_state.h"
#include "ui/gl/android/surface_texture.h"
#include "ui/gl/gl_context.h"
@@ -69,10 +68,11 @@ bool AVDACodecImage::CopyTexImage(unsigned target) {
GLint bound_service_id = 0;
glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, &bound_service_id);
- // We insist that the currently bound texture is the right one. We could
- // make a new glimage from a 2D image.
- if (bound_service_id != shared_state_->surface_texture_service_id())
+ // We insist that the currently bound texture is the right one.
+ if (bound_service_id !=
+ static_cast<GLint>(shared_state_->surface_texture_service_id())) {
return false;
+ }
// Make sure that we have the right image in the front buffer. Note that the
// bound_service_id is guaranteed to be equal to the surface texture's client
@@ -170,7 +170,6 @@ void AVDACodecImage::UpdateSurfaceInternal(
if (update_mode != UpdateMode::RENDER_TO_FRONT_BUFFER)
return;
- DCHECK(shared_state_->surface_texture_is_attached());
UpdateSurfaceTexture(attached_bindings_mode);
}
« no previous file with comments | « media/gpu/avda_codec_image.h ('k') | media/gpu/avda_shared_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698