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

Side by Side Diff: media/filters/gpu_video_decoder.h

Issue 2254993003: Avoid creating sync token when only change is new hardware video frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix deps Created 4 years, 4 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/BUILD.gn ('k') | media/filters/gpu_video_decoder.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 (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_FILTERS_GPU_VIDEO_DECODER_H_ 5 #ifndef MEDIA_FILTERS_GPU_VIDEO_DECODER_H_
6 #define MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ 6 #define MEDIA_FILTERS_GPU_VIDEO_DECODER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <list> 11 #include <list>
12 #include <map> 12 #include <map>
13 #include <set> 13 #include <set>
14 #include <utility> 14 #include <utility>
15 #include <vector> 15 #include <vector>
16 16
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/memory/weak_ptr.h" 18 #include "base/memory/weak_ptr.h"
19 #include "gpu/command_buffer/common/sync_token.h"
19 #include "media/base/pipeline_status.h" 20 #include "media/base/pipeline_status.h"
20 #include "media/base/surface_manager.h" 21 #include "media/base/surface_manager.h"
21 #include "media/base/video_decoder.h" 22 #include "media/base/video_decoder.h"
22 #include "media/video/video_decode_accelerator.h" 23 #include "media/video/video_decode_accelerator.h"
23 24
24 template <class T> class scoped_refptr; 25 template <class T> class scoped_refptr;
25 26
26 namespace base { 27 namespace base {
27 class SharedMemory; 28 class SharedMemory;
28 class SingleThreadTaskRunner; 29 class SingleThreadTaskRunner;
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 180
180 State state_; 181 State state_;
181 182
182 VideoDecoderConfig config_; 183 VideoDecoderConfig config_;
183 184
184 // Shared-memory buffer pool. Since allocating SHM segments requires a 185 // Shared-memory buffer pool. Since allocating SHM segments requires a
185 // round-trip to the browser process, we keep allocation out of the 186 // round-trip to the browser process, we keep allocation out of the
186 // steady-state of the decoder. 187 // steady-state of the decoder.
187 std::vector<SHMBuffer*> available_shm_segments_; 188 std::vector<SHMBuffer*> available_shm_segments_;
188 189
190 // Placeholder sync token that was created and validated after the most
191 // recent picture buffers were created.
192 gpu::SyncToken sync_token_;
193
189 std::map<int32_t, PendingDecoderBuffer> bitstream_buffers_in_decoder_; 194 std::map<int32_t, PendingDecoderBuffer> bitstream_buffers_in_decoder_;
190 PictureBufferMap assigned_picture_buffers_; 195 PictureBufferMap assigned_picture_buffers_;
191 // PictureBuffers given to us by VDA via PictureReady, which we sent forward 196 // PictureBuffers given to us by VDA via PictureReady, which we sent forward
192 // as VideoFrames to be rendered via decode_cb_, and which will be returned 197 // as VideoFrames to be rendered via decode_cb_, and which will be returned
193 // to us via ReusePictureBuffer. 198 // to us via ReusePictureBuffer.
194 typedef std::map<int32_t /* picture_buffer_id */, 199 typedef std::map<int32_t /* picture_buffer_id */,
195 PictureBuffer::TextureIds /* texture_id */> 200 PictureBuffer::TextureIds /* texture_id */>
196 PictureBufferTextureMap; 201 PictureBufferTextureMap;
197 PictureBufferTextureMap picture_buffers_at_display_; 202 PictureBufferTextureMap picture_buffers_at_display_;
198 203
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // Bound to factories_->GetMessageLoop(). 246 // Bound to factories_->GetMessageLoop().
242 // NOTE: Weak pointers must be invalidated before all other member variables. 247 // NOTE: Weak pointers must be invalidated before all other member variables.
243 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_; 248 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_;
244 249
245 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); 250 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder);
246 }; 251 };
247 252
248 } // namespace media 253 } // namespace media
249 254
250 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ 255 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « media/BUILD.gn ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698