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 2607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2618 synthesizeGLError(GL_INVALID_ENUM, "getFramebufferAttachmentParamete
r", "invalid parameter name for texture attachment"); | 2618 synthesizeGLError(GL_INVALID_ENUM, "getFramebufferAttachmentParamete
r", "invalid parameter name for texture attachment"); |
2619 return ScriptValue::createNull(scriptState); | 2619 return ScriptValue::createNull(scriptState); |
2620 } | 2620 } |
2621 } else { | 2621 } else { |
2622 switch (pname) { | 2622 switch (pname) { |
2623 case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: | 2623 case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: |
2624 return WebGLAny(scriptState, GL_RENDERBUFFER); | 2624 return WebGLAny(scriptState, GL_RENDERBUFFER); |
2625 case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: | 2625 case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: |
2626 return WebGLAny(scriptState, attachmentObject); | 2626 return WebGLAny(scriptState, attachmentObject); |
2627 case GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT: | 2627 case GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT: |
2628 if (extensionEnabled(EXTsRGBName) || isWebGL2OrHigher()) { | 2628 if (extensionEnabled(EXTsRGBName)) { |
2629 GLint value = 0; | 2629 GLint value = 0; |
2630 webContext()->getFramebufferAttachmentParameteriv(target, attach
ment, pname, &value); | 2630 webContext()->getFramebufferAttachmentParameteriv(target, attach
ment, pname, &value); |
2631 return WebGLAny(scriptState, value); | 2631 return WebGLAny(scriptState, value); |
2632 } | 2632 } |
2633 synthesizeGLError(GL_INVALID_ENUM, "getFramebufferAttachmentParamete
r", "invalid parameter name for renderbuffer attachment"); | 2633 synthesizeGLError(GL_INVALID_ENUM, "getFramebufferAttachmentParamete
r", "invalid parameter name for renderbuffer attachment"); |
2634 return ScriptValue::createNull(scriptState); | 2634 return ScriptValue::createNull(scriptState); |
2635 default: | 2635 default: |
2636 synthesizeGLError(GL_INVALID_ENUM, "getFramebufferAttachmentParamete
r", "invalid parameter name for renderbuffer attachment"); | 2636 synthesizeGLError(GL_INVALID_ENUM, "getFramebufferAttachmentParamete
r", "invalid parameter name for renderbuffer attachment"); |
2637 return ScriptValue::createNull(scriptState); | 2637 return ScriptValue::createNull(scriptState); |
2638 } | 2638 } |
(...skipping 4063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6702 | 6702 |
6703 return totalBytesPerPixel; | 6703 return totalBytesPerPixel; |
6704 } | 6704 } |
6705 | 6705 |
6706 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const | 6706 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const |
6707 { | 6707 { |
6708 return m_drawingBuffer.get(); | 6708 return m_drawingBuffer.get(); |
6709 } | 6709 } |
6710 | 6710 |
6711 } // namespace blink | 6711 } // namespace blink |
OLD | NEW |