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

Unified Diff: media/filters/skcanvas_video_renderer.h

Issue 445013002: media: Optimize HW Video to 2D Canvas copy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve comments, rebase to ToT Created 6 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/filters/skcanvas_video_renderer.h
diff --git a/media/filters/skcanvas_video_renderer.h b/media/filters/skcanvas_video_renderer.h
index 1e81d316f56555034fffdbfef72325d252a6944b..e2d402c72030c1825e3486eaf586d339a950f5c1 100644
--- a/media/filters/skcanvas_video_renderer.h
+++ b/media/filters/skcanvas_video_renderer.h
@@ -10,12 +10,12 @@
#include "base/timer/timer.h"
#include "media/base/media_export.h"
#include "media/base/video_rotation.h"
+#include "media/filters/context_3d_provider.h"
#include "third_party/skia/include/core/SkBitmap.h"
+#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkXfermode.h"
#include "ui/gfx/rect.h"
-class SkCanvas;
-
namespace media {
class VideoFrame;
@@ -37,11 +37,21 @@ class MEDIA_EXPORT SkCanvasVideoRenderer {
const gfx::RectF& dest_rect,
uint8 alpha,
SkXfermode::Mode mode,
- VideoRotation video_rotation);
+ VideoRotation video_rotation,
+ const Context3DProvider& context_provider);
// Copy |video_frame| on |canvas|.
void Copy(const scoped_refptr<VideoFrame>&, SkCanvas* canvas);
+ static void CopyVideoFrameTextureToGLTexture(gpu::gles2::GLES2Interface* gl,
scherkus (not reviewing) 2014/10/30 20:40:13 can we get documentation? for example, it'd be go
dshwang 2014/10/31 09:29:17 Done.
+ media::VideoFrame* video_frame,
scherkus (not reviewing) 2014/10/30 20:40:13 nit: typically we pass these as const-ref (you can
danakj 2014/10/30 21:04:20 If you don't need a reference, passing a T* is mor
dshwang 2014/10/31 09:29:17 I preserve T* because it doesn't need to take a re
+ unsigned int texture,
+ unsigned int level,
+ unsigned int internal_format,
+ unsigned int type,
+ bool premultiply_alpha,
+ bool flip_y);
+
private:
void ResetLastFrame();
void ResetAcceleratedLastFrame();

Powered by Google App Engine
This is Rietveld 408576698