Index: third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp |
diff --git a/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp b/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp |
index 58f3e9ad0f84f27e6bb4cde1697072792b707397..067f5b4467e6eee5079c3cfb626c2121816cc8e3 100644 |
--- a/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp |
@@ -183,7 +183,7 @@ void ImageBuffer::resetCanvas(SkCanvas* canvas) const |
m_client->restoreCanvasMatrixClipStack(canvas); |
} |
-PassRefPtr<SkImage> ImageBuffer::newSkImageSnapshot(AccelerationHint hint, SnapshotReason reason) const |
+sk_sp<SkImage> ImageBuffer::newSkImageSnapshot(AccelerationHint hint, SnapshotReason reason) const |
{ |
if (m_snapshotState == InitialSnapshotState) |
m_snapshotState = DidAcquireSnapshot; |
@@ -195,7 +195,7 @@ PassRefPtr<SkImage> ImageBuffer::newSkImageSnapshot(AccelerationHint hint, Snaps |
PassRefPtr<Image> ImageBuffer::newImageSnapshot(AccelerationHint hint, SnapshotReason reason) const |
{ |
- RefPtr<SkImage> snapshot = newSkImageSnapshot(hint, reason); |
+ sk_sp<SkImage> snapshot = newSkImageSnapshot(hint, reason); |
if (!snapshot) |
return nullptr; |
return StaticBitmapImage::create(snapshot); |
f(malita)
2016/09/01 03:55:38
std:move(snapshot)
Łukasz Anforowicz
2016/09/01 20:50:58
Done.
|
@@ -221,7 +221,7 @@ bool ImageBuffer::copyToPlatformTexture(gpu::gles2::GLES2Interface* gl, GLuint t |
if (!isSurfaceValid()) |
return false; |
- RefPtr<const SkImage> textureImage = m_surface->newImageSnapshot(PreferAcceleration, SnapshotReasonCopyToWebGLTexture); |
+ sk_sp<const SkImage> textureImage = m_surface->newImageSnapshot(PreferAcceleration, SnapshotReasonCopyToWebGLTexture); |
if (!textureImage) |
return false; |
@@ -343,7 +343,7 @@ bool ImageBuffer::getImageData(Multiply multiplied, const IntRect& rect, WTF::Ar |
if (ExpensiveCanvasHeuristicParameters::GetImageDataForcesNoAcceleration && !RuntimeEnabledFeatures::canvas2dFixedRenderingModeEnabled()) |
const_cast<ImageBuffer*>(this)->disableAcceleration(); |
- RefPtr<SkImage> snapshot = m_surface->newImageSnapshot(PreferNoAcceleration, SnapshotReasonGetImageData); |
+ sk_sp<SkImage> snapshot = m_surface->newImageSnapshot(PreferNoAcceleration, SnapshotReasonGetImageData); |
if (!snapshot) |
return false; |