Chromium Code Reviews| 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 1870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1881 { | 1881 { |
| 1882 unsigned previousRequiresOwnBackingStoreForAncestorReasons = m_requiresOwnBa ckingStoreForAncestorReasons; | 1882 unsigned previousRequiresOwnBackingStoreForAncestorReasons = m_requiresOwnBa ckingStoreForAncestorReasons; |
| 1883 bool previousPaintsIntoCompositedAncestor = paintsIntoCompositedAncestor(); | 1883 bool previousPaintsIntoCompositedAncestor = paintsIntoCompositedAncestor(); |
| 1884 bool canPaintIntoAncestor = compositingAncestorLayer | 1884 bool canPaintIntoAncestor = compositingAncestorLayer |
| 1885 && (compositingAncestorLayer->compositedLayerMapping()->mainGraphicsLaye r()->drawsContent() | 1885 && (compositingAncestorLayer->compositedLayerMapping()->mainGraphicsLaye r()->drawsContent() |
| 1886 || compositingAncestorLayer->compositedLayerMapping()->paintsIntoCom positedAncestor()); | 1886 || compositingAncestorLayer->compositedLayerMapping()->paintsIntoCom positedAncestor()); |
| 1887 | 1887 |
| 1888 if (paintsIntoCompositedAncestor() != previousPaintsIntoCompositedAncestor) | 1888 if (paintsIntoCompositedAncestor() != previousPaintsIntoCompositedAncestor) |
| 1889 compositor()->paintInvalidationOnCompositingChange(&m_owningLayer); | 1889 compositor()->paintInvalidationOnCompositingChange(&m_owningLayer); |
| 1890 | 1890 |
| 1891 // FIXME: this is bogus. We need to make this assignment before the check ab ove. | |
| 1891 m_requiresOwnBackingStoreForAncestorReasons = !canPaintIntoAncestor; | 1892 m_requiresOwnBackingStoreForAncestorReasons = !canPaintIntoAncestor; |
| 1892 | 1893 |
| 1893 return m_requiresOwnBackingStoreForAncestorReasons != previousRequiresOwnBac kingStoreForAncestorReasons; | 1894 return m_requiresOwnBackingStoreForAncestorReasons != previousRequiresOwnBac kingStoreForAncestorReasons; |
| 1894 } | 1895 } |
| 1895 | 1896 |
| 1896 bool CompositedLayerMapping::updateRequiresOwnBackingStoreForIntrinsicReasons() | 1897 bool CompositedLayerMapping::updateRequiresOwnBackingStoreForIntrinsicReasons() |
| 1897 { | 1898 { |
| 1898 unsigned previousRequiresOwnBackingStoreForIntrinsicReasons = m_requiresOwnB ackingStoreForIntrinsicReasons; | 1899 unsigned previousRequiresOwnBackingStoreForIntrinsicReasons = m_requiresOwnB ackingStoreForIntrinsicReasons; |
| 1899 bool previousPaintsIntoCompositedAncestor = paintsIntoCompositedAncestor(); | 1900 bool previousPaintsIntoCompositedAncestor = paintsIntoCompositedAncestor(); |
| 1900 RenderObject* renderer = m_owningLayer.renderer(); | 1901 RenderObject* renderer = m_owningLayer.renderer(); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2008 | 2009 |
| 2009 // Convert from ancestor to local coordinates. | 2010 // Convert from ancestor to local coordinates. |
| 2010 IntSize ancestorToLocalOffset = paintInfo.offsetFromRenderer - ancestorPaint Info->offsetFromRenderer; | 2011 IntSize ancestorToLocalOffset = paintInfo.offsetFromRenderer - ancestorPaint Info->offsetFromRenderer; |
| 2011 parentClipRect.move(ancestorToLocalOffset); | 2012 parentClipRect.move(ancestorToLocalOffset); |
| 2012 return parentClipRect; | 2013 return parentClipRect; |
| 2013 } | 2014 } |
| 2014 | 2015 |
| 2015 void CompositedLayerMapping::doPaintTask(const GraphicsLayerPaintInfo& paintInfo , const PaintLayerFlags& paintLayerFlags, GraphicsContext* context, | 2016 void CompositedLayerMapping::doPaintTask(const GraphicsLayerPaintInfo& paintInfo , const PaintLayerFlags& paintLayerFlags, GraphicsContext* context, |
| 2016 const IntRect& clip) // In the coords of rootLayer. | 2017 const IntRect& clip) // In the coords of rootLayer. |
| 2017 { | 2018 { |
| 2018 if (paintsIntoCompositedAncestor()) { | 2019 if (paintInfo.renderLayer->compositingState() != PaintsIntoGroupedBacking && paintsIntoCompositedAncestor()) { |
| 2019 ASSERT_NOT_REACHED(); | 2020 ASSERT_NOT_REACHED(); |
| 2020 return; | 2021 return; |
| 2021 } | 2022 } |
|
abarth-chromium
2014/08/14 20:56:29
We should just make this a RELEASE_ASSERT
| |
| 2022 | 2023 |
| 2023 FontCachePurgePreventer fontCachePurgePreventer; | 2024 FontCachePurgePreventer fontCachePurgePreventer; |
| 2024 | 2025 |
| 2025 // Note carefully: in theory it is appropriate to invoke context->save() her e | 2026 // Note carefully: in theory it is appropriate to invoke context->save() her e |
| 2026 // and restore the context after painting. For efficiency, we are assuming t hat | 2027 // and restore the context after painting. For efficiency, we are assuming t hat |
| 2027 // it is equivalent to manually undo this offset translation, which means we are | 2028 // it is equivalent to manually undo this offset translation, which means we are |
| 2028 // assuming that the context's space was not affected by the RenderLayer | 2029 // assuming that the context's space was not affected by the RenderLayer |
| 2029 // painting code. | 2030 // painting code. |
| 2030 | 2031 |
| 2031 IntSize offset = paintInfo.offsetFromRenderer; | 2032 IntSize offset = paintInfo.offsetFromRenderer; |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2280 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2281 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
| 2281 name = "Scrolling Block Selection Layer"; | 2282 name = "Scrolling Block Selection Layer"; |
| 2282 } else { | 2283 } else { |
| 2283 ASSERT_NOT_REACHED(); | 2284 ASSERT_NOT_REACHED(); |
| 2284 } | 2285 } |
| 2285 | 2286 |
| 2286 return name; | 2287 return name; |
| 2287 } | 2288 } |
| 2288 | 2289 |
| 2289 } // namespace blink | 2290 } // namespace blink |
| OLD | NEW |