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

Side by Side Diff: Source/core/rendering/compositing/RenderLayerCompositor.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 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // which asserts that it's not InCompositingUpdate. 197 // which asserts that it's not InCompositingUpdate.
198 enableCompositingModeIfNeeded(); 198 enableCompositingModeIfNeeded();
199 rootRenderLayer()->updateDescendantDependentFlags(); 199 rootRenderLayer()->updateDescendantDependentFlags();
200 200
201 lifecycle().advanceTo(DocumentLifecycle::InCompositingUpdate); 201 lifecycle().advanceTo(DocumentLifecycle::InCompositingUpdate);
202 updateIfNeeded(); 202 updateIfNeeded();
203 lifecycle().advanceTo(DocumentLifecycle::CompositingClean); 203 lifecycle().advanceTo(DocumentLifecycle::CompositingClean);
204 204
205 DocumentAnimations::startPendingAnimations(m_renderView.document()); 205 DocumentAnimations::startPendingAnimations(m_renderView.document());
206 206
207 #if ASSERT_ENABLED 207 #if ENABLE(ASSERT)
208 ASSERT(lifecycle().state() == DocumentLifecycle::CompositingClean); 208 ASSERT(lifecycle().state() == DocumentLifecycle::CompositingClean);
209 assertNoUnresolvedDirtyBits(); 209 assertNoUnresolvedDirtyBits();
210 for (Frame* child = m_renderView.frameView()->frame().tree().firstChild(); c hild; child = child->tree().nextSibling()) { 210 for (Frame* child = m_renderView.frameView()->frame().tree().firstChild(); c hild; child = child->tree().nextSibling()) {
211 if (child->isLocalFrame()) 211 if (child->isLocalFrame())
212 toLocalFrame(child)->contentRenderer()->compositor()->assertNoUnreso lvedDirtyBits(); 212 toLocalFrame(child)->contentRenderer()->compositor()->assertNoUnreso lvedDirtyBits();
213 } 213 }
214 #endif 214 #endif
215 } 215 }
216 216
217 void RenderLayerCompositor::setNeedsCompositingUpdate(CompositingUpdateType upda teType) 217 void RenderLayerCompositor::setNeedsCompositingUpdate(CompositingUpdateType upda teType)
(...skipping 10 matching lines...) Expand all
228 // isScrollable method would return a different value. 228 // isScrollable method would return a different value.
229 m_rootShouldAlwaysCompositeDirty = true; 229 m_rootShouldAlwaysCompositeDirty = true;
230 enableCompositingModeIfNeeded(); 230 enableCompositingModeIfNeeded();
231 231
232 // FIXME: Rather than marking the entire RenderView as dirty, we should 232 // FIXME: Rather than marking the entire RenderView as dirty, we should
233 // track which RenderLayers moved during layout and only dirty those 233 // track which RenderLayers moved during layout and only dirty those
234 // specific RenderLayers. 234 // specific RenderLayers.
235 rootRenderLayer()->setNeedsCompositingInputsUpdate(); 235 rootRenderLayer()->setNeedsCompositingInputsUpdate();
236 } 236 }
237 237
238 #if ASSERT_ENABLED 238 #if ENABLE(ASSERT)
239 239
240 void RenderLayerCompositor::assertNoUnresolvedDirtyBits() 240 void RenderLayerCompositor::assertNoUnresolvedDirtyBits()
241 { 241 {
242 ASSERT(m_pendingUpdateType == CompositingUpdateNone); 242 ASSERT(m_pendingUpdateType == CompositingUpdateNone);
243 ASSERT(!m_rootShouldAlwaysCompositeDirty); 243 ASSERT(!m_rootShouldAlwaysCompositeDirty);
244 } 244 }
245 245
246 #endif 246 #endif
247 247
248 void RenderLayerCompositor::applyOverlayFullscreenVideoAdjustment() 248 void RenderLayerCompositor::applyOverlayFullscreenVideoAdjustment()
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 if (!hasAcceleratedCompositing() || updateType == CompositingUpdateNone) 287 if (!hasAcceleratedCompositing() || updateType == CompositingUpdateNone)
288 return; 288 return;
289 289
290 RenderLayer* updateRoot = rootRenderLayer(); 290 RenderLayer* updateRoot = rootRenderLayer();
291 291
292 Vector<RenderLayer*> layersNeedingRepaint; 292 Vector<RenderLayer*> layersNeedingRepaint;
293 293
294 if (updateType >= CompositingUpdateAfterCompositingInputChange) { 294 if (updateType >= CompositingUpdateAfterCompositingInputChange) {
295 CompositingInputsUpdater(updateRoot).update(); 295 CompositingInputsUpdater(updateRoot).update();
296 296
297 #if ASSERT_ENABLED 297 #if ENABLE(ASSERT)
298 // FIXME: Move this check to the end of the compositing update. 298 // FIXME: Move this check to the end of the compositing update.
299 CompositingInputsUpdater::assertNeedsCompositingInputsUpdateBitsCleared( updateRoot); 299 CompositingInputsUpdater::assertNeedsCompositingInputsUpdateBitsCleared( updateRoot);
300 #endif 300 #endif
301 301
302 CompositingRequirementsUpdater(m_renderView, m_compositingReasonFinder). update(updateRoot); 302 CompositingRequirementsUpdater(m_renderView, m_compositingReasonFinder). update(updateRoot);
303 303
304 CompositingLayerAssigner layerAssigner(this); 304 CompositingLayerAssigner layerAssigner(this);
305 layerAssigner.assign(updateRoot, layersNeedingRepaint); 305 layerAssigner.assign(updateRoot, layersNeedingRepaint);
306 306
307 bool layersChanged = layerAssigner.layersChanged(); 307 bool layersChanged = layerAssigner.layersChanged();
(...skipping 10 matching lines...) Expand all
318 updateType = std::max(updateType, CompositingUpdateRebuildTree); 318 updateType = std::max(updateType, CompositingUpdateRebuildTree);
319 } 319 }
320 320
321 if (updateType != CompositingUpdateNone) { 321 if (updateType != CompositingUpdateNone) {
322 GraphicsLayerUpdater updater; 322 GraphicsLayerUpdater updater;
323 updater.update(*updateRoot, layersNeedingRepaint); 323 updater.update(*updateRoot, layersNeedingRepaint);
324 324
325 if (updater.needsRebuildTree()) 325 if (updater.needsRebuildTree())
326 updateType = std::max(updateType, CompositingUpdateRebuildTree); 326 updateType = std::max(updateType, CompositingUpdateRebuildTree);
327 327
328 #if ASSERT_ENABLED 328 #if ENABLE(ASSERT)
329 // FIXME: Move this check to the end of the compositing update. 329 // FIXME: Move this check to the end of the compositing update.
330 GraphicsLayerUpdater::assertNeedsToUpdateGraphicsLayerBitsCleared(*updat eRoot); 330 GraphicsLayerUpdater::assertNeedsToUpdateGraphicsLayerBitsCleared(*updat eRoot);
331 #endif 331 #endif
332 } 332 }
333 333
334 if (updateType >= CompositingUpdateRebuildTree) { 334 if (updateType >= CompositingUpdateRebuildTree) {
335 GraphicsLayerTreeBuilder::AncestorInfo ancestorInfo; 335 GraphicsLayerTreeBuilder::AncestorInfo ancestorInfo;
336 GraphicsLayerVector childList; 336 GraphicsLayerVector childList;
337 ancestorInfo.childLayersOfEnclosingCompositedLayer = &childList; 337 ancestorInfo.childLayersOfEnclosingCompositedLayer = &childList;
338 { 338 {
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 // FIXME: This method does not work correctly with transforms. 625 // FIXME: This method does not work correctly with transforms.
626 if (layer->compositingState() == PaintsIntoOwnBacking) { 626 if (layer->compositingState() == PaintsIntoOwnBacking) {
627 layer->compositedLayerMapping()->setContentsNeedDisplay(); 627 layer->compositedLayerMapping()->setContentsNeedDisplay();
628 // This function is called only when it is desired to repaint the entire compositing graphics layer tree. 628 // This function is called only when it is desired to repaint the entire compositing graphics layer tree.
629 // This includes squashing. 629 // This includes squashing.
630 layer->compositedLayerMapping()->setSquashingContentsNeedDisplay(); 630 layer->compositedLayerMapping()->setSquashingContentsNeedDisplay();
631 } 631 }
632 632
633 layer->stackingNode()->updateLayerListsIfNeeded(); 633 layer->stackingNode()->updateLayerListsIfNeeded();
634 634
635 #if ASSERT_ENABLED 635 #if ENABLE(ASSERT)
636 LayerListMutationDetector mutationChecker(layer->stackingNode()); 636 LayerListMutationDetector mutationChecker(layer->stackingNode());
637 #endif 637 #endif
638 638
639 unsigned childrenToVisit = NormalFlowChildren; 639 unsigned childrenToVisit = NormalFlowChildren;
640 if (layer->hasCompositingDescendant()) 640 if (layer->hasCompositingDescendant())
641 childrenToVisit |= PositiveZOrderChildren | NegativeZOrderChildren; 641 childrenToVisit |= PositiveZOrderChildren | NegativeZOrderChildren;
642 RenderLayerStackingNodeIterator iterator(*layer->stackingNode(), childrenToV isit); 642 RenderLayerStackingNodeIterator iterator(*layer->stackingNode(), childrenToV isit);
643 while (RenderLayerStackingNode* curNode = iterator.next()) 643 while (RenderLayerStackingNode* curNode = iterator.next())
644 recursiveRepaintLayer(curNode->layer()); 644 recursiveRepaintLayer(curNode->layer());
645 } 645 }
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 } else if (graphicsLayer == m_scrollLayer.get()) { 1167 } else if (graphicsLayer == m_scrollLayer.get()) {
1168 name = "LocalFrame Scrolling Layer"; 1168 name = "LocalFrame Scrolling Layer";
1169 } else { 1169 } else {
1170 ASSERT_NOT_REACHED(); 1170 ASSERT_NOT_REACHED();
1171 } 1171 }
1172 1172
1173 return name; 1173 return name;
1174 } 1174 }
1175 1175
1176 } // namespace WebCore 1176 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698