| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 return; | 107 return; |
| 108 | 108 |
| 109 clear(); | 109 clear(); |
| 110 } | 110 } |
| 111 | 111 |
| 112 #if USE(ACCELERATED_COMPOSITING) | 112 #if USE(ACCELERATED_COMPOSITING) |
| 113 void DrawingBuffer::publishToPlatformLayer() | 113 void DrawingBuffer::publishToPlatformLayer() |
| 114 { | 114 { |
| 115 if (!m_context) | 115 if (!m_context) |
| 116 return; | 116 return; |
| 117 | 117 |
| 118 if (m_callback) | 118 if (m_callback) |
| 119 m_callback->willPublish(); | 119 m_callback->willPublish(); |
| 120 if (multisample()) | 120 if (multisample()) |
| 121 commit(); | 121 commit(); |
| 122 unsigned parentTexture = m_platformLayer->textureId(); | 122 unsigned parentTexture = m_platformLayer->textureId(); |
| 123 // We do the copy in the canvas' (child) context so that it executes in the
correct order relative to | 123 // We do the copy in the canvas' (child) context so that it executes in the
correct order relative to |
| 124 // other commands in the child context. This ensures that the parent texture
always contains a complete | 124 // other commands in the child context. This ensures that the parent texture
always contains a complete |
| 125 // frame and not some intermediate result. LayerRendererChromium uses glSetL
atch to make sure the child | 125 // frame and not some intermediate result. |
| 126 // context completes before the parent context consumes the texture. | |
| 127 m_context->makeContextCurrent(); | 126 m_context->makeContextCurrent(); |
| 128 #if USE(SKIA) | 127 #if USE(SKIA) |
| 129 if (m_grContext) | 128 if (m_grContext) |
| 130 m_grContext->flush(0); | 129 m_grContext->flush(0); |
| 131 #endif | 130 #endif |
| 132 static_cast<Extensions3DChromium*>(m_context->getExtensions())->copyTextureT
oParentTextureCHROMIUM(m_colorBuffer, parentTexture); | 131 static_cast<Extensions3DChromium*>(m_context->getExtensions())->copyTextureT
oParentTextureCHROMIUM(m_colorBuffer, parentTexture); |
| 133 m_context->flush(); | 132 m_context->flush(); |
| 134 } | 133 } |
| 135 #endif | 134 #endif |
| 136 | 135 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 desc->fWidth = m_size.width(); | 181 desc->fWidth = m_size.width(); |
| 183 desc->fHeight = m_size.height(); | 182 desc->fHeight = m_size.height(); |
| 184 desc->fConfig = kRGBA_8888_GrPixelConfig; | 183 desc->fConfig = kRGBA_8888_GrPixelConfig; |
| 185 | 184 |
| 186 desc->fStencilBits = (m_depthStencilBuffer || m_stencilBuffer) ? 8 : 0; | 185 desc->fStencilBits = (m_depthStencilBuffer || m_stencilBuffer) ? 8 : 0; |
| 187 } | 186 } |
| 188 | 187 |
| 189 #endif | 188 #endif |
| 190 | 189 |
| 191 } | 190 } |
| OLD | NEW |