| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/layout/compositing/CompositingReasonFinder.h" | 6 #include "core/layout/compositing/CompositingReasonFinder.h" |
| 7 | 7 |
| 8 #include "core/CSSPropertyNames.h" | 8 #include "core/CSSPropertyNames.h" |
| 9 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
| 10 #include "core/frame/FrameView.h" | 10 #include "core/frame/FrameView.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 if (style.hasPerspective()) | 104 if (style.hasPerspective()) |
| 105 reasons |= CompositingReasonPerspectiveWith3DDescendants; | 105 reasons |= CompositingReasonPerspectiveWith3DDescendants; |
| 106 | 106 |
| 107 // Ignore scroll-blocks-on on the document element, because it will get prop
agated to | 107 // Ignore scroll-blocks-on on the document element, because it will get prop
agated to |
| 108 // the LayoutView (by Document::inheritHtmlAndBodyElementStyles) and we don'
t want to | 108 // the LayoutView (by Document::inheritHtmlAndBodyElementStyles) and we don'
t want to |
| 109 // create two composited layers. | 109 // create two composited layers. |
| 110 if (style.hasScrollBlocksOn() && !renderer->isDocumentElement()) | 110 if (style.hasScrollBlocksOn() && !renderer->isDocumentElement()) |
| 111 reasons |= CompositingReasonScrollBlocksOn; | 111 reasons |= CompositingReasonScrollBlocksOn; |
| 112 | 112 |
| 113 if (style.hasCompositorProxy()) |
| 114 reasons |= CompositingReasonCompositorProxy; |
| 115 |
| 113 // If the implementation of createsGroup changes, we need to be aware of tha
t in this part of code. | 116 // If the implementation of createsGroup changes, we need to be aware of tha
t in this part of code. |
| 114 ASSERT((renderer->isTransparent() || renderer->hasMask() || renderer->hasFil
ter() || style.hasBlendMode()) == renderer->createsGroup()); | 117 ASSERT((renderer->isTransparent() || renderer->hasMask() || renderer->hasFil
ter() || style.hasBlendMode()) == renderer->createsGroup()); |
| 115 | 118 |
| 116 if (style.hasMask()) | 119 if (style.hasMask()) |
| 117 reasons |= CompositingReasonMaskWithCompositedDescendants; | 120 reasons |= CompositingReasonMaskWithCompositedDescendants; |
| 118 | 121 |
| 119 if (style.hasFilter()) | 122 if (style.hasFilter()) |
| 120 reasons |= CompositingReasonFilterWithCompositedDescendants; | 123 reasons |= CompositingReasonFilterWithCompositedDescendants; |
| 121 | 124 |
| 122 // See Layer::updateTransform for an explanation of why we check both. | 125 // See Layer::updateTransform for an explanation of why we check both. |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 // Either way, we don't need to require compositing for scroll block
s on. This avoids | 230 // Either way, we don't need to require compositing for scroll block
s on. This avoids |
| 228 // enabling compositing by default, and avoids cluttering the root l
ayers compositing reasons. | 231 // enabling compositing by default, and avoids cluttering the root l
ayers compositing reasons. |
| 229 return false; | 232 return false; |
| 230 } | 233 } |
| 231 } | 234 } |
| 232 | 235 |
| 233 return true; | 236 return true; |
| 234 } | 237 } |
| 235 | 238 |
| 236 } | 239 } |
| OLD | NEW |