| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 | 376 |
| 377 level++; | 377 level++; |
| 378 if (level > fontData->maxGlyphPageTreeLevel()) | 378 if (level > fontData->maxGlyphPageTreeLevel()) |
| 379 return; | 379 return; |
| 380 | 380 |
| 381 GlyphPageTreeNodeMap::iterator end = m_children.end(); | 381 GlyphPageTreeNodeMap::iterator end = m_children.end(); |
| 382 for (GlyphPageTreeNodeMap::iterator it = m_children.begin(); it != end; ++it
) | 382 for (GlyphPageTreeNodeMap::iterator it = m_children.begin(); it != end; ++it
) |
| 383 it->value->pruneFontData(fontData, level); | 383 it->value->pruneFontData(fontData, level); |
| 384 } | 384 } |
| 385 | 385 |
| 386 #ifndef NDEBUG | |
| 387 void GlyphPageTreeNode::showSubtree() | |
| 388 { | |
| 389 Vector<char> indent(level()); | |
| 390 indent.fill('\t', level()); | |
| 391 indent.append(0); | |
| 392 | |
| 393 GlyphPageTreeNodeMap::iterator end = m_children.end(); | |
| 394 for (GlyphPageTreeNodeMap::iterator it = m_children.begin(); it != end;
++it) { | |
| 395 printf("%s\t%p %s\n", indent.data(), it->key, it->key->description()
.utf8().data()); | |
| 396 it->value->showSubtree(); | |
| 397 } | |
| 398 if (m_systemFallbackChild) { | |
| 399 printf("%s\t* fallback\n", indent.data()); | |
| 400 m_systemFallbackChild->showSubtree(); | |
| 401 } | |
| 402 } | |
| 403 #endif | |
| 404 | |
| 405 } // namespace blink | 386 } // namespace blink |
| 406 | 387 |
| 407 #ifndef NDEBUG | |
| 408 void showGlyphPageTrees() | |
| 409 { | |
| 410 printf("Page 0:\n"); | |
| 411 showGlyphPageTree(0); | |
| 412 HashMap<int, blink::GlyphPageTreeNode*>::iterator end = blink::GlyphPageTree
Node::roots->end(); | |
| 413 for (HashMap<int, blink::GlyphPageTreeNode*>::iterator it = blink::GlyphPage
TreeNode::roots->begin(); it != end; ++it) { | |
| 414 printf("\nPage %d:\n", it->key); | |
| 415 showGlyphPageTree(it->key); | |
| 416 } | |
| 417 } | |
| 418 | |
| 419 void showGlyphPageTree(unsigned pageNumber) | |
| 420 { | |
| 421 blink::GlyphPageTreeNode::getRoot(pageNumber)->showSubtree(); | |
| 422 } | |
| 423 #endif | |
| OLD | NEW |