Chromium Code Reviews| Index: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp |
| diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp |
| index 535e0b8df3925bc173501c89ee780ae522d04034..ffcbf0eebaf78f4717bf3a756fd66a15942e78d4 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp |
| +++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp |
| @@ -94,7 +94,7 @@ struct PaintInvalidationTracking { |
| DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| Vector<PaintInvalidationInfo> trackedPaintInvalidations; |
| #if DCHECK_IS_ON() |
| - RefPtr<SkPicture> lastPaintedPicture; |
| + sk_sp<SkPicture> lastPaintedPicture; |
| Region paintInvalidationRegionSinceLastPaint; |
| Vector<UnderPaintInvalidation> underPaintInvalidations; |
| #endif |
| @@ -338,7 +338,7 @@ void GraphicsLayer::paint(const IntRect* interestRect, GraphicsContext::Disabled |
| getPaintController().commitNewDisplayItems(offsetFromLayoutObjectWithSubpixelAccumulation()); |
| #if DCHECK_IS_ON() |
| if (RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabled()) { |
| - RefPtr<SkPicture> newPicture = capturePicture(); |
| + sk_sp<SkPicture> newPicture = capturePicture(); |
| checkPaintUnderInvalidations(*newPicture); |
| PaintInvalidationTracking& tracking = paintInvalidationTrackingMap().add(this, PaintInvalidationTracking()).storedValue->value; |
| tracking.lastPaintedPicture = newPicture; |
|
f(malita)
2016/09/01 03:55:38
Not new to this CL (and prolly not very important
Łukasz Anforowicz
2016/09/01 20:50:58
Done.
|
| @@ -1120,12 +1120,12 @@ void GraphicsLayer::setContentsRect(const IntRect& rect) |
| void GraphicsLayer::setContentsToImage(Image* image, RespectImageOrientationEnum respectImageOrientation) |
| { |
| - RefPtr<SkImage> skImage = image ? image->imageForCurrentFrame() : nullptr; |
| + sk_sp<SkImage> skImage = image ? image->imageForCurrentFrame() : nullptr; |
| if (image && skImage && image->isBitmapImage()) { |
| if (respectImageOrientation == RespectImageOrientation) { |
| ImageOrientation imageOrientation = toBitmapImage(image)->currentFrameOrientation(); |
| - skImage = DragImage::resizeAndOrientImage(skImage.release(), imageOrientation); |
| + skImage = DragImage::resizeAndOrientImage(std::move(skImage), imageOrientation); |
| } |
| } |
| @@ -1255,7 +1255,7 @@ void GraphicsLayer::setCompositorMutableProperties(uint32_t properties) |
| #if DCHECK_IS_ON() |
| -PassRefPtr<SkPicture> GraphicsLayer::capturePicture() |
| +sk_sp<SkPicture> GraphicsLayer::capturePicture() |
| { |
| if (!drawsContent()) |
| return nullptr; |
| @@ -1338,7 +1338,7 @@ void GraphicsLayer::checkPaintUnderInvalidations(const SkPicture& newPicture) |
| SkPictureRecorder recorder; |
| recorder.beginRecording(width, height); |
| recorder.getRecordingCanvas()->drawBitmap(newBitmap, 0, 0); |
| - RefPtr<SkPicture> picture = fromSkSp(recorder.finishRecordingAsPicture()); |
| + sk_sp<SkPicture> picture = recorder.finishRecordingAsPicture(); |
| getPaintController().appendDebugDrawingAfterCommit(*this, picture, offsetFromLayoutObjectWithSubpixelAccumulation()); |
| } |