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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 | 299 |
300 restoreFramebufferBindings(); | 300 restoreFramebufferBindings(); |
301 m_contentsChanged = false; | 301 m_contentsChanged = false; |
302 | 302 |
303 m_context->produceTextureDirectCHROMIUM(frontColorBufferMailbox->textureInfo
.textureId, frontColorBufferMailbox->textureInfo.parameters.target, frontColorBu
fferMailbox->mailbox.name); | 303 m_context->produceTextureDirectCHROMIUM(frontColorBufferMailbox->textureInfo
.textureId, frontColorBufferMailbox->textureInfo.parameters.target, frontColorBu
fferMailbox->mailbox.name); |
304 const WGC3Duint64 fenceSync = m_context->insertFenceSyncCHROMIUM(); | 304 const WGC3Duint64 fenceSync = m_context->insertFenceSyncCHROMIUM(); |
305 m_context->flush(); | 305 m_context->flush(); |
306 frontColorBufferMailbox->mailbox.validSyncToken = m_context->genSyncTokenCHR
OMIUM(fenceSync, frontColorBufferMailbox->mailbox.syncToken); | 306 frontColorBufferMailbox->mailbox.validSyncToken = m_context->genSyncTokenCHR
OMIUM(fenceSync, frontColorBufferMailbox->mailbox.syncToken); |
307 frontColorBufferMailbox->mailbox.allowOverlay = frontColorBufferMailbox->tex
tureInfo.imageId != 0; | 307 frontColorBufferMailbox->mailbox.allowOverlay = frontColorBufferMailbox->tex
tureInfo.imageId != 0; |
308 frontColorBufferMailbox->mailbox.textureTarget = frontColorBufferMailbox->te
xtureInfo.parameters.target; | 308 frontColorBufferMailbox->mailbox.textureTarget = frontColorBufferMailbox->te
xtureInfo.parameters.target; |
| 309 frontColorBufferMailbox->mailbox.textureSize = WebSize(m_size.width(), m_siz
e.height()); |
309 setBufferClearNeeded(true); | 310 setBufferClearNeeded(true); |
310 | 311 |
311 // set m_parentDrawingBuffer to make sure 'this' stays alive as long as it h
as live mailboxes | 312 // set m_parentDrawingBuffer to make sure 'this' stays alive as long as it h
as live mailboxes |
312 ASSERT(!frontColorBufferMailbox->m_parentDrawingBuffer); | 313 ASSERT(!frontColorBufferMailbox->m_parentDrawingBuffer); |
313 frontColorBufferMailbox->m_parentDrawingBuffer = this; | 314 frontColorBufferMailbox->m_parentDrawingBuffer = this; |
314 *outMailbox = frontColorBufferMailbox->mailbox; | 315 *outMailbox = frontColorBufferMailbox->mailbox; |
315 m_frontColorBuffer = { frontColorBufferMailbox->textureInfo, frontColorBuffe
rMailbox->mailbox }; | 316 m_frontColorBuffer = { frontColorBufferMailbox->textureInfo, frontColorBuffe
rMailbox->mailbox }; |
316 return true; | 317 return true; |
317 } | 318 } |
318 | 319 |
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1030 | 1031 |
1031 if (m_antiAliasingMode == MSAAImplicitResolve) | 1032 if (m_antiAliasingMode == MSAAImplicitResolve) |
1032 m_context->framebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, GL_COLOR_A
TTACHMENT0, target, m_colorBuffer.textureId, 0, m_sampleCount); | 1033 m_context->framebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, GL_COLOR_A
TTACHMENT0, target, m_colorBuffer.textureId, 0, m_sampleCount); |
1033 else | 1034 else |
1034 m_context->framebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, ta
rget, m_colorBuffer.textureId, 0); | 1035 m_context->framebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, ta
rget, m_colorBuffer.textureId, 0); |
1035 | 1036 |
1036 m_context->bindTexture(GL_TEXTURE_2D, m_texture2DBinding); | 1037 m_context->bindTexture(GL_TEXTURE_2D, m_texture2DBinding); |
1037 } | 1038 } |
1038 | 1039 |
1039 } // namespace blink | 1040 } // namespace blink |
OLD | NEW |