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

Unified Diff: content/browser/compositor/buffer_queue.h

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: content/browser/compositor/buffer_queue.h
diff --git a/content/browser/compositor/buffer_queue.h b/content/browser/compositor/buffer_queue.h
index 47b4a7dd00ac0dfe9598065fd232621609a7924e..772501c52a508f1d98aedb71ad19bc24792b5a6c 100644
--- a/content/browser/compositor/buffer_queue.h
+++ b/content/browser/compositor/buffer_queue.h
@@ -8,11 +8,11 @@
#include <stddef.h>
#include <deque>
+#include <memory>
#include <vector>
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "content/common/content_export.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
@@ -67,13 +67,13 @@ class CONTENT_EXPORT BufferQueue {
struct CONTENT_EXPORT AllocatedSurface {
AllocatedSurface(BufferQueue* buffer_queue,
- scoped_ptr<gfx::GpuMemoryBuffer> buffer,
+ std::unique_ptr<gfx::GpuMemoryBuffer> buffer,
unsigned int texture,
unsigned int image,
const gfx::Rect& rect);
~AllocatedSurface();
BufferQueue* const buffer_queue;
- scoped_ptr<gfx::GpuMemoryBuffer> buffer;
+ std::unique_ptr<gfx::GpuMemoryBuffer> buffer;
const unsigned int texture;
const unsigned int image;
gfx::Rect damage; // This is the damage for this frame from the previous.
@@ -93,10 +93,10 @@ class CONTENT_EXPORT BufferQueue {
void UpdateBufferDamage(const gfx::Rect& damage);
// Return a surface, available to be drawn into.
- scoped_ptr<AllocatedSurface> GetNextSurface();
+ std::unique_ptr<AllocatedSurface> GetNextSurface();
- scoped_ptr<AllocatedSurface> RecreateBuffer(
- scoped_ptr<AllocatedSurface> surface);
+ std::unique_ptr<AllocatedSurface> RecreateBuffer(
+ std::unique_ptr<AllocatedSurface> surface);
gfx::Size size_;
scoped_refptr<cc::ContextProvider> context_provider_;
@@ -106,14 +106,14 @@ class CONTENT_EXPORT BufferQueue {
unsigned int internal_format_;
// This surface is currently bound. This may be nullptr if no surface has
// been bound, or if allocation failed at bind.
- scoped_ptr<AllocatedSurface> current_surface_;
+ std::unique_ptr<AllocatedSurface> current_surface_;
// The surface currently on the screen, if any.
- scoped_ptr<AllocatedSurface> displayed_surface_;
+ std::unique_ptr<AllocatedSurface> displayed_surface_;
// These are free for use, and are not nullptr.
- std::vector<scoped_ptr<AllocatedSurface>> available_surfaces_;
+ std::vector<std::unique_ptr<AllocatedSurface>> available_surfaces_;
// These have been swapped but are not displayed yet. Entries of this deque
// may be nullptr, if they represent frames that have been destroyed.
- std::deque<scoped_ptr<AllocatedSurface>> in_flight_surfaces_;
+ std::deque<std::unique_ptr<AllocatedSurface>> in_flight_surfaces_;
GLHelper* gl_helper_;
gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_;
int surface_id_;

Powered by Google App Engine
This is Rietveld 408576698