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

Unified Diff: media/renderers/skcanvas_video_renderer.h

Issue 2476693002: WebGL & 16-bit video stream: upload to FLOAT texture. (Closed)
Patch Set: Lossless access to 16-bit video stream using WebGL GL_FLOAT texture. 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..044f056e5d4721a1ef6ace141bf8bb42ce044424 100644
--- a/media/renderers/skcanvas_video_renderer.h
+++ b/media/renderers/skcanvas_video_renderer.h
@@ -92,6 +92,31 @@ class MEDIA_EXPORT SkCanvasVideoRenderer {
bool premultiply_alpha,
bool flip_y);
+ // Method handles reinterpreting two components RG8 as 16 bit value for Y16
+ // format and optimizing upload-to-texture for single plane non-yuv plannar
+ // video frame formats and specific target texture formats. If needed, there
+ // is a conversion followed by a tex(Sub)Image2D or tex(Sub)Image3D call.
+ // Format specific optimizations here are targeting fallback path in
+ // WebGLRenderingContextBase::texImage2D.
+ // |format|, |internal_format|, |type| specify target texture |texture|.
+ // |xoffset|, |yoffset|, |zoffset| are used when functionID defines sub image
+ // calls.
+ // Returns false if there is no implementation for given parameters or if the
hubbe 2016/11/07 22:16:55 Please make it return an enum so that we can separ
aleksandar.stojiljkovic 2016/11/16 20:01:24 Done - you're right - no need for enum. Runtime fa
+ // call fails.
+ static bool TexImageImpl(const char* functionID,
hubbe 2016/11/07 22:16:55 I don't quite get what functionID is doing here, o
aleksandar.stojiljkovic 2016/11/16 20:01:24 Done. Replaced char* / enum in WebMediaPlayer.h.
+ unsigned target,
+ gpu::gles2::GLES2Interface* gl,
+ VideoFrame* video_frame,
+ int level,
+ int internalformat,
+ unsigned format,
+ unsigned type,
+ int xoffset,
+ int yoffset,
+ int zoffset,
+ bool flipY,
+ bool premultiplyAlpha);
+
// 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