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

Side by Side Diff: ui/surface/accelerated_surface_transformer_win.h

Issue 12090109: Tab Capture: Backing store readbacks to YV12 VideoFrames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Style fix per wjia Created 7 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 | Annotate | Revision Log
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 UI_SURFACE_ACCELERATED_SURFACE_TRANSFORMER_WIN_H_ 5 #ifndef UI_SURFACE_ACCELERATED_SURFACE_TRANSFORMER_WIN_H_
6 #define UI_SURFACE_ACCELERATED_SURFACE_TRANSFORMER_WIN_H_ 6 #define UI_SURFACE_ACCELERATED_SURFACE_TRANSFORMER_WIN_H_
7 7
8 #include <d3d9.h> 8 #include <d3d9.h>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // Draw a textured quad to a surface. 54 // Draw a textured quad to a surface.
55 bool Copy( 55 bool Copy(
56 IDirect3DTexture9* src_texture, 56 IDirect3DTexture9* src_texture,
57 IDirect3DSurface9* dst_surface, 57 IDirect3DSurface9* dst_surface,
58 const gfx::Size& dst_size); 58 const gfx::Size& dst_size);
59 59
60 // Resize a surface using repeated bilinear interpolation. 60 // Resize a surface using repeated bilinear interpolation.
61 bool ResizeBilinear( 61 bool ResizeBilinear(
62 IDirect3DSurface9* src_surface, 62 IDirect3DSurface9* src_surface,
63 const gfx::Rect& src_subrect, 63 const gfx::Rect& src_subrect,
64 IDirect3DSurface9* dst_surface); 64 IDirect3DSurface9* dst_surface,
65 const gfx::Rect& dst_subrect);
65 66
66 // Color format conversion from RGB to planar YV12 (also known as YUV420). 67 // Color format conversion from RGB to planar YV12 (also known as YUV420).
67 // 68 //
68 // YV12 is effectively a twelve bit per pixel format consisting of a full- 69 // YV12 is effectively a twelve bit per pixel format consisting of a full-
69 // size y (luminance) plane and half-width, half-height u and v (blue and 70 // size y (luminance) plane and half-width, half-height u and v (blue and
70 // red chrominance) planes. This method will allocate three lockable surfaces, 71 // red chrominance) planes. This method will allocate three lockable surfaces,
71 // one for each plane, and return them via the arguments |dst_y|, |dst_u|, 72 // one for each plane, and return them via the arguments |dst_y|, |dst_u|,
72 // and |dst_v|. These surface will be created with an ARGB D3DFORMAT, but 73 // and |dst_v|. These surface will be created with an ARGB D3DFORMAT, but
73 // should be interpreted as the appropriate single-byte format when locking. 74 // should be interpreted as the appropriate single-byte format when locking.
74 // 75 //
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 base::win::ScopedComPtr<IDirect3DDevice9> device_; 176 base::win::ScopedComPtr<IDirect3DDevice9> device_;
176 base::win::ScopedComPtr<IDirect3DVertexShader9> vertex_shaders_[NUM_SHADERS]; 177 base::win::ScopedComPtr<IDirect3DVertexShader9> vertex_shaders_[NUM_SHADERS];
177 base::win::ScopedComPtr<IDirect3DPixelShader9> pixel_shaders_[NUM_SHADERS]; 178 base::win::ScopedComPtr<IDirect3DPixelShader9> pixel_shaders_[NUM_SHADERS];
178 bool device_supports_multiple_render_targets_; 179 bool device_supports_multiple_render_targets_;
179 const BYTE* vertex_shader_sources_[NUM_SHADERS]; 180 const BYTE* vertex_shader_sources_[NUM_SHADERS];
180 const BYTE* pixel_shader_sources_[NUM_SHADERS]; 181 const BYTE* pixel_shader_sources_[NUM_SHADERS];
181 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceTransformer); 182 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceTransformer);
182 }; 183 };
183 184
184 #endif // UI_SURFACE_ACCELERATED_SURFACE_TRANSFORMER_WIN_H_ 185 #endif // UI_SURFACE_ACCELERATED_SURFACE_TRANSFORMER_WIN_H_
OLDNEW
« no previous file with comments | « media/video/capture/video_capture_device_unittest.cc ('k') | ui/surface/accelerated_surface_transformer_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698