| 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 } | 285 } |
| 286 } else { | 286 } else { |
| 287 m_gl->CopyTextureCHROMIUM(m_colorBuffer.textureId, frontColorBufferMailb
ox->textureInfo.textureId, frontColorBufferMailbox->textureInfo.parameters.inter
nalColorFormat, GL_UNSIGNED_BYTE, GL_FALSE, GL_FALSE, GL_FALSE); | 287 m_gl->CopyTextureCHROMIUM(m_colorBuffer.textureId, frontColorBufferMailb
ox->textureInfo.textureId, frontColorBufferMailbox->textureInfo.parameters.inter
nalColorFormat, GL_UNSIGNED_BYTE, GL_FALSE, GL_FALSE, GL_FALSE); |
| 288 } | 288 } |
| 289 | 289 |
| 290 restoreFramebufferBindings(); | 290 restoreFramebufferBindings(); |
| 291 m_contentsChanged = false; | 291 m_contentsChanged = false; |
| 292 | 292 |
| 293 m_gl->ProduceTextureDirectCHROMIUM(frontColorBufferMailbox->textureInfo.text
ureId, frontColorBufferMailbox->textureInfo.parameters.target, frontColorBufferM
ailbox->mailbox.name); | 293 m_gl->ProduceTextureDirectCHROMIUM(frontColorBufferMailbox->textureInfo.text
ureId, frontColorBufferMailbox->textureInfo.parameters.target, frontColorBufferM
ailbox->mailbox.name); |
| 294 const GLuint64 fenceSync = m_gl->InsertFenceSyncCHROMIUM(); | 294 const GLuint64 fenceSync = m_gl->InsertFenceSyncCHROMIUM(); |
| 295 if (RuntimeEnabledFeatures::webGLImageChromiumEnabled()) |
| 296 m_gl->DescheduleUntilFinishedCHROMIUM(); |
| 295 m_gl->Flush(); | 297 m_gl->Flush(); |
| 296 m_gl->GenSyncTokenCHROMIUM(fenceSync, frontColorBufferMailbox->mailbox.syncT
oken); | 298 m_gl->GenSyncTokenCHROMIUM(fenceSync, frontColorBufferMailbox->mailbox.syncT
oken); |
| 297 frontColorBufferMailbox->mailbox.validSyncToken = true; | 299 frontColorBufferMailbox->mailbox.validSyncToken = true; |
| 298 frontColorBufferMailbox->mailbox.allowOverlay = frontColorBufferMailbox->tex
tureInfo.imageId != 0; | 300 frontColorBufferMailbox->mailbox.allowOverlay = frontColorBufferMailbox->tex
tureInfo.imageId != 0; |
| 299 frontColorBufferMailbox->mailbox.textureTarget = frontColorBufferMailbox->te
xtureInfo.parameters.target; | 301 frontColorBufferMailbox->mailbox.textureTarget = frontColorBufferMailbox->te
xtureInfo.parameters.target; |
| 300 frontColorBufferMailbox->mailbox.textureSize = WebSize(m_size.width(), m_siz
e.height()); | 302 frontColorBufferMailbox->mailbox.textureSize = WebSize(m_size.width(), m_siz
e.height()); |
| 301 frontColorBufferMailbox->mailbox.gpuMemoryBufferId = frontColorBufferMailbox
->textureInfo.gpuMemoryBufferId; | 303 frontColorBufferMailbox->mailbox.gpuMemoryBufferId = frontColorBufferMailbox
->textureInfo.gpuMemoryBufferId; |
| 302 setBufferClearNeeded(true); | 304 setBufferClearNeeded(true); |
| 303 | 305 |
| 304 // set m_parentDrawingBuffer to make sure 'this' stays alive as long as it h
as live mailboxes | 306 // set m_parentDrawingBuffer to make sure 'this' stays alive as long as it h
as live mailboxes |
| (...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1086 | 1088 |
| 1087 void DrawingBuffer::restoreTextureBindings() | 1089 void DrawingBuffer::restoreTextureBindings() |
| 1088 { | 1090 { |
| 1089 // This class potentially modifies the bindings for GL_TEXTURE_2D and | 1091 // This class potentially modifies the bindings for GL_TEXTURE_2D and |
| 1090 // GL_TEXTURE_RECTANGLE. Only GL_TEXTURE_2D needs to be restored since | 1092 // GL_TEXTURE_RECTANGLE. Only GL_TEXTURE_2D needs to be restored since |
| 1091 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE. | 1093 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE. |
| 1092 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding); | 1094 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding); |
| 1093 } | 1095 } |
| 1094 | 1096 |
| 1095 } // namespace blink | 1097 } // namespace blink |
| OLD | NEW |