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 5320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5331 LocalFrame* frame = canvas()->document().frame(); | 5331 LocalFrame* frame = canvas()->document().frame(); |
5332 if (!frame) | 5332 if (!frame) |
5333 return; | 5333 return; |
5334 | 5334 |
5335 Settings* settings = frame->settings(); | 5335 Settings* settings = frame->settings(); |
5336 | 5336 |
5337 if (!frame->loader().client()->allowWebGL(settings && settings->webGLEnabled
())) | 5337 if (!frame->loader().client()->allowWebGL(settings && settings->webGLEnabled
())) |
5338 return; | 5338 return; |
5339 | 5339 |
5340 blink::WebGraphicsContext3D::Attributes attributes = m_requestedAttributes->
attributes(canvas()->document().topDocument().url().string(), settings); | 5340 blink::WebGraphicsContext3D::Attributes attributes = m_requestedAttributes->
attributes(canvas()->document().topDocument().url().string(), settings); |
5341 OwnPtr<blink::WebGraphicsContext3D> context = adoptPtr(blink::Platform::curr
ent()->createOffscreenGraphicsContext3D(attributes)); | 5341 OwnPtr<blink::WebGraphicsContext3D> context = adoptPtr(blink::Platform::curr
ent()->createOffscreenGraphicsContext3D(attributes, 0)); |
5342 if (!context) { | 5342 if (!context) { |
5343 if (m_contextLostMode == RealLostContext) { | 5343 if (m_contextLostMode == RealLostContext) { |
5344 m_restoreTimer.startOneShot(secondsBetweenRestoreAttempts, FROM_HERE
); | 5344 m_restoreTimer.startOneShot(secondsBetweenRestoreAttempts, FROM_HERE
); |
5345 } else { | 5345 } else { |
5346 // This likely shouldn't happen but is the best way to report it to
the WebGL app. | 5346 // This likely shouldn't happen but is the best way to report it to
the WebGL app. |
5347 synthesizeGLError(GL_INVALID_OPERATION, "", "error restoring context
"); | 5347 synthesizeGLError(GL_INVALID_OPERATION, "", "error restoring context
"); |
5348 } | 5348 } |
5349 return; | 5349 return; |
5350 } | 5350 } |
5351 | 5351 |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5559 if (m_textureUnits[i].m_texture2DBinding | 5559 if (m_textureUnits[i].m_texture2DBinding |
5560 || m_textureUnits[i].m_textureCubeMapBinding) { | 5560 || m_textureUnits[i].m_textureCubeMapBinding) { |
5561 m_onePlusMaxNonDefaultTextureUnit = i + 1; | 5561 m_onePlusMaxNonDefaultTextureUnit = i + 1; |
5562 return; | 5562 return; |
5563 } | 5563 } |
5564 } | 5564 } |
5565 m_onePlusMaxNonDefaultTextureUnit = 0; | 5565 m_onePlusMaxNonDefaultTextureUnit = 0; |
5566 } | 5566 } |
5567 | 5567 |
5568 } // namespace WebCore | 5568 } // namespace WebCore |
OLD | NEW |