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 <list> | |
DaleCurtis
2015/09/14 18:46:21
?
liberato (no reviews please)
2015/09/14 22:34:53
no idea. done.
| |
9 //#include <map> | |
10 //#include <queue> | |
11 //#include <string> | |
12 //#include <vector> | |
13 | |
14 #include "base/compiler_specific.h" | |
15 #include "base/threading/thread_checker.h" | |
16 #include "content/common/content_export.h" | |
17 #include "content/common/gpu/media/android_video_decode_accelerator.h" | |
18 | |
19 namespace gpu { | |
20 class CopyTextureCHROMIUMResourceManager; | |
21 } | |
22 | |
23 namespace media { | |
24 class PictureBuffer; | |
25 } | |
26 | |
27 namespace content { | |
28 | |
29 class AndroidVideoDecodeAcceleratorStateProvider; | |
30 | |
31 // A BackingStrategy implementation that copies images to PictureBuffer | |
32 // textures via gpu texture copy. | |
33 class CONTENT_EXPORT AndroidCopyingBackingStrategy | |
34 : public AndroidVideoDecodeAccelerator::BackingStrategy { | |
35 public: | |
36 AndroidCopyingBackingStrategy(); | |
37 ~AndroidCopyingBackingStrategy() override; | |
38 | |
39 // AndroidVideoDecodeAccelerator::BackingStrategy | |
40 void SetStateProvider(AndroidVideoDecodeAcceleratorStateProvider*) override; | |
41 void Cleanup() override; | |
42 uint32 GetNumPictureBuffers() const override; | |
43 uint32 GetTextureTarget() const override; | |
44 void AssignCurrentSurfaceToPictureBuffer( | |
45 int32 codec_buffer_index, | |
46 const media::PictureBuffer&) override; | |
47 | |
48 private: | |
49 // Used for copy the texture from surface texture to picture buffers. | |
50 scoped_ptr<gpu::CopyTextureCHROMIUMResourceManager> copier_; | |
51 | |
52 AndroidVideoDecodeAcceleratorStateProvider* state_provider_; | |
53 }; | |
54 | |
55 } // namespace content | |
56 | |
57 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_ | |
OLD | NEW |