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

Unified Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.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/core/html/HTMLCanvasElement.h
diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.h b/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
index cb6c241b8d0d1538f285fc9abca3f19a0fd69528..7ba4aa06e640886295bd7680e0ef40142a71b638 100644
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
@@ -46,6 +46,7 @@
#include "platform/graphics/GraphicsTypes3D.h"
#include "platform/graphics/ImageBufferClient.h"
#include "platform/heap/Handle.h"
+#include <memory>
#define CanvasDefaultInterpolationQuality InterpolationLow
@@ -185,9 +186,9 @@ public:
DECLARE_VIRTUAL_TRACE_WRAPPERS();
- void createImageBufferUsingSurfaceForTesting(PassOwnPtr<ImageBufferSurface>);
+ void createImageBufferUsingSurfaceForTesting(std::unique_ptr<ImageBufferSurface>);
- static void registerRenderingContextFactory(PassOwnPtr<CanvasRenderingContextFactory>);
+ static void registerRenderingContextFactory(std::unique_ptr<CanvasRenderingContextFactory>);
void updateExternallyAllocatedMemory() const;
void styleDidChange(const ComputedStyle* oldStyle, const ComputedStyle& newStyle);
@@ -212,7 +213,7 @@ private:
explicit HTMLCanvasElement(Document&);
void dispose();
- using ContextFactoryVector = Vector<OwnPtr<CanvasRenderingContextFactory>>;
+ using ContextFactoryVector = Vector<std::unique_ptr<CanvasRenderingContextFactory>>;
static ContextFactoryVector& renderingContextFactories();
static CanvasRenderingContextFactory* getRenderingContextFactory(int);
@@ -222,9 +223,9 @@ private:
void reset();
- PassOwnPtr<ImageBufferSurface> createImageBufferSurface(const IntSize& deviceSize, int* msaaSampleCount);
+ std::unique_ptr<ImageBufferSurface> createImageBufferSurface(const IntSize& deviceSize, int* msaaSampleCount);
void createImageBuffer();
- void createImageBufferInternal(PassOwnPtr<ImageBufferSurface> externalSurface);
+ void createImageBufferInternal(std::unique_ptr<ImageBufferSurface> externalSurface);
bool shouldUseDisplayList(const IntSize& deviceSize);
void setSurfaceSize(const IntSize&);
@@ -252,12 +253,12 @@ private:
// after the first attempt failed.
mutable bool m_didFailToCreateImageBuffer;
bool m_imageBufferIsClear;
- OwnPtr<ImageBuffer> m_imageBuffer;
+ std::unique_ptr<ImageBuffer> m_imageBuffer;
mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platforms that have to copy the image buffer to render (and for CSSCanvasValue).
// Used for OffscreenCanvas that controls this HTML canvas element
- OwnPtr<CanvasSurfaceLayerBridge> m_surfaceLayerBridge;
+ std::unique_ptr<CanvasSurfaceLayerBridge> m_surfaceLayerBridge;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLAreaElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698