| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "media/video/gpu_memory_buffer_video_frame_pool.h" | 5 #include "media/video/gpu_memory_buffer_video_frame_pool.h" |
| 6 | 6 |
| 7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
| 8 #include <GLES2/gl2ext.h> | 8 #include <GLES2/gl2ext.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 case PIXEL_FORMAT_YV24: | 330 case PIXEL_FORMAT_YV24: |
| 331 case PIXEL_FORMAT_NV12: | 331 case PIXEL_FORMAT_NV12: |
| 332 case PIXEL_FORMAT_NV21: | 332 case PIXEL_FORMAT_NV21: |
| 333 case PIXEL_FORMAT_UYVY: | 333 case PIXEL_FORMAT_UYVY: |
| 334 case PIXEL_FORMAT_YUY2: | 334 case PIXEL_FORMAT_YUY2: |
| 335 case PIXEL_FORMAT_ARGB: | 335 case PIXEL_FORMAT_ARGB: |
| 336 case PIXEL_FORMAT_XRGB: | 336 case PIXEL_FORMAT_XRGB: |
| 337 case PIXEL_FORMAT_RGB24: | 337 case PIXEL_FORMAT_RGB24: |
| 338 case PIXEL_FORMAT_RGB32: | 338 case PIXEL_FORMAT_RGB32: |
| 339 case PIXEL_FORMAT_MJPEG: | 339 case PIXEL_FORMAT_MJPEG: |
| 340 case PIXEL_FORMAT_MT21: |
| 340 case PIXEL_FORMAT_UNKNOWN: | 341 case PIXEL_FORMAT_UNKNOWN: |
| 341 frame_ready_cb.Run(video_frame); | 342 frame_ready_cb.Run(video_frame); |
| 342 return; | 343 return; |
| 343 } | 344 } |
| 344 | 345 |
| 345 DCHECK(video_frame->visible_rect().origin().IsOrigin()); | 346 DCHECK(video_frame->visible_rect().origin().IsOrigin()); |
| 346 const gfx::Size size = video_frame->visible_rect().size(); | 347 const gfx::Size size = video_frame->visible_rect().size(); |
| 347 | 348 |
| 348 // Acquire resources. Incompatible ones will be dropped from the pool. | 349 // Acquire resources. Incompatible ones will be dropped from the pool. |
| 349 FrameResources* frame_resources = | 350 FrameResources* frame_resources = |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 } | 645 } |
| 645 | 646 |
| 646 void GpuMemoryBufferVideoFramePool::MaybeCreateHardwareFrame( | 647 void GpuMemoryBufferVideoFramePool::MaybeCreateHardwareFrame( |
| 647 const scoped_refptr<VideoFrame>& video_frame, | 648 const scoped_refptr<VideoFrame>& video_frame, |
| 648 const FrameReadyCB& frame_ready_cb) { | 649 const FrameReadyCB& frame_ready_cb) { |
| 649 DCHECK(video_frame); | 650 DCHECK(video_frame); |
| 650 pool_impl_->CreateHardwareFrame(video_frame, frame_ready_cb); | 651 pool_impl_->CreateHardwareFrame(video_frame, frame_ready_cb); |
| 651 } | 652 } |
| 652 | 653 |
| 653 } // namespace media | 654 } // namespace media |
| OLD | NEW |