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 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
968 m_contextLostMode = SyntheticLostContext; | 968 m_contextLostMode = SyntheticLostContext; |
969 return; | 969 return; |
970 } | 970 } |
971 | 971 |
972 m_drawingBuffer = buffer.release(); | 972 m_drawingBuffer = buffer.release(); |
973 | 973 |
974 drawingBuffer()->bind(GL_FRAMEBUFFER); | 974 drawingBuffer()->bind(GL_FRAMEBUFFER); |
975 setupFlags(); | 975 setupFlags(); |
976 | 976 |
977 #define ADD_VALUES_TO_SET(set, values) \ | 977 #define ADD_VALUES_TO_SET(set, values) \ |
978 for (size_t i = 0; i < arraysize(values); ++i) { \ | 978 for (size_t i = 0; i < WTF_ARRAY_LENGTH(values); ++i) { \ |
979 set.insert(values[i]); \ | 979 set.insert(values[i]); \ |
980 } | 980 } |
981 | 981 |
982 ADD_VALUES_TO_SET(m_supportedInternalFormats, kSupportedInternalFormatsES2); | 982 ADD_VALUES_TO_SET(m_supportedInternalFormats, kSupportedInternalFormatsES2); |
983 ADD_VALUES_TO_SET(m_supportedFormats, kSupportedFormatsES2); | 983 ADD_VALUES_TO_SET(m_supportedFormats, kSupportedFormatsES2); |
984 ADD_VALUES_TO_SET(m_supportedTypes, kSupportedTypesES2); | 984 ADD_VALUES_TO_SET(m_supportedTypes, kSupportedTypesES2); |
985 ADD_VALUES_TO_SET(m_supportedFormatTypeCombinations, kSupportedFormatTypesES
2); | 985 ADD_VALUES_TO_SET(m_supportedFormatTypeCombinations, kSupportedFormatTypesES
2); |
986 } | 986 } |
987 | 987 |
988 PassRefPtr<DrawingBuffer> WebGLRenderingContextBase::createDrawingBuffer(PassOwn
Ptr<WebGraphicsContext3D> context) | 988 PassRefPtr<DrawingBuffer> WebGLRenderingContextBase::createDrawingBuffer(PassOwn
Ptr<WebGraphicsContext3D> context) |
(...skipping 6072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7061 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, 1); | 7061 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, 1); |
7062 } | 7062 } |
7063 | 7063 |
7064 void WebGLRenderingContextBase::restoreUnpackParameters() | 7064 void WebGLRenderingContextBase::restoreUnpackParameters() |
7065 { | 7065 { |
7066 if (m_unpackAlignment != 1) | 7066 if (m_unpackAlignment != 1) |
7067 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); | 7067 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); |
7068 } | 7068 } |
7069 | 7069 |
7070 } // namespace blink | 7070 } // namespace blink |
OLD | NEW |