| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011 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 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1444 // NB, it is illegal at this point to query an ancestor's compositing state.
Some compositing | 1444 // NB, it is illegal at this point to query an ancestor's compositing state.
Some compositing |
| 1445 // reasons depend on the compositing state of ancestors. So if we want a ren
dering context id | 1445 // reasons depend on the compositing state of ancestors. So if we want a ren
dering context id |
| 1446 // for the context root, we cannot ask for the id of its associated WebLayer
now; it may not have | 1446 // for the context root, we cannot ask for the id of its associated WebLayer
now; it may not have |
| 1447 // one yet. We could do a second past after doing the compositing updates to
get these ids, | 1447 // one yet. We could do a second past after doing the compositing updates to
get these ids, |
| 1448 // but this would actually be harmful. We do not want to attach any semantic
meaning to | 1448 // but this would actually be harmful. We do not want to attach any semantic
meaning to |
| 1449 // the context id other than the fact that they group a number of layers tog
ether for the | 1449 // the context id other than the fact that they group a number of layers tog
ether for the |
| 1450 // sake of 3d sorting. So instead we will ask the compositor to vend us an a
rbitrary, but | 1450 // sake of 3d sorting. So instead we will ask the compositor to vend us an a
rbitrary, but |
| 1451 // consistent id. | 1451 // consistent id. |
| 1452 if (PaintLayer* root = m_owningLayer.renderingContextRoot()) { | 1452 if (PaintLayer* root = m_owningLayer.renderingContextRoot()) { |
| 1453 if (Node* node = root->layoutObject()->node()) | 1453 if (Node* node = root->layoutObject()->node()) |
| 1454 id = static_cast<int>(WTF::PtrHash<Node*>::hash(node)); | 1454 id = static_cast<int>(PtrHash<Node>::hash(node)); |
| 1455 } | 1455 } |
| 1456 | 1456 |
| 1457 UpdateRenderingContextFunctor functor = { id }; | 1457 UpdateRenderingContextFunctor functor = { id }; |
| 1458 ApplyToGraphicsLayers<UpdateRenderingContextFunctor>(this, functor, ApplyToA
llGraphicsLayers); | 1458 ApplyToGraphicsLayers<UpdateRenderingContextFunctor>(this, functor, ApplyToA
llGraphicsLayers); |
| 1459 } | 1459 } |
| 1460 | 1460 |
| 1461 struct UpdateShouldFlattenTransformFunctor { | 1461 struct UpdateShouldFlattenTransformFunctor { |
| 1462 void operator() (GraphicsLayer* layer) const { layer->setShouldFlattenTransf
orm(shouldFlatten); } | 1462 void operator() (GraphicsLayer* layer) const { layer->setShouldFlattenTransf
orm(shouldFlatten); } |
| 1463 bool shouldFlatten; | 1463 bool shouldFlatten; |
| 1464 }; | 1464 }; |
| (...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2543 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2543 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
| 2544 name = "Scrolling Contents Layer"; | 2544 name = "Scrolling Contents Layer"; |
| 2545 } else { | 2545 } else { |
| 2546 ASSERT_NOT_REACHED(); | 2546 ASSERT_NOT_REACHED(); |
| 2547 } | 2547 } |
| 2548 | 2548 |
| 2549 return name; | 2549 return name; |
| 2550 } | 2550 } |
| 2551 | 2551 |
| 2552 } // namespace blink | 2552 } // namespace blink |
| OLD | NEW |