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 3883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3894 // compositor, the compositing layer bounds need to change from includin g filter outsets to | 3894 // compositor, the compositing layer bounds need to change from includin g filter outsets to |
3895 // excluding filter outsets, on platforms whose compositors compute thei r own outsets. | 3895 // excluding filter outsets, on platforms whose compositors compute thei r own outsets. |
3896 // Similarly for the reverse change from compositor-painted to software- painted filters. | 3896 // Similarly for the reverse change from compositor-painted to software- painted filters. |
3897 return true; | 3897 return true; |
3898 } | 3898 } |
3899 #endif | 3899 #endif |
3900 | 3900 |
3901 return false; | 3901 return false; |
3902 } | 3902 } |
3903 | 3903 |
3904 inline bool RenderLayer::needsCompositingLayersRebuiltForBlending(const RenderSt yle* oldStyle, const RenderStyle* newStyle) const | |
3905 { | |
3906 ASSERT(newStyle); | |
3907 if (!hasCompositedLayerMapping()) | |
3908 return false; | |
3909 return (shouldIsolateCompositedDescendants() && !stackingNode()->isStackingC ontext()) | |
3910 || (oldStyle && (oldStyle->hasBlendMode() != newStyle->hasBlendMode())); | |
3911 } | |
3912 | |
3904 void RenderLayer::updateFilters(const RenderStyle* oldStyle, const RenderStyle* newStyle) | 3913 void RenderLayer::updateFilters(const RenderStyle* oldStyle, const RenderStyle* newStyle) |
3905 { | 3914 { |
3906 if (!hasOrHadFilters(oldStyle, newStyle)) | 3915 if (!hasOrHadFilters(oldStyle, newStyle)) |
3907 return; | 3916 return; |
3908 | 3917 |
3909 updateOrRemoveFilterClients(); | 3918 updateOrRemoveFilterClients(); |
3910 // During an accelerated animation, both WebKit and the compositor animate p roperties. | 3919 // During an accelerated animation, both WebKit and the compositor animate p roperties. |
3911 // However, WebKit shouldn't ask the compositor to update its filters if the compositor is performing the animation. | 3920 // However, WebKit shouldn't ask the compositor to update its filters if the compositor is performing the animation. |
3912 if (hasCompositedLayerMapping() && (RuntimeEnabledFeatures::webAnimationsCSS Enabled() | 3921 if (hasCompositedLayerMapping() && (RuntimeEnabledFeatures::webAnimationsCSS Enabled() |
3913 ? !hasActiveAnimationsOnCompositor(*renderer(), CSSPropertyWebkitFilter) | 3922 ? !hasActiveAnimationsOnCompositor(*renderer(), CSSPropertyWebkitFilter) |
(...skipping 26 matching lines...) Expand all Loading... | |
3940 bool didPaintWithFilters = false; | 3949 bool didPaintWithFilters = false; |
3941 | 3950 |
3942 if (paintsWithFilters()) | 3951 if (paintsWithFilters()) |
3943 didPaintWithFilters = true; | 3952 didPaintWithFilters = true; |
3944 updateFilters(oldStyle, renderer()->style()); | 3953 updateFilters(oldStyle, renderer()->style()); |
3945 | 3954 |
3946 const RenderStyle* newStyle = renderer()->style(); | 3955 const RenderStyle* newStyle = renderer()->style(); |
3947 if (compositor()->updateLayerCompositingState(this) | 3956 if (compositor()->updateLayerCompositingState(this) |
3948 || needsCompositingLayersRebuiltForClip(oldStyle, newStyle) | 3957 || needsCompositingLayersRebuiltForClip(oldStyle, newStyle) |
3949 || needsCompositingLayersRebuiltForOverflow(oldStyle, newStyle) | 3958 || needsCompositingLayersRebuiltForOverflow(oldStyle, newStyle) |
3950 || needsCompositingLayersRebuiltForFilters(oldStyle, newStyle, didPaintW ithFilters)) | 3959 || needsCompositingLayersRebuiltForFilters(oldStyle, newStyle, didPaintW ithFilters) |
3960 || needsCompositingLayersRebuiltForBlending(oldStyle, newStyle)) | |
rosca
2013/11/25 21:11:41
I added this new check. The tree must be rebuilt i
| |
3951 compositor()->setCompositingLayersNeedRebuild(); | 3961 compositor()->setCompositingLayersNeedRebuild(); |
3952 else if (hasCompositedLayerMapping()) | 3962 else if (hasCompositedLayerMapping()) |
3953 compositedLayerMapping()->updateGraphicsLayerGeometry(); | 3963 compositedLayerMapping()->updateGraphicsLayerGeometry(); |
3954 } | 3964 } |
3955 | 3965 |
3956 bool RenderLayer::scrollsOverflow() const | 3966 bool RenderLayer::scrollsOverflow() const |
3957 { | 3967 { |
3958 if (RenderLayerScrollableArea* scrollableArea = this->scrollableArea()) | 3968 if (RenderLayerScrollableArea* scrollableArea = this->scrollableArea()) |
3959 return scrollableArea->scrollsOverflow(); | 3969 return scrollableArea->scrollsOverflow(); |
3960 | 3970 |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4120 } | 4130 } |
4121 } | 4131 } |
4122 | 4132 |
4123 void showLayerTree(const WebCore::RenderObject* renderer) | 4133 void showLayerTree(const WebCore::RenderObject* renderer) |
4124 { | 4134 { |
4125 if (!renderer) | 4135 if (!renderer) |
4126 return; | 4136 return; |
4127 showLayerTree(renderer->enclosingLayer()); | 4137 showLayerTree(renderer->enclosingLayer()); |
4128 } | 4138 } |
4129 #endif | 4139 #endif |
OLD | NEW |