| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. | 2  * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. | 
| 3  * | 3  * | 
| 4  * This library is free software; you can redistribute it and/or | 4  * This library is free software; you can redistribute it and/or | 
| 5  * modify it under the terms of the GNU Library General Public | 5  * modify it under the terms of the GNU Library General Public | 
| 6  * License as published by the Free Software Foundation; either | 6  * License as published by the Free Software Foundation; either | 
| 7  * version 2 of the License, or (at your option) any later version. | 7  * version 2 of the License, or (at your option) any later version. | 
| 8  * | 8  * | 
| 9  * This library is distributed in the hope that it will be useful, | 9  * This library is distributed in the hope that it will be useful, | 
| 10  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 67 | 67 | 
| 68     static PassRefPtr<FontFallbackList> create() { return adoptRef(new FontFallb
     ackList()); } | 68     static PassRefPtr<FontFallbackList> create() { return adoptRef(new FontFallb
     ackList()); } | 
| 69 | 69 | 
| 70     ~FontFallbackList() { releaseFontData(); } | 70     ~FontFallbackList() { releaseFontData(); } | 
| 71     bool isValid() const; | 71     bool isValid() const; | 
| 72     void invalidate(PassRefPtrWillBeRawPtr<FontSelector>); | 72     void invalidate(PassRefPtrWillBeRawPtr<FontSelector>); | 
| 73 | 73 | 
| 74     bool loadingCustomFonts() const; | 74     bool loadingCustomFonts() const; | 
| 75     bool shouldSkipDrawing() const; | 75     bool shouldSkipDrawing() const; | 
| 76 | 76 | 
| 77     FontSelector* fontSelector() const { return m_fontSelector.get(); } | 77     FontSelector* getFontSelector() const { return m_fontSelector.get(); } | 
| 78     // FIXME: It should be possible to combine fontSelectorVersion and generatio
     n. | 78     // FIXME: It should be possible to combine fontSelectorVersion and generatio
     n. | 
| 79     unsigned fontSelectorVersion() const { return m_fontSelectorVersion; } | 79     unsigned fontSelectorVersion() const { return m_fontSelectorVersion; } | 
| 80     unsigned generation() const { return m_generation; } | 80     unsigned generation() const { return m_generation; } | 
| 81 | 81 | 
| 82     ShapeCache* shapeCache(const FontDescription& fontDescription) const | 82     ShapeCache* shapeCache(const FontDescription& fontDescription) const | 
| 83     { | 83     { | 
| 84         if (!m_shapeCache) { | 84         if (!m_shapeCache) { | 
| 85             FallbackListCompositeKey key = compositeKey(fontDescription); | 85             FallbackListCompositeKey key = compositeKey(fontDescription); | 
| 86             m_shapeCache = FontCache::fontCache()->getShapeCache(key)->weakPtr()
     ; | 86             m_shapeCache = FontCache::fontCache()->getShapeCache(key)->weakPtr()
     ; | 
| 87         } | 87         } | 
| 88         ASSERT(m_shapeCache); | 88         ASSERT(m_shapeCache); | 
| 89         if (fontSelector()) | 89         if (getFontSelector()) | 
| 90             m_shapeCache->clearIfVersionChanged(fontSelector()->version()); | 90             m_shapeCache->clearIfVersionChanged(getFontSelector()->version()); | 
| 91         return m_shapeCache.get(); | 91         return m_shapeCache.get(); | 
| 92     } | 92     } | 
| 93 | 93 | 
| 94     const SimpleFontData* primarySimpleFontData(const FontDescription& fontDescr
     iption) | 94     const SimpleFontData* primarySimpleFontData(const FontDescription& fontDescr
     iption) | 
| 95     { | 95     { | 
| 96         ASSERT(isMainThread()); | 96         ASSERT(isMainThread()); | 
| 97         if (!m_cachedPrimarySimpleFontData) { | 97         if (!m_cachedPrimarySimpleFontData) { | 
| 98             m_cachedPrimarySimpleFontData = determinePrimarySimpleFontData(fontD
     escription); | 98             m_cachedPrimarySimpleFontData = determinePrimarySimpleFontData(fontD
     escription); | 
| 99             ASSERT(m_cachedPrimarySimpleFontData); | 99             ASSERT(m_cachedPrimarySimpleFontData); | 
| 100         } | 100         } | 
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 134     unsigned m_fontSelectorVersion; | 134     unsigned m_fontSelectorVersion; | 
| 135     mutable int m_familyIndex; | 135     mutable int m_familyIndex; | 
| 136     unsigned short m_generation; | 136     unsigned short m_generation; | 
| 137     mutable bool m_hasLoadingFallback : 1; | 137     mutable bool m_hasLoadingFallback : 1; | 
| 138     mutable WeakPtr<ShapeCache> m_shapeCache; | 138     mutable WeakPtr<ShapeCache> m_shapeCache; | 
| 139 }; | 139 }; | 
| 140 | 140 | 
| 141 } // namespace blink | 141 } // namespace blink | 
| 142 | 142 | 
| 143 #endif | 143 #endif | 
| OLD | NEW | 
|---|