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

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

Issue 746163002: Drop RenderObject::hasBlendMode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 reasonsToComposite |= layer->potentialCompositingReasonsFromStyle() & CompositingReasonInlineTransform; 389 reasonsToComposite |= layer->potentialCompositingReasonsFromStyle() & CompositingReasonInlineTransform;
390 390
391 // If the original layer is composited, the reflection needs to be, too. 391 // If the original layer is composited, the reflection needs to be, too.
392 if (layer->reflectionInfo()) { 392 if (layer->reflectionInfo()) {
393 // FIXME: Shouldn't we call computeCompositingRequirements to handle a reflection overlapping with another renderer? 393 // FIXME: Shouldn't we call computeCompositingRequirements to handle a reflection overlapping with another renderer?
394 RenderLayer* reflectionLayer = layer->reflectionInfo()->reflectionLa yer(); 394 RenderLayer* reflectionLayer = layer->reflectionInfo()->reflectionLa yer();
395 CompositingReasons reflectionCompositingReason = willBeCompositedOrS quashed ? CompositingReasonReflectionOfCompositedParent : CompositingReasonNone; 395 CompositingReasons reflectionCompositingReason = willBeCompositedOrS quashed ? CompositingReasonReflectionOfCompositedParent : CompositingReasonNone;
396 reflectionLayer->setCompositingReasons(reflectionCompositingReason, CompositingReasonReflectionOfCompositedParent); 396 reflectionLayer->setCompositingReasons(reflectionCompositingReason, CompositingReasonReflectionOfCompositedParent);
397 } 397 }
398 398
399 if (willBeCompositedOrSquashed && layer->renderer()->hasBlendMode()) 399 if (willBeCompositedOrSquashed && layer->renderer()->style()->hasBlendMo de())
400 currentRecursionData.m_hasUnisolatedCompositedBlendingDescendant = t rue; 400 currentRecursionData.m_hasUnisolatedCompositedBlendingDescendant = t rue;
401 401
402 // Turn overlap testing off for later layers if it's already off, or if we have an animating transform. 402 // Turn overlap testing off for later layers if it's already off, or if we have an animating transform.
403 // Note that if the layer clips its descendants, there's no reason to pr opagate the child animation to the parent layers. That's because 403 // Note that if the layer clips its descendants, there's no reason to pr opagate the child animation to the parent layers. That's because
404 // we know for sure the animation is contained inside the clipping recta ngle, which is already added to the overlap map. 404 // we know for sure the animation is contained inside the clipping recta ngle, which is already added to the overlap map.
405 bool isCompositedClippingLayer = compositor->canBeComposited(layer) && ( reasonsToComposite & CompositingReasonClipsCompositingDescendants); 405 bool isCompositedClippingLayer = compositor->canBeComposited(layer) && ( reasonsToComposite & CompositingReasonClipsCompositingDescendants);
406 bool isCompositedWithInlineTransform = reasonsToComposite & CompositingR easonInlineTransform; 406 bool isCompositedWithInlineTransform = reasonsToComposite & CompositingR easonInlineTransform;
407 if ((!childRecursionData.m_testingOverlap && !isCompositedClippingLayer) || layer->renderer()->style()->hasCurrentTransformAnimation() || isCompositedWi thInlineTransform) 407 if ((!childRecursionData.m_testingOverlap && !isCompositedClippingLayer) || layer->renderer()->style()->hasCurrentTransformAnimation() || isCompositedWi thInlineTransform)
408 currentRecursionData.m_testingOverlap = false; 408 currentRecursionData.m_testingOverlap = false;
409 409
410 if (childRecursionData.m_compositingAncestor == layer) 410 if (childRecursionData.m_compositingAncestor == layer)
411 overlapMap.finishCurrentOverlapTestingContext(); 411 overlapMap.finishCurrentOverlapTestingContext();
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 blink 421 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698