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

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: Rebased. 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 259 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
« no previous file with comments | « Source/core/rendering/compositing/CompositedLayerMapping.cpp ('k') | Source/core/rendering/svg/RenderSVGText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698