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

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

Issue 322163003: Rename AncestorDependentProperties to CompositingInputs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Moar renaming 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
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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 289
290 // Remove irrelevant unclipped descendants in reverse order so our store d 290 // Remove irrelevant unclipped descendants in reverse order so our store d
291 // indices remain valid. 291 // indices remain valid.
292 for (size_t i = 0; i < unclippedDescendantsToRemove.size(); i++) 292 for (size_t i = 0; i < unclippedDescendantsToRemove.size(); i++)
293 unclippedDescendants.remove(unclippedDescendantsToRemove.at(unclippe dDescendantsToRemove.size() - i - 1)); 293 unclippedDescendants.remove(unclippedDescendantsToRemove.at(unclippe dDescendantsToRemove.size() - i - 1));
294 294
295 if (reasonsToComposite & CompositingReasonOutOfFlowClipping) 295 if (reasonsToComposite & CompositingReasonOutOfFlowClipping)
296 unclippedDescendants.append(layer); 296 unclippedDescendants.append(layer);
297 } 297 }
298 298
299 const IntRect& absBounds = layer->ancestorDependentProperties().clippedAbsol uteBoundingBox; 299 const IntRect& absBounds = layer->compositingInputs().clippedAbsoluteBoundin gBox;
300 absoluteDecendantBoundingBox = absBounds; 300 absoluteDecendantBoundingBox = absBounds;
301 301
302 if (currentRecursionData.m_testingOverlap && !requiresCompositingOrSquashing (directReasons)) 302 if (currentRecursionData.m_testingOverlap && !requiresCompositingOrSquashing (directReasons))
303 overlapCompositingReason = overlapMap.overlapsLayers(absBounds) ? Compos itingReasonOverlap : CompositingReasonNone; 303 overlapCompositingReason = overlapMap.overlapsLayers(absBounds) ? Compos itingReasonOverlap : CompositingReasonNone;
304 304
305 reasonsToComposite |= overlapCompositingReason; 305 reasonsToComposite |= overlapCompositingReason;
306 306
307 // The children of this layer don't need to composite, unless there is 307 // The children of this layer don't need to composite, unless there is
308 // a compositing layer among them, so start by inheriting the compositing 308 // a compositing layer among them, so start by inheriting the compositing
309 // ancestor with m_subtreeIsCompositing set to false. 309 // ancestor with m_subtreeIsCompositing set to false.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 // make layer compositing 349 // make layer compositing
350 childRecursionData.m_compositingAncestor = layer; 350 childRecursionData.m_compositingAncestor = layer;
351 overlapMap.beginNewOverlapTestingContext(); 351 overlapMap.beginNewOverlapTestingContext();
352 willBeCompositedOrSquashed = true; 352 willBeCompositedOrSquashed = true;
353 willHaveForegroundLayer = true; 353 willHaveForegroundLayer = true;
354 354
355 // FIXME: temporary solution for the first negative z-index composited child: 355 // FIXME: temporary solution for the first negative z-index composited child:
356 // re-compute the absBounds for the child so that we can add the 356 // re-compute the absBounds for the child so that we can add the
357 // negative z-index child's bounds to the new overlap context. 357 // negative z-index child's bounds to the new overlap context.
358 overlapMap.beginNewOverlapTestingContext(); 358 overlapMap.beginNewOverlapTestingContext();
359 overlapMap.add(curNode->layer(), curNode->layer()->ancestorD ependentProperties().clippedAbsoluteBoundingBox); 359 overlapMap.add(curNode->layer(), curNode->layer()->compositi ngInputs().clippedAbsoluteBoundingBox);
360 overlapMap.finishCurrentOverlapTestingContext(); 360 overlapMap.finishCurrentOverlapTestingContext();
361 } 361 }
362 } 362 }
363 } 363 }
364 } 364 }
365 365
366 if (willHaveForegroundLayer) { 366 if (willHaveForegroundLayer) {
367 ASSERT(willBeCompositedOrSquashed); 367 ASSERT(willBeCompositedOrSquashed);
368 // A foreground layer effectively is a new backing for all subsequent ch ildren, so 368 // A foreground layer effectively is a new backing for all subsequent ch ildren, so
369 // we don't need to test for overlap with anything behind this. So, we c an finish 369 // we don't need to test for overlap with anything behind this. So, we c an finish
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 layer->setCompositingReasons(reasonsToComposite); 456 layer->setCompositingReasons(reasonsToComposite);
457 457
458 } 458 }
459 459
460 bool CompositingRequirementsUpdater::isRunningAcceleratedTransformAnimation(Rend erObject* renderer) const 460 bool CompositingRequirementsUpdater::isRunningAcceleratedTransformAnimation(Rend erObject* renderer) const
461 { 461 {
462 return renderer->style()->hasCurrentTransformAnimation(); 462 return renderer->style()->hasCurrentTransformAnimation();
463 } 463 }
464 464
465 } // namespace WebCore 465 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698