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 2055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2066 beginTransparencyLayers(context, paintingInfo.rootLayer, paintingInfo.pa
intDirtyRect, paintingInfo.paintBehavior); | 2066 beginTransparencyLayers(context, paintingInfo.rootLayer, paintingInfo.pa
intDirtyRect, paintingInfo.paintBehavior); |
2067 | 2067 |
2068 LayerPaintingInfo localPaintingInfo(paintingInfo); | 2068 LayerPaintingInfo localPaintingInfo(paintingInfo); |
2069 FilterEffectRendererHelper filterPainter(filterRenderer() && paintsWithFilte
rs()); | 2069 FilterEffectRendererHelper filterPainter(filterRenderer() && paintsWithFilte
rs()); |
2070 if (filterPainter.haveFilterEffect() && !context->paintingDisabled()) { | 2070 if (filterPainter.haveFilterEffect() && !context->paintingDisabled()) { |
2071 RenderLayerFilterInfo* filterInfo = this->filterInfo(); | 2071 RenderLayerFilterInfo* filterInfo = this->filterInfo(); |
2072 ASSERT(filterInfo); | 2072 ASSERT(filterInfo); |
2073 LayoutRect filterRepaintRect = filterInfo->dirtySourceRect(); | 2073 LayoutRect filterRepaintRect = filterInfo->dirtySourceRect(); |
2074 filterRepaintRect.move(offsetFromRoot.x(), offsetFromRoot.y()); | 2074 filterRepaintRect.move(offsetFromRoot.x(), offsetFromRoot.y()); |
2075 | 2075 |
2076 if (!rootRelativeBoundsComputed) { | 2076 if (!rootRelativeBoundsComputed) |
2077 rootRelativeBounds = calculateLayerBounds(paintingInfo.rootLayer, &o
ffsetFromRoot, 0); | 2077 rootRelativeBounds = calculateLayerBounds(paintingInfo.rootLayer, &o
ffsetFromRoot, 0); |
2078 rootRelativeBoundsComputed = true; | |
2079 } | |
2080 | 2078 |
2081 if (filterPainter.prepareFilterEffect(this, rootRelativeBounds, painting
Info.paintDirtyRect, filterRepaintRect)) { | 2079 if (filterPainter.prepareFilterEffect(this, rootRelativeBounds, painting
Info.paintDirtyRect, filterRepaintRect)) { |
2082 // Now we know for sure, that the source image will be updated, so w
e can revert our tracking repaint rect back to zero. | 2080 // Now we know for sure, that the source image will be updated, so w
e can revert our tracking repaint rect back to zero. |
2083 filterInfo->resetDirtySourceRect(); | 2081 filterInfo->resetDirtySourceRect(); |
2084 | 2082 |
2085 // Rewire the old context to a memory buffer, so that we can capture
the contents of the layer. | 2083 // Rewire the old context to a memory buffer, so that we can capture
the contents of the layer. |
2086 // NOTE: We saved the old context in the "transparencyLayerContext"
local variable, to be able to start a transparency layer | 2084 // NOTE: We saved the old context in the "transparencyLayerContext"
local variable, to be able to start a transparency layer |
2087 // on the original context and avoid duplicating "beginFilterEffect"
after each transparency layer call. Also, note that | 2085 // on the original context and avoid duplicating "beginFilterEffect"
after each transparency layer call. Also, note that |
2088 // beginTransparencyLayers will only create a single lazy transparen
cy layer, even though it is called twice in this method. | 2086 // beginTransparencyLayers will only create a single lazy transparen
cy layer, even though it is called twice in this method. |
2089 context = filterPainter.beginFilterEffect(context); | 2087 context = filterPainter.beginFilterEffect(context); |
(...skipping 1994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4084 } | 4082 } |
4085 } | 4083 } |
4086 | 4084 |
4087 void showLayerTree(const WebCore::RenderObject* renderer) | 4085 void showLayerTree(const WebCore::RenderObject* renderer) |
4088 { | 4086 { |
4089 if (!renderer) | 4087 if (!renderer) |
4090 return; | 4088 return; |
4091 showLayerTree(renderer->enclosingLayer()); | 4089 showLayerTree(renderer->enclosingLayer()); |
4092 } | 4090 } |
4093 #endif | 4091 #endif |
OLD | NEW |