| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |