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 2388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2399 if (!needsRepaint(*graphicsLayer) && previousInterestRect == wholeLayerRect) | 2399 if (!needsRepaint(*graphicsLayer) && previousInterestRect == wholeLayerRect) |
2400 return previousInterestRect; | 2400 return previousInterestRect; |
2401 | 2401 |
2402 // Paint the whole layer if "mainFrameClipsContent" is false, meaning that W
ebPreferences::record_whole_document is true. | 2402 // Paint the whole layer if "mainFrameClipsContent" is false, meaning that W
ebPreferences::record_whole_document is true. |
2403 bool shouldPaintWholePage = !m_owningLayer.layoutObject()->document().settin
gs()->mainFrameClipsContent(); | 2403 bool shouldPaintWholePage = !m_owningLayer.layoutObject()->document().settin
gs()->mainFrameClipsContent(); |
2404 if (shouldPaintWholePage | 2404 if (shouldPaintWholePage |
2405 || (graphicsLayer != m_graphicsLayer.get() && graphicsLayer != m_squashi
ngLayer.get() && graphicsLayer != m_scrollingContentsLayer.get())) | 2405 || (graphicsLayer != m_graphicsLayer.get() && graphicsLayer != m_squashi
ngLayer.get() && graphicsLayer != m_scrollingContentsLayer.get())) |
2406 return wholeLayerRect; | 2406 return wholeLayerRect; |
2407 | 2407 |
2408 IntRect newInterestRect = recomputeInterestRect(graphicsLayer); | 2408 IntRect newInterestRect = recomputeInterestRect(graphicsLayer); |
2409 if (interestRectChangedEnoughToRepaint(previousInterestRect, newInterestRect
, expandedIntSize(graphicsLayer->size()))) | 2409 if (needsRepaint(*graphicsLayer) || interestRectChangedEnoughToRepaint(previ
ousInterestRect, newInterestRect, expandedIntSize(graphicsLayer->size()))) |
2410 return newInterestRect; | 2410 return newInterestRect; |
2411 return previousInterestRect; | 2411 return previousInterestRect; |
2412 } | 2412 } |
2413 | 2413 |
2414 LayoutSize CompositedLayerMapping::subpixelAccumulation() const | 2414 LayoutSize CompositedLayerMapping::subpixelAccumulation() const |
2415 { | 2415 { |
2416 return m_owningLayer.subpixelAccumulation(); | 2416 return m_owningLayer.subpixelAccumulation(); |
2417 } | 2417 } |
2418 | 2418 |
2419 bool CompositedLayerMapping::needsRepaint(const GraphicsLayer& graphicsLayer) co
nst | 2419 bool CompositedLayerMapping::needsRepaint(const GraphicsLayer& graphicsLayer) co
nst |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2697 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2697 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
2698 name = "Scrolling Contents Layer"; | 2698 name = "Scrolling Contents Layer"; |
2699 } else { | 2699 } else { |
2700 ASSERT_NOT_REACHED(); | 2700 ASSERT_NOT_REACHED(); |
2701 } | 2701 } |
2702 | 2702 |
2703 return name; | 2703 return name; |
2704 } | 2704 } |
2705 | 2705 |
2706 } // namespace blink | 2706 } // namespace blink |
OLD | NEW |