| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 6125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6136 return m_maxColorAttachments; | 6136 return m_maxColorAttachments; |
| 6137 } | 6137 } |
| 6138 | 6138 |
| 6139 void WebGLRenderingContextBase::setBackDrawBuffer(GLenum buf) | 6139 void WebGLRenderingContextBase::setBackDrawBuffer(GLenum buf) |
| 6140 { | 6140 { |
| 6141 m_backDrawBuffer = buf; | 6141 m_backDrawBuffer = buf; |
| 6142 } | 6142 } |
| 6143 | 6143 |
| 6144 void WebGLRenderingContextBase::setFramebuffer(GLenum target, WebGLFramebuffer*
buffer) | 6144 void WebGLRenderingContextBase::setFramebuffer(GLenum target, WebGLFramebuffer*
buffer) |
| 6145 { | 6145 { |
| 6146 RELEASE_ASSERT(!buffer || buffer->context() == this); |
| 6146 if (buffer) | 6147 if (buffer) |
| 6147 buffer->setHasEverBeenBound(); | 6148 buffer->setHasEverBeenBound(); |
| 6148 | 6149 |
| 6149 if (target == GL_FRAMEBUFFER || target == GL_DRAW_FRAMEBUFFER) { | 6150 if (target == GL_FRAMEBUFFER || target == GL_DRAW_FRAMEBUFFER) { |
| 6150 m_framebufferBinding = buffer; | 6151 m_framebufferBinding = buffer; |
| 6151 applyStencilTest(); | 6152 applyStencilTest(); |
| 6152 } | 6153 } |
| 6153 drawingBuffer()->setFramebufferBinding(target, objectOrZero(getFramebufferBi
nding(target))); | 6154 drawingBuffer()->setFramebufferBinding(target, objectOrZero(getFramebufferBi
nding(target))); |
| 6154 | 6155 |
| 6155 if (!buffer) { | 6156 if (!buffer) { |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6290 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, 1); | 6291 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, 1); |
| 6291 } | 6292 } |
| 6292 | 6293 |
| 6293 void WebGLRenderingContextBase::restoreUnpackParameters() | 6294 void WebGLRenderingContextBase::restoreUnpackParameters() |
| 6294 { | 6295 { |
| 6295 if (m_unpackAlignment != 1) | 6296 if (m_unpackAlignment != 1) |
| 6296 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); | 6297 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); |
| 6297 } | 6298 } |
| 6298 | 6299 |
| 6299 } // namespace blink | 6300 } // namespace blink |
| OLD | NEW |