| 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 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 } | 773 } |
| 774 | 774 |
| 775 void WebGLRenderingContextBase::markContextChanged(ContentChangeType changeType) | 775 void WebGLRenderingContextBase::markContextChanged(ContentChangeType changeType) |
| 776 { | 776 { |
| 777 if (m_framebufferBinding || isContextLost()) | 777 if (m_framebufferBinding || isContextLost()) |
| 778 return; | 778 return; |
| 779 | 779 |
| 780 drawingBuffer()->markContentsChanged(); | 780 drawingBuffer()->markContentsChanged(); |
| 781 | 781 |
| 782 m_layerCleared = false; | 782 m_layerCleared = false; |
| 783 RenderBox* renderBox = canvas()->renderBox(); | 783 if (!m_markedCanvasDirty) { |
| 784 if (renderBox && renderBox->hasAcceleratedCompositing()) { | |
| 785 m_markedCanvasDirty = true; | 784 m_markedCanvasDirty = true; |
| 786 canvas()->clearCopiedImage(); | 785 canvas()->didDraw(FloatRect(FloatPoint(0, 0), clampedCanvasSize())); |
| 787 } else { | |
| 788 if (!m_markedCanvasDirty) { | |
| 789 m_markedCanvasDirty = true; | |
| 790 canvas()->didDraw(FloatRect(FloatPoint(0, 0), clampedCanvasSize())); | |
| 791 } | |
| 792 } | 786 } |
| 793 } | 787 } |
| 794 | 788 |
| 795 bool WebGLRenderingContextBase::clearIfComposited(GLbitfield mask) | 789 bool WebGLRenderingContextBase::clearIfComposited(GLbitfield mask) |
| 796 { | 790 { |
| 797 if (isContextLost()) | 791 if (isContextLost()) |
| 798 return false; | 792 return false; |
| 799 | 793 |
| 800 if (!drawingBuffer()->layerComposited() || m_layerCleared | 794 if (!drawingBuffer()->layerComposited() || m_layerCleared |
| 801 || m_requestedAttributes->preserveDrawingBuffer() || (mask && m_framebuf
ferBinding)) | 795 || m_requestedAttributes->preserveDrawingBuffer() || (mask && m_framebuf
ferBinding)) |
| (...skipping 4808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5610 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB
uffer() : 0; | 5604 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB
uffer() : 0; |
| 5611 } | 5605 } |
| 5612 #else | 5606 #else |
| 5613 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const | 5607 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const |
| 5614 { | 5608 { |
| 5615 return m_drawingBuffer.get(); | 5609 return m_drawingBuffer.get(); |
| 5616 } | 5610 } |
| 5617 #endif | 5611 #endif |
| 5618 | 5612 |
| 5619 } // namespace blink | 5613 } // namespace blink |
| OLD | NEW |