| 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 MEDIA_GPU_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_H_ |
| 6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_H_ | 6 #define MEDIA_GPU_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "content/common/content_export.h" | 12 #include "media/gpu/android_video_decode_accelerator.h" |
| 13 #include "content/common/gpu/media/android_video_decode_accelerator.h" | 13 #include "media/gpu/media_gpu_export.h" |
| 14 | 14 |
| 15 namespace gl { | 15 namespace gl { |
| 16 class GLImage; | 16 class GLImage; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace gpu { | 19 namespace gpu { |
| 20 namespace gles2 { | 20 namespace gles2 { |
| 21 class GLStreamTextureImage; | 21 class GLStreamTextureImage; |
| 22 class TextureRef; | 22 class TextureRef; |
| 23 } | 23 } |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace content { | 26 namespace media { |
| 27 | 27 |
| 28 class AVDACodecImage; | 28 class AVDACodecImage; |
| 29 class AVDASharedState; | 29 class AVDASharedState; |
| 30 | 30 |
| 31 // A BackingStrategy implementation that defers releasing codec buffers until | 31 // A BackingStrategy implementation that defers releasing codec buffers until |
| 32 // a PictureBuffer's texture is used to draw, then draws using the surface | 32 // a PictureBuffer's texture is used to draw, then draws using the surface |
| 33 // texture's front buffer rather than a copy. To do this, it uses a GLImage | 33 // texture's front buffer rather than a copy. To do this, it uses a GLImage |
| 34 // implementation to talk to MediaCodec. | 34 // implementation to talk to MediaCodec. |
| 35 class CONTENT_EXPORT AndroidDeferredRenderingBackingStrategy | 35 class MEDIA_GPU_EXPORT AndroidDeferredRenderingBackingStrategy |
| 36 : public AndroidVideoDecodeAccelerator::BackingStrategy { | 36 : public AndroidVideoDecodeAccelerator::BackingStrategy { |
| 37 public: | 37 public: |
| 38 explicit AndroidDeferredRenderingBackingStrategy( | 38 explicit AndroidDeferredRenderingBackingStrategy( |
| 39 AVDAStateProvider* state_provider); | 39 AVDAStateProvider* state_provider); |
| 40 ~AndroidDeferredRenderingBackingStrategy() override; | 40 ~AndroidDeferredRenderingBackingStrategy() override; |
| 41 | 41 |
| 42 // AndroidVideoDecodeAccelerator::BackingStrategy | 42 // AndroidVideoDecodeAccelerator::BackingStrategy |
| 43 gfx::ScopedJavaSurface Initialize(int surface_view_id) override; | 43 gfx::ScopedJavaSurface Initialize(int surface_view_id) override; |
| 44 void Cleanup( | 44 void Cleanup( |
| 45 bool have_context, | 45 bool have_context, |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 media::VideoCodecBridge* media_codec_; | 100 media::VideoCodecBridge* media_codec_; |
| 101 | 101 |
| 102 // Picture buffer IDs that are out for display. Stored in order of frames as | 102 // Picture buffer IDs that are out for display. Stored in order of frames as |
| 103 // they are returned from the decoder. | 103 // they are returned from the decoder. |
| 104 std::vector<int32_t> pictures_out_for_display_; | 104 std::vector<int32_t> pictures_out_for_display_; |
| 105 | 105 |
| 106 DISALLOW_COPY_AND_ASSIGN(AndroidDeferredRenderingBackingStrategy); | 106 DISALLOW_COPY_AND_ASSIGN(AndroidDeferredRenderingBackingStrategy); |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 } // namespace content | 109 } // namespace media |
| 110 | 110 |
| 111 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_
H_ | 111 #endif // MEDIA_GPU_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_H_ |
| OLD | NEW |