OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 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 * 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 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
900 void GraphicsLayer::setNeedsDisplayInRect(const FloatRect& rect) | 900 void GraphicsLayer::setNeedsDisplayInRect(const FloatRect& rect) |
901 { | 901 { |
902 if (drawsContent()) { | 902 if (drawsContent()) { |
903 m_layer->layer()->invalidateRect(rect); | 903 m_layer->layer()->invalidateRect(rect); |
904 addRepaintRect(rect); | 904 addRepaintRect(rect); |
905 for (size_t i = 0; i < m_linkHighlights.size(); ++i) | 905 for (size_t i = 0; i < m_linkHighlights.size(); ++i) |
906 m_linkHighlights[i]->invalidate(); | 906 m_linkHighlights[i]->invalidate(); |
907 } | 907 } |
908 } | 908 } |
909 | 909 |
| 910 void GraphicsLayer::setIncludesFirstPaintInvalidation() |
| 911 { |
| 912 m_debugInfo.setIncludesFirstPaintInvalidation(true); |
| 913 } |
| 914 |
| 915 void GraphicsLayer::resetIncludesFirstPaintInvalidationRecursive() |
| 916 { |
| 917 m_debugInfo.setIncludesFirstPaintInvalidation(false); |
| 918 |
| 919 for (size_t i = 0; i < m_children.size(); ++i) |
| 920 m_children[i]->resetIncludesFirstPaintInvalidationRecursive(); |
| 921 } |
| 922 |
910 void GraphicsLayer::setContentsRect(const IntRect& rect) | 923 void GraphicsLayer::setContentsRect(const IntRect& rect) |
911 { | 924 { |
912 if (rect == m_contentsRect) | 925 if (rect == m_contentsRect) |
913 return; | 926 return; |
914 | 927 |
915 m_contentsRect = rect; | 928 m_contentsRect = rect; |
916 updateContentsRect(); | 929 updateContentsRect(); |
917 } | 930 } |
918 | 931 |
919 void GraphicsLayer::setContentsToImage(Image* image) | 932 void GraphicsLayer::setContentsToImage(Image* image) |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1056 #ifndef NDEBUG | 1069 #ifndef NDEBUG |
1057 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) | 1070 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) |
1058 { | 1071 { |
1059 if (!layer) | 1072 if (!layer) |
1060 return; | 1073 return; |
1061 | 1074 |
1062 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1075 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
1063 fprintf(stderr, "%s\n", output.utf8().data()); | 1076 fprintf(stderr, "%s\n", output.utf8().data()); |
1064 } | 1077 } |
1065 #endif | 1078 #endif |
OLD | NEW |