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

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

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/RecordingImageBufferSurface.h
diff --git a/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.h b/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.h
index 257a9316fad7bbcf65d7f225b9af1cb41401b1e1..011073e3d2b4bee7cd7c0eaabcd44efbbd7d4d00 100644
--- a/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.h
+++ b/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.h
@@ -10,8 +10,8 @@
#include "public/platform/WebThread.h"
#include "wtf/Allocator.h"
#include "wtf/Noncopyable.h"
+#include "wtf/OwnPtr.h"
#include "wtf/RefPtr.h"
-#include <memory>
class SkCanvas;
class SkPicture;
@@ -26,7 +26,7 @@ class RecordingImageBufferFallbackSurfaceFactory {
USING_FAST_MALLOC(RecordingImageBufferFallbackSurfaceFactory);
WTF_MAKE_NONCOPYABLE(RecordingImageBufferFallbackSurfaceFactory);
public:
- virtual std::unique_ptr<ImageBufferSurface> createSurface(const IntSize&, OpacityMode) = 0;
+ virtual PassOwnPtr<ImageBufferSurface> createSurface(const IntSize&, OpacityMode) = 0;
virtual ~RecordingImageBufferFallbackSurfaceFactory() { }
protected:
RecordingImageBufferFallbackSurfaceFactory() { }
@@ -39,7 +39,7 @@ public:
// for one frame and should not be used for any operations which need a
// raster surface, (i.e. writePixels).
// Only #getPicture should be used to access the resulting frame.
- RecordingImageBufferSurface(const IntSize&, std::unique_ptr<RecordingImageBufferFallbackSurfaceFactory> fallbackFactory = nullptr, OpacityMode = NonOpaque);
+ RecordingImageBufferSurface(const IntSize&, PassOwnPtr<RecordingImageBufferFallbackSurfaceFactory> fallbackFactory = nullptr, OpacityMode = NonOpaque);
~RecordingImageBufferSurface() override;
// Implementation of ImageBufferSurface interfaces
@@ -94,9 +94,9 @@ private:
bool finalizeFrameInternal(FallbackReason*);
int approximateOpCount();
- std::unique_ptr<SkPictureRecorder> m_currentFrame;
+ OwnPtr<SkPictureRecorder> m_currentFrame;
RefPtr<SkPicture> m_previousFrame;
- std::unique_ptr<ImageBufferSurface> m_fallbackSurface;
+ OwnPtr<ImageBufferSurface> m_fallbackSurface;
ImageBuffer* m_imageBuffer;
int m_initialSaveCount;
int m_currentFramePixelCount;
@@ -105,7 +105,7 @@ private:
bool m_didRecordDrawCommandsInCurrentFrame;
bool m_currentFrameHasExpensiveOp;
bool m_previousFrameHasExpensiveOp;
- std::unique_ptr<RecordingImageBufferFallbackSurfaceFactory> m_fallbackFactory;
+ OwnPtr<RecordingImageBufferFallbackSurfaceFactory> m_fallbackFactory;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698