| 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 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 683 SourceDrawingBuffer sourceBuffer) { | 683 SourceDrawingBuffer sourceBuffer) { |
| 684 if (m_contentsChanged) { | 684 if (m_contentsChanged) { |
| 685 if (m_antiAliasingMode != None) { | 685 if (m_antiAliasingMode != None) { |
| 686 commit(); | 686 commit(); |
| 687 restoreFramebufferBindings(); | 687 restoreFramebufferBindings(); |
| 688 } | 688 } |
| 689 m_gl->Flush(); | 689 m_gl->Flush(); |
| 690 } | 690 } |
| 691 | 691 |
| 692 // Assume that the destination target is GL_TEXTURE_2D. | 692 // Assume that the destination target is GL_TEXTURE_2D. |
| 693 if (!Extensions3DUtil::canUseCopyTextureCHROMIUM( | 693 if (!m_extensionsUtil->canUseCopyTextureCHROMIUM( |
| 694 GL_TEXTURE_2D, internalFormat, destType, level)) | 694 GL_TEXTURE_2D, internalFormat, destType, level)) |
| 695 return false; | 695 return false; |
| 696 | 696 |
| 697 // Contexts may be in a different share group. We must transfer the texture th
rough a mailbox first | 697 // Contexts may be in a different share group. We must transfer the texture th
rough a mailbox first |
| 698 GLint textureId = 0; | 698 GLint textureId = 0; |
| 699 GLenum target = 0; | 699 GLenum target = 0; |
| 700 gpu::Mailbox mailbox; | 700 gpu::Mailbox mailbox; |
| 701 gpu::SyncToken produceSyncToken; | 701 gpu::SyncToken produceSyncToken; |
| 702 if (sourceBuffer == FrontBuffer && m_frontColorBuffer.texInfo.textureId) { | 702 if (sourceBuffer == FrontBuffer && m_frontColorBuffer.texInfo.textureId) { |
| 703 textureId = m_frontColorBuffer.texInfo.textureId; | 703 textureId = m_frontColorBuffer.texInfo.textureId; |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1319 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE. | 1319 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE. |
| 1320 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding); | 1320 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding); |
| 1321 } | 1321 } |
| 1322 | 1322 |
| 1323 bool DrawingBuffer::shouldUseChromiumImage() { | 1323 bool DrawingBuffer::shouldUseChromiumImage() { |
| 1324 return RuntimeEnabledFeatures::webGLImageChromiumEnabled() && | 1324 return RuntimeEnabledFeatures::webGLImageChromiumEnabled() && |
| 1325 m_chromiumImageUsage == AllowChromiumImage; | 1325 m_chromiumImageUsage == AllowChromiumImage; |
| 1326 } | 1326 } |
| 1327 | 1327 |
| 1328 } // namespace blink | 1328 } // namespace blink |
| OLD | NEW |