| 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 #ifndef MEDIA_GPU_AVDA_CODEC_IMAGE_H_ | 5 #ifndef MEDIA_GPU_AVDA_CODEC_IMAGE_H_ |
| 6 #define MEDIA_GPU_AVDA_CODEC_IMAGE_H_ | 6 #define MEDIA_GPU_AVDA_CODEC_IMAGE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 // GLImage that renders MediaCodec buffers to a SurfaceTexture or SurfaceView as | 24 // GLImage that renders MediaCodec buffers to a SurfaceTexture or SurfaceView as |
| 25 // needed in order to draw them. | 25 // needed in order to draw them. |
| 26 class AVDACodecImage : public gpu::gles2::GLStreamTextureImage { | 26 class AVDACodecImage : public gpu::gles2::GLStreamTextureImage { |
| 27 public: | 27 public: |
| 28 AVDACodecImage(int picture_buffer_id, | 28 AVDACodecImage(int picture_buffer_id, |
| 29 const scoped_refptr<AVDASharedState>& shared_state, | 29 const scoped_refptr<AVDASharedState>& shared_state, |
| 30 VideoCodecBridge* codec, | 30 VideoCodecBridge* codec, |
| 31 const base::WeakPtr<gpu::gles2::GLES2Decoder>& decoder); | 31 const base::WeakPtr<gpu::gles2::GLES2Decoder>& decoder); |
| 32 | 32 |
| 33 // gl::GLImage implementation | 33 // gl::GLImage implementation |
| 34 void Destroy(bool have_context) override; | |
| 35 gfx::Size GetSize() override; | 34 gfx::Size GetSize() override; |
| 36 unsigned GetInternalFormat() override; | 35 unsigned GetInternalFormat() override; |
| 37 bool BindTexImage(unsigned target) override; | 36 bool BindTexImage(unsigned target) override; |
| 38 void ReleaseTexImage(unsigned target) override; | 37 void ReleaseTexImage(unsigned target) override; |
| 39 bool CopyTexImage(unsigned target) override; | 38 bool CopyTexImage(unsigned target) override; |
| 40 bool CopyTexSubImage(unsigned target, | 39 bool CopyTexSubImage(unsigned target, |
| 41 const gfx::Point& offset, | 40 const gfx::Point& offset, |
| 42 const gfx::Rect& rect) override; | 41 const gfx::Rect& rect) override; |
| 43 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 42 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
| 44 int z_order, | 43 int z_order, |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 150 |
| 152 // The picture buffer id attached to this image. | 151 // The picture buffer id attached to this image. |
| 153 int picture_buffer_id_; | 152 int picture_buffer_id_; |
| 154 | 153 |
| 155 DISALLOW_COPY_AND_ASSIGN(AVDACodecImage); | 154 DISALLOW_COPY_AND_ASSIGN(AVDACodecImage); |
| 156 }; | 155 }; |
| 157 | 156 |
| 158 } // namespace media | 157 } // namespace media |
| 159 | 158 |
| 160 #endif // MEDIA_GPU_AVDA_CODEC_IMAGE_H_ | 159 #endif // MEDIA_GPU_AVDA_CODEC_IMAGE_H_ |
| OLD | NEW |