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

Unified Diff: Source/core/platform/image-encoders/skia/JPEGImageEncoder.cpp

Issue 54653004: Break dependency of platform/graphics on html/ImageData.h (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Move struct into ImageBuffer.h Created 7 years, 1 month 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/platform/image-encoders/skia/JPEGImageEncoder.cpp
diff --git a/Source/core/platform/image-encoders/skia/JPEGImageEncoder.cpp b/Source/core/platform/image-encoders/skia/JPEGImageEncoder.cpp
index de34c98413304acff620082d6b76ac0a985079d0..50c143d48bdf93ac804b3cb2513255a6dd506e0c 100644
--- a/Source/core/platform/image-encoders/skia/JPEGImageEncoder.cpp
+++ b/Source/core/platform/image-encoders/skia/JPEGImageEncoder.cpp
@@ -33,7 +33,7 @@
#include "SkBitmap.h"
#include "SkColorPriv.h"
-#include "core/html/ImageData.h"
+#include "core/platform/graphics/ImageBuffer.h"
#include "platform/geometry/IntSize.h"
extern "C" {
#include <setjmp.h>
@@ -194,9 +194,9 @@ bool JPEGImageEncoder::encode(const SkBitmap& bitmap, int quality, Vector<unsign
return encodePixels(IntSize(bitmap.width(), bitmap.height()), static_cast<unsigned char *>(bitmap.getPixels()), true, quality, output);
}
-bool JPEGImageEncoder::encode(const ImageData& imageData, int quality, Vector<unsigned char>* output)
+bool JPEGImageEncoder::encode(const ImageDataBuffer& imageData, int quality, Vector<unsigned char>* output)
{
- return encodePixels(imageData.size(), imageData.data()->data(), false, quality, output);
+ return encodePixels(imageData.size(), imageData.data(), false, quality, output);
}
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698