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

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

Issue 1682343002: AVDACodecImages keep a reference to the SurfaceTexture backing them (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comment Created 4 years, 10 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_H_ 5 #ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_H_
6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_H_ 6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "content/common/gpu/media/android_video_decode_accelerator.h" 12 #include "content/common/gpu/media/android_video_decode_accelerator.h"
13 13
14 namespace gl { 14 namespace gl {
15 class GLImage; 15 class GLImage;
16 } 16 }
17 17
18 namespace gpu { 18 namespace gpu {
19 namespace gles2 { 19 namespace gles2 {
20 class TextureRef; 20 class TextureRef;
21 } 21 }
22 } 22 }
23 23
24 namespace content { 24 namespace content {
25 25
26 class AVDACodecImage; 26 class AVDACodecImage;
27 class AVDASharedState; 27 class AVDASharedState;
28 28
29 // A BackingStrategy implementation that defers releasing codec buffers until 29 // A BackingStrategy implementation that defers releasing codec buffers until
30 // a PictureBuffer's texture is used to draw, then draws using the surface 30 // a PictureBuffer's texture is used to draw. To do this it backs PictureBuffers
31 // texture's front buffer rather than a copy. To do this, it uses a GLImage 31 // with AVDACodecImages, which talk to MediaCodec to organize the display of the
32 // implementation to talk to MediaCodec. 32 // right frame. It can render to either a SurfaceTexture or SurfaceView Surface.
33 class CONTENT_EXPORT AndroidDeferredRenderingBackingStrategy 33 class CONTENT_EXPORT AndroidDeferredRenderingBackingStrategy
34 : public AndroidVideoDecodeAccelerator::BackingStrategy { 34 : public AndroidVideoDecodeAccelerator::BackingStrategy {
35 public: 35 public:
36 explicit AndroidDeferredRenderingBackingStrategy( 36 explicit AndroidDeferredRenderingBackingStrategy(
37 AVDAStateProvider* state_provider); 37 AVDAStateProvider* state_provider);
38 ~AndroidDeferredRenderingBackingStrategy() override; 38 ~AndroidDeferredRenderingBackingStrategy() override;
39 39
40 // AndroidVideoDecodeAccelerator::BackingStrategy 40 // AndroidVideoDecodeAccelerator::BackingStrategy
41 gfx::ScopedJavaSurface Initialize(int surface_view_id) override; 41 gfx::ScopedJavaSurface Initialize(int surface_view_id) override;
42 void Cleanup(bool have_context, 42 void Cleanup(bool have_context,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 scoped_refptr<gfx::SurfaceTexture> surface_texture_; 76 scoped_refptr<gfx::SurfaceTexture> surface_texture_;
77 77
78 media::VideoCodecBridge* media_codec_; 78 media::VideoCodecBridge* media_codec_;
79 79
80 DISALLOW_COPY_AND_ASSIGN(AndroidDeferredRenderingBackingStrategy); 80 DISALLOW_COPY_AND_ASSIGN(AndroidDeferredRenderingBackingStrategy);
81 }; 81 };
82 82
83 } // namespace content 83 } // namespace content
84 84
85 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_ H_ 85 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698