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

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: 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/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 1c72248b08640e274dd43730b87f6a8ede270bc6..bed287baaad52e90b917c0f76cff812bed51e345 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
@@ -184,9 +185,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);
@@ -208,7 +209,7 @@ protected:
private:
explicit HTMLCanvasElement(Document&);
- using ContextFactoryVector = Vector<OwnPtr<CanvasRenderingContextFactory>>;
+ using ContextFactoryVector = Vector<std::unique_ptr<CanvasRenderingContextFactory>>;
static ContextFactoryVector& renderingContextFactories();
static CanvasRenderingContextFactory* getRenderingContextFactory(int);
@@ -218,9 +219,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&);
@@ -248,12 +249,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

Powered by Google App Engine
This is Rietveld 408576698