| 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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 if (!m_textPainted && m_paintController->textPainted()) { | 351 if (!m_textPainted && m_paintController->textPainted()) { |
| 352 m_textPainted = true; | 352 m_textPainted = true; |
| 353 m_client->notifyFirstTextPaint(); | 353 m_client->notifyFirstTextPaint(); |
| 354 } | 354 } |
| 355 if (!m_imagePainted && m_paintController->imagePainted()) { | 355 if (!m_imagePainted && m_paintController->imagePainted()) { |
| 356 m_imagePainted = true; | 356 m_imagePainted = true; |
| 357 m_client->notifyFirstImagePaint(); | 357 m_client->notifyFirstImagePaint(); |
| 358 } | 358 } |
| 359 } | 359 } |
| 360 | 360 |
| 361 void GraphicsLayer::notifyPaintInvalidationToClient(const IntRect* visualRect) |
| 362 { |
| 363 if (visualRect) { |
| 364 m_client->notifyPaintInvalidation(visualRect, paintCount()); |
| 365 } |
| 366 } |
| 367 |
| 361 void GraphicsLayer::updateChildList() | 368 void GraphicsLayer::updateChildList() |
| 362 { | 369 { |
| 363 WebLayer* childHost = m_layer->layer(); | 370 WebLayer* childHost = m_layer->layer(); |
| 364 childHost->removeAllChildren(); | 371 childHost->removeAllChildren(); |
| 365 | 372 |
| 366 clearContentsLayerIfUnregistered(); | 373 clearContentsLayerIfUnregistered(); |
| 367 | 374 |
| 368 if (m_contentsLayer) { | 375 if (m_contentsLayer) { |
| 369 // FIXME: add the contents layer in the correct order with negative z-or
der children. | 376 // FIXME: add the contents layer in the correct order with negative z-or
der children. |
| 370 // This does not cause visible rendering issues because currently conten
ts layers are only used | 377 // This does not cause visible rendering issues because currently conten
ts layers are only used |
| (...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1043 trackPaintInvalidationRect(rect); | 1050 trackPaintInvalidationRect(rect); |
| 1044 for (size_t i = 0; i < m_linkHighlights.size(); ++i) | 1051 for (size_t i = 0; i < m_linkHighlights.size(); ++i) |
| 1045 m_linkHighlights[i]->invalidate(); | 1052 m_linkHighlights[i]->invalidate(); |
| 1046 } | 1053 } |
| 1047 | 1054 |
| 1048 void GraphicsLayer::invalidateDisplayItemClient(const DisplayItemClientWrapper&
displayItemClient, PaintInvalidationReason paintInvalidationReason, const IntRec
t* visualRect) | 1055 void GraphicsLayer::invalidateDisplayItemClient(const DisplayItemClientWrapper&
displayItemClient, PaintInvalidationReason paintInvalidationReason, const IntRec
t* visualRect) |
| 1049 { | 1056 { |
| 1050 paintController()->invalidate(displayItemClient, paintInvalidationReason, vi
sualRect); | 1057 paintController()->invalidate(displayItemClient, paintInvalidationReason, vi
sualRect); |
| 1051 if (isTrackingPaintInvalidations()) | 1058 if (isTrackingPaintInvalidations()) |
| 1052 trackPaintInvalidationObject(displayItemClient.debugName()); | 1059 trackPaintInvalidationObject(displayItemClient.debugName()); |
| 1060 notifyPaintInvalidationToClient(visualRect); |
| 1053 } | 1061 } |
| 1054 | 1062 |
| 1055 void GraphicsLayer::setContentsRect(const IntRect& rect) | 1063 void GraphicsLayer::setContentsRect(const IntRect& rect) |
| 1056 { | 1064 { |
| 1057 if (rect == m_contentsRect) | 1065 if (rect == m_contentsRect) |
| 1058 return; | 1066 return; |
| 1059 | 1067 |
| 1060 m_contentsRect = rect; | 1068 m_contentsRect = rect; |
| 1061 updateContentsRect(); | 1069 updateContentsRect(); |
| 1062 } | 1070 } |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1223 { | 1231 { |
| 1224 if (!layer) { | 1232 if (!layer) { |
| 1225 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); | 1233 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); |
| 1226 return; | 1234 return; |
| 1227 } | 1235 } |
| 1228 | 1236 |
| 1229 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1237 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
| 1230 fprintf(stderr, "%s\n", output.utf8().data()); | 1238 fprintf(stderr, "%s\n", output.utf8().data()); |
| 1231 } | 1239 } |
| 1232 #endif | 1240 #endif |
| OLD | NEW |