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 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1883 } | 1883 } |
1884 | 1884 |
1885 bool CompositedLayerMapping::updateRequiresOwnBackingStoreForAncestorReasons(con
st RenderLayer* compositingAncestorLayer) | 1885 bool CompositedLayerMapping::updateRequiresOwnBackingStoreForAncestorReasons(con
st RenderLayer* compositingAncestorLayer) |
1886 { | 1886 { |
1887 unsigned previousRequiresOwnBackingStoreForAncestorReasons = m_requiresOwnBa
ckingStoreForAncestorReasons; | 1887 unsigned previousRequiresOwnBackingStoreForAncestorReasons = m_requiresOwnBa
ckingStoreForAncestorReasons; |
1888 bool previousPaintsIntoCompositedAncestor = paintsIntoCompositedAncestor(); | 1888 bool previousPaintsIntoCompositedAncestor = paintsIntoCompositedAncestor(); |
1889 bool canPaintIntoAncestor = compositingAncestorLayer | 1889 bool canPaintIntoAncestor = compositingAncestorLayer |
1890 && (compositingAncestorLayer->compositedLayerMapping()->mainGraphicsLaye
r()->drawsContent() | 1890 && (compositingAncestorLayer->compositedLayerMapping()->mainGraphicsLaye
r()->drawsContent() |
1891 || compositingAncestorLayer->compositedLayerMapping()->paintsIntoCom
positedAncestor()); | 1891 || compositingAncestorLayer->compositedLayerMapping()->paintsIntoCom
positedAncestor()); |
1892 | 1892 |
1893 if (paintsIntoCompositedAncestor() != previousPaintsIntoCompositedAncestor) | 1893 m_requiresOwnBackingStoreForAncestorReasons = !canPaintIntoAncestor; |
| 1894 if (paintsIntoCompositedAncestor() != previousPaintsIntoCompositedAncestor)
{ |
| 1895 // Back out the change temporarily while invalidating with respect to th
e old container. |
| 1896 m_requiresOwnBackingStoreForAncestorReasons = !m_requiresOwnBackingStore
ForAncestorReasons; |
1894 compositor()->paintInvalidationOnCompositingChange(&m_owningLayer); | 1897 compositor()->paintInvalidationOnCompositingChange(&m_owningLayer); |
1895 | 1898 m_requiresOwnBackingStoreForAncestorReasons = !m_requiresOwnBackingStore
ForAncestorReasons; |
1896 // FIXME: this is bogus. We need to make this assignment before the check ab
ove. | 1899 } |
1897 m_requiresOwnBackingStoreForAncestorReasons = !canPaintIntoAncestor; | |
1898 | 1900 |
1899 return m_requiresOwnBackingStoreForAncestorReasons != previousRequiresOwnBac
kingStoreForAncestorReasons; | 1901 return m_requiresOwnBackingStoreForAncestorReasons != previousRequiresOwnBac
kingStoreForAncestorReasons; |
1900 } | 1902 } |
1901 | 1903 |
1902 bool CompositedLayerMapping::updateRequiresOwnBackingStoreForIntrinsicReasons() | 1904 bool CompositedLayerMapping::updateRequiresOwnBackingStoreForIntrinsicReasons() |
1903 { | 1905 { |
1904 unsigned previousRequiresOwnBackingStoreForIntrinsicReasons = m_requiresOwnB
ackingStoreForIntrinsicReasons; | 1906 unsigned previousRequiresOwnBackingStoreForIntrinsicReasons = m_requiresOwnB
ackingStoreForIntrinsicReasons; |
1905 bool previousPaintsIntoCompositedAncestor = paintsIntoCompositedAncestor(); | 1907 bool previousPaintsIntoCompositedAncestor = paintsIntoCompositedAncestor(); |
1906 RenderObject* renderer = m_owningLayer.renderer(); | 1908 RenderObject* renderer = m_owningLayer.renderer(); |
1907 m_requiresOwnBackingStoreForIntrinsicReasons = m_owningLayer.isRootLayer() | 1909 m_requiresOwnBackingStoreForIntrinsicReasons = m_owningLayer.isRootLayer() |
1908 || (m_owningLayer.compositingReasons() & CompositingReasonComboReasonsTh
atRequireOwnBacking) | 1910 || (m_owningLayer.compositingReasons() & CompositingReasonComboReasonsTh
atRequireOwnBacking) |
1909 || m_owningLayer.transform() | 1911 || m_owningLayer.transform() |
1910 || m_owningLayer.clipsCompositingDescendantsWithBorderRadius() // FIXME:
Revisit this if the paintsIntoCompositedAncestor state is removed. | 1912 || m_owningLayer.clipsCompositingDescendantsWithBorderRadius() // FIXME:
Revisit this if the paintsIntoCompositedAncestor state is removed. |
1911 || renderer->isTransparent() | 1913 || renderer->isTransparent() |
1912 || renderer->hasMask() | 1914 || renderer->hasMask() |
1913 || renderer->hasReflection() | 1915 || renderer->hasReflection() |
1914 || renderer->hasFilter(); | 1916 || renderer->hasFilter(); |
1915 | 1917 |
1916 if (paintsIntoCompositedAncestor() != previousPaintsIntoCompositedAncestor) | 1918 if (paintsIntoCompositedAncestor() != previousPaintsIntoCompositedAncestor)
{ |
| 1919 // Back out the change temporarily while invalidating with respect to th
e old container. |
| 1920 m_requiresOwnBackingStoreForIntrinsicReasons = !m_requiresOwnBackingStor
eForIntrinsicReasons; |
1917 compositor()->paintInvalidationOnCompositingChange(&m_owningLayer); | 1921 compositor()->paintInvalidationOnCompositingChange(&m_owningLayer); |
| 1922 m_requiresOwnBackingStoreForIntrinsicReasons = !m_requiresOwnBackingStor
eForIntrinsicReasons; |
| 1923 } |
1918 | 1924 |
1919 return m_requiresOwnBackingStoreForIntrinsicReasons != previousRequiresOwnBa
ckingStoreForIntrinsicReasons; | 1925 return m_requiresOwnBackingStoreForIntrinsicReasons != previousRequiresOwnBa
ckingStoreForIntrinsicReasons; |
1920 } | 1926 } |
1921 | 1927 |
1922 void CompositedLayerMapping::setBlendMode(WebBlendMode blendMode) | 1928 void CompositedLayerMapping::setBlendMode(WebBlendMode blendMode) |
1923 { | 1929 { |
1924 if (m_ancestorClippingLayer) { | 1930 if (m_ancestorClippingLayer) { |
1925 m_ancestorClippingLayer->setBlendMode(blendMode); | 1931 m_ancestorClippingLayer->setBlendMode(blendMode); |
1926 m_graphicsLayer->setBlendMode(WebBlendModeNormal); | 1932 m_graphicsLayer->setBlendMode(WebBlendModeNormal); |
1927 } else { | 1933 } else { |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2283 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2289 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
2284 name = "Scrolling Block Selection Layer"; | 2290 name = "Scrolling Block Selection Layer"; |
2285 } else { | 2291 } else { |
2286 ASSERT_NOT_REACHED(); | 2292 ASSERT_NOT_REACHED(); |
2287 } | 2293 } |
2288 | 2294 |
2289 return name; | 2295 return name; |
2290 } | 2296 } |
2291 | 2297 |
2292 } // namespace blink | 2298 } // namespace blink |
OLD | NEW |