OLD | NEW |
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 class GLStreamTextureImage; |
16 } | 17 } |
17 | 18 |
18 namespace gpu { | 19 namespace gpu { |
19 namespace gles2 { | 20 namespace gles2 { |
20 class TextureRef; | 21 class TextureRef; |
21 } | 22 } |
22 } | 23 } |
23 | 24 |
24 namespace content { | 25 namespace content { |
25 | 26 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // Release any codec buffer that is associated with the given picture buffer | 59 // Release any codec buffer that is associated with the given picture buffer |
59 // back to the codec. It is okay if there is no such buffer. | 60 // back to the codec. It is okay if there is no such buffer. |
60 void ReleaseCodecBufferForPicture(const media::PictureBuffer& picture_buffer); | 61 void ReleaseCodecBufferForPicture(const media::PictureBuffer& picture_buffer); |
61 | 62 |
62 // Return the TextureRef for a given PictureBuffer's texture. | 63 // Return the TextureRef for a given PictureBuffer's texture. |
63 gpu::gles2::TextureRef* GetTextureForPicture(const media::PictureBuffer&); | 64 gpu::gles2::TextureRef* GetTextureForPicture(const media::PictureBuffer&); |
64 | 65 |
65 // Return the AVDACodecImage for a given PictureBuffer's texture. | 66 // Return the AVDACodecImage for a given PictureBuffer's texture. |
66 AVDACodecImage* GetImageForPicture(const media::PictureBuffer&); | 67 AVDACodecImage* GetImageForPicture(const media::PictureBuffer&); |
67 void SetImageForPicture(const media::PictureBuffer& picture_buffer, | 68 void SetImageForPicture(const media::PictureBuffer& picture_buffer, |
68 const scoped_refptr<gl::GLImage>& image); | 69 const scoped_refptr<gl::GLStreamTextureImage>& image); |
69 | 70 |
70 scoped_refptr<AVDASharedState> shared_state_; | 71 scoped_refptr<AVDASharedState> shared_state_; |
71 | 72 |
72 AVDAStateProvider* state_provider_; | 73 AVDAStateProvider* state_provider_; |
73 | 74 |
74 // The SurfaceTexture to render to. Non-null after Initialize() if | 75 // The SurfaceTexture to render to. Non-null after Initialize() if |
75 // we're not rendering to a SurfaceView. | 76 // we're not rendering to a SurfaceView. |
76 scoped_refptr<gfx::SurfaceTexture> surface_texture_; | 77 scoped_refptr<gfx::SurfaceTexture> surface_texture_; |
77 | 78 |
78 media::VideoCodecBridge* media_codec_; | 79 media::VideoCodecBridge* media_codec_; |
79 | 80 |
80 DISALLOW_COPY_AND_ASSIGN(AndroidDeferredRenderingBackingStrategy); | 81 DISALLOW_COPY_AND_ASSIGN(AndroidDeferredRenderingBackingStrategy); |
81 }; | 82 }; |
82 | 83 |
83 } // namespace content | 84 } // namespace content |
84 | 85 |
85 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_
H_ | 86 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_
H_ |
OLD | NEW |