Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: Source/core/rendering/compositing/CompositingRequirementsUpdater.cpp

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed config.gni. Minor cleanups. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 276
277 // Here we know that all children and the layer's own contents can blind ly paint into 277 // Here we know that all children and the layer's own contents can blind ly paint into
278 // this layer's backing, until a descendant is composited. So, we don't need to check 278 // this layer's backing, until a descendant is composited. So, we don't need to check
279 // for overlap with anything behind this layer. 279 // for overlap with anything behind this layer.
280 overlapMap.beginNewOverlapTestingContext(); 280 overlapMap.beginNewOverlapTestingContext();
281 // This layer is going to be composited, so children can safely ignore t he fact that there's an 281 // This layer is going to be composited, so children can safely ignore t he fact that there's an
282 // animation running behind this layer, meaning they can rely on the ove rlap map testing again. 282 // animation running behind this layer, meaning they can rely on the ove rlap map testing again.
283 childRecursionData.m_testingOverlap = true; 283 childRecursionData.m_testingOverlap = true;
284 } 284 }
285 285
286 #if ASSERT_ENABLED 286 #if ENABLE(ASSERT)
287 LayerListMutationDetector mutationChecker(layer->stackingNode()); 287 LayerListMutationDetector mutationChecker(layer->stackingNode());
288 #endif 288 #endif
289 289
290 bool anyDescendantHas3DTransform = false; 290 bool anyDescendantHas3DTransform = false;
291 bool willHaveForegroundLayer = false; 291 bool willHaveForegroundLayer = false;
292 292
293 if (layer->stackingNode()->isStackingContext()) { 293 if (layer->stackingNode()->isStackingContext()) {
294 RenderLayerStackingNodeIterator iterator(*layer->stackingNode(), Negativ eZOrderChildren); 294 RenderLayerStackingNodeIterator iterator(*layer->stackingNode(), Negativ eZOrderChildren);
295 while (RenderLayerStackingNode* curNode = iterator.next()) { 295 while (RenderLayerStackingNode* curNode = iterator.next()) {
296 IntRect absoluteChildDecendantBoundingBox; 296 IntRect absoluteChildDecendantBoundingBox;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698