diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-06 08:52:00 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-06 08:52:00 +0000 |
commit | b1c1e094efa5cff22d84175fc3df0baaf783be95 (patch) | |
tree | f2db34afc3124214222bdea1d828facc086a5e2f /webkit/glue/image_decoder.h | |
parent | a0afceb9561005694d89872be0f65508d2375f03 (diff) | |
download | chromium_src-b1c1e094efa5cff22d84175fc3df0baaf783be95.zip chromium_src-b1c1e094efa5cff22d84175fc3df0baaf783be95.tar.gz chromium_src-b1c1e094efa5cff22d84175fc3df0baaf783be95.tar.bz2 |
Add webkit/ api to request all frames in an image.
Depends on https://bugs.webkit.org/show_bug.cgi?id=92933
Not used anywhere yet, so no observable effect.
BUG=138550
Review URL: https://chromiumcodereview.appspot.com/10853010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150071 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/image_decoder.h')
-rw-r--r-- | webkit/glue/image_decoder.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/webkit/glue/image_decoder.h b/webkit/glue/image_decoder.h index 1f7f266..21e754a 100644 --- a/webkit/glue/image_decoder.h +++ b/webkit/glue/image_decoder.h @@ -1,7 +1,9 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // 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_; |