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

Side by Side Diff: content/renderer/pepper/video_decoder_shim.h

Issue 1457963002: Use scoped_ptr instead of linked_ptr from /content/renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android compile error Created 5 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_RENDERER_PEPPER_VIDEO_DECODER_SHIM_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_VIDEO_DECODER_SHIM_H_
6 #define CONTENT_RENDERER_PEPPER_VIDEO_DECODER_SHIM_H_ 6 #define CONTENT_RENDERER_PEPPER_VIDEO_DECODER_SHIM_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/containers/hash_tables.h" 12 #include "base/containers/hash_tables.h"
13 #include "base/memory/linked_ptr.h"
14 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
16 #include "gpu/command_buffer/common/mailbox.h" 15 #include "gpu/command_buffer/common/mailbox.h"
17 #include "media/base/video_decoder_config.h" 16 #include "media/base/video_decoder_config.h"
18 #include "media/video/video_decode_accelerator.h" 17 #include "media/video/video_decode_accelerator.h"
19 18
20 #include "ppapi/c/pp_codecs.h" 19 #include "ppapi/c/pp_codecs.h"
21 20
22 namespace base { 21 namespace base {
23 class SingleThreadTaskRunner; 22 class SingleThreadTaskRunner;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // Track textures that are no longer needed (these are plugin ids.) 103 // Track textures that are no longer needed (these are plugin ids.)
105 TextureIdSet textures_to_dismiss_; 104 TextureIdSet textures_to_dismiss_;
106 // Mailboxes for pending texture requests, to write to plugin's textures. 105 // Mailboxes for pending texture requests, to write to plugin's textures.
107 std::vector<gpu::Mailbox> pending_texture_mailboxes_; 106 std::vector<gpu::Mailbox> pending_texture_mailboxes_;
108 107
109 // Queue of completed decode ids, for notifying the host. 108 // Queue of completed decode ids, for notifying the host.
110 typedef std::queue<uint32_t> CompletedDecodeQueue; 109 typedef std::queue<uint32_t> CompletedDecodeQueue;
111 CompletedDecodeQueue completed_decodes_; 110 CompletedDecodeQueue completed_decodes_;
112 111
113 // Queue of decoded frames that await rgb->yuv conversion. 112 // Queue of decoded frames that await rgb->yuv conversion.
114 typedef std::queue<linked_ptr<PendingFrame> > PendingFrameQueue; 113 typedef std::queue<scoped_ptr<PendingFrame>> PendingFrameQueue;
115 PendingFrameQueue pending_frames_; 114 PendingFrameQueue pending_frames_;
116 115
117 // The optimal number of textures to allocate for decoder_impl_. 116 // The optimal number of textures to allocate for decoder_impl_.
118 uint32_t texture_pool_size_; 117 uint32_t texture_pool_size_;
119 118
120 uint32_t num_pending_decodes_; 119 uint32_t num_pending_decodes_;
121 120
122 scoped_ptr<YUVConverter> yuv_converter_; 121 scoped_ptr<YUVConverter> yuv_converter_;
123 122
124 base::WeakPtrFactory<VideoDecoderShim> weak_ptr_factory_; 123 base::WeakPtrFactory<VideoDecoderShim> weak_ptr_factory_;
125 124
126 DISALLOW_COPY_AND_ASSIGN(VideoDecoderShim); 125 DISALLOW_COPY_AND_ASSIGN(VideoDecoderShim);
127 }; 126 };
128 127
129 } // namespace content 128 } // namespace content
130 129
131 #endif // CONTENT_RENDERER_PEPPER_VIDEO_DECODER_SHIM_H_ 130 #endif // CONTENT_RENDERER_PEPPER_VIDEO_DECODER_SHIM_H_
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.cc ('k') | content/renderer/pepper/video_decoder_shim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698