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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 #include "core/paint/PaintLayerStackingNodeIterator.h" | 53 #include "core/paint/PaintLayerStackingNodeIterator.h" |
54 #include "core/paint/PaintTiming.h" | 54 #include "core/paint/PaintTiming.h" |
55 #include "core/paint/ScrollableAreaPainter.h" | 55 #include "core/paint/ScrollableAreaPainter.h" |
56 #include "core/paint/TransformRecorder.h" | 56 #include "core/paint/TransformRecorder.h" |
57 #include "core/plugins/PluginView.h" | 57 #include "core/plugins/PluginView.h" |
58 #include "platform/LengthFunctions.h" | 58 #include "platform/LengthFunctions.h" |
59 #include "platform/RuntimeEnabledFeatures.h" | 59 #include "platform/RuntimeEnabledFeatures.h" |
60 #include "platform/fonts/FontCache.h" | 60 #include "platform/fonts/FontCache.h" |
61 #include "platform/geometry/TransformState.h" | 61 #include "platform/geometry/TransformState.h" |
62 #include "platform/graphics/BitmapImage.h" | 62 #include "platform/graphics/BitmapImage.h" |
| 63 #include "platform/graphics/CompositorMutableProperties.h" |
63 #include "platform/graphics/GraphicsContext.h" | 64 #include "platform/graphics/GraphicsContext.h" |
64 #include "platform/graphics/paint/ClipDisplayItem.h" | 65 #include "platform/graphics/paint/ClipDisplayItem.h" |
65 #include "platform/graphics/paint/CullRect.h" | 66 #include "platform/graphics/paint/CullRect.h" |
66 #include "platform/graphics/paint/PaintController.h" | 67 #include "platform/graphics/paint/PaintController.h" |
67 #include "platform/graphics/paint/TransformDisplayItem.h" | 68 #include "platform/graphics/paint/TransformDisplayItem.h" |
68 #include "public/platform/WebCompositorMutableProperties.h" | |
69 #include "wtf/CurrentTime.h" | 69 #include "wtf/CurrentTime.h" |
70 #include "wtf/text/StringBuilder.h" | 70 #include "wtf/text/StringBuilder.h" |
71 | 71 |
72 namespace blink { | 72 namespace blink { |
73 | 73 |
74 using namespace HTMLNames; | 74 using namespace HTMLNames; |
75 | 75 |
76 static IntRect clipBox(LayoutBox* layoutObject); | 76 static IntRect clipBox(LayoutBox* layoutObject); |
77 | 77 |
78 static IntRect contentsRect(const LayoutObject* layoutObject) | 78 static IntRect contentsRect(const LayoutObject* layoutObject) |
(...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1521 } | 1521 } |
1522 | 1522 |
1523 void CompositedLayerMapping::updateElementIdAndCompositorMutableProperties() | 1523 void CompositedLayerMapping::updateElementIdAndCompositorMutableProperties() |
1524 { | 1524 { |
1525 if (!RuntimeEnabledFeatures::compositorWorkerEnabled()) | 1525 if (!RuntimeEnabledFeatures::compositorWorkerEnabled()) |
1526 return; | 1526 return; |
1527 | 1527 |
1528 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("compositor-worker"), "CompositedLaye
rMapping::updateElementId()"); | 1528 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("compositor-worker"), "CompositedLaye
rMapping::updateElementId()"); |
1529 | 1529 |
1530 uint64_t elementId = 0; | 1530 uint64_t elementId = 0; |
1531 uint32_t mainMutableProperties = WebCompositorMutablePropertyNone; | 1531 uint32_t mainMutableProperties = CompositorMutableProperty::kNone; |
1532 uint32_t scrollMutableProperties = WebCompositorMutablePropertyNone; | 1532 uint32_t scrollMutableProperties = CompositorMutableProperty::kNone; |
1533 | 1533 |
1534 if (m_owningLayer.layoutObject()->style()->hasCompositorProxy()) { | 1534 if (m_owningLayer.layoutObject()->style()->hasCompositorProxy()) { |
1535 if (Node* owningNode = m_owningLayer.layoutObject()->generatingNode()) { | 1535 if (Node* owningNode = m_owningLayer.layoutObject()->generatingNode()) { |
1536 if (owningNode->isElementNode()) { | 1536 if (owningNode->isElementNode()) { |
1537 Element* owningElement = toElement(owningNode); | 1537 Element* owningElement = toElement(owningNode); |
1538 uint32_t compositorMutableProperties = owningElement->compositor
MutableProperties(); | 1538 uint32_t compositorMutableProperties = owningElement->compositor
MutableProperties(); |
1539 elementId = DOMNodeIds::idForNode(owningNode); | 1539 elementId = DOMNodeIds::idForNode(owningNode); |
1540 mainMutableProperties = (WebCompositorMutablePropertyOpacity | W
ebCompositorMutablePropertyTransform) & compositorMutableProperties; | 1540 mainMutableProperties = (CompositorMutableProperty::kOpacity | C
ompositorMutableProperty::kTransform) & compositorMutableProperties; |
1541 scrollMutableProperties = (WebCompositorMutablePropertyScrollLef
t | WebCompositorMutablePropertyScrollTop) & compositorMutableProperties; | 1541 scrollMutableProperties = (CompositorMutableProperty::kScrollLef
t | CompositorMutableProperty::kScrollTop) & compositorMutableProperties; |
1542 } | 1542 } |
1543 } | 1543 } |
1544 } | 1544 } |
1545 | 1545 |
1546 m_graphicsLayer->setElementId(elementId); | 1546 m_graphicsLayer->setElementId(elementId); |
1547 m_graphicsLayer->setCompositorMutableProperties(mainMutableProperties); | 1547 m_graphicsLayer->setCompositorMutableProperties(mainMutableProperties); |
1548 | 1548 |
1549 if (m_scrollingContentsLayer.get()) { | 1549 if (m_scrollingContentsLayer.get()) { |
1550 m_scrollingContentsLayer->setElementId(elementId); | 1550 m_scrollingContentsLayer->setElementId(elementId); |
1551 m_scrollingContentsLayer->setCompositorMutableProperties(scrollMutablePr
operties); | 1551 m_scrollingContentsLayer->setCompositorMutableProperties(scrollMutablePr
operties); |
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2582 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2582 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
2583 name = "Scrolling Block Selection Layer"; | 2583 name = "Scrolling Block Selection Layer"; |
2584 } else { | 2584 } else { |
2585 ASSERT_NOT_REACHED(); | 2585 ASSERT_NOT_REACHED(); |
2586 } | 2586 } |
2587 | 2587 |
2588 return name; | 2588 return name; |
2589 } | 2589 } |
2590 | 2590 |
2591 } // namespace blink | 2591 } // namespace blink |
OLD | NEW |