| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
| 3 * | 3 * |
| 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 5 * | 5 * |
| 6 * Other contributors: | 6 * Other contributors: |
| 7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
| 9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
| 10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
| (...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1009 | 1009 |
| 1010 // Begin transparency if we have something to paint. | 1010 // Begin transparency if we have something to paint. |
| 1011 if (haveTransparency && !foregroundRectIsEmpty) | 1011 if (haveTransparency && !foregroundRectIsEmpty) |
| 1012 beginTransparencyLayers(transparencyLayerContext, localPaintingInfo.root
Layer, transparencyPaintDirtyRect, localPaintingInfo.subPixelAccumulation); | 1012 beginTransparencyLayers(transparencyLayerContext, localPaintingInfo.root
Layer, transparencyPaintDirtyRect, localPaintingInfo.subPixelAccumulation); |
| 1013 | 1013 |
| 1014 // Optimize clipping for the single fragment case. | 1014 // Optimize clipping for the single fragment case. |
| 1015 bool shouldClip = localPaintingInfo.clipToDirtyRect && !foregroundRectIsEmpt
y; | 1015 bool shouldClip = localPaintingInfo.clipToDirtyRect && !foregroundRectIsEmpt
y; |
| 1016 if (shouldClip) | 1016 if (shouldClip) |
| 1017 clipToRect(localPaintingInfo, context, layerForegroundRect); | 1017 clipToRect(localPaintingInfo, context, layerForegroundRect); |
| 1018 | 1018 |
| 1019 // TODO(ojan): We probably should early return at the beginning of this func
tion |
| 1020 // if the rect is empty. |
| 1019 if (!foregroundRectIsEmpty) { | 1021 if (!foregroundRectIsEmpty) { |
| 1020 // We have to loop through every fragment multiple times, since we have
to issue paint invalidations in each specific phase in order for | |
| 1021 // interleaving of the fragments to work properly. | |
| 1022 // FIXME(sky): Do we still need this for anything now that we don't have
fragments? | |
| 1023 paintForegroundWithPhase(PaintPhaseForeground, | 1022 paintForegroundWithPhase(PaintPhaseForeground, |
| 1024 context, localPaintingInfo, | 1023 context, localPaintingInfo, |
| 1025 layerLocation, layerForegroundRect); | 1024 layerLocation, layerForegroundRect); |
| 1026 } | 1025 } |
| 1027 | 1026 |
| 1028 if (shouldClip) | 1027 if (shouldClip) |
| 1029 restoreClip(context, localPaintingInfo.paintDirtyRect, layerForegroundRe
ct); | 1028 restoreClip(context, localPaintingInfo.paintDirtyRect, layerForegroundRe
ct); |
| 1030 } | 1029 } |
| 1031 | 1030 |
| 1032 void RenderLayer::paintForegroundWithPhase(PaintPhase phase, GraphicsContext* co
ntext, | 1031 void RenderLayer::paintForegroundWithPhase(PaintPhase phase, GraphicsContext* co
ntext, |
| (...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1699 } | 1698 } |
| 1700 } | 1699 } |
| 1701 | 1700 |
| 1702 void showLayerTree(const blink::RenderObject* renderer) | 1701 void showLayerTree(const blink::RenderObject* renderer) |
| 1703 { | 1702 { |
| 1704 if (!renderer) | 1703 if (!renderer) |
| 1705 return; | 1704 return; |
| 1706 showLayerTree(renderer->enclosingLayer()); | 1705 showLayerTree(renderer->enclosingLayer()); |
| 1707 } | 1706 } |
| 1708 #endif | 1707 #endif |
| OLD | NEW |