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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 , m_contextLostMode(SyntheticLostContext) | 509 , m_contextLostMode(SyntheticLostContext) |
510 , m_requestedAttributes(requestedAttributes->clone()) | 510 , m_requestedAttributes(requestedAttributes->clone()) |
511 , m_synthesizedErrorsToConsole(true) | 511 , m_synthesizedErrorsToConsole(true) |
512 , m_numGLErrorsToConsoleAllowed(maxGLErrorsAllowedToConsole) | 512 , m_numGLErrorsToConsoleAllowed(maxGLErrorsAllowedToConsole) |
513 , m_multisamplingAllowed(false) | 513 , m_multisamplingAllowed(false) |
514 , m_multisamplingObserverRegistered(false) | 514 , m_multisamplingObserverRegistered(false) |
515 , m_onePlusMaxEnabledAttribIndex(0) | 515 , m_onePlusMaxEnabledAttribIndex(0) |
516 , m_onePlusMaxNonDefaultTextureUnit(0) | 516 , m_onePlusMaxNonDefaultTextureUnit(0) |
517 { | 517 { |
518 ASSERT(m_context); | 518 ASSERT(m_context); |
519 ScriptWrappable::init(this); | |
520 | 519 |
521 m_contextGroup = WebGLContextGroup::create(); | 520 m_contextGroup = WebGLContextGroup::create(); |
522 m_contextGroup->addContext(this); | 521 m_contextGroup->addContext(this); |
523 | 522 |
524 m_maxViewportDims[0] = m_maxViewportDims[1] = 0; | 523 m_maxViewportDims[0] = m_maxViewportDims[1] = 0; |
525 m_context->getIntegerv(GL_MAX_VIEWPORT_DIMS, m_maxViewportDims); | 524 m_context->getIntegerv(GL_MAX_VIEWPORT_DIMS, m_maxViewportDims); |
526 | 525 |
527 RefPtr<WebGLRenderingContextEvictionManager> contextEvictionManager = adoptR
ef(new WebGLRenderingContextEvictionManager()); | 526 RefPtr<WebGLRenderingContextEvictionManager> contextEvictionManager = adoptR
ef(new WebGLRenderingContextEvictionManager()); |
528 | 527 |
529 // Create the DrawingBuffer and initialize the platform layer. | 528 // Create the DrawingBuffer and initialize the platform layer. |
(...skipping 5051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5581 if (m_textureUnits[i].m_texture2DBinding | 5580 if (m_textureUnits[i].m_texture2DBinding |
5582 || m_textureUnits[i].m_textureCubeMapBinding) { | 5581 || m_textureUnits[i].m_textureCubeMapBinding) { |
5583 m_onePlusMaxNonDefaultTextureUnit = i + 1; | 5582 m_onePlusMaxNonDefaultTextureUnit = i + 1; |
5584 return; | 5583 return; |
5585 } | 5584 } |
5586 } | 5585 } |
5587 m_onePlusMaxNonDefaultTextureUnit = 0; | 5586 m_onePlusMaxNonDefaultTextureUnit = 0; |
5588 } | 5587 } |
5589 | 5588 |
5590 } // namespace WebCore | 5589 } // namespace WebCore |
OLD | NEW |