| 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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 // Bind the common vertex attributes used for drawing all the layers. | 433 // Bind the common vertex attributes used for drawing all the layers. |
| 434 m_sharedGeometry->prepareForDraw(); | 434 m_sharedGeometry->prepareForDraw(); |
| 435 | 435 |
| 436 GLC(m_context.get(), m_context->disable(GraphicsContext3D::DEPTH_TEST)); | 436 GLC(m_context.get(), m_context->disable(GraphicsContext3D::DEPTH_TEST)); |
| 437 GLC(m_context.get(), m_context->disable(GraphicsContext3D::CULL_FACE)); | 437 GLC(m_context.get(), m_context->disable(GraphicsContext3D::CULL_FACE)); |
| 438 GLC(m_context.get(), m_context->colorMask(true, true, true, true)); | 438 GLC(m_context.get(), m_context->colorMask(true, true, true, true)); |
| 439 GLC(m_context.get(), m_context->enable(GraphicsContext3D::BLEND)); | 439 GLC(m_context.get(), m_context->enable(GraphicsContext3D::BLEND)); |
| 440 GLC(m_context.get(), m_context->blendFunc(GraphicsContext3D::ONE, GraphicsCo
ntext3D::ONE_MINUS_SRC_ALPHA)); | 440 GLC(m_context.get(), m_context->blendFunc(GraphicsContext3D::ONE, GraphicsCo
ntext3D::ONE_MINUS_SRC_ALPHA)); |
| 441 } | 441 } |
| 442 | 442 |
| 443 void LayerRendererChromium::doNoOp() |
| 444 { |
| 445 GLC(m_context.get(), m_context->bindFramebuffer(GraphicsContext3D::FRAMEBUFF
ER, 0)); |
| 446 GLC(m_context.get(), m_context->flush()); |
| 447 } |
| 448 |
| 443 void LayerRendererChromium::drawRenderPass(const CCRenderPass* renderPass) | 449 void LayerRendererChromium::drawRenderPass(const CCRenderPass* renderPass) |
| 444 { | 450 { |
| 445 CCRenderSurface* renderSurface = renderPass->targetSurface(); | 451 CCRenderSurface* renderSurface = renderPass->targetSurface(); |
| 446 if (!useRenderSurface(renderSurface)) | 452 if (!useRenderSurface(renderSurface)) |
| 447 return; | 453 return; |
| 448 | 454 |
| 449 clearRenderSurface(renderSurface, m_defaultRenderSurface, renderPass->surfac
eDamageRect()); | 455 clearRenderSurface(renderSurface, m_defaultRenderSurface, renderPass->surfac
eDamageRect()); |
| 450 | 456 |
| 451 const CCQuadList& quadList = renderPass->quadList(); | 457 const CCQuadList& quadList = renderPass->quadList(); |
| 452 for (CCQuadList::constBackToFrontIterator it = quadList.backToFrontBegin();
it != quadList.backToFrontEnd(); ++it) | 458 for (CCQuadList::constBackToFrontIterator it = quadList.backToFrontBegin();
it != quadList.backToFrontEnd(); ++it) |
| (...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1638 } | 1644 } |
| 1639 | 1645 |
| 1640 bool LayerRendererChromium::isContextLost() | 1646 bool LayerRendererChromium::isContextLost() |
| 1641 { | 1647 { |
| 1642 return (m_context.get()->getExtensions()->getGraphicsResetStatusARB() != Gra
phicsContext3D::NO_ERROR); | 1648 return (m_context.get()->getExtensions()->getGraphicsResetStatusARB() != Gra
phicsContext3D::NO_ERROR); |
| 1643 } | 1649 } |
| 1644 | 1650 |
| 1645 } // namespace WebCore | 1651 } // namespace WebCore |
| 1646 | 1652 |
| 1647 #endif // USE(ACCELERATED_COMPOSITING) | 1653 #endif // USE(ACCELERATED_COMPOSITING) |
| OLD | NEW |