| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 } | 148 } |
| 149 | 149 |
| 150 IntRect LayerRendererChromium::horizontalScrollbarRect(const IntRect& visibleRec
t, const IntRect& contentRect) | 150 IntRect LayerRendererChromium::horizontalScrollbarRect(const IntRect& visibleRec
t, const IntRect& contentRect) |
| 151 { | 151 { |
| 152 IntRect horizontalScrollbar(IntPoint(contentRect.x(), contentRect.bottom()),
IntSize(visibleRect.width(), visibleRect.height() - contentRect.height())); | 152 IntRect horizontalScrollbar(IntPoint(contentRect.x(), contentRect.bottom()),
IntSize(visibleRect.width(), visibleRect.height() - contentRect.height())); |
| 153 return horizontalScrollbar; | 153 return horizontalScrollbar; |
| 154 } | 154 } |
| 155 | 155 |
| 156 void LayerRendererChromium::invalidateRootLayerRect(const IntRect& dirtyRect, co
nst IntRect& visibleRect, const IntRect& contentRect) | 156 void LayerRendererChromium::invalidateRootLayerRect(const IntRect& dirtyRect, co
nst IntRect& visibleRect, const IntRect& contentRect) |
| 157 { | 157 { |
| 158 if (contentRect.intersects(dirtyRect)) | 158 m_rootLayerTiler->invalidateRect(dirtyRect); |
| 159 m_rootLayerTiler->invalidateRect(dirtyRect); | |
| 160 if (m_horizontalScrollbarTiler) { | 159 if (m_horizontalScrollbarTiler) { |
| 161 IntRect scrollbar = horizontalScrollbarRect(visibleRect, contentRect); | 160 IntRect scrollbar = horizontalScrollbarRect(visibleRect, contentRect); |
| 162 if (dirtyRect.intersects(scrollbar)) { | 161 if (dirtyRect.intersects(scrollbar)) { |
| 163 m_horizontalScrollbarTiler->setLayerPosition(scrollbar.location()); | 162 m_horizontalScrollbarTiler->setLayerPosition(scrollbar.location()); |
| 164 m_horizontalScrollbarTiler->invalidateRect(dirtyRect); | 163 m_horizontalScrollbarTiler->invalidateRect(dirtyRect); |
| 165 } | 164 } |
| 166 } | 165 } |
| 167 if (m_verticalScrollbarTiler) { | 166 if (m_verticalScrollbarTiler) { |
| 168 IntRect scrollbar = verticalScrollbarRect(visibleRect, contentRect); | 167 IntRect scrollbar = verticalScrollbarRect(visibleRect, contentRect); |
| 169 if (dirtyRect.intersects(scrollbar)) { | 168 if (dirtyRect.intersects(scrollbar)) { |
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 801 m_rootLayerTiler.clear(); | 800 m_rootLayerTiler.clear(); |
| 802 m_horizontalScrollbarTiler.clear(); | 801 m_horizontalScrollbarTiler.clear(); |
| 803 m_verticalScrollbarTiler.clear(); | 802 m_verticalScrollbarTiler.clear(); |
| 804 | 803 |
| 805 m_textureManager.clear(); | 804 m_textureManager.clear(); |
| 806 } | 805 } |
| 807 | 806 |
| 808 } // namespace WebCore | 807 } // namespace WebCore |
| 809 | 808 |
| 810 #endif // USE(ACCELERATED_COMPOSITING) | 809 #endif // USE(ACCELERATED_COMPOSITING) |
| OLD | NEW |