| 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 CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_ |
| 6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/threading/thread_checker.h" | 9 #include "base/threading/thread_checker.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 : public AndroidVideoDecodeAccelerator::BackingStrategy { | 28 : public AndroidVideoDecodeAccelerator::BackingStrategy { |
| 29 public: | 29 public: |
| 30 AndroidCopyingBackingStrategy(); | 30 AndroidCopyingBackingStrategy(); |
| 31 ~AndroidCopyingBackingStrategy() override; | 31 ~AndroidCopyingBackingStrategy() override; |
| 32 | 32 |
| 33 // AndroidVideoDecodeAccelerator::BackingStrategy | 33 // AndroidVideoDecodeAccelerator::BackingStrategy |
| 34 void SetStateProvider(AndroidVideoDecodeAcceleratorStateProvider*) override; | 34 void SetStateProvider(AndroidVideoDecodeAcceleratorStateProvider*) override; |
| 35 void Cleanup() override; | 35 void Cleanup() override; |
| 36 uint32 GetNumPictureBuffers() const override; | 36 uint32 GetNumPictureBuffers() const override; |
| 37 uint32 GetTextureTarget() const override; | 37 uint32 GetTextureTarget() const override; |
| 38 void AssignCurrentSurfaceToPictureBuffer( | 38 scoped_refptr<gfx::SurfaceTexture> CreateSurfaceTexture() override; |
| 39 int32 codec_buffer_index, | 39 void UseCodecBufferForPictureBuffer(int32 codec_buffer_index, |
| 40 const media::PictureBuffer&) override; | 40 const media::PictureBuffer&) override; |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 // Used for copy the texture from surface texture to picture buffers. | 43 // Used for copy the texture from surface texture to picture buffers. |
| 44 scoped_ptr<gpu::CopyTextureCHROMIUMResourceManager> copier_; | 44 scoped_ptr<gpu::CopyTextureCHROMIUMResourceManager> copier_; |
| 45 | 45 |
| 46 AndroidVideoDecodeAcceleratorStateProvider* state_provider_; | 46 AndroidVideoDecodeAcceleratorStateProvider* state_provider_; |
| 47 |
| 48 // A container of texture. Used to set a texture to |media_codec_|. |
| 49 scoped_refptr<gfx::SurfaceTexture> surface_texture_; |
| 50 |
| 51 // The texture id which is set to |surface_texture_|. |
| 52 uint32 surface_texture_id_; |
| 47 }; | 53 }; |
| 48 | 54 |
| 49 } // namespace content | 55 } // namespace content |
| 50 | 56 |
| 51 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_ | 57 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_ |
| OLD | NEW |