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 2153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2164 return getFloatParameter(pname); | 2164 return getFloatParameter(pname); |
2165 case GraphicsContext3D::POLYGON_OFFSET_FILL: | 2165 case GraphicsContext3D::POLYGON_OFFSET_FILL: |
2166 return getBooleanParameter(pname); | 2166 return getBooleanParameter(pname); |
2167 case GraphicsContext3D::POLYGON_OFFSET_UNITS: | 2167 case GraphicsContext3D::POLYGON_OFFSET_UNITS: |
2168 return getFloatParameter(pname); | 2168 return getFloatParameter(pname); |
2169 case GraphicsContext3D::RED_BITS: | 2169 case GraphicsContext3D::RED_BITS: |
2170 return getIntParameter(pname); | 2170 return getIntParameter(pname); |
2171 case GraphicsContext3D::RENDERBUFFER_BINDING: | 2171 case GraphicsContext3D::RENDERBUFFER_BINDING: |
2172 return WebGLGetInfo(PassRefPtr<WebGLRenderbuffer>(m_renderbufferBinding)
); | 2172 return WebGLGetInfo(PassRefPtr<WebGLRenderbuffer>(m_renderbufferBinding)
); |
2173 case GraphicsContext3D::RENDERER: | 2173 case GraphicsContext3D::RENDERER: |
2174 return WebGLGetInfo(m_context->getString(GraphicsContext3D::RENDERER)); | 2174 return WebGLGetInfo(String("WebKit WebGL")); |
2175 case GraphicsContext3D::SAMPLE_BUFFERS: | 2175 case GraphicsContext3D::SAMPLE_BUFFERS: |
2176 return getIntParameter(pname); | 2176 return getIntParameter(pname); |
2177 case GraphicsContext3D::SAMPLE_COVERAGE_INVERT: | 2177 case GraphicsContext3D::SAMPLE_COVERAGE_INVERT: |
2178 return getBooleanParameter(pname); | 2178 return getBooleanParameter(pname); |
2179 case GraphicsContext3D::SAMPLE_COVERAGE_VALUE: | 2179 case GraphicsContext3D::SAMPLE_COVERAGE_VALUE: |
2180 return getFloatParameter(pname); | 2180 return getFloatParameter(pname); |
2181 case GraphicsContext3D::SAMPLES: | 2181 case GraphicsContext3D::SAMPLES: |
2182 return getIntParameter(pname); | 2182 return getIntParameter(pname); |
2183 case GraphicsContext3D::SCISSOR_BOX: | 2183 case GraphicsContext3D::SCISSOR_BOX: |
2184 return getWebGLIntArrayParameter(pname); | 2184 return getWebGLIntArrayParameter(pname); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2228 return WebGLGetInfo(PassRefPtr<WebGLTexture>(m_textureUnits[m_activeText
ureUnit].m_textureCubeMapBinding)); | 2228 return WebGLGetInfo(PassRefPtr<WebGLTexture>(m_textureUnits[m_activeText
ureUnit].m_textureCubeMapBinding)); |
2229 case GraphicsContext3D::UNPACK_ALIGNMENT: | 2229 case GraphicsContext3D::UNPACK_ALIGNMENT: |
2230 return getIntParameter(pname); | 2230 return getIntParameter(pname); |
2231 case GraphicsContext3D::UNPACK_FLIP_Y_WEBGL: | 2231 case GraphicsContext3D::UNPACK_FLIP_Y_WEBGL: |
2232 return WebGLGetInfo(m_unpackFlipY); | 2232 return WebGLGetInfo(m_unpackFlipY); |
2233 case GraphicsContext3D::UNPACK_PREMULTIPLY_ALPHA_WEBGL: | 2233 case GraphicsContext3D::UNPACK_PREMULTIPLY_ALPHA_WEBGL: |
2234 return WebGLGetInfo(m_unpackPremultiplyAlpha); | 2234 return WebGLGetInfo(m_unpackPremultiplyAlpha); |
2235 case GraphicsContext3D::UNPACK_COLORSPACE_CONVERSION_WEBGL: | 2235 case GraphicsContext3D::UNPACK_COLORSPACE_CONVERSION_WEBGL: |
2236 return WebGLGetInfo(m_unpackColorspaceConversion); | 2236 return WebGLGetInfo(m_unpackColorspaceConversion); |
2237 case GraphicsContext3D::VENDOR: | 2237 case GraphicsContext3D::VENDOR: |
2238 return WebGLGetInfo("Webkit (" + m_context->getString(GraphicsContext3D:
:VENDOR) + ")"); | 2238 return WebGLGetInfo(String("WebKit")); |
2239 case GraphicsContext3D::VERSION: | 2239 case GraphicsContext3D::VERSION: |
2240 return WebGLGetInfo("WebGL 1.0 (" + m_context->getString(GraphicsContext
3D::VERSION) + ")"); | 2240 return WebGLGetInfo("WebGL 1.0 (" + m_context->getString(GraphicsContext
3D::VERSION) + ")"); |
2241 case GraphicsContext3D::VIEWPORT: | 2241 case GraphicsContext3D::VIEWPORT: |
2242 return getWebGLIntArrayParameter(pname); | 2242 return getWebGLIntArrayParameter(pname); |
2243 case Extensions3D::FRAGMENT_SHADER_DERIVATIVE_HINT_OES: // OES_standard_deri
vatives | 2243 case Extensions3D::FRAGMENT_SHADER_DERIVATIVE_HINT_OES: // OES_standard_deri
vatives |
2244 if (m_oesStandardDerivatives) | 2244 if (m_oesStandardDerivatives) |
2245 return getUnsignedIntParameter(Extensions3D::FRAGMENT_SHADER_DERIVAT
IVE_HINT_OES); | 2245 return getUnsignedIntParameter(Extensions3D::FRAGMENT_SHADER_DERIVAT
IVE_HINT_OES); |
2246 m_context->synthesizeGLError(GraphicsContext3D::INVALID_ENUM); | 2246 m_context->synthesizeGLError(GraphicsContext3D::INVALID_ENUM); |
2247 return WebGLGetInfo(); | 2247 return WebGLGetInfo(); |
2248 case Extensions3D::VERTEX_ARRAY_BINDING_OES: // OES_vertex_array_object | 2248 case Extensions3D::VERTEX_ARRAY_BINDING_OES: // OES_vertex_array_object |
(...skipping 2611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4860 | 4860 |
4861 void WebGLRenderingContext::LRUImageBufferCache::bubbleToFront(int idx) | 4861 void WebGLRenderingContext::LRUImageBufferCache::bubbleToFront(int idx) |
4862 { | 4862 { |
4863 for (int i = idx; i > 0; --i) | 4863 for (int i = idx; i > 0; --i) |
4864 m_buffers[i].swap(m_buffers[i-1]); | 4864 m_buffers[i].swap(m_buffers[i-1]); |
4865 } | 4865 } |
4866 | 4866 |
4867 } // namespace WebCore | 4867 } // namespace WebCore |
4868 | 4868 |
4869 #endif // ENABLE(WEBGL) | 4869 #endif // ENABLE(WEBGL) |
OLD | NEW |