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

Unified Diff: media/renderers/skcanvas_video_renderer.h

Issue 2476693002: WebGL & 16-bit video stream: upload to FLOAT texture. (Closed)
Patch Set: Fixes. phoglung@, hubbe@, thanks. 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
Index: media/renderers/skcanvas_video_renderer.h
diff --git a/media/renderers/skcanvas_video_renderer.h b/media/renderers/skcanvas_video_renderer.h
index 1b1b93559d4a03c7e5f46259d95fb365093fc91e..8132e3547a8b1861f9006a5db96e630fa41dbc36 100644
--- a/media/renderers/skcanvas_video_renderer.h
+++ b/media/renderers/skcanvas_video_renderer.h
@@ -92,6 +92,37 @@ class MEDIA_EXPORT SkCanvasVideoRenderer {
bool premultiply_alpha,
bool flip_y);
+ // Converts unsigned 16-bit value to target |format| for Y16 format and
+ // calls WebGL texImage2D.
+ // |level|, |internal_format|, |format|, |type| are WebGL texImage2D
+ // parameters.
+ // Returns false if there is no implementation for given parameters.
+ static bool TexImage2D(unsigned target,
+ gpu::gles2::GLES2Interface* gl,
+ VideoFrame* video_frame,
+ int level,
+ int internalformat,
+ unsigned format,
+ unsigned type,
+ bool flip_y,
+ bool premultiply_alpha);
+
+ // Converts unsigned 16-bit value to target |format| for Y16 format and
+ // calls WebGL texSubImage2D.
+ // |level|, |format|, |type|, |xoffset| and |yoffset| are texSubImage2D
+ // parameters.
+ // Returns false if there is no implementation for given parameters.
+ static bool TexSubImage2D(unsigned target,
+ gpu::gles2::GLES2Interface* gl,
+ VideoFrame* video_frame,
+ int level,
+ unsigned format,
+ unsigned type,
+ int xoffset,
+ int yoffset,
+ bool flip_y,
+ bool premultiply_alpha);
+
// In general, We hold the most recently painted frame to increase the
// performance for the case that the same frame needs to be painted
// repeatedly. Call this function if you are sure the most recent frame will

Powered by Google App Engine
This is Rietveld 408576698