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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
382 { | 382 { |
383 if (!m_context || !m_context->makeContextCurrent() || m_context->getGraphics ResetStatusARB() != GL_NO_ERROR) | 383 if (!m_context || !m_context->makeContextCurrent() || m_context->getGraphics ResetStatusARB() != GL_NO_ERROR) |
384 return; | 384 return; |
385 | 385 |
386 if (!imageBuffer) | 386 if (!imageBuffer) |
387 return; | 387 return; |
388 Platform3DObject tex = imageBuffer->getBackingTexture(); | 388 Platform3DObject tex = imageBuffer->getBackingTexture(); |
389 if (tex) { | 389 if (tex) { |
390 m_context->copyTextureCHROMIUM(GL_TEXTURE_2D, m_frontColorBuffer, | 390 m_context->copyTextureCHROMIUM(GL_TEXTURE_2D, m_frontColorBuffer, |
391 tex, 0, GL_RGBA, GL_UNSIGNED_BYTE); | 391 tex, 0, GL_RGBA, GL_UNSIGNED_BYTE); |
392 m_context->flush(); | |
Ken Russell (switch to Gerrit)
2014/03/17 19:17:32
Uh oh. If this is really the needed fix then there
no sievers
2014/03/17 19:48:09
We do need to glFlush() whenever we need the chang
Ken Russell (switch to Gerrit)
2014/03/17 21:34:16
My point is that there are other callers of copyTe
vmiura
2014/03/17 21:35:08
Checked if other sites have calls to flush().
Ima
piman
2014/03/18 22:43:40
Right, what matters is not the copyTextureCHROMIUM
| |
392 return; | 393 return; |
393 } | 394 } |
394 | 395 |
395 // Since the m_frontColorBuffer was produced and sent to the compositor, it cannot be bound to an fbo. | 396 // Since the m_frontColorBuffer was produced and sent to the compositor, it cannot be bound to an fbo. |
396 // We have to make a copy of it here and bind that copy instead. | 397 // We have to make a copy of it here and bind that copy instead. |
397 // FIXME: That's not true any more, provided we don't change texture | 398 // FIXME: That's not true any more, provided we don't change texture |
398 // parameters. | 399 // parameters. |
399 unsigned sourceTexture = createColorTexture(m_size); | 400 unsigned sourceTexture = createColorTexture(m_size); |
400 m_context->copyTextureCHROMIUM(GL_TEXTURE_2D, m_frontColorBuffer, sourceText ure, 0, GL_RGBA, GL_UNSIGNED_BYTE); | 401 m_context->copyTextureCHROMIUM(GL_TEXTURE_2D, m_frontColorBuffer, sourceText ure, 0, GL_RGBA, GL_UNSIGNED_BYTE); |
401 | 402 |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
896 } | 897 } |
897 } | 898 } |
898 | 899 |
899 void DrawingBuffer::texImage2DResourceSafe(GLenum target, GLint level, GLenum in ternalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLint unpackAlignment) | 900 void DrawingBuffer::texImage2DResourceSafe(GLenum target, GLint level, GLenum in ternalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLint unpackAlignment) |
900 { | 901 { |
901 ASSERT(unpackAlignment == 1 || unpackAlignment == 2 || unpackAlignment == 4 || unpackAlignment == 8); | 902 ASSERT(unpackAlignment == 1 || unpackAlignment == 2 || unpackAlignment == 4 || unpackAlignment == 8); |
902 m_context->texImage2D(target, level, internalformat, width, height, border, format, type, 0); | 903 m_context->texImage2D(target, level, internalformat, width, height, border, format, type, 0); |
903 } | 904 } |
904 | 905 |
905 } // namespace WebCore | 906 } // namespace WebCore |
OLD | NEW |