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

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

Issue 99883002: Refactor BlendMode into a separate class. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Rebase to master Created 6 years, 11 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
« no previous file with comments | « Source/core/rendering/RenderLayerBlendInfo.cpp ('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 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 if (layer->reflectionInfo()) { 971 if (layer->reflectionInfo()) {
972 // FIXME: Shouldn't we call computeCompositingRequirements to handle a r eflection overlapping with another renderer? 972 // FIXME: Shouldn't we call computeCompositingRequirements to handle a r eflection overlapping with another renderer?
973 CompositingReasons reflectionCompositingReason = willBeComposited ? Comp ositingReasonReflectionOfCompositedParent : CompositingReasonNone; 973 CompositingReasons reflectionCompositingReason = willBeComposited ? Comp ositingReasonReflectionOfCompositedParent : CompositingReasonNone;
974 layer->reflectionInfo()->reflectionLayer()->setCompositingReasons(layer- >reflectionInfo()->reflectionLayer()->compositingReasons() | reflectionCompositi ngReason); 974 layer->reflectionInfo()->reflectionLayer()->setCompositingReasons(layer- >reflectionInfo()->reflectionLayer()->compositingReasons() | reflectionCompositi ngReason);
975 } 975 }
976 976
977 // Subsequent layers in the parent's stacking context may also need to compo site. 977 // Subsequent layers in the parent's stacking context may also need to compo site.
978 if (childRecursionData.m_subtreeIsCompositing) 978 if (childRecursionData.m_subtreeIsCompositing)
979 currentRecursionData.m_subtreeIsCompositing = true; 979 currentRecursionData.m_subtreeIsCompositing = true;
980 980
981 if (willBeComposited && layer->hasBlendMode()) 981 if (willBeComposited && layer->blendInfo().hasBlendMode())
982 currentRecursionData.m_hasUnisolatedCompositedBlendingDescendant = true; 982 currentRecursionData.m_hasUnisolatedCompositedBlendingDescendant = true;
983 983
984 // Set the flag to say that this SC has compositing children. 984 // Set the flag to say that this SC has compositing children.
985 layer->setHasCompositingDescendant(childRecursionData.m_subtreeIsCompositing ); 985 layer->setHasCompositingDescendant(childRecursionData.m_subtreeIsCompositing );
986 986
987 // Turn overlap testing off for later layers if it's already off, or if we h ave an animating transform. 987 // Turn overlap testing off for later layers if it's already off, or if we h ave an animating transform.
988 // Note that if the layer clips its descendants, there's no reason to propag ate the child animation to the parent layers. That's because 988 // Note that if the layer clips its descendants, there's no reason to propag ate the child animation to the parent layers. That's because
989 // we know for sure the animation is contained inside the clipping rectangle , which is already added to the overlap map. 989 // we know for sure the animation is contained inside the clipping rectangle , which is already added to the overlap map.
990 bool isCompositedClippingLayer = canBeComposited(layer) && (reasonsToComposi te & CompositingReasonClipsCompositingDescendants); 990 bool isCompositedClippingLayer = canBeComposited(layer) && (reasonsToComposi te & CompositingReasonClipsCompositingDescendants);
991 if ((!childRecursionData.m_testingOverlap && !isCompositedClippingLayer) || isRunningAcceleratedTransformAnimation(layer->renderer())) 991 if ((!childRecursionData.m_testingOverlap && !isCompositedClippingLayer) || isRunningAcceleratedTransformAnimation(layer->renderer()))
(...skipping 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after
2588 } else if (graphicsLayer == m_scrollLayer.get()) { 2588 } else if (graphicsLayer == m_scrollLayer.get()) {
2589 name = "Frame Scrolling Layer"; 2589 name = "Frame Scrolling Layer";
2590 } else { 2590 } else {
2591 ASSERT_NOT_REACHED(); 2591 ASSERT_NOT_REACHED();
2592 } 2592 }
2593 2593
2594 return name; 2594 return name;
2595 } 2595 }
2596 2596
2597 } // namespace WebCore 2597 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayerBlendInfo.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698