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

Unified Diff: media/blink/skcanvas_video_renderer.h

Issue 1153623002: media: SkCanvasVideoRenderer support for YUV native videoframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set the color format. Created 5 years, 6 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 | « content/renderer/media/webmediaplayer_ms.cc ('k') | media/blink/skcanvas_video_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/skcanvas_video_renderer.h
diff --git a/media/blink/skcanvas_video_renderer.h b/media/blink/skcanvas_video_renderer.h
index 9b75cd01e0fad04c242dd1463c73c6142e853845..504495321b94aa0b3bdabf48b0fd059eaa5d7e1e 100644
--- a/media/blink/skcanvas_video_renderer.h
+++ b/media/blink/skcanvas_video_renderer.h
@@ -12,6 +12,7 @@
#include "media/base/video_rotation.h"
#include "media/filters/context_3d.h"
#include "third_party/skia/include/core/SkBitmap.h"
+#include "third_party/skia/include/core/SkImage.h"
#include "third_party/skia/include/core/SkXfermode.h"
#include "ui/gfx/geometry/rect.h"
@@ -61,13 +62,14 @@ 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.
- static void CopyVideoFrameTextureToGLTexture(gpu::gles2::GLES2Interface* gl,
- VideoFrame* video_frame,
- unsigned int texture,
- unsigned int internal_format,
- unsigned int type,
- 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);
private:
void ResetLastFrame();
@@ -84,6 +86,7 @@ class MEDIA_EXPORT SkCanvasVideoRenderer {
// |accelerated_generator_|.
// It's used when |canvas| parameter in Paint() is Ganesh canvas.
// Note: all GrContext in SkCanvas instances are same.
+ scoped_ptr<SkImage> accelerated_last_image_;
SkBitmap accelerated_last_frame_;
VideoImageGenerator* accelerated_generator_;
base::TimeDelta accelerated_last_frame_timestamp_;
« no previous file with comments | « content/renderer/media/webmediaplayer_ms.cc ('k') | media/blink/skcanvas_video_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698