| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/gpu/android_video_decode_accelerator.h" | 5 #include "media/gpu/android_video_decode_accelerator.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 | 940 |
| 941 bool size_changed = false; | 941 bool size_changed = false; |
| 942 if (i->second.size() != size_) { | 942 if (i->second.size() != size_) { |
| 943 // Size may have changed due to resolution change since the last time this | 943 // Size may have changed due to resolution change since the last time this |
| 944 // PictureBuffer was used. | 944 // PictureBuffer was used. |
| 945 strategy_->UpdatePictureBufferSize(&i->second, size_); | 945 strategy_->UpdatePictureBufferSize(&i->second, size_); |
| 946 size_changed = true; | 946 size_changed = true; |
| 947 } | 947 } |
| 948 | 948 |
| 949 const bool allow_overlay = strategy_->ArePicturesOverlayable(); | 949 const bool allow_overlay = strategy_->ArePicturesOverlayable(); |
| 950 UMA_HISTOGRAM_BOOLEAN("Media.AVDA.FrameSentAsOverlay", allow_overlay); |
| 950 Picture picture(picture_buffer_id, bitstream_id, gfx::Rect(size_), | 951 Picture picture(picture_buffer_id, bitstream_id, gfx::Rect(size_), |
| 951 allow_overlay); | 952 allow_overlay); |
| 952 picture.set_size_changed(size_changed); | 953 picture.set_size_changed(size_changed); |
| 953 | 954 |
| 954 // Notify picture ready before calling UseCodecBufferForPictureBuffer() since | 955 // Notify picture ready before calling UseCodecBufferForPictureBuffer() since |
| 955 // that process may be slow and shouldn't delay delivery of the frame to the | 956 // that process may be slow and shouldn't delay delivery of the frame to the |
| 956 // renderer. The picture is only used on the same thread as this method is | 957 // renderer. The picture is only used on the same thread as this method is |
| 957 // called, so it is safe to do this. | 958 // called, so it is safe to do this. |
| 958 NotifyPictureReady(picture); | 959 NotifyPictureReady(picture); |
| 959 | 960 |
| (...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1765 // http://crbug.com/582170 | 1766 // http://crbug.com/582170 |
| 1766 capabilities.flags |= media::VideoDecodeAccelerator::Capabilities:: | 1767 capabilities.flags |= media::VideoDecodeAccelerator::Capabilities:: |
| 1767 SUPPORTS_EXTERNAL_OUTPUT_SURFACE; | 1768 SUPPORTS_EXTERNAL_OUTPUT_SURFACE; |
| 1768 } | 1769 } |
| 1769 } | 1770 } |
| 1770 | 1771 |
| 1771 return capabilities; | 1772 return capabilities; |
| 1772 } | 1773 } |
| 1773 | 1774 |
| 1774 } // namespace media | 1775 } // namespace media |
| OLD | NEW |