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

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

Issue 336493004: Removing a RenderLayer's CLM should trigger a repaint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add comment Created 6 years, 6 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
« no previous file with comments | « LayoutTests/compositing/squashing/squashed-layer-loses-graphicslayer-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 layer->setViewportConstrainedNotCompositedReason(viewportConstrainedNotC ompositedReason); 473 layer->setViewportConstrainedNotCompositedReason(viewportConstrainedNotC ompositedReason);
474 return true; 474 return true;
475 } 475 }
476 return false; 476 return false;
477 } 477 }
478 478
479 // These are temporary hacks to work around chicken-egg issues while we continue to refactor the compositing code. 479 // These are temporary hacks to work around chicken-egg issues while we continue to refactor the compositing code.
480 // See crbug.com/383191 for a list of tests that fail if this method is removed. 480 // See crbug.com/383191 for a list of tests that fail if this method is removed.
481 void RenderLayerCompositor::applyUpdateLayerCompositingStateChickenEggHacks(Rend erLayer* layer, CompositingStateTransitionType compositedLayerUpdate) 481 void RenderLayerCompositor::applyUpdateLayerCompositingStateChickenEggHacks(Rend erLayer* layer, CompositingStateTransitionType compositedLayerUpdate)
482 { 482 {
483 if (compositedLayerUpdate != NoCompositingStateChange) 483 if (compositedLayerUpdate != NoCompositingStateChange) {
484 allocateOrClearCompositedLayerMapping(layer, compositedLayerUpdate); 484 bool compositedLayerMappingChanged = allocateOrClearCompositedLayerMappi ng(layer, compositedLayerUpdate);
485 if (compositedLayerMappingChanged) {
486 // Repaint rects can only be computed for layers that have already b een attached to the
487 // render tree, but a chicken-egg compositing update can happen befo re |layer| gets
488 // attached. Since newly-created renderers don't get parented until they are attached
489 // (see RenderTreeBuilder::createRendererForElementIfNeeded), we can check for attachment
490 // by checking for a parent.
491 if (layer->parent())
492 layer->repainter().computeRepaintRectsIncludingNonCompositingDes cendants();
493 repaintOnCompositingChange(layer);
494 }
495 }
485 } 496 }
486 497
487 void RenderLayerCompositor::updateLayerCompositingState(RenderLayer* layer, Upda teLayerCompositingStateOptions options) 498 void RenderLayerCompositor::updateLayerCompositingState(RenderLayer* layer, Upda teLayerCompositingStateOptions options)
488 { 499 {
489 updateDirectCompositingReasons(layer); 500 updateDirectCompositingReasons(layer);
490 CompositingStateTransitionType compositedLayerUpdate = CompositingLayerAssig ner(this).computeCompositedLayerUpdate(layer); 501 CompositingStateTransitionType compositedLayerUpdate = CompositingLayerAssig ner(this).computeCompositedLayerUpdate(layer);
491 502
492 if (compositedLayerUpdate != NoCompositingStateChange) 503 if (compositedLayerUpdate != NoCompositingStateChange)
493 setNeedsCompositingUpdate(CompositingUpdateRebuildTree); 504 setNeedsCompositingUpdate(CompositingUpdateRebuildTree);
494 505
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
1239 } else if (graphicsLayer == m_scrollLayer.get()) { 1250 } else if (graphicsLayer == m_scrollLayer.get()) {
1240 name = "LocalFrame Scrolling Layer"; 1251 name = "LocalFrame Scrolling Layer";
1241 } else { 1252 } else {
1242 ASSERT_NOT_REACHED(); 1253 ASSERT_NOT_REACHED();
1243 } 1254 }
1244 1255
1245 return name; 1256 return name;
1246 } 1257 }
1247 1258
1248 } // namespace WebCore 1259 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/compositing/squashing/squashed-layer-loses-graphicslayer-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698