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

Unified Diff: src/utils/SkLua.cpp

Issue 834633006: add ImageGenerator::NewFromData to porting layer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add helper for SkInstallDiscardablePixelRef(SkData*, ...) Created 5 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: src/utils/SkLua.cpp
diff --git a/src/utils/SkLua.cpp b/src/utils/SkLua.cpp
index 2370b9925c59a82f43a6d86971dcc0164e035df9..ba79933c1873cff74d131931f11ce54c24d76563 100644
--- a/src/utils/SkLua.cpp
+++ b/src/utils/SkLua.cpp
@@ -14,7 +14,6 @@
#include "SkBlurImageFilter.h"
#include "SkCanvas.h"
#include "SkData.h"
-#include "SkDecodingImageGenerator.h"
#include "SkDocument.h"
#include "SkGradientShader.h"
#include "SkImage.h"
@@ -2008,9 +2007,7 @@ static int lsk_loadImage(lua_State* L) {
const char* name = lua_tolstring(L, 1, NULL);
SkAutoDataUnref data(SkData::NewFromFileName(name));
if (data.get()) {
- SkImage* image = SkImage::NewFromGenerator(
- SkDecodingImageGenerator::Create(data, SkDecodingImageGenerator::Options()));
-
+ SkImage* image = SkImage::NewFromData(data);
if (image) {
push_ref(L, image)->unref();
return 1;

Powered by Google App Engine
This is Rietveld 408576698