| 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/gpu/avda_picture_buffer_manager.h" | 5 #include "media/gpu/avda_picture_buffer_manager.h" |
| 6 | 6 |
| 7 #include <EGL/egl.h> | 7 #include <EGL/egl.h> |
| 8 #include <EGL/eglext.h> | 8 #include <EGL/eglext.h> |
| 9 | 9 |
| 10 #include "base/android/build_info.h" | 10 #include "base/android/build_info.h" |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 GetImageForPicture(pictures_out_for_display_[backbuffer_index]); | 262 GetImageForPicture(pictures_out_for_display_[backbuffer_index]); |
| 263 if (first_renderable_image->was_rendered_to_back_buffer()) | 263 if (first_renderable_image->was_rendered_to_back_buffer()) |
| 264 return; | 264 return; |
| 265 | 265 |
| 266 // Due to the loop in the beginning this should never be true. | 266 // Due to the loop in the beginning this should never be true. |
| 267 DCHECK(!first_renderable_image->was_rendered_to_front_buffer()); | 267 DCHECK(!first_renderable_image->was_rendered_to_front_buffer()); |
| 268 first_renderable_image->UpdateSurface( | 268 first_renderable_image->UpdateSurface( |
| 269 AVDACodecImage::UpdateMode::RENDER_TO_BACK_BUFFER); | 269 AVDACodecImage::UpdateMode::RENDER_TO_BACK_BUFFER); |
| 270 } | 270 } |
| 271 | 271 |
| 272 void AVDAPictureBufferManager::CodecChanged(VideoCodecBridge* codec) { | 272 void AVDAPictureBufferManager::CodecChanged(MediaCodecBridge* codec) { |
| 273 media_codec_ = codec; | 273 media_codec_ = codec; |
| 274 for (auto& image_kv : codec_images_) | 274 for (auto& image_kv : codec_images_) |
| 275 image_kv.second->CodecChanged(codec); | 275 image_kv.second->CodecChanged(codec); |
| 276 shared_state_->clear_release_time(); | 276 shared_state_->clear_release_time(); |
| 277 } | 277 } |
| 278 | 278 |
| 279 bool AVDAPictureBufferManager::ArePicturesOverlayable() { | 279 bool AVDAPictureBufferManager::ArePicturesOverlayable() { |
| 280 // SurfaceView frames are always overlayable because that's the only way to | 280 // SurfaceView frames are always overlayable because that's the only way to |
| 281 // display them. | 281 // display them. |
| 282 return !surface_texture_; | 282 return !surface_texture_; |
| 283 } | 283 } |
| 284 | 284 |
| 285 bool AVDAPictureBufferManager::HasUnrenderedPictures() const { | 285 bool AVDAPictureBufferManager::HasUnrenderedPictures() const { |
| 286 for (int id : pictures_out_for_display_) { | 286 for (int id : pictures_out_for_display_) { |
| 287 if (GetImageForPicture(id)->is_unrendered()) | 287 if (GetImageForPicture(id)->is_unrendered()) |
| 288 return true; | 288 return true; |
| 289 } | 289 } |
| 290 return false; | 290 return false; |
| 291 } | 291 } |
| 292 | 292 |
| 293 } // namespace media | 293 } // namespace media |
| OLD | NEW |