| 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_codec_image.h" | 5 #include "media/gpu/avda_codec_image.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 has_surface_texture_(!!shared_state_->surface_texture_service_id()), | 30 has_surface_texture_(!!shared_state_->surface_texture_service_id()), |
| 31 texture_(0), | 31 texture_(0), |
| 32 picture_buffer_id_(picture_buffer_id) { | 32 picture_buffer_id_(picture_buffer_id) { |
| 33 shared_state_->SetImageForPicture(picture_buffer_id_, this); | 33 shared_state_->SetImageForPicture(picture_buffer_id_, this); |
| 34 } | 34 } |
| 35 | 35 |
| 36 AVDACodecImage::~AVDACodecImage() { | 36 AVDACodecImage::~AVDACodecImage() { |
| 37 shared_state_->SetImageForPicture(picture_buffer_id_, nullptr); | 37 shared_state_->SetImageForPicture(picture_buffer_id_, nullptr); |
| 38 } | 38 } |
| 39 | 39 |
| 40 void AVDACodecImage::Destroy(bool have_context) {} | |
| 41 | |
| 42 gfx::Size AVDACodecImage::GetSize() { | 40 gfx::Size AVDACodecImage::GetSize() { |
| 43 return size_; | 41 return size_; |
| 44 } | 42 } |
| 45 | 43 |
| 46 unsigned AVDACodecImage::GetInternalFormat() { | 44 unsigned AVDACodecImage::GetInternalFormat() { |
| 47 return GL_RGBA; | 45 return GL_RGBA; |
| 48 } | 46 } |
| 49 | 47 |
| 50 bool AVDACodecImage::BindTexImage(unsigned target) { | 48 bool AVDACodecImage::BindTexImage(unsigned target) { |
| 51 return false; | 49 return false; |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 } | 224 } |
| 227 | 225 |
| 228 bool AVDACodecImage::IsCodecBufferOutstanding() const { | 226 bool AVDACodecImage::IsCodecBufferOutstanding() const { |
| 229 static_assert(kUpdateOnly < 0 && kUpdateOnly > kRendered && | 227 static_assert(kUpdateOnly < 0 && kUpdateOnly > kRendered && |
| 230 kRendered > kInvalidCodecBufferIndex, | 228 kRendered > kInvalidCodecBufferIndex, |
| 231 "Codec buffer index enum values are not ordered correctly."); | 229 "Codec buffer index enum values are not ordered correctly."); |
| 232 return codec_buffer_index_ > kRendered && media_codec_; | 230 return codec_buffer_index_ > kRendered && media_codec_; |
| 233 } | 231 } |
| 234 | 232 |
| 235 } // namespace media | 233 } // namespace media |
| OLD | NEW |