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

Unified 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: add gn build. 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 side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/media/android_copying_backing_strategy.h
diff --git a/content/common/gpu/media/android_copying_backing_strategy.h b/content/common/gpu/media/android_copying_backing_strategy.h
new file mode 100644
index 0000000000000000000000000000000000000000..039823d2264077025b8290f61c181f0e0ad01909
--- /dev/null
+++ b/content/common/gpu/media/android_copying_backing_strategy.h
@@ -0,0 +1,49 @@
+// Copyright (c) 2015 The Chromium Authors. All rights reserved.
sandersd (OOO until July 31) 2015/09/10 20:28:20 http://www.chromium.org/developers/coding-style#TO
liberato (no reviews please) 2015/09/14 17:41:28 Done, and elsewhere.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_
+#define CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_
+
+#include <list>
sandersd (OOO until July 31) 2015/09/10 20:28:20 Many of these headers are not used in this file.
liberato (no reviews please) 2015/09/14 17:41:28 Done.
+#include <map>
+#include <queue>
+#include <string>
+#include <vector>
+
+#include "base/compiler_specific.h"
+#include "base/threading/thread_checker.h"
+#include "content/common/content_export.h"
+#include "content/common/gpu/media/android_video_decode_accelerator.h"
+#include "content/common/gpu/media/android_video_decode_accelerator_state_provider.h"
+#include "gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h"
+#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
+
+namespace content {
+// A BackingStrategy implementation that copies images to PictureBuffer
+// textures via gpu texture copy.
+class CONTENT_EXPORT AndroidCopyingBackingStrategy
+ : public AndroidVideoDecodeAccelerator::BackingStrategy {
+ public:
+ AndroidCopyingBackingStrategy();
+ ~AndroidCopyingBackingStrategy() override;
+
+ // AndroidVideoDecodeAccelerator::BackingStrategy
+ void SetStateProvider(AndroidVideoDecodeAcceleratorStateProvider*) override;
+ void Cleanup() override;
+ uint32 GetNumPictureBuffers() const override;
+ uint32 GetTextureTarget() const override;
+ void AssignCurrentSurfaceToPictureBuffer(
+ int32 codec_buffer_index,
+ const media::PictureBuffer&) override;
+
+ private:
+ // Used for copy the texture from surface texture to picture buffers.
+ scoped_ptr<gpu::CopyTextureCHROMIUMResourceManager> copier_;
+
+ AndroidVideoDecodeAcceleratorStateProvider* state_provider_;
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_

Powered by Google App Engine
This is Rietveld 408576698