| 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 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 } | 883 } |
| 884 | 884 |
| 885 void GraphicsLayer::setIsRootForIsolatedGroup(bool isolated) | 885 void GraphicsLayer::setIsRootForIsolatedGroup(bool isolated) |
| 886 { | 886 { |
| 887 if (m_isRootForIsolatedGroup == isolated) | 887 if (m_isRootForIsolatedGroup == isolated) |
| 888 return; | 888 return; |
| 889 m_isRootForIsolatedGroup = isolated; | 889 m_isRootForIsolatedGroup = isolated; |
| 890 platformLayer()->setIsRootForIsolatedGroup(isolated); | 890 platformLayer()->setIsRootForIsolatedGroup(isolated); |
| 891 } | 891 } |
| 892 | 892 |
| 893 void GraphicsLayer::setContentsNeedsDisplay() | 893 void GraphicsLayer::setContentsNeedsDisplay(const IntRect& dirtyRect) |
| 894 { | 894 { |
| 895 if (WebLayer* contentsLayer = contentsLayerIfRegistered()) { | 895 if (WebLayer* contentsLayer = contentsLayerIfRegistered()) { |
| 896 contentsLayer->invalidate(); | 896 IntRect rect = m_contentsRect; |
| 897 addRepaintRect(m_contentsRect); | 897 if (!dirtyRect.isEmpty()) |
| 898 rect = dirtyRect; |
| 899 contentsLayer->invalidateRect(rect); |
| 900 addRepaintRect(rect); |
| 898 } | 901 } |
| 899 } | 902 } |
| 900 | 903 |
| 901 void GraphicsLayer::setNeedsDisplay() | 904 void GraphicsLayer::setNeedsDisplay() |
| 902 { | 905 { |
| 903 if (drawsContent()) { | 906 if (drawsContent()) { |
| 904 m_layer->layer()->invalidate(); | 907 m_layer->layer()->invalidate(); |
| 905 addRepaintRect(FloatRect(FloatPoint(), m_size)); | 908 addRepaintRect(FloatRect(FloatPoint(), m_size)); |
| 906 for (size_t i = 0; i < m_linkHighlights.size(); ++i) | 909 for (size_t i = 0; i < m_linkHighlights.size(); ++i) |
| 907 m_linkHighlights[i]->invalidate(); | 910 m_linkHighlights[i]->invalidate(); |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1085 #ifndef NDEBUG | 1088 #ifndef NDEBUG |
| 1086 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) | 1089 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) |
| 1087 { | 1090 { |
| 1088 if (!layer) | 1091 if (!layer) |
| 1089 return; | 1092 return; |
| 1090 | 1093 |
| 1091 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1094 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
| 1092 fprintf(stderr, "%s\n", output.utf8().data()); | 1095 fprintf(stderr, "%s\n", output.utf8().data()); |
| 1093 } | 1096 } |
| 1094 #endif | 1097 #endif |
| OLD | NEW |