| 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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 m_actualAttributes.antialias = multisample(); | 434 m_actualAttributes.antialias = multisample(); |
| 435 return true; | 435 return true; |
| 436 } | 436 } |
| 437 | 437 |
| 438 bool DrawingBuffer::copyToPlatformTexture(blink::WebGraphicsContext3D* context,
Platform3DObject texture, GLenum internalFormat, GLenum destType, GLint level, b
ool premultiplyAlpha, bool flipY, bool fromFrontBuffer) | 438 bool DrawingBuffer::copyToPlatformTexture(blink::WebGraphicsContext3D* context,
Platform3DObject texture, GLenum internalFormat, GLenum destType, GLint level, b
ool premultiplyAlpha, bool flipY, bool fromFrontBuffer) |
| 439 { | 439 { |
| 440 if (!m_context->makeContextCurrent()) | 440 if (!m_context->makeContextCurrent()) |
| 441 return false; | 441 return false; |
| 442 | 442 |
| 443 GLint textureId = m_colorBuffer.textureId; | 443 GLint textureId = m_colorBuffer.textureId; |
| 444 if (fromFrontBuffer) | 444 if (fromFrontBuffer && m_frontColorBuffer.textureId) |
| 445 textureId = m_frontColorBuffer.textureId; | 445 textureId = m_frontColorBuffer.textureId; |
| 446 | 446 |
| 447 if (m_contentsChanged) { | 447 if (m_contentsChanged) { |
| 448 if (m_multisampleMode != None) { | 448 if (m_multisampleMode != None) { |
| 449 commit(); | 449 commit(); |
| 450 if (!m_framebufferBinding) | 450 if (!m_framebufferBinding) |
| 451 bind(); | 451 bind(); |
| 452 else | 452 else |
| 453 restoreFramebufferBinding(); | 453 restoreFramebufferBinding(); |
| 454 } | 454 } |
| (...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1063 void DrawingBuffer::deleteChromiumImageForTexture(TextureInfo* info) | 1063 void DrawingBuffer::deleteChromiumImageForTexture(TextureInfo* info) |
| 1064 { | 1064 { |
| 1065 if (info->imageId) { | 1065 if (info->imageId) { |
| 1066 m_context->releaseTexImage2DCHROMIUM(GL_TEXTURE_2D, info->imageId); | 1066 m_context->releaseTexImage2DCHROMIUM(GL_TEXTURE_2D, info->imageId); |
| 1067 m_context->destroyImageCHROMIUM(info->imageId); | 1067 m_context->destroyImageCHROMIUM(info->imageId); |
| 1068 info->imageId = 0; | 1068 info->imageId = 0; |
| 1069 } | 1069 } |
| 1070 } | 1070 } |
| 1071 | 1071 |
| 1072 } // namespace WebCore | 1072 } // namespace WebCore |
| OLD | NEW |