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

Side by Side Diff: media/gpu/avda_surface_bundle.h

Issue 2889603005: Position overlays in AVDACodecImage (Closed)
Patch Set: rebased Created 3 years, 7 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
« no previous file with comments | « media/gpu/avda_shared_state.cc ('k') | media/gpu/content_video_view_overlay.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 MEDIA_GPU_AVDA_SURFACE_BUNDLE_H_ 5 #ifndef MEDIA_GPU_AVDA_SURFACE_BUNDLE_H_
6 #define MEDIA_GPU_AVDA_SURFACE_BUNDLE_H_ 6 #define MEDIA_GPU_AVDA_SURFACE_BUNDLE_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "media/base/android/android_overlay.h" 9 #include "media/base/android/android_overlay.h"
10 #include "media/base/surface_manager.h" 10 #include "media/base/surface_manager.h"
11 #include "media/gpu/media_gpu_export.h" 11 #include "media/gpu/media_gpu_export.h"
12 #include "media/gpu/surface_texture_gl_owner.h"
12 #include "ui/gl/android/scoped_java_surface.h" 13 #include "ui/gl/android/scoped_java_surface.h"
13 #include "ui/gl/android/surface_texture.h"
14 14
15 namespace media { 15 namespace media {
16 16
17 // AVDASurfaceBundle is a collection of everything that the producer-side of 17 // AVDASurfaceBundle is a collection of everything that the producer-side of
18 // the output surface needs. In other words, it's the surface, and any 18 // the output surface needs. In other words, it's the surface, and any
19 // SurfaceTexture that backs it. The SurfaceTexture isn't needed directly by 19 // SurfaceTexture that backs it. The SurfaceTexture isn't needed directly by
20 // the producer, but destroying it causes the surface not to work. 20 // the producer, but destroying it causes the surface not to work.
21 // 21 //
22 // The idea is that a reference to this should be kept with the codec, even if 22 // The idea is that a reference to this should be kept with the codec, even if
23 // the codec is sent to another thread. This will prevent the output surface 23 // the codec is sent to another thread. This will prevent the output surface
(...skipping 16 matching lines...) Expand all
40 return overlay->GetJavaSurface(); 40 return overlay->GetJavaSurface();
41 else 41 else
42 return surface_texture_surface.j_surface(); 42 return surface_texture_surface.j_surface();
43 } 43 }
44 44
45 // If |overlay| is non-null, then |overlay| owns j_surface(). 45 // If |overlay| is non-null, then |overlay| owns j_surface().
46 std::unique_ptr<AndroidOverlay> overlay; 46 std::unique_ptr<AndroidOverlay> overlay;
47 47
48 // The SurfaceTexture attached to |surface()|, or nullptr if j_surface() is 48 // The SurfaceTexture attached to |surface()|, or nullptr if j_surface() is
49 // SurfaceView backed. 49 // SurfaceView backed.
50 scoped_refptr<gl::SurfaceTexture> surface_texture; 50 scoped_refptr<SurfaceTextureGLOwner> surface_texture;
51 51
52 // If |surface_texture| is not null, then this is the surface for it. 52 // If |surface_texture| is not null, then this is the surface for it.
53 gl::ScopedJavaSurface surface_texture_surface; 53 gl::ScopedJavaSurface surface_texture_surface;
54 54
55 private: 55 private:
56 ~AVDASurfaceBundle(); 56 ~AVDASurfaceBundle();
57 friend class base::RefCountedThreadSafe<AVDASurfaceBundle>; 57 friend class base::RefCountedThreadSafe<AVDASurfaceBundle>;
58 58
59 DISALLOW_COPY_AND_ASSIGN(AVDASurfaceBundle); 59 DISALLOW_COPY_AND_ASSIGN(AVDASurfaceBundle);
60 }; 60 };
61 61
62 } // namespace media 62 } // namespace media
63 63
64 #endif // MEDIA_GPU_AVDA_SURFACE_BUNDLE_H_ 64 #endif // MEDIA_GPU_AVDA_SURFACE_BUNDLE_H_
OLDNEW
« no previous file with comments | « media/gpu/avda_shared_state.cc ('k') | media/gpu/content_video_view_overlay.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698