| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved. | 2 * Copyright (c) 2008, 2009, 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 #include "SkTypes.h" | 38 #include "SkTypes.h" |
| 39 #include "SkUtils.h" | 39 #include "SkUtils.h" |
| 40 #include "platform/fonts/FontDescription.h" | 40 #include "platform/fonts/FontDescription.h" |
| 41 #include "platform/fonts/GlyphPage.h" | 41 #include "platform/fonts/GlyphPage.h" |
| 42 #include "platform/fonts/VDMXParser.h" | 42 #include "platform/fonts/VDMXParser.h" |
| 43 #include "platform/geometry/FloatRect.h" | 43 #include "platform/geometry/FloatRect.h" |
| 44 #include "wtf/unicode/Unicode.h" | 44 #include "wtf/unicode/Unicode.h" |
| 45 | 45 |
| 46 namespace blink { | 46 namespace blink { |
| 47 | 47 |
| 48 #if OS(LINUX) || OS(ANDROID) | |
| 49 // This is the largest VDMX table which we'll try to load and parse. | 48 // This is the largest VDMX table which we'll try to load and parse. |
| 50 static const size_t maxVDMXTableSize = 1024 * 1024; // 1 MB | 49 static const size_t maxVDMXTableSize = 1024 * 1024; // 1 MB |
| 51 #endif | |
| 52 | 50 |
| 53 void SimpleFontData::platformInit() | 51 void SimpleFontData::platformInit() |
| 54 { | 52 { |
| 55 if (!m_platformData.size()) { | 53 if (!m_platformData.size()) { |
| 56 m_fontMetrics.reset(); | 54 m_fontMetrics.reset(); |
| 57 m_avgCharWidth = 0; | 55 m_avgCharWidth = 0; |
| 58 m_maxCharWidth = 0; | 56 m_maxCharWidth = 0; |
| 59 return; | 57 return; |
| 60 } | 58 } |
| 61 | 59 |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 if (glyphs[i]) { | 296 if (glyphs[i]) { |
| 299 pageToFill->setGlyphDataForIndex(offset + i, glyphs[i], this); | 297 pageToFill->setGlyphDataForIndex(offset + i, glyphs[i], this); |
| 300 haveGlyphs = true; | 298 haveGlyphs = true; |
| 301 } | 299 } |
| 302 } | 300 } |
| 303 | 301 |
| 304 return haveGlyphs; | 302 return haveGlyphs; |
| 305 } | 303 } |
| 306 | 304 |
| 307 } // namespace blink | 305 } // namespace blink |
| OLD | NEW |