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

Unified Diff: media/renderers/skcanvas_video_renderer.h

Issue 2562003003: Fix the size of video textures uploaded to WebGL. (Closed)
Patch Set: Rebased. Fixed Android build. Created 3 years, 11 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
« no previous file with comments | « media/blink/webmediaplayer_impl.cc ('k') | media/renderers/skcanvas_video_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/renderers/skcanvas_video_renderer.h
diff --git a/media/renderers/skcanvas_video_renderer.h b/media/renderers/skcanvas_video_renderer.h
index 8cd1d802deaca402a7d2428eb2e659bc2a6cd1c3..2567ede1e90e4058979e3401072024153bb4ed63 100644
--- a/media/renderers/skcanvas_video_renderer.h
+++ b/media/renderers/skcanvas_video_renderer.h
@@ -65,12 +65,13 @@ 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.
+ // Assumes |texture| has already been allocated with the appropriate
+ // size and a compatible format, internal format and type; this is
+ // effectively a "TexSubImage" operation.
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);
@@ -79,14 +80,15 @@ class MEDIA_EXPORT SkCanvasVideoRenderer {
// |level|, |internal_format|, |type| specify target texture |texture|.
// The format of |video_frame| must be VideoFrame::NATIVE_TEXTURE.
// |context_3d| has a GrContext that may be used during the copy.
+ // Assumes |texture| has already been allocated with the appropriate
+ // size and a compatible format, internal format and type; this is
+ // effectively a "TexSubImage" operation.
// Returns true on success.
bool CopyVideoFrameTexturesToGLTexture(
const Context3D& context_3d,
gpu::gles2::GLES2Interface* destination_gl,
const scoped_refptr<VideoFrame>& video_frame,
unsigned int texture,
- unsigned int internal_format,
- unsigned int type,
bool premultiply_alpha,
bool flip_y);
« no previous file with comments | « media/blink/webmediaplayer_impl.cc ('k') | media/renderers/skcanvas_video_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698