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

Unified Diff: media/blink/skcanvas_video_renderer.h

Issue 1315323006: webgl: optimize webgl.texSubImage2D(video) path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix canvas2d-webgl failures Created 5 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/blink/skcanvas_video_renderer.h
diff --git a/media/blink/skcanvas_video_renderer.h b/media/blink/skcanvas_video_renderer.h
index 0bb7b39a06e493e0ce165c8f22ed6e7791ae92f6..097c880c12105c86595148aa8e41830dbf764ad0 100644
--- a/media/blink/skcanvas_video_renderer.h
+++ b/media/blink/skcanvas_video_renderer.h
@@ -64,14 +64,23 @@ class MEDIA_EXPORT SkCanvasVideoRenderer {
// Copy the contents of texture of |video_frame| to texture |texture|.
// |level|, |internal_format|, |type| specify target texture |texture|.
// The format of |video_frame| must be VideoFrame::NATIVE_TEXTURE.
+ struct CopyFrameSingleTextureParams {
+ enum CopyType { FullCopy, SubCopy };
+ CopyType copy_type;
+ unsigned int target;
+ unsigned int texture;
+ unsigned int internal_format;
+ unsigned int type;
+ int level;
+ int xoffset;
+ int yoffset;
+ bool premultiply_alpha;
+ bool flip_y;
+ };
static void CopyVideoFrameSingleTextureToGLTexture(
gpu::gles2::GLES2Interface* gl,
VideoFrame* video_frame,
- unsigned int texture,
- unsigned int internal_format,
- unsigned int type,
- bool premultiply_alpha,
- bool flip_y);
+ const CopyFrameSingleTextureParams& params);
private:
void ResetCache();

Powered by Google App Engine
This is Rietveld 408576698