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

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

Issue 1577843002: Fix SVG sizing in crossfaded images (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust test to make it more obvious when it fails Created 4 years, 11 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/CrossfadeGeneratedImage.h
diff --git a/third_party/WebKit/Source/platform/graphics/CrossfadeGeneratedImage.h b/third_party/WebKit/Source/platform/graphics/CrossfadeGeneratedImage.h
index 5ce4dd41e6ad2c3631132111b705a7aebfc963b3..2dc79a5994492bb980b353f0893bcb2d568341d2 100644
--- a/third_party/WebKit/Source/platform/graphics/CrossfadeGeneratedImage.h
+++ b/third_party/WebKit/Source/platform/graphics/CrossfadeGeneratedImage.h
@@ -36,7 +36,7 @@ namespace blink {
class PLATFORM_EXPORT CrossfadeGeneratedImage final : public GeneratedImage {
public:
- static PassRefPtr<CrossfadeGeneratedImage> create(Image* fromImage, Image* toImage, float percentage, IntSize crossfadeSize, const IntSize& size)
+ static PassRefPtr<CrossfadeGeneratedImage> create(PassRefPtr<Image> fromImage, PassRefPtr<Image> toImage, float percentage, IntSize crossfadeSize, const IntSize& size)
{
return adoptRef(new CrossfadeGeneratedImage(fromImage, toImage, percentage, crossfadeSize, size));
}
@@ -51,13 +51,13 @@ protected:
void draw(SkCanvas*, const SkPaint&, const FloatRect&, const FloatRect&, RespectImageOrientationEnum, ImageClampingMode) override;
void drawTile(GraphicsContext&, const FloatRect&) final;
- CrossfadeGeneratedImage(Image* fromImage, Image* toImage, float percentage, IntSize crossfadeSize, const IntSize&);
+ CrossfadeGeneratedImage(PassRefPtr<Image> fromImage, PassRefPtr<Image> toImage, float percentage, IntSize crossfadeSize, const IntSize&);
private:
void drawCrossfade(SkCanvas*, const SkPaint&, ImageClampingMode);
- Image* m_fromImage;
- Image* m_toImage;
+ RefPtr<Image> m_fromImage;
+ RefPtr<Image> m_toImage;
float m_percentage;
IntSize m_crossfadeSize;

Powered by Google App Engine
This is Rietveld 408576698