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

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

Issue 2463103002: Revert of Fix HTML5 video blurry (Closed)
Patch Set: Created 4 years, 1 month 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_RENDERERS_SKCANVAS_VIDEO_RENDERER_H_ 5 #ifndef MEDIA_RENDERERS_SKCANVAS_VIDEO_RENDERER_H_
6 #define MEDIA_RENDERERS_SKCANVAS_VIDEO_RENDERER_H_ 6 #define MEDIA_RENDERERS_SKCANVAS_VIDEO_RENDERER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 VideoRotation video_rotation, 51 VideoRotation video_rotation,
52 const Context3D& context_3d); 52 const Context3D& context_3d);
53 53
54 // Copy |video_frame| on |canvas|. 54 // Copy |video_frame| on |canvas|.
55 // If the format of |video_frame| is PIXEL_FORMAT_NATIVE_TEXTURE, |context_3d| 55 // If the format of |video_frame| is PIXEL_FORMAT_NATIVE_TEXTURE, |context_3d|
56 // must be provided. 56 // must be provided.
57 void Copy(const scoped_refptr<VideoFrame>& video_frame, 57 void Copy(const scoped_refptr<VideoFrame>& video_frame,
58 SkCanvas* canvas, 58 SkCanvas* canvas,
59 const Context3D& context_3d); 59 const Context3D& context_3d);
60 60
61 enum class ConvertingSize { VISUAL, CODED };
62 // Convert the contents of |video_frame| to raw RGB pixels. |rgb_pixels| 61 // Convert the contents of |video_frame| to raw RGB pixels. |rgb_pixels|
63 // should point into a buffer large enough to hold as many 32 bit RGBA pixels 62 // should point into a buffer large enough to hold as many 32 bit RGBA pixels
64 // as are in the visible_rect() area of the frame. 63 // as are in the visible_rect() area of the frame.
65 static void ConvertVideoFrameToRGBPixels(const media::VideoFrame* video_frame, 64 static void ConvertVideoFrameToRGBPixels(const media::VideoFrame* video_frame,
66 ConvertingSize size_type,
67 void* rgb_pixels, 65 void* rgb_pixels,
68 size_t row_bytes); 66 size_t row_bytes);
69 67
70 // Copy the contents of texture of |video_frame| to texture |texture|. 68 // Copy the contents of texture of |video_frame| to texture |texture|.
71 // |level|, |internal_format|, |type| specify target texture |texture|. 69 // |level|, |internal_format|, |type| specify target texture |texture|.
72 // The format of |video_frame| must be VideoFrame::NATIVE_TEXTURE. 70 // The format of |video_frame| must be VideoFrame::NATIVE_TEXTURE.
73 static void CopyVideoFrameSingleTextureToGLTexture( 71 static void CopyVideoFrameSingleTextureToGLTexture(
74 gpu::gles2::GLES2Interface* gl, 72 gpu::gles2::GLES2Interface* gl,
75 VideoFrame* video_frame, 73 VideoFrame* video_frame,
76 unsigned int texture, 74 unsigned int texture,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 122
125 // Used for unit test. 123 // Used for unit test.
126 SkISize last_image_dimensions_for_testing_; 124 SkISize last_image_dimensions_for_testing_;
127 125
128 DISALLOW_COPY_AND_ASSIGN(SkCanvasVideoRenderer); 126 DISALLOW_COPY_AND_ASSIGN(SkCanvasVideoRenderer);
129 }; 127 };
130 128
131 } // namespace media 129 } // namespace media
132 130
133 #endif // MEDIA_RENDERERS_SKCANVAS_VIDEO_RENDERER_H_ 131 #endif // MEDIA_RENDERERS_SKCANVAS_VIDEO_RENDERER_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/delegated_frame_host.cc ('k') | media/renderers/skcanvas_video_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698