OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_ |
| 6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_ |
| 7 |
| 8 #include "base/compiler_specific.h" |
| 9 #include "base/threading/thread_checker.h" |
| 10 #include "content/common/content_export.h" |
| 11 #include "content/common/gpu/media/android_video_decode_accelerator.h" |
| 12 |
| 13 namespace gpu { |
| 14 class CopyTextureCHROMIUMResourceManager; |
| 15 } |
| 16 |
| 17 namespace media { |
| 18 class PictureBuffer; |
| 19 } |
| 20 |
| 21 namespace content { |
| 22 |
| 23 class AndroidVideoDecodeAcceleratorStateProvider; |
| 24 |
| 25 // A BackingStrategy implementation that copies images to PictureBuffer |
| 26 // textures via gpu texture copy. |
| 27 class CONTENT_EXPORT AndroidCopyingBackingStrategy |
| 28 : public AndroidVideoDecodeAccelerator::BackingStrategy { |
| 29 public: |
| 30 AndroidCopyingBackingStrategy(); |
| 31 ~AndroidCopyingBackingStrategy() override; |
| 32 |
| 33 // AndroidVideoDecodeAccelerator::BackingStrategy |
| 34 void SetStateProvider(AndroidVideoDecodeAcceleratorStateProvider*) override; |
| 35 void Cleanup() override; |
| 36 uint32 GetNumPictureBuffers() const override; |
| 37 uint32 GetTextureTarget() const override; |
| 38 void AssignCurrentSurfaceToPictureBuffer( |
| 39 int32 codec_buffer_index, |
| 40 const media::PictureBuffer&) override; |
| 41 |
| 42 private: |
| 43 // Used for copy the texture from surface texture to picture buffers. |
| 44 scoped_ptr<gpu::CopyTextureCHROMIUMResourceManager> copier_; |
| 45 |
| 46 AndroidVideoDecodeAcceleratorStateProvider* state_provider_; |
| 47 }; |
| 48 |
| 49 } // namespace content |
| 50 |
| 51 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_ |
OLD | NEW |