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

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: refactored into composable pieces, to see if it looks nicer. 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) 2013 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 "gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h"
19 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
20
21 namespace content {
22 // A BackingStrategy implementation that copies images to PictureBuffer
23 // textures via gpu texture copy.
24 class CONTENT_EXPORT AndroidCopyingBackingStrategy
25 : public AndroidVideoDecodeAccelerator::BackingStrategy {
26 public:
27 AndroidCopyingBackingStrategy();
28 ~AndroidCopyingBackingStrategy() override;
29
30 // AndroidVideoDecodeAccelerator::BackingStrategy
31 void SetStateProvider(AndroidVideoDecodeAccelerator::StateProvider*) override;
32 void Cleanup() override;
33 uint32 GetNumPictureBuffers() const override;
34 uint32 GetTextureTarget() const override;
35 // TODO(liberato): should we just send in the state provider to Assign?
36 // zero copy has an additional callback.
37 void AssignCurrentSurfaceToPictureBuffer(int32 codec_buffer_index,
38 const media::PictureBuffer&) override;
39
40 private:
41 // Used for copy the texture from surface texture to picture buffers.
42 scoped_ptr<gpu::CopyTextureCHROMIUMResourceManager> copier_;
43
44 AndroidVideoDecodeAccelerator::StateProvider* state_provider_;
45 };
46
47 } // namespace content
48
49 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698