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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 123 |
124 protected: | 124 protected: |
125 const ImageFrameGenerator* m_generator; | 125 const ImageFrameGenerator* m_generator; |
126 int m_useCount; | 126 int m_useCount; |
127 | 127 |
128 private: | 128 private: |
129 CacheEntry* m_prev; | 129 CacheEntry* m_prev; |
130 CacheEntry* m_next; | 130 CacheEntry* m_next; |
131 }; | 131 }; |
132 | 132 |
133 class DecoderCacheEntry FINAL : public CacheEntry { | 133 class DecoderCacheEntry final : public CacheEntry { |
134 public: | 134 public: |
135 static PassOwnPtr<DecoderCacheEntry> create(const ImageFrameGenerator* g
enerator, PassOwnPtr<ImageDecoder> decoder) | 135 static PassOwnPtr<DecoderCacheEntry> create(const ImageFrameGenerator* g
enerator, PassOwnPtr<ImageDecoder> decoder) |
136 { | 136 { |
137 return adoptPtr(new DecoderCacheEntry(generator, 0, decoder)); | 137 return adoptPtr(new DecoderCacheEntry(generator, 0, decoder)); |
138 } | 138 } |
139 | 139 |
140 DecoderCacheEntry(const ImageFrameGenerator* generator, int count, PassO
wnPtr<ImageDecoder> decoder) | 140 DecoderCacheEntry(const ImageFrameGenerator* generator, int count, PassO
wnPtr<ImageDecoder> decoder) |
141 : CacheEntry(generator, count) | 141 : CacheEntry(generator, count) |
142 , m_cachedDecoder(decoder) | 142 , m_cachedDecoder(decoder) |
143 , m_size(SkISize::Make(m_cachedDecoder->decodedSize().width(), m_cac
hedDecoder->decodedSize().height())) | 143 , m_size(SkISize::Make(m_cachedDecoder->decodedSize().width(), m_cac
hedDecoder->decodedSize().height())) |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 // m_heapLimitInBytes | 211 // m_heapLimitInBytes |
212 // m_heapMemoryUsageInBytes | 212 // m_heapMemoryUsageInBytes |
213 // This mutex also protects calls to underlying skBitmap's | 213 // This mutex also protects calls to underlying skBitmap's |
214 // lockPixels()/unlockPixels() as they are not threadsafe. | 214 // lockPixels()/unlockPixels() as they are not threadsafe. |
215 Mutex m_mutex; | 215 Mutex m_mutex; |
216 }; | 216 }; |
217 | 217 |
218 } // namespace blink | 218 } // namespace blink |
219 | 219 |
220 #endif | 220 #endif |
OLD | NEW |