Chromium Code Reviews| 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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 706 } else { | 706 } else { |
| 707 target = m_backColorBuffer->parameters.target; | 707 target = m_backColorBuffer->parameters.target; |
| 708 m_gl->GenMailboxCHROMIUM(mailbox.name); | 708 m_gl->GenMailboxCHROMIUM(mailbox.name); |
| 709 m_gl->ProduceTextureDirectCHROMIUM(m_backColorBuffer->textureId, target, | 709 m_gl->ProduceTextureDirectCHROMIUM(m_backColorBuffer->textureId, target, |
| 710 mailbox.name); | 710 mailbox.name); |
| 711 const GLuint64 fenceSync = m_gl->InsertFenceSyncCHROMIUM(); | 711 const GLuint64 fenceSync = m_gl->InsertFenceSyncCHROMIUM(); |
| 712 m_gl->Flush(); | 712 m_gl->Flush(); |
| 713 m_gl->GenSyncTokenCHROMIUM(fenceSync, produceSyncToken.GetData()); | 713 m_gl->GenSyncTokenCHROMIUM(fenceSync, produceSyncToken.GetData()); |
| 714 } | 714 } |
| 715 | 715 |
| 716 DCHECK(produceSyncToken.HasData()); | 716 if (!produceSyncToken.HasData()) { |
|
Ken Russell (switch to Gerrit)
2016/12/09 21:23:49
Please add a comment that this should really only
| |
| 717 return false; | |
| 718 } | |
| 719 | |
| 717 gl->WaitSyncTokenCHROMIUM(produceSyncToken.GetConstData()); | 720 gl->WaitSyncTokenCHROMIUM(produceSyncToken.GetConstData()); |
| 718 GLuint sourceTexture = | 721 GLuint sourceTexture = |
| 719 gl->CreateAndConsumeTextureCHROMIUM(target, mailbox.name); | 722 gl->CreateAndConsumeTextureCHROMIUM(target, mailbox.name); |
| 720 | 723 |
| 721 GLboolean unpackPremultiplyAlphaNeeded = GL_FALSE; | 724 GLboolean unpackPremultiplyAlphaNeeded = GL_FALSE; |
| 722 GLboolean unpackUnpremultiplyAlphaNeeded = GL_FALSE; | 725 GLboolean unpackUnpremultiplyAlphaNeeded = GL_FALSE; |
| 723 if (m_wantAlphaChannel && m_premultipliedAlpha && !premultiplyAlpha) | 726 if (m_wantAlphaChannel && m_premultipliedAlpha && !premultiplyAlpha) |
| 724 unpackUnpremultiplyAlphaNeeded = GL_TRUE; | 727 unpackUnpremultiplyAlphaNeeded = GL_TRUE; |
| 725 else if (m_wantAlphaChannel && !m_premultipliedAlpha && premultiplyAlpha) | 728 else if (m_wantAlphaChannel && !m_premultipliedAlpha && premultiplyAlpha) |
| 726 unpackPremultiplyAlphaNeeded = GL_TRUE; | 729 unpackPremultiplyAlphaNeeded = GL_TRUE; |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1262 if (m_pixelUnpackBufferBindingDirty) | 1265 if (m_pixelUnpackBufferBindingDirty) |
| 1263 client->DrawingBufferClientRestorePixelUnpackBufferBinding(); | 1266 client->DrawingBufferClientRestorePixelUnpackBufferBinding(); |
| 1264 } | 1267 } |
| 1265 | 1268 |
| 1266 bool DrawingBuffer::shouldUseChromiumImage() { | 1269 bool DrawingBuffer::shouldUseChromiumImage() { |
| 1267 return RuntimeEnabledFeatures::webGLImageChromiumEnabled() && | 1270 return RuntimeEnabledFeatures::webGLImageChromiumEnabled() && |
| 1268 m_chromiumImageUsage == AllowChromiumImage; | 1271 m_chromiumImageUsage == AllowChromiumImage; |
| 1269 } | 1272 } |
| 1270 | 1273 |
| 1271 } // namespace blink | 1274 } // namespace blink |
| OLD | NEW |