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

Unified Diff: webkit/glue/image_decoder.h

Issue 10828127: Use hi-resolution favicon variants if available. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: daringfireball hackfix Created 8 years, 5 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: webkit/glue/image_decoder.h
diff --git a/webkit/glue/image_decoder.h b/webkit/glue/image_decoder.h
index 1f7f266f9ab4a59c11ca479c9d8614989f7fb516..427948518357fcf4f4b0a34672d6e373350315c5 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,13 @@ 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. All frames
+ // will only have valid sizes and won't contain pixels, except for the
+ // frames that have a size that's in |desired_sizes|.
+ static std::vector<SkBitmap> DecodeAll(
+ const unsigned char* data, size_t size,
+ const std::vector<gfx::Size>& desired_sizes);
+
private:
// Size will be empty to get the largest possible size.
gfx::Size desired_icon_size_;

Powered by Google App Engine
This is Rietveld 408576698