| 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 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 { | 638 { |
| 639 ASSERT(context); | 639 ASSERT(context); |
| 640 | 640 |
| 641 m_contextGroup = WebGLContextGroup::create(); | 641 m_contextGroup = WebGLContextGroup::create(); |
| 642 m_contextGroup->addContext(this); | 642 m_contextGroup->addContext(this); |
| 643 | 643 |
| 644 m_maxViewportDims[0] = m_maxViewportDims[1] = 0; | 644 m_maxViewportDims[0] = m_maxViewportDims[1] = 0; |
| 645 context->getIntegerv(GL_MAX_VIEWPORT_DIMS, m_maxViewportDims); | 645 context->getIntegerv(GL_MAX_VIEWPORT_DIMS, m_maxViewportDims); |
| 646 | 646 |
| 647 RefPtr<DrawingBuffer> buffer = createDrawingBuffer(context); | 647 RefPtr<DrawingBuffer> buffer = createDrawingBuffer(context); |
| 648 if (!buffer) | 648 if (!buffer) { |
| 649 m_contextLostMode = SyntheticLostContext; |
| 649 return; | 650 return; |
| 651 } |
| 650 | 652 |
| 651 #if ENABLE(OILPAN) | 653 #if ENABLE(OILPAN) |
| 652 m_sharedWebGraphicsContext3D = WebGLSharedWebGraphicsContext3D::create(buffe
r.release()); | 654 m_sharedWebGraphicsContext3D = WebGLSharedWebGraphicsContext3D::create(buffe
r.release()); |
| 653 #else | 655 #else |
| 654 m_drawingBuffer = buffer.release(); | 656 m_drawingBuffer = buffer.release(); |
| 655 #endif | 657 #endif |
| 656 | 658 |
| 657 drawingBuffer()->bind(); | 659 drawingBuffer()->bind(); |
| 658 setupFlags(); | 660 setupFlags(); |
| 659 } | 661 } |
| (...skipping 5580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6240 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB
uffer() : 0; | 6242 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB
uffer() : 0; |
| 6241 } | 6243 } |
| 6242 #else | 6244 #else |
| 6243 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const | 6245 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const |
| 6244 { | 6246 { |
| 6245 return m_drawingBuffer.get(); | 6247 return m_drawingBuffer.get(); |
| 6246 } | 6248 } |
| 6247 #endif | 6249 #endif |
| 6248 | 6250 |
| 6249 } // namespace blink | 6251 } // namespace blink |
| OLD | NEW |