| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2014 Google Inc. All rights reserved. | 3 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 } | 132 } |
| 133 | 133 |
| 134 RenderLayer* m_compositingAncestor; | 134 RenderLayer* m_compositingAncestor; |
| 135 bool m_subtreeIsCompositing; | 135 bool m_subtreeIsCompositing; |
| 136 bool m_hasUnisolatedCompositedBlendingDescendant; | 136 bool m_hasUnisolatedCompositedBlendingDescendant; |
| 137 bool m_testingOverlap; | 137 bool m_testingOverlap; |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 static bool requiresCompositingOrSquashing(CompositingReasons reasons) | 140 static bool requiresCompositingOrSquashing(CompositingReasons reasons) |
| 141 { | 141 { |
| 142 #ifndef NDEBUG | 142 #if ENABLE(ASSERT) |
| 143 bool fastAnswer = reasons != CompositingReasonNone; | 143 bool fastAnswer = reasons != CompositingReasonNone; |
| 144 bool slowAnswer = requiresCompositing(reasons) || requiresSquashing(reasons)
; | 144 bool slowAnswer = requiresCompositing(reasons) || requiresSquashing(reasons)
; |
| 145 ASSERT(fastAnswer == slowAnswer); | 145 ASSERT(fastAnswer == slowAnswer); |
| 146 #endif | 146 #endif |
| 147 return reasons != CompositingReasonNone; | 147 return reasons != CompositingReasonNone; |
| 148 } | 148 } |
| 149 | 149 |
| 150 static CompositingReasons subtreeReasonsForCompositing(RenderLayer* layer, bool
hasCompositedDescendants, bool has3DTransformedDescendants) | 150 static CompositingReasons subtreeReasonsForCompositing(RenderLayer* layer, bool
hasCompositedDescendants, bool has3DTransformedDescendants) |
| 151 { | 151 { |
| 152 CompositingReasons subtreeReasons = CompositingReasonNone; | 152 CompositingReasons subtreeReasons = CompositingReasonNone; |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 | 412 |
| 413 descendantHas3DTransform |= anyDescendantHas3DTransform || layer->has3DT
ransform(); | 413 descendantHas3DTransform |= anyDescendantHas3DTransform || layer->has3DT
ransform(); |
| 414 } | 414 } |
| 415 | 415 |
| 416 // At this point we have finished collecting all reasons to composite this l
ayer. | 416 // At this point we have finished collecting all reasons to composite this l
ayer. |
| 417 layer->setCompositingReasons(reasonsToComposite); | 417 layer->setCompositingReasons(reasonsToComposite); |
| 418 | 418 |
| 419 } | 419 } |
| 420 | 420 |
| 421 } // namespace WebCore | 421 } // namespace WebCore |
| OLD | NEW |