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

Unified Diff: Source/core/svg/graphics/SVGImage.cpp

Issue 1001703003: Take NativeImageSkia out behind the woodshed. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make bitmapForCurrentFrame() return SkBitmap by value. Created 5 years, 9 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: Source/core/svg/graphics/SVGImage.cpp
diff --git a/Source/core/svg/graphics/SVGImage.cpp b/Source/core/svg/graphics/SVGImage.cpp
index 2c1adb6e842adeb1ec95a4454a72feede68f863c..d702ee939c7bedd714b09405d2eaadb6bdcaea15 100644
--- a/Source/core/svg/graphics/SVGImage.cpp
+++ b/Source/core/svg/graphics/SVGImage.cpp
@@ -208,18 +208,18 @@ void SVGImage::drawForContainer(GraphicsContext* context, const FloatSize contai
draw(context, dstRect, scaledSrc, compositeOp, DoNotRespectImageOrientation);
}
-PassRefPtr<NativeImageSkia> SVGImage::nativeImageForCurrentFrame()
+SkBitmap SVGImage::bitmapForCurrentFrame()
{
if (!m_page)
- return nullptr;
+ return SkBitmap();
OwnPtr<ImageBuffer> buffer = ImageBuffer::create(size());
if (!buffer)
- return nullptr;
+ return SkBitmap();
drawForContainer(buffer->context(), size(), 1, rect(), rect(), SkXfermode::kSrcOver_Mode);
- return NativeImageSkia::create(buffer->bitmap());
+ return buffer->bitmap();
}
void SVGImage::drawPatternForContainer(GraphicsContext* context, const FloatSize containerSize,

Powered by Google App Engine
This is Rietveld 408576698