| 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 } | 16 } |
| 17 | 17 |
| 18 namespace gpu { | 18 namespace gpu { |
| 19 namespace gles2 { | 19 namespace gles2 { |
| 20 class GLStreamTextureImage; |
| 20 class TextureRef; | 21 class TextureRef; |
| 21 } | 22 } |
| 22 } | 23 } |
| 23 | 24 |
| 24 namespace content { | 25 namespace content { |
| 25 | 26 |
| 26 class AVDACodecImage; | 27 class AVDACodecImage; |
| 27 class AVDASharedState; | 28 class AVDASharedState; |
| 28 | 29 |
| 29 // A BackingStrategy implementation that defers releasing codec buffers until | 30 // A BackingStrategy implementation that defers releasing codec buffers until |
| (...skipping 27 matching lines...) Expand all Loading... |
| 57 private: | 58 private: |
| 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( |
| 68 const scoped_refptr<gl::GLImage>& image); | 69 const media::PictureBuffer& picture_buffer, |
| 70 const scoped_refptr<gpu::gles2::GLStreamTextureImage>& image); |
| 69 | 71 |
| 70 scoped_refptr<AVDASharedState> shared_state_; | 72 scoped_refptr<AVDASharedState> shared_state_; |
| 71 | 73 |
| 72 AVDAStateProvider* state_provider_; | 74 AVDAStateProvider* state_provider_; |
| 73 | 75 |
| 74 // The SurfaceTexture to render to. Non-null after Initialize() if | 76 // The SurfaceTexture to render to. Non-null after Initialize() if |
| 75 // we're not rendering to a SurfaceView. | 77 // we're not rendering to a SurfaceView. |
| 76 scoped_refptr<gfx::SurfaceTexture> surface_texture_; | 78 scoped_refptr<gfx::SurfaceTexture> surface_texture_; |
| 77 | 79 |
| 78 media::VideoCodecBridge* media_codec_; | 80 media::VideoCodecBridge* media_codec_; |
| 79 | 81 |
| 80 DISALLOW_COPY_AND_ASSIGN(AndroidDeferredRenderingBackingStrategy); | 82 DISALLOW_COPY_AND_ASSIGN(AndroidDeferredRenderingBackingStrategy); |
| 81 }; | 83 }; |
| 82 | 84 |
| 83 } // namespace content | 85 } // namespace content |
| 84 | 86 |
| 85 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_
H_ | 87 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_
H_ |
| OLD | NEW |