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

Side by Side Diff: media/gpu/ipc/service/gpu_video_decode_accelerator.h

Issue 2881553002: Add |texture_target_| and |pixel_format_| to media::PictureBuffer (Closed)
Patch Set: Add |texture_target_| and |pixel_format_| to media::PictureBuffer 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_IPC_SERVICE_GPU_VIDEO_DECODE_ACCELERATOR_H_ 5 #ifndef MEDIA_GPU_IPC_SERVICE_GPU_VIDEO_DECODE_ACCELERATOR_H_
6 #define MEDIA_GPU_IPC_SERVICE_GPU_VIDEO_DECODE_ACCELERATOR_H_ 6 #define MEDIA_GPU_IPC_SERVICE_GPU_VIDEO_DECODE_ACCELERATOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 private: 87 private:
88 class MessageFilter; 88 class MessageFilter;
89 89
90 // We only allow self-delete, from OnWillDestroyStub(), after cleanup there. 90 // We only allow self-delete, from OnWillDestroyStub(), after cleanup there.
91 ~GpuVideoDecodeAccelerator() override; 91 ~GpuVideoDecodeAccelerator() override;
92 92
93 // Handlers for IPC messages. 93 // Handlers for IPC messages.
94 void OnDecode(const BitstreamBuffer& bitstream_buffer); 94 void OnDecode(const BitstreamBuffer& bitstream_buffer);
95 void OnAssignPictureBuffers( 95 void OnAssignPictureBuffers(
96 const std::vector<int32_t>& buffer_ids, 96 const std::vector<int32_t>& buffer_ids,
97 const std::vector<PictureBuffer::TextureIds>& texture_ids); 97 const std::vector<PictureBuffer::TextureIds>& texture_ids,
98 uint32_t texture_target,
99 VideoPixelFormat pixel_format,
100 const gfx::Size& dimensions);
98 void OnReusePictureBuffer(int32_t picture_buffer_id); 101 void OnReusePictureBuffer(int32_t picture_buffer_id);
99 void OnFlush(); 102 void OnFlush();
100 void OnReset(); 103 void OnReset();
101 void OnSetSurface(int32_t surface_id); 104 void OnSetSurface(int32_t surface_id);
102 void OnDestroy(); 105 void OnDestroy();
103 106
104 // Called on IO thread when |filter_| has been removed. 107 // Called on IO thread when |filter_| has been removed.
105 void OnFilterRemoved(); 108 void OnFilterRemoved();
106 109
107 // Sets the texture to cleared. 110 // Sets the texture to cleared.
(...skipping 15 matching lines...) Expand all
123 126
124 // Callback for making the relevant context current for GL calls. 127 // Callback for making the relevant context current for GL calls.
125 MakeGLContextCurrentCallback make_context_current_cb_; 128 MakeGLContextCurrentCallback make_context_current_cb_;
126 129
127 // Callback to bind a GLImage to a given texture id and target. 130 // Callback to bind a GLImage to a given texture id and target.
128 BindGLImageCallback bind_image_cb_; 131 BindGLImageCallback bind_image_cb_;
129 132
130 // Callback to return a WeakPtr to GLES2Decoder. 133 // Callback to return a WeakPtr to GLES2Decoder.
131 GetGLES2DecoderCallback get_gles2_decoder_cb_; 134 GetGLES2DecoderCallback get_gles2_decoder_cb_;
132 135
133 // The texture dimensions as requested by ProvidePictureBuffers().
134 gfx::Size texture_dimensions_;
135
136 // The texture target as requested by ProvidePictureBuffers().
137 uint32_t texture_target_;
138
139 // The number of textures per picture buffer as requests by 136 // The number of textures per picture buffer as requests by
140 // ProvidePictureBuffers() 137 // ProvidePictureBuffers()
141 uint32_t textures_per_buffer_; 138 uint32_t textures_per_buffer_;
142 139
143 // The message filter to run VDA::Decode on IO thread if VDA supports it. 140 // The message filter to run VDA::Decode on IO thread if VDA supports it.
144 scoped_refptr<MessageFilter> filter_; 141 scoped_refptr<MessageFilter> filter_;
145 142
146 // Used to wait on for |filter_| to be removed, before we can safely 143 // Used to wait on for |filter_| to be removed, before we can safely
147 // destroy the VDA. 144 // destroy the VDA.
148 base::WaitableEvent filter_removed_; 145 base::WaitableEvent filter_removed_;
(...skipping 19 matching lines...) Expand all
168 // cleared. 165 // cleared.
169 std::map<int32_t, std::vector<scoped_refptr<gpu::gles2::TextureRef>>> 166 std::map<int32_t, std::vector<scoped_refptr<gpu::gles2::TextureRef>>>
170 uncleared_textures_; 167 uncleared_textures_;
171 168
172 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); 169 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator);
173 }; 170 };
174 171
175 } // namespace media 172 } // namespace media
176 173
177 #endif // MEDIA_GPU_IPC_SERVICE_GPU_VIDEO_DECODE_ACCELERATOR_H_ 174 #endif // MEDIA_GPU_IPC_SERVICE_GPU_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698