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

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

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/gpu/SharedContextRateLimiter.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/SharedContextRateLimiter.cpp b/third_party/WebKit/Source/platform/graphics/gpu/SharedContextRateLimiter.cpp
index 54152e96029a8a6ac5ffe41fc1ddcd31b081ed5d..c351f163099ce85d4081eafc463d871b9caab8be 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/SharedContextRateLimiter.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/SharedContextRateLimiter.cpp
@@ -9,27 +9,25 @@
#include "public/platform/Platform.h"
#include "public/platform/WebGraphicsContext3DProvider.h"
#include "third_party/khronos/GLES2/gl2.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
namespace blink {
-std::unique_ptr<SharedContextRateLimiter> SharedContextRateLimiter::create(unsigned maxPendingTicks)
+PassOwnPtr<SharedContextRateLimiter> SharedContextRateLimiter::create(unsigned maxPendingTicks)
{
- return wrapUnique(new SharedContextRateLimiter(maxPendingTicks));
+ return adoptPtr(new SharedContextRateLimiter(maxPendingTicks));
}
SharedContextRateLimiter::SharedContextRateLimiter(unsigned maxPendingTicks)
: m_maxPendingTicks(maxPendingTicks)
, m_canUseSyncQueries(false)
{
- m_contextProvider = wrapUnique(Platform::current()->createSharedOffscreenGraphicsContext3DProvider());
+ m_contextProvider = adoptPtr(Platform::current()->createSharedOffscreenGraphicsContext3DProvider());
if (!m_contextProvider)
return;
gpu::gles2::GLES2Interface* gl = m_contextProvider->contextGL();
if (gl && gl->GetGraphicsResetStatusKHR() == GL_NO_ERROR) {
- std::unique_ptr<Extensions3DUtil> extensionsUtil = Extensions3DUtil::create(gl);
+ OwnPtr<Extensions3DUtil> extensionsUtil = Extensions3DUtil::create(gl);
// TODO(junov): when the GLES 3.0 command buffer is ready, we could use fenceSync instead
m_canUseSyncQueries = extensionsUtil->supportsExtension("GL_CHROMIUM_sync_query");
}

Powered by Google App Engine
This is Rietveld 408576698