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

Unified Diff: third_party/WebKit/Source/core/exported/WebImageDecoder.cpp

Issue 2930513004: [WIP] Move ImageDecoders to SkCodec
Patch Set: Adding check for decoder creation Created 3 years, 6 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 | « skia/BUILD.gn ('k') | third_party/WebKit/Source/platform/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/exported/WebImageDecoder.cpp
diff --git a/third_party/WebKit/Source/core/exported/WebImageDecoder.cpp b/third_party/WebKit/Source/core/exported/WebImageDecoder.cpp
index 1da10eb547f55841011546330fe656ea7e3366ec..81cad4f72655e80ec2d26b1f2eed6e5b2e69da4a 100644
--- a/third_party/WebKit/Source/core/exported/WebImageDecoder.cpp
+++ b/third_party/WebKit/Source/core/exported/WebImageDecoder.cpp
@@ -31,8 +31,7 @@
#include "public/web/WebImageDecoder.h"
#include "platform/SharedBuffer.h"
-#include "platform/image-decoders/bmp/BMPImageDecoder.h"
-#include "platform/image-decoders/ico/ICOImageDecoder.h"
+#include "platform/image-decoders/ImageDecoder.h"
#include "platform/wtf/PassRefPtr.h"
#include "public/platform/Platform.h"
#include "public/platform/WebData.h"
@@ -46,20 +45,13 @@ void WebImageDecoder::Reset() {
}
void WebImageDecoder::Init(Type type) {
+#if 0
size_t max_decoded_bytes = Platform::Current()->MaxDecodedImageBytes();
- switch (type) {
- case kTypeBMP:
- private_ = new BMPImageDecoder(
+ private_ = new ImageDecoder(
ImageDecoder::kAlphaPremultiplied,
ColorBehavior::TransformToTargetForTesting(), max_decoded_bytes);
- break;
- case kTypeICO:
- private_ = new ICOImageDecoder(
- ImageDecoder::kAlphaPremultiplied,
- ColorBehavior::TransformToTargetForTesting(), max_decoded_bytes);
- break;
- }
+#endif
}
void WebImageDecoder::SetData(const WebData& data, bool all_data_received) {
« no previous file with comments | « skia/BUILD.gn ('k') | third_party/WebKit/Source/platform/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698