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

Unified Diff: third_party/WebKit/Source/platform/graphics/ImageBuffer.h

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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: third_party/WebKit/Source/platform/graphics/ImageBuffer.h
diff --git a/third_party/WebKit/Source/platform/graphics/ImageBuffer.h b/third_party/WebKit/Source/platform/graphics/ImageBuffer.h
index 20bcd7638ca5a9908c04678e4172cc4600dea043..56b9fd97389ce730358100a126655b2a79b10e9e 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageBuffer.h
+++ b/third_party/WebKit/Source/platform/graphics/ImageBuffer.h
@@ -39,12 +39,11 @@
#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/core/SkPicture.h"
#include "wtf/Forward.h"
-#include "wtf/OwnPtr.h"
-#include "wtf/PassOwnPtr.h"
#include "wtf/PassRefPtr.h"
#include "wtf/Vector.h"
#include "wtf/text/WTFString.h"
#include "wtf/typed_arrays/Uint8ClampedArray.h"
+#include <memory>
namespace gpu {
namespace gles2 {
@@ -76,8 +75,8 @@ class PLATFORM_EXPORT ImageBuffer {
WTF_MAKE_NONCOPYABLE(ImageBuffer);
USING_FAST_MALLOC(ImageBuffer);
public:
- static PassOwnPtr<ImageBuffer> create(const IntSize&, OpacityMode = NonOpaque, ImageInitializationMode = InitializeImagePixels);
- static PassOwnPtr<ImageBuffer> create(PassOwnPtr<ImageBufferSurface>);
+ static std::unique_ptr<ImageBuffer> create(const IntSize&, OpacityMode = NonOpaque, ImageInitializationMode = InitializeImagePixels);
+ static std::unique_ptr<ImageBuffer> create(std::unique_ptr<ImageBufferSurface>);
virtual ~ImageBuffer();
@@ -147,7 +146,7 @@ public:
intptr_t getGPUMemoryUsage() { return m_gpuMemoryUsage; }
protected:
- ImageBuffer(PassOwnPtr<ImageBufferSurface>);
+ ImageBuffer(std::unique_ptr<ImageBufferSurface>);
private:
enum SnapshotState {
@@ -156,7 +155,7 @@ private:
DrawnToAfterSnapshot,
};
mutable SnapshotState m_snapshotState;
- OwnPtr<ImageBufferSurface> m_surface;
+ std::unique_ptr<ImageBufferSurface> m_surface;
ImageBufferClient* m_client;
mutable intptr_t m_gpuMemoryUsage;

Powered by Google App Engine
This is Rietveld 408576698