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

Unified Diff: webkit/glue/image_decoder.h

Issue 10853010: Add webkit/ api to request all frames in an image. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « no previous file | webkit/glue/image_decoder.cc » ('j') | webkit/glue/multi_resolution_image_resource_fetcher.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/image_decoder.h
diff --git a/webkit/glue/image_decoder.h b/webkit/glue/image_decoder.h
index 1f7f266f9ab4a59c11ca479c9d8614989f7fb516..9c9d9eee7395785c346ace23b54e63614b35fb6b 100644
--- a/webkit/glue/image_decoder.h
+++ b/webkit/glue/image_decoder.h
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <vector>
+
#include "base/basictypes.h"
#include "ui/gfx/size.h"
#include "webkit/glue/webkit_glue_export.h"
@@ -28,6 +30,11 @@ class WEBKIT_GLUE_EXPORT ImageDecoder {
// will be returned. Otherwise, an empty bitmap will be returned.
SkBitmap Decode(const unsigned char* data, size_t size) const;
+ // Returns all frames found in the image represented by data. If there are
+ // multiple frames at the same size, only the first one is returned.
+ static std::vector<SkBitmap> DecodeAll(
+ const unsigned char* data, size_t size);
+
private:
// Size will be empty to get the largest possible size.
gfx::Size desired_icon_size_;
« no previous file with comments | « no previous file | webkit/glue/image_decoder.cc » ('j') | webkit/glue/multi_resolution_image_resource_fetcher.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698