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 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
959 void GraphicsLayer::setIsRootForIsolatedGroup(bool isolated) | 959 void GraphicsLayer::setIsRootForIsolatedGroup(bool isolated) |
960 { | 960 { |
961 if (m_isRootForIsolatedGroup == isolated) | 961 if (m_isRootForIsolatedGroup == isolated) |
962 return; | 962 return; |
963 m_isRootForIsolatedGroup = isolated; | 963 m_isRootForIsolatedGroup = isolated; |
964 platformLayer()->setIsRootForIsolatedGroup(isolated); | 964 platformLayer()->setIsRootForIsolatedGroup(isolated); |
965 } | 965 } |
966 | 966 |
967 void GraphicsLayer::setContentsNeedsDisplay() | 967 void GraphicsLayer::setContentsNeedsDisplay() |
968 { | 968 { |
| 969 setContentsNeedsDisplayInRect(m_contentsRect); |
| 970 } |
| 971 |
| 972 void GraphicsLayer::setContentsNeedsDisplayInRect(const FloatRect& rect) |
| 973 { |
969 if (WebLayer* contentsLayer = contentsLayerIfRegistered()) { | 974 if (WebLayer* contentsLayer = contentsLayerIfRegistered()) { |
970 contentsLayer->invalidate(); | 975 contentsLayer->invalidateRect(rect); |
971 addRepaintRect(m_contentsRect); | 976 addRepaintRect(rect); |
972 } | 977 } |
973 } | 978 } |
974 | 979 |
975 void GraphicsLayer::setNeedsDisplay() | 980 void GraphicsLayer::setNeedsDisplay() |
976 { | 981 { |
977 if (drawsContent()) { | 982 if (drawsContent()) { |
978 m_layer->layer()->invalidate(); | 983 m_layer->layer()->invalidate(); |
979 addRepaintRect(FloatRect(FloatPoint(), m_size)); | 984 addRepaintRect(FloatRect(FloatPoint(), m_size)); |
980 for (size_t i = 0; i < m_linkHighlights.size(); ++i) | 985 for (size_t i = 0; i < m_linkHighlights.size(); ++i) |
981 m_linkHighlights[i]->invalidate(); | 986 m_linkHighlights[i]->invalidate(); |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1229 #ifndef NDEBUG | 1234 #ifndef NDEBUG |
1230 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) | 1235 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) |
1231 { | 1236 { |
1232 if (!layer) | 1237 if (!layer) |
1233 return; | 1238 return; |
1234 | 1239 |
1235 String output = layer->layerTreeAsText(WebCore::LayerTreeIncludesDebugInfo); | 1240 String output = layer->layerTreeAsText(WebCore::LayerTreeIncludesDebugInfo); |
1236 fprintf(stderr, "%s\n", output.utf8().data()); | 1241 fprintf(stderr, "%s\n", output.utf8().data()); |
1237 } | 1242 } |
1238 #endif | 1243 #endif |
OLD | NEW |