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

Unified Diff: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp

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/gpu/DrawingBuffer.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
index 3b72a2e91e10d725b19b5bf001a7ce873667f7f6..601e4dac652fdb6d119a741ecf98daa508a7917a 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -43,8 +43,10 @@
#include "public/platform/WebExternalTextureLayer.h"
#include "public/platform/WebGraphicsContext3DProvider.h"
#include "wtf/CheckedNumeric.h"
+#include "wtf/PtrUtil.h"
#include "wtf/typed_arrays/ArrayBufferContents.h"
#include <algorithm>
+#include <memory>
namespace blink {
@@ -79,7 +81,7 @@ static bool shouldFailDrawingBufferCreationForTesting = false;
} // namespace
-PassRefPtr<DrawingBuffer> DrawingBuffer::create(PassOwnPtr<WebGraphicsContext3DProvider> contextProvider, const IntSize& size, bool premultipliedAlpha, bool wantAlphaChannel, bool wantDepthBuffer, bool wantStencilBuffer, bool wantAntialiasing, PreserveDrawingBuffer preserve)
+PassRefPtr<DrawingBuffer> DrawingBuffer::create(std::unique_ptr<WebGraphicsContext3DProvider> contextProvider, const IntSize& size, bool premultipliedAlpha, bool wantAlphaChannel, bool wantDepthBuffer, bool wantStencilBuffer, bool wantAntialiasing, PreserveDrawingBuffer preserve)
{
ASSERT(contextProvider);
@@ -88,7 +90,7 @@ PassRefPtr<DrawingBuffer> DrawingBuffer::create(PassOwnPtr<WebGraphicsContext3DP
return nullptr;
}
- OwnPtr<Extensions3DUtil> extensionsUtil = Extensions3DUtil::create(contextProvider->contextGL());
+ std::unique_ptr<Extensions3DUtil> extensionsUtil = Extensions3DUtil::create(contextProvider->contextGL());
if (!extensionsUtil->isValid()) {
// This might be the first time we notice that the GL context is lost.
return nullptr;
@@ -124,8 +126,8 @@ void DrawingBuffer::forceNextDrawingBufferCreationToFail()
}
DrawingBuffer::DrawingBuffer(
- PassOwnPtr<WebGraphicsContext3DProvider> contextProvider,
- PassOwnPtr<Extensions3DUtil> extensionsUtil,
+ std::unique_ptr<WebGraphicsContext3DProvider> contextProvider,
+ std::unique_ptr<Extensions3DUtil> extensionsUtil,
bool discardFramebufferSupported,
bool wantAlphaChannel,
bool premultipliedAlpha,
@@ -558,7 +560,7 @@ GLuint DrawingBuffer::framebuffer() const
WebLayer* DrawingBuffer::platformLayer()
{
if (!m_layer) {
- m_layer = adoptPtr(Platform::current()->compositorSupport()->createExternalTextureLayer(this));
+ m_layer = wrapUnique(Platform::current()->compositorSupport()->createExternalTextureLayer(this));
m_layer->setOpaque(!m_wantAlphaChannel);
m_layer->setBlendBackgroundColor(m_wantAlphaChannel);

Powered by Google App Engine
This is Rietveld 408576698