| 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 CONTENT_BROWSER_COMPOSITOR_GL_HELPER_H_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_GL_HELPER_H_ |
| 6 #define CONTENT_BROWSER_COMPOSITOR_GL_HELPER_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_GL_HELPER_H_ |
| 7 | 7 |
| 8 #include "base/atomicops.h" | 8 #include "base/atomicops.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 bool swizzle); | 308 bool swizzle); |
| 309 | 309 |
| 310 // Create a readback pipeline that will scale a subsection of the source | 310 // Create a readback pipeline that will scale a subsection of the source |
| 311 // texture, then convert it to YUV422 planar form and then read back that. | 311 // texture, then convert it to YUV422 planar form and then read back that. |
| 312 // This reduces the amount of memory read from GPU to CPU memory by a factor | 312 // This reduces the amount of memory read from GPU to CPU memory by a factor |
| 313 // 2.6, which can be quite handy since readbacks have very limited speed | 313 // 2.6, which can be quite handy since readbacks have very limited speed |
| 314 // on some platforms. All values in |dst_size| must be a multiple of two. If | 314 // on some platforms. All values in |dst_size| must be a multiple of two. If |
| 315 // |use_mrt| is true, the pipeline will try to optimize the YUV conversion | 315 // |use_mrt| is true, the pipeline will try to optimize the YUV conversion |
| 316 // using the multi-render-target extension. |use_mrt| should only be set to | 316 // using the multi-render-target extension. |use_mrt| should only be set to |
| 317 // false for testing. | 317 // false for testing. |
| 318 ReadbackYUVInterface* CreateReadbackPipelineYUV(ScalerQuality quality, | 318 ReadbackYUVInterface* CreateReadbackPipelineYUV(const gfx::Size& src_size, |
| 319 const gfx::Size& src_size, | |
| 320 const gfx::Rect& src_subrect, | 319 const gfx::Rect& src_subrect, |
| 321 const gfx::Size& dst_size, | 320 const gfx::Size& dst_size, |
| 322 bool flip_vertically, | 321 bool flip_vertically, |
| 323 bool use_mrt); | 322 bool use_mrt); |
| 324 | 323 |
| 325 // Returns the maximum number of draw buffers available, | 324 // Returns the maximum number of draw buffers available, |
| 326 // 0 if GL_EXT_draw_buffers is not available. | 325 // 0 if GL_EXT_draw_buffers is not available. |
| 327 GLint MaxDrawBuffers(); | 326 GLint MaxDrawBuffers(); |
| 328 | 327 |
| 329 // Checks whether the readbback is supported for texture with the | 328 // Checks whether the readbback is supported for texture with the |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 const gpu::SyncToken& sync_token, | 369 const gpu::SyncToken& sync_token, |
| 371 const scoped_refptr<media::VideoFrame>& target, | 370 const scoped_refptr<media::VideoFrame>& target, |
| 372 const gfx::Point& paste_location, | 371 const gfx::Point& paste_location, |
| 373 const base::Callback<void(bool)>& callback) = 0; | 372 const base::Callback<void(bool)>& callback) = 0; |
| 374 virtual GLHelper::ScalerInterface* scaler() = 0; | 373 virtual GLHelper::ScalerInterface* scaler() = 0; |
| 375 }; | 374 }; |
| 376 | 375 |
| 377 } // namespace content | 376 } // namespace content |
| 378 | 377 |
| 379 #endif // CONTENT_BROWSER_COMPOSITOR_GL_HELPER_H_ | 378 #endif // CONTENT_BROWSER_COMPOSITOR_GL_HELPER_H_ |
| OLD | NEW |