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

Side by Side Diff: Source/core/rendering/RenderLayer.cpp

Issue 285103003: [RAL] Make sure RenderLayers are invalidated when moved. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase to master 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 | « Source/core/rendering/RenderLayer.h ('k') | Source/core/rendering/RenderLayerModelObject.cpp » ('j') | 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) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 { 256 {
257 TRACE_EVENT0("blink_rendering", "RenderLayer::updateLayerPositionsAfterLayou t"); 257 TRACE_EVENT0("blink_rendering", "RenderLayer::updateLayerPositionsAfterLayou t");
258 258
259 // FIXME: Remove incremental compositing updates after fixing the chicken/eg g issues 259 // FIXME: Remove incremental compositing updates after fixing the chicken/eg g issues
260 // https://code.google.com/p/chromium/issues/detail?id=343756 260 // https://code.google.com/p/chromium/issues/detail?id=343756
261 DisableCompositingQueryAsserts disabler; 261 DisableCompositingQueryAsserts disabler;
262 262
263 RenderGeometryMap geometryMap(UseTransforms); 263 RenderGeometryMap geometryMap(UseTransforms);
264 if (this != rootLayer) 264 if (this != rootLayer)
265 geometryMap.pushMappingsToAncestor(parent(), 0); 265 geometryMap.pushMappingsToAncestor(parent(), 0);
266 updateLayerPositions(&geometryMap, flags); 266 updateLayerPositions(&geometryMap, rootLayer->renderer()->containerForRepain t(), flags);
267 } 267 }
268 268
269 void RenderLayer::updateLayerPositions(RenderGeometryMap* geometryMap, UpdateLay erPositionsFlags flags) 269 void RenderLayer::updateLayerPositions(RenderGeometryMap* geometryMap, const Ren derLayerModelObject* paintInvalidationContainer, UpdateLayerPositionsFlags flags )
270 { 270 {
271 updateLayerPosition(); // For relpositioned layers or non-positioned layers, 271 updateLayerPosition(); // For relpositioned layers or non-positioned layers,
272 // we need to keep in sync, since we may have shifted relative 272 // we need to keep in sync, since we may have shifted relative
273 // to our parent layer. 273 // to our parent layer.
274 if (geometryMap) 274 if (geometryMap)
275 geometryMap->pushMappingsToAncestor(this, parent()); 275 geometryMap->pushMappingsToAncestor(this, parent());
276 276
277 // Clear our cached clip rect information. 277 // Clear our cached clip rect information.
278 m_clipper.clearClipRects(); 278 m_clipper.clearClipRects();
279 279
(...skipping 11 matching lines...) Expand all
291 291
292 updateDescendantDependentFlags(); 292 updateDescendantDependentFlags();
293 293
294 if (flags & UpdatePagination) 294 if (flags & UpdatePagination)
295 updatePagination(); 295 updatePagination();
296 else { 296 else {
297 m_isPaginated = false; 297 m_isPaginated = false;
298 m_enclosingPaginationLayer = 0; 298 m_enclosingPaginationLayer = 0;
299 } 299 }
300 300
301 const RenderLayerModelObject* newPaintInvalidationContainer = paintInvalidat ionContainer;
302 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled() && geometryMap) {
leviw_travelin_and_unemployed 2014/06/02 20:22:19 Whoa... does this mean the paintInvalidationContai
dsinclair 2014/06/02 20:36:19 Technically it didn't matter as we _only_ use the
303 bool establishesNewPaintInvalidationContainer = isRepaintContainer();
304 newPaintInvalidationContainer = renderer()->adjustCompositedContainerFor SpecialAncestors(establishesNewPaintInvalidationContainer ? renderer() : paintIn validationContainer);
305
306 LayoutPoint offset = renderer()->isBox() ? toRenderBox(renderer())->loca tion() : LayoutPoint();
307 if (renderer()->previousPositionFromPaintInvalidationContainer() != geom etryMap->mapToContainer(offset, newPaintInvalidationContainer))
308 renderer()->setMayNeedPaintInvalidation(true);
309 }
310
301 repainter().repaintAfterLayout(flags & CheckForRepaint); 311 repainter().repaintAfterLayout(flags & CheckForRepaint);
302 312
303 // Go ahead and update the reflection's position and size. 313 // Go ahead and update the reflection's position and size.
304 if (m_reflectionInfo) 314 if (m_reflectionInfo)
305 m_reflectionInfo->reflection()->layout(); 315 m_reflectionInfo->reflection()->layout();
306 316
307 if (useRegionBasedColumns() && renderer()->isRenderFlowThread()) { 317 if (useRegionBasedColumns() && renderer()->isRenderFlowThread()) {
308 updatePagination(); 318 updatePagination();
309 flags |= UpdatePagination; 319 flags |= UpdatePagination;
310 } 320 }
311 321
312 if (renderer()->hasColumns()) 322 if (renderer()->hasColumns())
313 flags |= UpdatePagination; 323 flags |= UpdatePagination;
314 324
315 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) 325 for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
316 child->updateLayerPositions(geometryMap, flags); 326 child->updateLayerPositions(geometryMap, newPaintInvalidationContainer, flags);
317 327
318 if ((flags & NeedsFullRepaintInBacking) && hasCompositedLayerMapping() && !c ompositedLayerMapping()->paintsIntoCompositedAncestor()) 328 if ((flags & NeedsFullRepaintInBacking) && hasCompositedLayerMapping() && !c ompositedLayerMapping()->paintsIntoCompositedAncestor())
319 compositedLayerMapping()->setContentsNeedDisplay(); 329 compositedLayerMapping()->setContentsNeedDisplay();
320 330
321 if (geometryMap) 331 if (geometryMap)
322 geometryMap->popMappingsToAncestor(parent()); 332 geometryMap->popMappingsToAncestor(parent());
323 } 333 }
324 334
325 void RenderLayer::setAncestorChainHasSelfPaintingLayerDescendant() 335 void RenderLayer::setAncestorChainHasSelfPaintingLayerDescendant()
326 { 336 {
(...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after
1476 m_parent->addChild(current, nextSib); 1486 m_parent->addChild(current, nextSib);
1477 1487
1478 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) 1488 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled())
1479 current->renderer()->setShouldDoFullPaintInvalidationAfterLayout(tru e); 1489 current->renderer()->setShouldDoFullPaintInvalidationAfterLayout(tru e);
1480 else 1490 else
1481 current->repainter().setRepaintStatus(NeedsFullRepaint); 1491 current->repainter().setRepaintStatus(NeedsFullRepaint);
1482 1492
1483 // Hits in compositing/overflow/automatically-opt-into-composited-scroll ing-part-1.html 1493 // Hits in compositing/overflow/automatically-opt-into-composited-scroll ing-part-1.html
1484 DisableCompositingQueryAsserts disabler; 1494 DisableCompositingQueryAsserts disabler;
1485 1495
1486 current->updateLayerPositions(0); // FIXME: use geometry map. 1496 current->updateLayerPositions(0, 0); // FIXME: use geometry map.
1487 current = next; 1497 current = next;
1488 } 1498 }
1489 1499
1490 // Remove us from the parent. 1500 // Remove us from the parent.
1491 m_parent->removeChild(this); 1501 m_parent->removeChild(this);
1492 m_renderer->destroyLayer(); 1502 m_renderer->destroyLayer();
1493 } 1503 }
1494 1504
1495 void RenderLayer::insertOnlyThisLayer() 1505 void RenderLayer::insertOnlyThisLayer()
1496 { 1506 {
(...skipping 2430 matching lines...) Expand 10 before | Expand all | Expand 10 after
3927 } 3937 }
3928 } 3938 }
3929 3939
3930 void showLayerTree(const WebCore::RenderObject* renderer) 3940 void showLayerTree(const WebCore::RenderObject* renderer)
3931 { 3941 {
3932 if (!renderer) 3942 if (!renderer)
3933 return; 3943 return;
3934 showLayerTree(renderer->enclosingLayer()); 3944 showLayerTree(renderer->enclosingLayer());
3935 } 3945 }
3936 #endif 3946 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | Source/core/rendering/RenderLayerModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698