| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 , m_contentsOpaque(false) | 121 , m_contentsOpaque(false) |
| 122 , m_shouldFlattenTransform(true) | 122 , m_shouldFlattenTransform(true) |
| 123 , m_backfaceVisibility(true) | 123 , m_backfaceVisibility(true) |
| 124 , m_masksToBounds(false) | 124 , m_masksToBounds(false) |
| 125 , m_drawsContent(false) | 125 , m_drawsContent(false) |
| 126 , m_contentsVisible(true) | 126 , m_contentsVisible(true) |
| 127 , m_isRootForIsolatedGroup(false) | 127 , m_isRootForIsolatedGroup(false) |
| 128 , m_hasScrollParent(false) | 128 , m_hasScrollParent(false) |
| 129 , m_hasClipParent(false) | 129 , m_hasClipParent(false) |
| 130 , m_painted(false) | 130 , m_painted(false) |
| 131 , m_textPainted(false) | |
| 132 , m_imagePainted(false) | |
| 133 , m_isTrackingPaintInvalidations(client && client->isTrackingPaintInvalidati
ons()) | 131 , m_isTrackingPaintInvalidations(client && client->isTrackingPaintInvalidati
ons()) |
| 134 , m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip) | 132 , m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip) |
| 135 , m_parent(0) | 133 , m_parent(0) |
| 136 , m_maskLayer(0) | 134 , m_maskLayer(0) |
| 137 , m_contentsClippingMaskLayer(0) | 135 , m_contentsClippingMaskLayer(0) |
| 138 , m_replicaLayer(0) | 136 , m_replicaLayer(0) |
| 139 , m_replicatedLayer(0) | 137 , m_replicatedLayer(0) |
| 140 , m_paintCount(0) | 138 , m_paintCount(0) |
| 141 , m_contentsLayer(0) | 139 , m_contentsLayer(0) |
| 142 , m_contentsLayerId(0) | 140 , m_contentsLayerId(0) |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 GraphicsContext context(getPaintController(), disabledMode); | 373 GraphicsContext context(getPaintController(), disabledMode); |
| 376 | 374 |
| 377 m_previousInterestRect = *interestRect; | 375 m_previousInterestRect = *interestRect; |
| 378 m_client->paintContents(this, context, m_paintingPhase, *interestRect); | 376 m_client->paintContents(this, context, m_paintingPhase, *interestRect); |
| 379 notifyFirstPaintToClient(); | 377 notifyFirstPaintToClient(); |
| 380 return true; | 378 return true; |
| 381 } | 379 } |
| 382 | 380 |
| 383 void GraphicsLayer::notifyFirstPaintToClient() | 381 void GraphicsLayer::notifyFirstPaintToClient() |
| 384 { | 382 { |
| 383 bool isFirstPaint = false; |
| 385 if (!m_painted) { | 384 if (!m_painted) { |
| 386 DisplayItemList& itemList = m_paintController->newDisplayItemList(); | 385 DisplayItemList& itemList = m_paintController->newDisplayItemList(); |
| 387 for (DisplayItem& item : itemList) { | 386 for (DisplayItem& item : itemList) { |
| 388 DisplayItem::Type type = item.getType(); | 387 DisplayItem::Type type = item.getType(); |
| 389 if (DisplayItem::isDrawingType(type) && type != DisplayItem::Documen
tBackground && static_cast<const DrawingDisplayItem&>(item).picture()) { | 388 if (DisplayItem::isDrawingType(type) && type != DisplayItem::Documen
tBackground && static_cast<const DrawingDisplayItem&>(item).picture()) { |
| 390 m_painted = true; | 389 m_painted = true; |
| 391 m_client->notifyFirstPaint(); | 390 isFirstPaint = true; |
| 392 break; | 391 break; |
| 393 } | 392 } |
| 394 } | 393 } |
| 395 } | 394 } |
| 396 if (!m_textPainted && m_paintController->textPainted()) { | 395 m_client->notifyPaint(isFirstPaint, m_paintController->textPainted(), m_pain
tController->imagePainted()); |
| 397 m_textPainted = true; | |
| 398 m_client->notifyFirstTextPaint(); | |
| 399 } | |
| 400 if (!m_imagePainted && m_paintController->imagePainted()) { | |
| 401 m_imagePainted = true; | |
| 402 m_client->notifyFirstImagePaint(); | |
| 403 } | |
| 404 } | 396 } |
| 405 | 397 |
| 406 void GraphicsLayer::updateChildList() | 398 void GraphicsLayer::updateChildList() |
| 407 { | 399 { |
| 408 WebLayer* childHost = m_layer->layer(); | 400 WebLayer* childHost = m_layer->layer(); |
| 409 childHost->removeAllChildren(); | 401 childHost->removeAllChildren(); |
| 410 | 402 |
| 411 clearContentsLayerIfUnregistered(); | 403 clearContentsLayerIfUnregistered(); |
| 412 | 404 |
| 413 if (m_contentsLayer) { | 405 if (m_contentsLayer) { |
| (...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1358 { | 1350 { |
| 1359 if (!layer) { | 1351 if (!layer) { |
| 1360 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); | 1352 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); |
| 1361 return; | 1353 return; |
| 1362 } | 1354 } |
| 1363 | 1355 |
| 1364 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1356 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
| 1365 fprintf(stderr, "%s\n", output.utf8().data()); | 1357 fprintf(stderr, "%s\n", output.utf8().data()); |
| 1366 } | 1358 } |
| 1367 #endif | 1359 #endif |
| OLD | NEW |