Index: Source/platform/fonts/CustomFontData.h |
diff --git a/Source/platform/fonts/CustomFontData.h b/Source/platform/fonts/CustomFontData.h |
index cb69f5a0c4139ec17ca41c801be45dd44396a673..75152561c3ad7aeb0d0b5c671854f06747671df0 100644 |
--- a/Source/platform/fonts/CustomFontData.h |
+++ b/Source/platform/fonts/CustomFontData.h |
@@ -37,9 +37,9 @@ struct WidthIterator; |
class PLATFORM_EXPORT CustomFontData : public RefCounted<CustomFontData> { |
public: |
- static PassRefPtr<CustomFontData> create(bool isLoadingFallback = false) |
+ static PassRefPtr<CustomFontData> create(bool isLoadingFallback = false, bool skipDrawing = false) |
{ |
- return adoptRef(new CustomFontData(isLoadingFallback)); |
+ return adoptRef(new CustomFontData(isLoadingFallback, skipDrawing)); |
} |
virtual ~CustomFontData() { } |
@@ -47,6 +47,7 @@ public: |
virtual void beginLoadIfNeeded() const { }; |
bool isLoading() const { return m_isLoadingFallback && m_isUsed; } |
bool isLoadingFallback() const { return m_isLoadingFallback; } |
+ bool shouldSkipDrawing() const { return m_skipDrawing && m_isUsed; } |
virtual bool isSVGFont() const { return false; } |
virtual void initializeFontData(SimpleFontData*, float) { } |
@@ -58,13 +59,15 @@ public: |
virtual void clearCSSFontFaceSource() { } |
protected: |
- CustomFontData(bool isLoadingFallback) |
+ CustomFontData(bool isLoadingFallback, bool skipDrawing) |
: m_isLoadingFallback(isLoadingFallback) |
+ , m_skipDrawing(skipDrawing) |
, m_isUsed(false) |
{ |
} |
- bool m_isLoadingFallback; // Whether or not this is a temporary font data for a custom font which is not yet loaded. |
+ bool m_isLoadingFallback; |
+ bool m_skipDrawing; |
mutable bool m_isUsed; |
}; |