| 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 5518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5529 if (drawingBuffer()) { | 5529 if (drawingBuffer()) { |
| 5530 #if ENABLE(OILPAN) | 5530 #if ENABLE(OILPAN) |
| 5531 m_sharedWebGraphicsContext3D->dispose(); | 5531 m_sharedWebGraphicsContext3D->dispose(); |
| 5532 #else | 5532 #else |
| 5533 m_drawingBuffer->beginDestruction(); | 5533 m_drawingBuffer->beginDestruction(); |
| 5534 m_drawingBuffer.clear(); | 5534 m_drawingBuffer.clear(); |
| 5535 #endif | 5535 #endif |
| 5536 } | 5536 } |
| 5537 | 5537 |
| 5538 blink::WebGraphicsContext3D::Attributes attributes = m_requestedAttributes->
attributes(canvas()->document().topDocument().url().string(), settings, version(
)); | 5538 blink::WebGraphicsContext3D::Attributes attributes = m_requestedAttributes->
attributes(canvas()->document().topDocument().url().string(), settings, version(
)); |
| 5539 OwnPtr<blink::WebGraphicsContext3D> context = adoptPtr(blink::Platform::curr
ent()->createOffscreenGraphicsContext3D(attributes, 0)); | 5539 blink::WebGLInfo glInfo; |
| 5540 OwnPtr<blink::WebGraphicsContext3D> context = adoptPtr(blink::Platform::curr
ent()->createOffscreenGraphicsContext3D(attributes, 0, glInfo)); |
| 5540 RefPtr<DrawingBuffer> buffer; | 5541 RefPtr<DrawingBuffer> buffer; |
| 5541 if (context) { | 5542 if (context) { |
| 5542 // Construct a new drawing buffer with the new WebGraphicsContext3D. | 5543 // Construct a new drawing buffer with the new WebGraphicsContext3D. |
| 5543 buffer = createDrawingBuffer(context.release()); | 5544 buffer = createDrawingBuffer(context.release()); |
| 5544 // If DrawingBuffer::create() fails to allocate a fbo, |drawingBuffer| i
s set to null. | 5545 // If DrawingBuffer::create() fails to allocate a fbo, |drawingBuffer| i
s set to null. |
| 5545 } | 5546 } |
| 5546 if (!buffer) { | 5547 if (!buffer) { |
| 5547 if (m_contextLostMode == RealLostContext) { | 5548 if (m_contextLostMode == RealLostContext) { |
| 5548 m_restoreTimer.startOneShot(secondsBetweenRestoreAttempts, FROM_HERE
); | 5549 m_restoreTimer.startOneShot(secondsBetweenRestoreAttempts, FROM_HERE
); |
| 5549 } else { | 5550 } else { |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5794 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB
uffer() : 0; | 5795 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB
uffer() : 0; |
| 5795 } | 5796 } |
| 5796 #else | 5797 #else |
| 5797 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const | 5798 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const |
| 5798 { | 5799 { |
| 5799 return m_drawingBuffer.get(); | 5800 return m_drawingBuffer.get(); |
| 5800 } | 5801 } |
| 5801 #endif | 5802 #endif |
| 5802 | 5803 |
| 5803 } // namespace blink | 5804 } // namespace blink |
| OLD | NEW |