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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 , m_restoreAllowed(false) | 464 , m_restoreAllowed(false) |
465 , m_restoreTimer(this, &WebGLRenderingContext::maybeRestoreContext) | 465 , m_restoreTimer(this, &WebGLRenderingContext::maybeRestoreContext) |
466 , m_videoCache(4) | 466 , m_videoCache(4) |
467 , m_contextLost(false) | 467 , m_contextLost(false) |
468 , m_contextLostMode(SyntheticLostContext) | 468 , m_contextLostMode(SyntheticLostContext) |
469 , m_attributes(attributes) | 469 , m_attributes(attributes) |
470 , m_synthesizedErrorsToConsole(true) | 470 , m_synthesizedErrorsToConsole(true) |
471 , m_numGLErrorsToConsoleAllowed(maxGLErrorsAllowedToConsole) | 471 , m_numGLErrorsToConsoleAllowed(maxGLErrorsAllowedToConsole) |
472 { | 472 { |
473 ASSERT(m_context); | 473 ASSERT(m_context); |
| 474 ScriptWrappable::init(this); |
| 475 |
474 m_contextGroup = WebGLContextGroup::create(); | 476 m_contextGroup = WebGLContextGroup::create(); |
475 m_contextGroup->addContext(this); | 477 m_contextGroup->addContext(this); |
476 | 478 |
477 m_maxViewportDims[0] = m_maxViewportDims[1] = 0; | 479 m_maxViewportDims[0] = m_maxViewportDims[1] = 0; |
478 m_context->getIntegerv(GraphicsContext3D::MAX_VIEWPORT_DIMS, m_maxViewportDi
ms); | 480 m_context->getIntegerv(GraphicsContext3D::MAX_VIEWPORT_DIMS, m_maxViewportDi
ms); |
479 | 481 |
480 #if PLATFORM(CHROMIUM) | 482 #if PLATFORM(CHROMIUM) |
481 // Create the DrawingBuffer and initialize the platform layer. | 483 // Create the DrawingBuffer and initialize the platform layer. |
482 DrawingBuffer::PreserveDrawingBuffer preserve = m_attributes.preserveDrawing
Buffer ? DrawingBuffer::Preserve : DrawingBuffer::Discard; | 484 DrawingBuffer::PreserveDrawingBuffer preserve = m_attributes.preserveDrawing
Buffer ? DrawingBuffer::Preserve : DrawingBuffer::Discard; |
483 DrawingBuffer::AlphaRequirement alpha = m_attributes.alpha ? DrawingBuffer::
Alpha : DrawingBuffer::Opaque; | 485 DrawingBuffer::AlphaRequirement alpha = m_attributes.alpha ? DrawingBuffer::
Alpha : DrawingBuffer::Opaque; |
(...skipping 5565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6049 bool WebGLRenderingContext::supportsDrawBuffers() | 6051 bool WebGLRenderingContext::supportsDrawBuffers() |
6050 { | 6052 { |
6051 if (!m_drawBuffersWebGLRequirementsChecked) { | 6053 if (!m_drawBuffersWebGLRequirementsChecked) { |
6052 m_drawBuffersWebGLRequirementsChecked = true; | 6054 m_drawBuffersWebGLRequirementsChecked = true; |
6053 m_drawBuffersSupported = EXTDrawBuffers::supported(this); | 6055 m_drawBuffersSupported = EXTDrawBuffers::supported(this); |
6054 } | 6056 } |
6055 return m_drawBuffersSupported; | 6057 return m_drawBuffersSupported; |
6056 } | 6058 } |
6057 | 6059 |
6058 } // namespace WebCore | 6060 } // namespace WebCore |
OLD | NEW |