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

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: Address comments from Kent; merge. 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 4e52a0b58ee33107fd1a6c8345929dd17352fe75..24df6433cd6ac34d241154e6b64e36d55dcb4564 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 {
@@ -75,8 +74,8 @@ enum Multiply {
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();
@@ -145,7 +144,7 @@ public:
intptr_t getGPUMemoryUsage() { return m_gpuMemoryUsage; }
protected:
- ImageBuffer(PassOwnPtr<ImageBufferSurface>);
+ ImageBuffer(std::unique_ptr<ImageBufferSurface>);
private:
enum SnapshotState {
@@ -154,7 +153,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