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

Side by Side Diff: cc/resources/video_resource_updater.h

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase Created 4 years, 8 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 | « cc/resources/ui_resource_request.cc ('k') | cc/resources/video_resource_updater_unittest.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ 5 #ifndef CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_
6 #define CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ 6 #define CC_RESOURCES_VIDEO_RESOURCE_UPDATER_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 <memory>
12 #include <vector> 13 #include <vector>
13 14
14 #include "base/macros.h" 15 #include "base/macros.h"
15 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
16 #include "base/memory/scoped_ptr.h"
17 #include "base/memory/weak_ptr.h" 17 #include "base/memory/weak_ptr.h"
18 #include "base/time/time.h" 18 #include "base/time/time.h"
19 #include "cc/base/cc_export.h" 19 #include "cc/base/cc_export.h"
20 #include "cc/resources/release_callback_impl.h" 20 #include "cc/resources/release_callback_impl.h"
21 #include "cc/resources/resource_format.h" 21 #include "cc/resources/resource_format.h"
22 #include "cc/resources/texture_mailbox.h" 22 #include "cc/resources/texture_mailbox.h"
23 #include "ui/gfx/geometry/size.h" 23 #include "ui/gfx/geometry/size.h"
24 24
25 namespace media { 25 namespace media {
26 class SkCanvasVideoRenderer; 26 class SkCanvasVideoRenderer;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 BlockingTaskRunner* main_thread_task_runner); 154 BlockingTaskRunner* main_thread_task_runner);
155 #if DCHECK_IS_ON() 155 #if DCHECK_IS_ON()
156 // Mark the |destructed| as true when the orginal VideoFrame is destructed. 156 // Mark the |destructed| as true when the orginal VideoFrame is destructed.
157 static void MarkOldResource(base::WeakPtr<VideoResourceUpdater> updater, 157 static void MarkOldResource(base::WeakPtr<VideoResourceUpdater> updater,
158 const media::VideoFrame* video_frame_ptr, 158 const media::VideoFrame* video_frame_ptr,
159 base::TimeDelta timestamp); 159 base::TimeDelta timestamp);
160 #endif 160 #endif
161 161
162 ContextProvider* context_provider_; 162 ContextProvider* context_provider_;
163 ResourceProvider* resource_provider_; 163 ResourceProvider* resource_provider_;
164 scoped_ptr<media::SkCanvasVideoRenderer> video_renderer_; 164 std::unique_ptr<media::SkCanvasVideoRenderer> video_renderer_;
165 std::vector<uint8_t> upload_pixels_; 165 std::vector<uint8_t> upload_pixels_;
166 166
167 // Recycle resources so that we can reduce the number of allocations and 167 // Recycle resources so that we can reduce the number of allocations and
168 // data transfers. 168 // data transfers.
169 ResourceList all_resources_; 169 ResourceList all_resources_;
170 170
171 DISALLOW_COPY_AND_ASSIGN(VideoResourceUpdater); 171 DISALLOW_COPY_AND_ASSIGN(VideoResourceUpdater);
172 }; 172 };
173 173
174 } // namespace cc 174 } // namespace cc
175 175
176 #endif // CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ 176 #endif // CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_
OLDNEW
« no previous file with comments | « cc/resources/ui_resource_request.cc ('k') | cc/resources/video_resource_updater_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698