| 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 "media/renderers/skcanvas_video_renderer.h" | 5 #include "media/renderers/skcanvas_video_renderer.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "gpu/GLES2/gl2extchromium.h" | 10 #include "gpu/GLES2/gl2extchromium.h" |
| (...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 video_frame->visible_data(VideoFrame::kUPlane), | 647 video_frame->visible_data(VideoFrame::kUPlane), |
| 648 video_frame->stride(VideoFrame::kUPlane), | 648 video_frame->stride(VideoFrame::kUPlane), |
| 649 video_frame->visible_data(VideoFrame::kVPlane), | 649 video_frame->visible_data(VideoFrame::kVPlane), |
| 650 video_frame->stride(VideoFrame::kVPlane), | 650 video_frame->stride(VideoFrame::kVPlane), |
| 651 static_cast<uint8_t*>(rgb_pixels), row_bytes, | 651 static_cast<uint8_t*>(rgb_pixels), row_bytes, |
| 652 video_frame->visible_rect().width(), | 652 video_frame->visible_rect().width(), |
| 653 video_frame->visible_rect().height()); | 653 video_frame->visible_rect().height()); |
| 654 } | 654 } |
| 655 break; | 655 break; |
| 656 case PIXEL_FORMAT_YV16: | 656 case PIXEL_FORMAT_YV16: |
| 657 case PIXEL_FORMAT_I422: |
| 657 LIBYUV_I422_TO_ARGB(video_frame->visible_data(VideoFrame::kYPlane), | 658 LIBYUV_I422_TO_ARGB(video_frame->visible_data(VideoFrame::kYPlane), |
| 658 video_frame->stride(VideoFrame::kYPlane), | 659 video_frame->stride(VideoFrame::kYPlane), |
| 659 video_frame->visible_data(VideoFrame::kUPlane), | 660 video_frame->visible_data(VideoFrame::kUPlane), |
| 660 video_frame->stride(VideoFrame::kUPlane), | 661 video_frame->stride(VideoFrame::kUPlane), |
| 661 video_frame->visible_data(VideoFrame::kVPlane), | 662 video_frame->visible_data(VideoFrame::kVPlane), |
| 662 video_frame->stride(VideoFrame::kVPlane), | 663 video_frame->stride(VideoFrame::kVPlane), |
| 663 static_cast<uint8_t*>(rgb_pixels), row_bytes, | 664 static_cast<uint8_t*>(rgb_pixels), row_bytes, |
| 664 video_frame->visible_rect().width(), | 665 video_frame->visible_rect().width(), |
| 665 video_frame->visible_rect().height()); | 666 video_frame->visible_rect().height()); |
| 666 break; | 667 break; |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 932 last_image_->bounds().contains(visible_rect)) { | 933 last_image_->bounds().contains(visible_rect)) { |
| 933 last_image_ = last_image_->makeSubset(visible_rect); | 934 last_image_ = last_image_->makeSubset(visible_rect); |
| 934 } | 935 } |
| 935 } | 936 } |
| 936 | 937 |
| 937 SkISize SkCanvasVideoRenderer::LastImageDimensionsForTesting() { | 938 SkISize SkCanvasVideoRenderer::LastImageDimensionsForTesting() { |
| 938 return last_image_dimensions_for_testing_; | 939 return last_image_dimensions_for_testing_; |
| 939 } | 940 } |
| 940 | 941 |
| 941 } // namespace media | 942 } // namespace media |
| OLD | NEW |