| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010, Google Inc. All rights reserved. | 2 * Copyright (c) 2010, Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 | 299 |
| 300 WebKit::WebLayer* DrawingBuffer::platformLayer() | 300 WebKit::WebLayer* DrawingBuffer::platformLayer() |
| 301 { | 301 { |
| 302 if (!m_context) | 302 if (!m_context) |
| 303 return 0; | 303 return 0; |
| 304 | 304 |
| 305 if (!m_layer) { | 305 if (!m_layer) { |
| 306 m_layer = adoptPtr(WebKit::Platform::current()->compositorSupport()->cre
ateExternalTextureLayer(this)); | 306 m_layer = adoptPtr(WebKit::Platform::current()->compositorSupport()->cre
ateExternalTextureLayer(this)); |
| 307 | 307 |
| 308 m_layer->setOpaque(!m_attributes.alpha); | 308 m_layer->setOpaque(!m_attributes.alpha); |
| 309 m_layer->setBlendBackgroundColor(m_attributes.alpha); |
| 309 m_layer->setPremultipliedAlpha(m_attributes.premultipliedAlpha); | 310 m_layer->setPremultipliedAlpha(m_attributes.premultipliedAlpha); |
| 310 GraphicsLayer::registerContentsLayer(m_layer->layer()); | 311 GraphicsLayer::registerContentsLayer(m_layer->layer()); |
| 311 } | 312 } |
| 312 | 313 |
| 313 return m_layer->layer(); | 314 return m_layer->layer(); |
| 314 } | 315 } |
| 315 | 316 |
| 316 void DrawingBuffer::paintCompositedResultsToCanvas(ImageBuffer* imageBuffer) | 317 void DrawingBuffer::paintCompositedResultsToCanvas(ImageBuffer* imageBuffer) |
| 317 { | 318 { |
| 318 if (!m_context || !m_context->makeContextCurrent() || m_context->getExtensio
ns()->getGraphicsResetStatusARB() != GraphicsContext3D::NO_ERROR) | 319 if (!m_context || !m_context->makeContextCurrent() || m_context->getExtensio
ns()->getGraphicsResetStatusARB() != GraphicsContext3D::NO_ERROR) |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 | 729 |
| 729 void DrawingBuffer::bind() | 730 void DrawingBuffer::bind() |
| 730 { | 731 { |
| 731 if (!m_context) | 732 if (!m_context) |
| 732 return; | 733 return; |
| 733 | 734 |
| 734 m_context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_multisampleFBO
? m_multisampleFBO : m_fbo); | 735 m_context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_multisampleFBO
? m_multisampleFBO : m_fbo); |
| 735 } | 736 } |
| 736 | 737 |
| 737 } // namespace WebCore | 738 } // namespace WebCore |
| OLD | NEW |