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

Unified Diff: media/renderers/skcanvas_video_renderer.h

Issue 2476693002: WebGL & 16-bit video stream: upload to FLOAT texture. (Closed)
Patch Set: Rebase after crrev.com/2527343002 land. 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 05e3d3ee312858bf0cabb56ff4264f217509a497..4c33a66c5d46b97f98024073b7ac11082e7e898b 100644
--- a/media/renderers/skcanvas_video_renderer.h
+++ b/media/renderers/skcanvas_video_renderer.h
@@ -91,6 +91,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