Chromium Code Reviews| 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 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 603 case PIXEL_FORMAT_NV12: | 603 case PIXEL_FORMAT_NV12: |
| 604 case PIXEL_FORMAT_NV21: | 604 case PIXEL_FORMAT_NV21: |
| 605 case PIXEL_FORMAT_UYVY: | 605 case PIXEL_FORMAT_UYVY: |
| 606 case PIXEL_FORMAT_YUY2: | 606 case PIXEL_FORMAT_YUY2: |
| 607 case PIXEL_FORMAT_ARGB: | 607 case PIXEL_FORMAT_ARGB: |
| 608 case PIXEL_FORMAT_XRGB: | 608 case PIXEL_FORMAT_XRGB: |
| 609 case PIXEL_FORMAT_RGB24: | 609 case PIXEL_FORMAT_RGB24: |
| 610 case PIXEL_FORMAT_RGB32: | 610 case PIXEL_FORMAT_RGB32: |
| 611 case PIXEL_FORMAT_MJPEG: | 611 case PIXEL_FORMAT_MJPEG: |
| 612 case PIXEL_FORMAT_MT21: | 612 case PIXEL_FORMAT_MT21: |
| 613 case PIXEL_FORMAT_Y8: | |
|
fbarchard1
2016/09/20 21:52:24
Y8 is supported by libyuv if you want to add the c
dshwang
2016/09/21 09:00:00
Thank you for suggestion. My plan is to draw Y8 di
fbarchard1
2016/09/22 21:06:57
Add a TODO to that effect?
Not all drivers support
dshwang
2016/09/26 13:02:22
Done. Added the comment you explained.
| |
| 614 case PIXEL_FORMAT_Y16: | |
| 613 case PIXEL_FORMAT_UNKNOWN: | 615 case PIXEL_FORMAT_UNKNOWN: |
| 614 NOTREACHED(); | 616 NOTREACHED(); |
| 615 } | 617 } |
| 616 } | 618 } |
| 617 | 619 |
| 618 // static | 620 // static |
| 619 void SkCanvasVideoRenderer::CopyVideoFrameSingleTextureToGLTexture( | 621 void SkCanvasVideoRenderer::CopyVideoFrameSingleTextureToGLTexture( |
| 620 gpu::gles2::GLES2Interface* gl, | 622 gpu::gles2::GLES2Interface* gl, |
| 621 VideoFrame* video_frame, | 623 VideoFrame* video_frame, |
| 622 unsigned int texture, | 624 unsigned int texture, |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 754 if (!last_image_) // Couldn't create the SkImage. | 756 if (!last_image_) // Couldn't create the SkImage. |
| 755 return false; | 757 return false; |
| 756 last_timestamp_ = video_frame->timestamp(); | 758 last_timestamp_ = video_frame->timestamp(); |
| 757 } | 759 } |
| 758 last_image_deleting_timer_.Reset(); | 760 last_image_deleting_timer_.Reset(); |
| 759 DCHECK(!!last_image_); | 761 DCHECK(!!last_image_); |
| 760 return true; | 762 return true; |
| 761 } | 763 } |
| 762 | 764 |
| 763 } // namespace media | 765 } // namespace media |
| OLD | NEW |