| 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 m_context->clear(GraphicsContext3D::COLOR_BUFFER_BIT); | 259 m_context->clear(GraphicsContext3D::COLOR_BUFFER_BIT); |
| 260 // Mask out writes to alpha channel: subpixel antialiasing via Skia results
in invalid | 260 // Mask out writes to alpha channel: subpixel antialiasing via Skia results
in invalid |
| 261 // zero alpha values on text glyphs. The root layer is always opaque. | 261 // zero alpha values on text glyphs. The root layer is always opaque. |
| 262 m_context->colorMask(true, true, true, false); | 262 m_context->colorMask(true, true, true, false); |
| 263 | 263 |
| 264 updateAndDrawRootLayer(tilePaint, scrollbarPaint, visibleRect, contentRect); | 264 updateAndDrawRootLayer(tilePaint, scrollbarPaint, visibleRect, contentRect); |
| 265 | 265 |
| 266 // Re-enable color writes to layers, which may be partially transparent. | 266 // Re-enable color writes to layers, which may be partially transparent. |
| 267 m_context->colorMask(true, true, true, true); | 267 m_context->colorMask(true, true, true, true); |
| 268 | 268 |
| 269 // Recheck that we still have a root layer. This may become null if |
| 270 // compositing gets turned off during a paint operation. |
| 271 if (!m_rootLayer) |
| 272 return; |
| 273 |
| 269 // Set the root visible/content rects --- used by subsequent drawLayers call
s. | 274 // Set the root visible/content rects --- used by subsequent drawLayers call
s. |
| 270 m_rootVisibleRect = visibleRect; | 275 m_rootVisibleRect = visibleRect; |
| 271 m_rootContentRect = contentRect; | 276 m_rootContentRect = contentRect; |
| 272 | 277 |
| 273 // Scissor out the scrollbars to avoid rendering on top of them. | 278 // Scissor out the scrollbars to avoid rendering on top of them. |
| 274 IntRect rootScissorRect(contentRect); | 279 IntRect rootScissorRect(contentRect); |
| 275 // The scissorRect should not include the scroll offset. | 280 // The scissorRect should not include the scroll offset. |
| 276 rootScissorRect.move(-m_scrollPosition.x(), -m_scrollPosition.y()); | 281 rootScissorRect.move(-m_scrollPosition.x(), -m_scrollPosition.y()); |
| 277 m_rootLayer->m_scissorRect = rootScissorRect; | 282 m_rootLayer->m_scissorRect = rootScissorRect; |
| 278 | 283 |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 m_rootLayerTiler.clear(); | 801 m_rootLayerTiler.clear(); |
| 797 m_horizontalScrollbarTiler.clear(); | 802 m_horizontalScrollbarTiler.clear(); |
| 798 m_verticalScrollbarTiler.clear(); | 803 m_verticalScrollbarTiler.clear(); |
| 799 | 804 |
| 800 m_textureManager.clear(); | 805 m_textureManager.clear(); |
| 801 } | 806 } |
| 802 | 807 |
| 803 } // namespace WebCore | 808 } // namespace WebCore |
| 804 | 809 |
| 805 #endif // USE(ACCELERATED_COMPOSITING) | 810 #endif // USE(ACCELERATED_COMPOSITING) |
| OLD | NEW |