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

Unified Diff: content/renderer/media/android/stream_texture_wrapper_impl.h

Issue 2480523006: Enable texture copy for webiew (Closed)
Patch Set: Addressed comments. Created 4 years, 1 month 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 | content/renderer/media/android/stream_texture_wrapper_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/android/stream_texture_wrapper_impl.h
diff --git a/content/renderer/media/android/stream_texture_wrapper_impl.h b/content/renderer/media/android/stream_texture_wrapper_impl.h
index a7e2bae48fbdd2558967f0323b5030dd64bdf85a..b18b18d79531e117885b554becac91edcf984b4c 100644
--- a/content/renderer/media/android/stream_texture_wrapper_impl.h
+++ b/content/renderer/media/android/stream_texture_wrapper_impl.h
@@ -42,7 +42,10 @@ namespace content {
class CONTENT_EXPORT StreamTextureWrapperImpl
: public media::StreamTextureWrapper {
public:
+ // |enable_texture_copy| controls the VideoFrameMetadata::COPY_REQUIRED flag,
+ // making sure it is correctly set on |current_frame_|, for webview scenarios.
static media::ScopedStreamTextureWrapper Create(
+ bool enable_texture_copy,
scoped_refptr<StreamTextureFactory> factory,
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner);
@@ -80,6 +83,7 @@ class CONTENT_EXPORT StreamTextureWrapperImpl
private:
StreamTextureWrapperImpl(
+ bool enable_texture_copy,
scoped_refptr<StreamTextureFactory> factory,
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner);
~StreamTextureWrapperImpl() override;
@@ -95,6 +99,8 @@ class CONTENT_EXPORT StreamTextureWrapperImpl
void SetCurrentFrameInternal(
const scoped_refptr<media::VideoFrame>& video_frame);
+ bool enable_texture_copy_;
+
// Client GL texture ID allocated to the StreamTexture.
unsigned texture_id_;
« no previous file with comments | « no previous file | content/renderer/media/android/stream_texture_wrapper_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698