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

Unified Diff: third_party/WebKit/Source/platform/graphics/PaintGeneratedImage.h

Issue 2290903002: Change (Pass)RefPtr<SkXxx> into sk_sp<SkXxx>. (Closed)
Patch Set: Rebasing... Created 4 years, 3 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/PaintGeneratedImage.h
diff --git a/third_party/WebKit/Source/platform/graphics/PaintGeneratedImage.h b/third_party/WebKit/Source/platform/graphics/PaintGeneratedImage.h
index 58f55fd42b5edd82e6eee03ba7c7caeefa3d31d4..478335338a93640ba0a96dc905e9fc4a806c0065 100644
--- a/third_party/WebKit/Source/platform/graphics/PaintGeneratedImage.h
+++ b/third_party/WebKit/Source/platform/graphics/PaintGeneratedImage.h
@@ -7,6 +7,7 @@
#include "platform/geometry/IntSize.h"
#include "platform/graphics/GeneratedImage.h"
+#include "third_party/skia/include/core/SkRefCnt.h"
class SkPicture;
@@ -14,9 +15,9 @@ namespace blink {
class PLATFORM_EXPORT PaintGeneratedImage : public GeneratedImage {
public:
- static PassRefPtr<PaintGeneratedImage> create(PassRefPtr<SkPicture> picture, const IntSize& size)
+ static PassRefPtr<PaintGeneratedImage> create(sk_sp<SkPicture> picture, const IntSize& size)
{
- return adoptRef(new PaintGeneratedImage(picture, size));
+ return adoptRef(new PaintGeneratedImage(std::move(picture), size));
}
~PaintGeneratedImage() override { }
@@ -24,13 +25,13 @@ protected:
void draw(SkCanvas*, const SkPaint&, const FloatRect&, const FloatRect&, RespectImageOrientationEnum, ImageClampingMode) override;
void drawTile(GraphicsContext&, const FloatRect&) final;
- PaintGeneratedImage(PassRefPtr<SkPicture> picture, const IntSize& size)
+ PaintGeneratedImage(sk_sp<SkPicture> picture, const IntSize& size)
: GeneratedImage(size)
- , m_picture(picture)
+ , m_picture(std::move(picture))
{
}
- RefPtr<SkPicture> m_picture;
+ sk_sp<SkPicture> m_picture;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/LoggingCanvas.cpp ('k') | third_party/WebKit/Source/platform/graphics/Pattern.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698