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

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: Switch to skia-style API (return bool instead of SkBitmap) 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
« no previous file with comments | « Source/core/svg/graphics/SVGImage.h ('k') | Source/core/svg/graphics/SVGImageForContainer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b9e9667aec1ac7f477972feaa5448093e830c46e 100644
--- a/Source/core/svg/graphics/SVGImage.cpp
+++ b/Source/core/svg/graphics/SVGImage.cpp
@@ -208,18 +208,19 @@ void SVGImage::drawForContainer(GraphicsContext* context, const FloatSize contai
draw(context, dstRect, scaledSrc, compositeOp, DoNotRespectImageOrientation);
}
-PassRefPtr<NativeImageSkia> SVGImage::nativeImageForCurrentFrame()
+bool SVGImage::bitmapForCurrentFrame(SkBitmap* bitmap)
{
if (!m_page)
- return nullptr;
+ return false;
OwnPtr<ImageBuffer> buffer = ImageBuffer::create(size());
if (!buffer)
- return nullptr;
+ return false;
drawForContainer(buffer->context(), size(), 1, rect(), rect(), SkXfermode::kSrcOver_Mode);
- return NativeImageSkia::create(buffer->bitmap());
+ *bitmap = buffer->bitmap();
+ return true;
}
void SVGImage::drawPatternForContainer(GraphicsContext* context, const FloatSize containerSize,
« no previous file with comments | « Source/core/svg/graphics/SVGImage.h ('k') | Source/core/svg/graphics/SVGImageForContainer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698