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

Unified Diff: cc/raster/staging_buffer_pool.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/raster/single_thread_task_graph_runner.h ('k') | cc/raster/staging_buffer_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/raster/staging_buffer_pool.h
diff --git a/cc/raster/staging_buffer_pool.h b/cc/raster/staging_buffer_pool.h
index 1b3f04604e23b7b6794ffe2f3580c8f3e4025c65..14818b4b4262a0ec202dbd8cb274bfca56b6d60a 100644
--- a/cc/raster/staging_buffer_pool.h
+++ b/cc/raster/staging_buffer_pool.h
@@ -8,6 +8,7 @@
#include <stdint.h>
#include <deque>
+#include <memory>
#include <set>
#include "base/macros.h"
@@ -40,7 +41,7 @@ struct StagingBuffer {
const gfx::Size size;
const ResourceFormat format;
- scoped_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer;
+ std::unique_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer;
base::TimeTicks last_usage;
unsigned texture_id;
unsigned image_id;
@@ -53,7 +54,7 @@ class CC_EXPORT StagingBufferPool
public:
~StagingBufferPool() final;
- static scoped_ptr<StagingBufferPool> Create(
+ static std::unique_ptr<StagingBufferPool> Create(
base::SequencedTaskRunner* task_runner,
ResourceProvider* resource_provider,
bool use_partial_raster,
@@ -64,9 +65,10 @@ class CC_EXPORT StagingBufferPool
bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
base::trace_event::ProcessMemoryDump* pmd) override;
- scoped_ptr<StagingBuffer> AcquireStagingBuffer(const Resource* resource,
- uint64_t previous_content_id);
- void ReleaseStagingBuffer(scoped_ptr<StagingBuffer> staging_buffer);
+ std::unique_ptr<StagingBuffer> AcquireStagingBuffer(
+ const Resource* resource,
+ uint64_t previous_content_id);
+ void ReleaseStagingBuffer(std::unique_ptr<StagingBuffer> staging_buffer);
private:
StagingBufferPool(base::SequencedTaskRunner* task_runner,
@@ -85,7 +87,8 @@ class CC_EXPORT StagingBufferPool
void ReduceMemoryUsage();
void ReleaseBuffersNotUsedSince(base::TimeTicks time);
- scoped_ptr<base::trace_event::ConvertableToTraceFormat> StateAsValue() const;
+ std::unique_ptr<base::trace_event::ConvertableToTraceFormat> StateAsValue()
+ const;
void StagingStateAsValueInto(
base::trace_event::TracedValue* staging_state) const;
@@ -97,7 +100,7 @@ class CC_EXPORT StagingBufferPool
// |lock_| must be acquired when accessing the following members.
using StagingBufferSet = std::set<const StagingBuffer*>;
StagingBufferSet buffers_;
- using StagingBufferDeque = std::deque<scoped_ptr<StagingBuffer>>;
+ using StagingBufferDeque = std::deque<std::unique_ptr<StagingBuffer>>;
StagingBufferDeque free_buffers_;
StagingBufferDeque busy_buffers_;
const int max_staging_buffer_usage_in_bytes_;
« no previous file with comments | « cc/raster/single_thread_task_graph_runner.h ('k') | cc/raster/staging_buffer_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698