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

Side by Side Diff: media/filters/skcanvas_video_renderer.h

Issue 864113002: Pepper: PPB_VideoDecoder software fallback should support all YUV formats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_FILTERS_SKCANVAS_VIDEO_RENDERER_H_ 5 #ifndef MEDIA_FILTERS_SKCANVAS_VIDEO_RENDERER_H_
6 #define MEDIA_FILTERS_SKCANVAS_VIDEO_RENDERER_H_ 6 #define MEDIA_FILTERS_SKCANVAS_VIDEO_RENDERER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "base/timer/timer.h" 10 #include "base/timer/timer.h"
(...skipping 28 matching lines...) Expand all
39 SkCanvas* canvas, 39 SkCanvas* canvas,
40 const gfx::RectF& dest_rect, 40 const gfx::RectF& dest_rect,
41 uint8 alpha, 41 uint8 alpha,
42 SkXfermode::Mode mode, 42 SkXfermode::Mode mode,
43 VideoRotation video_rotation, 43 VideoRotation video_rotation,
44 const Context3D& context_3d); 44 const Context3D& context_3d);
45 45
46 // Copy |video_frame| on |canvas|. 46 // Copy |video_frame| on |canvas|.
47 void Copy(const scoped_refptr<VideoFrame>&, SkCanvas* canvas); 47 void Copy(const scoped_refptr<VideoFrame>&, SkCanvas* canvas);
48 48
49 // Convert the contents of |video_frame| to raw RGB pixels. |rgb_pixels|
50 // should point into a buffer large enough to hold as many 32 bit RGBA pixels
51 // as are in the visible_rect() area of the frame.
52 static void ConvertVideoFrameToRGBPixels(
53 const scoped_refptr<media::VideoFrame>& video_frame,
54 void* rgb_pixels,
55 size_t row_bytes);
56
49 // Copy the contents of texture of |video_frame| to texture |texture|. 57 // Copy the contents of texture of |video_frame| to texture |texture|.
50 // |level|, |internal_format|, |type| specify target texture |texture|. 58 // |level|, |internal_format|, |type| specify target texture |texture|.
51 // The format of |video_frame| must be VideoFrame::NATIVE_TEXTURE. 59 // The format of |video_frame| must be VideoFrame::NATIVE_TEXTURE.
52 static void CopyVideoFrameTextureToGLTexture(gpu::gles2::GLES2Interface* gl, 60 static void CopyVideoFrameTextureToGLTexture(gpu::gles2::GLES2Interface* gl,
53 VideoFrame* video_frame, 61 VideoFrame* video_frame,
54 unsigned int texture, 62 unsigned int texture,
55 unsigned int level, 63 unsigned int level,
56 unsigned int internal_format, 64 unsigned int internal_format,
57 unsigned int type, 65 unsigned int type,
58 bool premultiply_alpha, 66 bool premultiply_alpha,
(...skipping 18 matching lines...) Expand all
77 VideoImageGenerator* accelerated_generator_; 85 VideoImageGenerator* accelerated_generator_;
78 base::TimeDelta accelerated_last_frame_timestamp_; 86 base::TimeDelta accelerated_last_frame_timestamp_;
79 base::DelayTimer<SkCanvasVideoRenderer> accelerated_frame_deleting_timer_; 87 base::DelayTimer<SkCanvasVideoRenderer> accelerated_frame_deleting_timer_;
80 88
81 DISALLOW_COPY_AND_ASSIGN(SkCanvasVideoRenderer); 89 DISALLOW_COPY_AND_ASSIGN(SkCanvasVideoRenderer);
82 }; 90 };
83 91
84 } // namespace media 92 } // namespace media
85 93
86 #endif // MEDIA_FILTERS_SKCANVAS_VIDEO_RENDERER_H_ 94 #endif // MEDIA_FILTERS_SKCANVAS_VIDEO_RENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698