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

Unified Diff: Source/core/imagebitmap/ImageBitmapFactories.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/html/HTMLCanvasElement.cpp ('k') | Source/core/svg/graphics/SVGImage.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/imagebitmap/ImageBitmapFactories.cpp
diff --git a/Source/core/imagebitmap/ImageBitmapFactories.cpp b/Source/core/imagebitmap/ImageBitmapFactories.cpp
index bc2be148d3a5eabee8d2f445a0b9bc97c261f13c..50676dddb34d730cc09819b612a1e837653c2f9a 100644
--- a/Source/core/imagebitmap/ImageBitmapFactories.cpp
+++ b/Source/core/imagebitmap/ImageBitmapFactories.cpp
@@ -46,7 +46,6 @@
#include "platform/SharedBuffer.h"
#include "platform/graphics/BitmapImage.h"
#include "platform/graphics/ImageSource.h"
-#include "platform/graphics/skia/NativeImageSkia.h"
#include "public/platform/WebSize.h"
#include <v8.h>
@@ -307,13 +306,13 @@ void ImageBitmapFactories::ImageBitmapLoader::didFinishLoading()
OwnPtr<ImageSource> source = adoptPtr(new ImageSource());
source->setData(*sharedBuffer, true);
- RefPtr<NativeImageSkia> imageSkia = source->createFrameAtIndex(0);
- if (!imageSkia) {
+ SkBitmap bitmap;
+ if (!source->createFrameAtIndex(0, &bitmap)) {
rejectPromise();
return;
}
- RefPtr<Image> image = BitmapImage::create(imageSkia);
+ RefPtr<Image> image = BitmapImage::create(bitmap);
if (!image->width() || !image->height()) {
rejectPromise();
return;
« no previous file with comments | « Source/core/html/HTMLCanvasElement.cpp ('k') | Source/core/svg/graphics/SVGImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698