aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu/gl/egl
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2016-11-03 14:40:50 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-03 19:03:40 +0000
commit145dbcd165d9d27298eb8888bc240e2d06a95464 (patch)
tree461ac2a3fe607bdf1d72fd72ae9451a58490a1bc /tools/gpu/gl/egl
parentb1c7f88df9ec40b4efb52d314304adfbaf95697c (diff)
Remove SkAutoTDelete.
Replace with std::unique_ptr. Change-Id: I5806cfbb30515fcb20e5e66ce13fb5f3b8728176 Reviewed-on: https://skia-review.googlesource.com/4381 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'tools/gpu/gl/egl')
-rw-r--r--tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp b/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp
index 06bd70f852..b2517f090e 100644
--- a/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp
+++ b/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp
@@ -22,7 +22,7 @@ namespace {
// TODO: Share this class with ANGLE if/when it gets support for EGL_KHR_fence_sync.
class EGLFenceSync : public sk_gpu_test::FenceSync {
public:
- static EGLFenceSync* CreateIfSupported(EGLDisplay);
+ static std::unique_ptr<EGLFenceSync> MakeIfSupported(EGLDisplay);
sk_gpu_test::PlatformFence SK_WARN_UNUSED_RESULT insertFence() const override;
bool waitFence(sk_gpu_test::PlatformFence fence) const override;
@@ -44,7 +44,7 @@ public:
GrEGLImage texture2DToEGLImage(GrGLuint texID) const override;
void destroyEGLImage(GrEGLImage) const override;
GrGLuint eglImageToExternalTexture(GrEGLImage) const override;
- sk_gpu_test::GLTestContext* createNew() const override;
+ std::unique_ptr<sk_gpu_test::GLTestContext> makeNew() const override;
private:
void destroyGLContext();
@@ -180,7 +180,7 @@ EGLGLTestContext::EGLGLTestContext(GrGLStandard forcedGpuAPI)
continue;
}
- this->init(gl.release(), EGLFenceSync::CreateIfSupported(fDisplay));
+ this->init(gl.release(), EGLFenceSync::MakeIfSupported(fDisplay));
break;
}
}
@@ -255,8 +255,8 @@ GrGLuint EGLGLTestContext::eglImageToExternalTexture(GrEGLImage image) const {
return texID;
}
-sk_gpu_test::GLTestContext* EGLGLTestContext::createNew() const {
- sk_gpu_test::GLTestContext* ctx = new EGLGLTestContext(this->gl()->fStandard);
+std::unique_ptr<sk_gpu_test::GLTestContext> EGLGLTestContext::makeNew() const {
+ std::unique_ptr<sk_gpu_test::GLTestContext> ctx(new EGLGLTestContext(this->gl()->fStandard));
if (ctx) {
ctx->makeCurrent();
}
@@ -294,11 +294,11 @@ static bool supports_egl_extension(EGLDisplay display, const char* extension) {
return false;
}
-EGLFenceSync* EGLFenceSync::CreateIfSupported(EGLDisplay display) {
+std::unique_ptr<EGLFenceSync> EGLFenceSync::MakeIfSupported(EGLDisplay display) {
if (!display || !supports_egl_extension(display, "EGL_KHR_fence_sync")) {
return nullptr;
}
- return new EGLFenceSync(display);
+ return std::unique_ptr<EGLFenceSync>(new EGLFenceSync(display));
}
sk_gpu_test::PlatformFence EGLFenceSync::insertFence() const {