OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
5 * 2000 Dirk Mueller <mueller@kde.org> | 5 * 2000 Dirk Mueller <mueller@kde.org> |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
9 * Copyright (C) 2009 Google Inc. All rights reserved. | 9 * Copyright (C) 2009 Google Inc. All rights reserved. |
10 * | 10 * |
(...skipping 2460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2471 | 2471 |
2472 // A null graphics layer can occur for painting of SVG images that are not p
arented into the main frame tree. | 2472 // A null graphics layer can occur for painting of SVG images that are not p
arented into the main frame tree. |
2473 if (rootGraphicsLayer) { | 2473 if (rootGraphicsLayer) { |
2474 synchronizedPaintRecursively(rootGraphicsLayer, interestRect); | 2474 synchronizedPaintRecursively(rootGraphicsLayer, interestRect); |
2475 } | 2475 } |
2476 lifecycle().advanceTo(DocumentLifecycle::PaintClean); | 2476 lifecycle().advanceTo(DocumentLifecycle::PaintClean); |
2477 } | 2477 } |
2478 | 2478 |
2479 void FrameView::synchronizedPaintRecursively(GraphicsLayer* graphicsLayer, const
LayoutRect& interestRect) | 2479 void FrameView::synchronizedPaintRecursively(GraphicsLayer* graphicsLayer, const
LayoutRect& interestRect) |
2480 { | 2480 { |
2481 if (graphicsLayer->needsDisplay()) { | 2481 GraphicsContext context(graphicsLayer->displayItemList()); |
2482 // TODO(chrishtr): implement interest rects. | |
2483 GraphicsContext context(graphicsLayer->displayItemList()); | |
2484 graphicsLayer->paint(context, roundedIntRect(interestRect)); | |
2485 | 2482 |
| 2483 // TODO(chrishtr): fix unit tests to not inject one-off interest rects. |
| 2484 if (interestRect != LayoutRect::infiniteRect()) { |
| 2485 if (graphicsLayer->needsDisplay()) { |
| 2486 graphicsLayer->paint(context, roundedIntRect(interestRect)); |
| 2487 |
| 2488 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
| 2489 graphicsLayer->commitIfNeeded(); |
| 2490 } |
| 2491 } else { |
| 2492 graphicsLayer->paintIfNeeded(context); |
2486 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) | 2493 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
2487 graphicsLayer->commitIfNeeded(); | 2494 graphicsLayer->commitIfNeeded(); |
2488 } | 2495 } |
2489 | 2496 |
2490 for (auto& child : graphicsLayer->children()) { | 2497 for (auto& child : graphicsLayer->children()) { |
2491 if (child) | 2498 if (child) |
2492 synchronizedPaintRecursively(child, interestRect); | 2499 synchronizedPaintRecursively(child, interestRect); |
2493 } | 2500 } |
2494 } | 2501 } |
2495 | 2502 |
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3931 | 3938 |
3932 if (!graphicsLayer) | 3939 if (!graphicsLayer) |
3933 return; | 3940 return; |
3934 | 3941 |
3935 PaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentLayoutObjec
t(), paintInvalidationContainer, viewRect); | 3942 PaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentLayoutObjec
t(), paintInvalidationContainer, viewRect); |
3936 | 3943 |
3937 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); | 3944 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); |
3938 } | 3945 } |
3939 | 3946 |
3940 } // namespace blink | 3947 } // namespace blink |
OLD | NEW |