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

Unified Diff: media/gpu/avda_state_provider.h

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_shared_state.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/avda_state_provider.h
diff --git a/media/gpu/avda_state_provider.h b/media/gpu/avda_state_provider.h
index caa3e92f40fbdc941bd1f6d00c66ccfde4937f83..6946dedc8a42aa06ee460c36d876702e2a2282b2 100644
--- a/media/gpu/avda_state_provider.h
+++ b/media/gpu/avda_state_provider.h
@@ -8,7 +8,6 @@
#include "base/compiler_specific.h"
#include "base/threading/thread_checker.h"
#include "gpu/command_buffer/service/texture_manager.h"
-#include "media/gpu/media_gpu_export.h"
#include "media/video/video_decode_accelerator.h"
namespace gl {
@@ -22,17 +21,11 @@ class GLES2Decoder;
}
namespace media {
-class VideoCodecBridge;
-}
-
-namespace media {
// Helper class that provides the BackingStrategy with enough state
// to do useful work.
class AVDAStateProvider {
public:
- virtual ~AVDAStateProvider() {}
-
// Various handy getters.
virtual const gfx::Size& GetSize() const = 0;
virtual const base::ThreadChecker& ThreadChecker() const = 0;
@@ -40,11 +33,19 @@ class AVDAStateProvider {
virtual gpu::gles2::TextureRef* GetTextureForPicture(
const media::PictureBuffer& picture_buffer) = 0;
+ // Create a SurfaceTexture and attach a new gl texture to it. |*service_id|
+ // is set to the created texture id.
+ virtual scoped_refptr<gl::SurfaceTexture> CreateAttachedSurfaceTexture(
+ GLuint* service_id) = 0;
+
// Helper function to report an error condition and stop decoding.
// This will post NotifyError(), and transition to the error state.
// It is meant to be called from the RETURN_ON_FAILURE macro.
virtual void PostError(const ::tracked_objects::Location& from_here,
media::VideoDecodeAccelerator::Error error) = 0;
+
+ protected:
+ ~AVDAStateProvider() = default;
};
} // namespace media
« no previous file with comments | « media/gpu/avda_shared_state.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698