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

Side by Side Diff: Source/platform/graphics/DeferredImageDecoder.h

Issue 1001703003: Take NativeImageSkia out behind the woodshed. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Switch to skia-style API (return bool instead of SkBitmap) Created 5 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 static PassOwnPtr<DeferredImageDecoder> createForTesting(PassOwnPtr<ImageDec oder>); 52 static PassOwnPtr<DeferredImageDecoder> createForTesting(PassOwnPtr<ImageDec oder>);
53 53
54 static bool isLazyDecoded(const SkBitmap&); 54 static bool isLazyDecoded(const SkBitmap&);
55 55
56 static void setEnabled(bool); 56 static void setEnabled(bool);
57 static bool enabled(); 57 static bool enabled();
58 58
59 String filenameExtension() const; 59 String filenameExtension() const;
60 60
61 PassRefPtr<NativeImageSkia> createFrameAtIndex(size_t); 61 bool createFrameAtIndex(size_t, SkBitmap*) WARN_UNUSED_RETURN;
62 62
63 void setData(SharedBuffer& data, bool allDataReceived); 63 void setData(SharedBuffer& data, bool allDataReceived);
64 64
65 bool isSizeAvailable(); 65 bool isSizeAvailable();
66 bool hasColorProfile() const; 66 bool hasColorProfile() const;
67 IntSize size() const; 67 IntSize size() const;
68 IntSize frameSizeAtIndex(size_t index) const; 68 IntSize frameSizeAtIndex(size_t index) const;
69 size_t frameCount(); 69 size_t frameCount();
70 int repetitionCount() const; 70 int repetitionCount() const;
71 size_t clearCacheExceptFrame(size_t); 71 size_t clearCacheExceptFrame(size_t);
(...skipping 27 matching lines...) Expand all
99 // Carries only frame state and other information. Does not carry bitmap. 99 // Carries only frame state and other information. Does not carry bitmap.
100 Vector<FrameData> m_frameData; 100 Vector<FrameData> m_frameData;
101 RefPtr<ImageFrameGenerator> m_frameGenerator; 101 RefPtr<ImageFrameGenerator> m_frameGenerator;
102 102
103 static bool s_enabled; 103 static bool s_enabled;
104 }; 104 };
105 105
106 } // namespace blink 106 } // namespace blink
107 107
108 #endif 108 #endif
OLDNEW
« no previous file with comments | « Source/platform/graphics/BitmapPatternBase.h ('k') | Source/platform/graphics/DeferredImageDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698