Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Side by Side Diff: content/common/gpu/media/android_copying_backing_strategy.h

Issue 1313913003: Begin refactor of AVDA to support zero-copy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed unit test. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 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>
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 #include "content/common/gpu/media/android_video_decode_accelerator_state_provid er.h"
19 #include "gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h"
20 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
21
22 namespace content {
23 // A BackingStrategy implementation that copies images to PictureBuffer
24 // textures via gpu texture copy.
25 class CONTENT_EXPORT AndroidCopyingBackingStrategy
26 : public AndroidVideoDecodeAccelerator::BackingStrategy {
27 public:
28 AndroidCopyingBackingStrategy();
29 ~AndroidCopyingBackingStrategy() override;
30
31 // AndroidVideoDecodeAccelerator::BackingStrategy
32 void SetStateProvider(AndroidVideoDecodeAcceleratorStateProvider*) override;
33 void Cleanup() override;
34 uint32 GetNumPictureBuffers() const override;
35 uint32 GetTextureTarget() const override;
36 void AssignCurrentSurfaceToPictureBuffer(int32 codec_buffer_index,
37 const media::PictureBuffer&) override;
38
39 private:
40 // Used for copy the texture from surface texture to picture buffers.
41 scoped_ptr<gpu::CopyTextureCHROMIUMResourceManager> copier_;
42
43 AndroidVideoDecodeAcceleratorStateProvider* state_provider_;
44 };
45
46 } // namespace content
47
48 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698