| OLD | NEW |
| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 ImageOrientation orientation() const; | 74 ImageOrientation orientation() const; |
| 75 bool hotSpot(IntPoint&) const; | 75 bool hotSpot(IntPoint&) const; |
| 76 | 76 |
| 77 // For testing. | 77 // For testing. |
| 78 ImageFrameGenerator* frameGenerator() { return m_frameGenerator.get(); } | 78 ImageFrameGenerator* frameGenerator() { return m_frameGenerator.get(); } |
| 79 | 79 |
| 80 private: | 80 private: |
| 81 explicit DeferredImageDecoder(PassOwnPtr<ImageDecoder> actualDecoder); | 81 explicit DeferredImageDecoder(PassOwnPtr<ImageDecoder> actualDecoder); |
| 82 void prepareLazyDecodedFrames(); | 82 void prepareLazyDecodedFrames(); |
| 83 SkBitmap createBitmap(size_t index); | 83 SkBitmap createBitmap(size_t index); |
| 84 SkBitmap createSkiaDiscardableBitmap(size_t index); | |
| 85 SkBitmap createLazyDecodingBitmap(size_t index); | |
| 86 void activateLazyDecoding(); | 84 void activateLazyDecoding(); |
| 87 | 85 |
| 88 RefPtr<SharedBuffer> m_data; | 86 RefPtr<SharedBuffer> m_data; |
| 89 bool m_allDataReceived; | 87 bool m_allDataReceived; |
| 90 unsigned m_lastDataSize; | 88 unsigned m_lastDataSize; |
| 91 bool m_dataChanged; | 89 bool m_dataChanged; |
| 92 OwnPtr<ImageDecoder> m_actualDecoder; | 90 OwnPtr<ImageDecoder> m_actualDecoder; |
| 93 | 91 |
| 94 String m_filenameExtension; | 92 String m_filenameExtension; |
| 95 IntSize m_size; | 93 IntSize m_size; |
| 96 ImageOrientation m_orientation; | 94 ImageOrientation m_orientation; |
| 97 int m_repetitionCount; | 95 int m_repetitionCount; |
| 98 bool m_hasColorProfile; | 96 bool m_hasColorProfile; |
| 99 | 97 |
| 100 Vector<OwnPtr<ImageFrame> > m_lazyDecodedFrames; | 98 Vector<OwnPtr<ImageFrame> > m_lazyDecodedFrames; |
| 101 RefPtr<ImageFrameGenerator> m_frameGenerator; | 99 RefPtr<ImageFrameGenerator> m_frameGenerator; |
| 102 | 100 |
| 103 static bool s_enabled; | 101 static bool s_enabled; |
| 104 static bool s_skiaDiscardableMemoryEnabled; | |
| 105 }; | 102 }; |
| 106 | 103 |
| 107 } // namespace WebCore | 104 } // namespace WebCore |
| 108 | 105 |
| 109 #endif | 106 #endif |
| OLD | NEW |