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

Unified Diff: media/renderers/skcanvas_video_renderer.h

Issue 2428263004: 16 bpp video stream capture, render and createImageBitmap(video) using (CPU) shared memory buffers (Closed)
Patch Set: fixes Created 4 years, 2 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
Index: media/renderers/skcanvas_video_renderer.h
diff --git a/media/renderers/skcanvas_video_renderer.h b/media/renderers/skcanvas_video_renderer.h
index 9323a82fed4d55c8160707d809c5fb6030186d33..ebaf2a3ae7b704c1fcf50e955cf87099bfc85320 100644
--- a/media/renderers/skcanvas_video_renderer.h
+++ b/media/renderers/skcanvas_video_renderer.h
@@ -23,7 +23,6 @@
#include "third_party/skia/include/core/SkXfermode.h"
class SkCanvas;
-class SkImage;
namespace gfx {
class RectF;
@@ -93,6 +92,29 @@ 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 some video frame and texture
+ // formats. If needed, there is a conversion followed by a tex(Sub)Image2D or
+ // tex(Sub)Image3D call.
+ // |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
+ // call fails.
+ static bool TexImageImpl(const char* functionID,
+ 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