|
Lines 2976-2982
void RenderLayer::paintLayerContents(RenderLayer* rootLayer, GraphicsContext* co
a/Source/WebCore/rendering/RenderLayer.cpp_sec1
|
| 2976 |
LayoutPoint rootLayerOffset; |
2976 |
LayoutPoint rootLayerOffset; |
| 2977 |
convertToLayerCoords(rootLayer, rootLayerOffset); |
2977 |
convertToLayerCoords(rootLayer, rootLayerOffset); |
| 2978 |
m_filterRepaintRect.move(rootLayerOffset.x(), rootLayerOffset.y()); |
2978 |
m_filterRepaintRect.move(rootLayerOffset.x(), rootLayerOffset.y()); |
| 2979 |
LayoutRect filterPaintDirtyRect = filterPainter.prepareFilterEffect(this, calculateLayerBounds(this, rootLayer, false, false), parentPaintDirtyRect, m_filterRepaintRect); |
2979 |
LayoutRect filterPaintDirtyRect = filterPainter.prepareFilterEffect(this, calculateLayerBounds(this, rootLayer, 0), parentPaintDirtyRect, m_filterRepaintRect); |
| 2980 |
m_filterRepaintRect = IntRect(); |
2980 |
m_filterRepaintRect = IntRect(); |
| 2981 |
// Rewire the old context to a memory buffer, so that we can capture the contents of the layer. |
2981 |
// Rewire the old context to a memory buffer, so that we can capture the contents of the layer. |
| 2982 |
// NOTE: We saved the old context in the "transparencyLayerContext" local variable, to be able to start a transparency layer |
2982 |
// NOTE: We saved the old context in the "transparencyLayerContext" local variable, to be able to start a transparency layer |
|
Lines 4093-4099
IntRect RenderLayer::absoluteBoundingBox() const
a/Source/WebCore/rendering/RenderLayer.cpp_sec2
|
| 4093 |
return pixelSnappedIntRect(boundingBox(root())); |
4093 |
return pixelSnappedIntRect(boundingBox(root())); |
| 4094 |
} |
4094 |
} |
| 4095 |
|
4095 |
|
| 4096 |
IntRect RenderLayer::calculateLayerBounds(const RenderLayer* layer, const RenderLayer* ancestorLayer, bool includeSelfTransform, bool includeLayerFilterOutsets) |
4096 |
IntRect RenderLayer::calculateLayerBounds(const RenderLayer* layer, const RenderLayer* ancestorLayer, CalculateLayerBoundsFlags flags) |
| 4097 |
{ |
4097 |
{ |
| 4098 |
if (!layer->isSelfPaintingLayer()) |
4098 |
if (!layer->isSelfPaintingLayer()) |
| 4099 |
return IntRect(); |
4099 |
return IntRect(); |
|
Lines 4114-4125
IntRect RenderLayer::calculateLayerBounds(const RenderLayer* layer, const Render
a/Source/WebCore/rendering/RenderLayer.cpp_sec3
|
| 4114 |
|
4114 |
|
| 4115 |
LayoutRect unionBounds = boundingBoxRect; |
4115 |
LayoutRect unionBounds = boundingBoxRect; |
| 4116 |
|
4116 |
|
| 4117 |
LayoutRect localClipRect = layer->localClipRect(); |
4117 |
if (flags & UseLocalClipRectIfPossible) { |
| 4118 |
if (localClipRect != PaintInfo::infiniteRect()) { |
4118 |
LayoutRect localClipRect = layer->localClipRect(); |
| 4119 |
LayoutPoint ancestorRelOffset; |
4119 |
if (localClipRect != PaintInfo::infiniteRect()) { |
| 4120 |
layer->convertToLayerCoords(ancestorLayer, ancestorRelOffset); |
4120 |
LayoutPoint ancestorRelOffset; |
| 4121 |
localClipRect.moveBy(ancestorRelOffset); |
4121 |
layer->convertToLayerCoords(ancestorLayer, ancestorRelOffset); |
| 4122 |
return pixelSnappedIntRect(localClipRect); |
4122 |
localClipRect.moveBy(ancestorRelOffset); |
|
|
4123 |
return pixelSnappedIntRect(localClipRect); |
| 4124 |
} |
| 4123 |
} |
4125 |
} |
| 4124 |
|
4126 |
|
| 4125 |
if (RenderLayer* reflection = layer->reflectionLayer()) { |
4127 |
if (RenderLayer* reflection = layer->reflectionLayer()) { |
|
Lines 4172-4178
IntRect RenderLayer::calculateLayerBounds(const RenderLayer* layer, const Render
a/Source/WebCore/rendering/RenderLayer.cpp_sec4
|
| 4172 |
// FIXME: We can optimize the size of the composited layers, by not enlarging |
4174 |
// FIXME: We can optimize the size of the composited layers, by not enlarging |
| 4173 |
// filtered areas with the outsets if we know that the filter is going to render in hardware. |
4175 |
// filtered areas with the outsets if we know that the filter is going to render in hardware. |
| 4174 |
// https://bugs.webkit.org/show_bug.cgi?id=81239 |
4176 |
// https://bugs.webkit.org/show_bug.cgi?id=81239 |
| 4175 |
if (includeLayerFilterOutsets && layer->renderer()->style()->hasFilterOutsets()) { |
4177 |
if ((flags & IncludeLayerFilterOutsets) && layer->renderer()->style()->hasFilterOutsets()) { |
| 4176 |
int topOutset; |
4178 |
int topOutset; |
| 4177 |
int rightOutset; |
4179 |
int rightOutset; |
| 4178 |
int bottomOutset; |
4180 |
int bottomOutset; |
|
Lines 4185-4191
IntRect RenderLayer::calculateLayerBounds(const RenderLayer* layer, const Render
a/Source/WebCore/rendering/RenderLayer.cpp_sec5
|
| 4185 |
UNUSED_PARAM(includeLayerFilterOutsets); |
4187 |
UNUSED_PARAM(includeLayerFilterOutsets); |
| 4186 |
#endif |
4188 |
#endif |
| 4187 |
|
4189 |
|
| 4188 |
if (includeSelfTransform && layer->paintsWithTransform(PaintBehaviorNormal)) { |
4190 |
if ((flags & IncludeSelfTransform) && layer->paintsWithTransform(PaintBehaviorNormal)) { |
| 4189 |
TransformationMatrix* affineTrans = layer->transform(); |
4191 |
TransformationMatrix* affineTrans = layer->transform(); |
| 4190 |
boundingBoxRect = affineTrans->mapRect(boundingBoxRect); |
4192 |
boundingBoxRect = affineTrans->mapRect(boundingBoxRect); |
| 4191 |
unionBounds = affineTrans->mapRect(unionBounds); |
4193 |
unionBounds = affineTrans->mapRect(unionBounds); |