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 #include "content/common/gpu/client/gl_helper.h" | 5 #include "content/common/gpu/client/gl_helper.h" |
6 | 6 |
7 #include <queue> | 7 #include <queue> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 CopyTextureToImpl* copy_impl, | 242 CopyTextureToImpl* copy_impl, |
243 GLHelperScaling* scaler_impl, | 243 GLHelperScaling* scaler_impl, |
244 GLHelper::ScalerQuality quality, | 244 GLHelper::ScalerQuality quality, |
245 const gfx::Size& src_size, | 245 const gfx::Size& src_size, |
246 const gfx::Rect& src_subrect, | 246 const gfx::Rect& src_subrect, |
247 const gfx::Size& dst_size, | 247 const gfx::Size& dst_size, |
248 const gfx::Rect& dst_subrect, | 248 const gfx::Rect& dst_subrect, |
249 bool flip_vertically, | 249 bool flip_vertically, |
250 ReadbackSwizzle swizzle); | 250 ReadbackSwizzle swizzle); |
251 | 251 |
252 virtual void ReadbackYUV(const gpu::Mailbox& mailbox, | 252 void ReadbackYUV(const gpu::Mailbox& mailbox, |
253 uint32 sync_point, | 253 uint32 sync_point, |
254 const scoped_refptr<media::VideoFrame>& target, | 254 const scoped_refptr<media::VideoFrame>& target, |
255 const base::Callback<void(bool)>& callback) | 255 const base::Callback<void(bool)>& callback) override; |
256 override; | |
257 | 256 |
258 virtual ScalerInterface* scaler() override { return scaler_.scaler(); } | 257 ScalerInterface* scaler() override { return scaler_.scaler(); } |
259 | 258 |
260 private: | 259 private: |
261 GLES2Interface* gl_; | 260 GLES2Interface* gl_; |
262 CopyTextureToImpl* copy_impl_; | 261 CopyTextureToImpl* copy_impl_; |
263 gfx::Size dst_size_; | 262 gfx::Size dst_size_; |
264 gfx::Rect dst_subrect_; | 263 gfx::Rect dst_subrect_; |
265 ReadbackSwizzle swizzle_; | 264 ReadbackSwizzle swizzle_; |
266 ScalerHolder scaler_; | 265 ScalerHolder scaler_; |
267 ScalerHolder y_; | 266 ScalerHolder y_; |
268 ScalerHolder u_; | 267 ScalerHolder u_; |
(...skipping 11 matching lines...) Expand all Loading... |
280 CopyTextureToImpl* copy_impl, | 279 CopyTextureToImpl* copy_impl, |
281 GLHelperScaling* scaler_impl, | 280 GLHelperScaling* scaler_impl, |
282 GLHelper::ScalerQuality quality, | 281 GLHelper::ScalerQuality quality, |
283 const gfx::Size& src_size, | 282 const gfx::Size& src_size, |
284 const gfx::Rect& src_subrect, | 283 const gfx::Rect& src_subrect, |
285 const gfx::Size& dst_size, | 284 const gfx::Size& dst_size, |
286 const gfx::Rect& dst_subrect, | 285 const gfx::Rect& dst_subrect, |
287 bool flip_vertically, | 286 bool flip_vertically, |
288 ReadbackSwizzle swizzle); | 287 ReadbackSwizzle swizzle); |
289 | 288 |
290 virtual void ReadbackYUV(const gpu::Mailbox& mailbox, | 289 void ReadbackYUV(const gpu::Mailbox& mailbox, |
291 uint32 sync_point, | 290 uint32 sync_point, |
292 const scoped_refptr<media::VideoFrame>& target, | 291 const scoped_refptr<media::VideoFrame>& target, |
293 const base::Callback<void(bool)>& callback) | 292 const base::Callback<void(bool)>& callback) override; |
294 override; | |
295 | 293 |
296 virtual ScalerInterface* scaler() override { return scaler_.scaler(); } | 294 ScalerInterface* scaler() override { return scaler_.scaler(); } |
297 | 295 |
298 private: | 296 private: |
299 GLES2Interface* gl_; | 297 GLES2Interface* gl_; |
300 CopyTextureToImpl* copy_impl_; | 298 CopyTextureToImpl* copy_impl_; |
301 gfx::Size dst_size_; | 299 gfx::Size dst_size_; |
302 gfx::Rect dst_subrect_; | 300 gfx::Rect dst_subrect_; |
303 GLHelper::ScalerQuality quality_; | 301 GLHelper::ScalerQuality quality_; |
304 ReadbackSwizzle swizzle_; | 302 ReadbackSwizzle swizzle_; |
305 ScalerHolder scaler_; | 303 ScalerHolder scaler_; |
306 scoped_ptr<content::GLHelperScaling::ShaderInterface> pass1_shader_; | 304 scoped_ptr<content::GLHelperScaling::ShaderInterface> pass1_shader_; |
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1354 return copy_texture_to_impl_->CreateReadbackPipelineYUV(quality, | 1352 return copy_texture_to_impl_->CreateReadbackPipelineYUV(quality, |
1355 src_size, | 1353 src_size, |
1356 src_subrect, | 1354 src_subrect, |
1357 dst_size, | 1355 dst_size, |
1358 dst_subrect, | 1356 dst_subrect, |
1359 flip_vertically, | 1357 flip_vertically, |
1360 use_mrt); | 1358 use_mrt); |
1361 } | 1359 } |
1362 | 1360 |
1363 } // namespace content | 1361 } // namespace content |
OLD | NEW |