diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/platform/graphics/gpu/Texture.cpp | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/platform/graphics/gpu/Texture.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/gpu/Texture.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/WebCore/platform/graphics/gpu/Texture.cpp b/Source/WebCore/platform/graphics/gpu/Texture.cpp index 31aaa63ee..aad13f34d 100644 --- a/Source/WebCore/platform/graphics/gpu/Texture.cpp +++ b/Source/WebCore/platform/graphics/gpu/Texture.cpp @@ -43,11 +43,11 @@ namespace WebCore { -Texture::Texture(GraphicsContext3D* context, PassOwnPtr<Vector<unsigned int>> tileTextureIds, Format format, int width, int height, int maxTextureSize) +Texture::Texture(GraphicsContext3D* context, std::unique_ptr<Vector<unsigned>> tileTextureIds, Format format, int width, int height, int maxTextureSize) : m_context(context) , m_format(format) , m_tiles(IntSize(maxTextureSize, maxTextureSize), IntSize(width, height), true) - , m_tileTextureIds(tileTextureIds) + , m_tileTextureIds(WTFMove(tileTextureIds)) { } @@ -66,7 +66,7 @@ static void convertFormat(GraphicsContext3D* context, Texture::Format format, un *glType = GraphicsContext3D::UNSIGNED_BYTE; break; case Texture::BGRA8: - if (context->getExtensions()->supports("GL_EXT_texture_format_BGRA8888")) { + if (context->getExtensions().supports("GL_EXT_texture_format_BGRA8888")) { *glFormat = Extensions3D::BGRA_EXT; *glType = GraphicsContext3D::UNSIGNED_BYTE; } else { @@ -94,7 +94,7 @@ PassRefPtr<Texture> Texture::create(GraphicsContext3D* context, Format format, i numTiles = 0; } - OwnPtr<Vector<unsigned int>> textureIds = adoptPtr(new Vector<unsigned int>(numTiles)); + auto textureIds = std::make_unique<Vector<unsigned>>(numTiles); textureIds->fill(0, numTiles); for (int i = 0; i < numTiles; i++) { @@ -120,7 +120,7 @@ PassRefPtr<Texture> Texture::create(GraphicsContext3D* context, Format format, i tileBoundsWithBorder.height(), 0, glFormat, glType); } - return adoptRef(new Texture(context, textureIds.release(), format, width, height, maxTextureSize)); + return adoptRef(new Texture(context, WTFMove(textureIds), format, width, height, maxTextureSize)); } template <bool swizzle> |