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 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 canvas()->didDraw(FloatRect(FloatPoint(0, 0), clampedCanvasSize())); | 807 canvas()->didDraw(FloatRect(FloatPoint(0, 0), clampedCanvasSize())); |
808 } | 808 } |
809 } | 809 } |
810 } | 810 } |
811 | 811 |
812 bool WebGLRenderingContextBase::clearIfComposited(GLbitfield mask) | 812 bool WebGLRenderingContextBase::clearIfComposited(GLbitfield mask) |
813 { | 813 { |
814 if (isContextLost()) | 814 if (isContextLost()) |
815 return false; | 815 return false; |
816 | 816 |
817 if (!drawingBuffer()->layerComposited() || m_layerCleared | 817 if (!drawingBuffer()->layerComposited() || drawingBuffer()->discardFramebuff
erSupported() || m_layerCleared |
818 || m_requestedAttributes->preserveDrawingBuffer() || (mask && m_framebuf
ferBinding)) | 818 || m_requestedAttributes->preserveDrawingBuffer() || (mask && m_framebuf
ferBinding)) |
819 return false; | 819 return false; |
820 | 820 |
821 RefPtrWillBeRawPtr<WebGLContextAttributes> contextAttributes = getContextAtt
ributes(); | 821 RefPtrWillBeRawPtr<WebGLContextAttributes> contextAttributes = getContextAtt
ributes(); |
822 | 822 |
823 // Determine if it's possible to combine the clear the user asked for and th
is clear. | 823 // Determine if it's possible to combine the clear the user asked for and th
is clear. |
824 bool combinedClear = mask && !m_scissorEnabled; | 824 bool combinedClear = mask && !m_scissorEnabled; |
825 | 825 |
826 webContext()->disable(GL_SCISSOR_TEST); | 826 webContext()->disable(GL_SCISSOR_TEST); |
827 if (combinedClear && (mask & GL_COLOR_BUFFER_BIT)) { | 827 if (combinedClear && (mask & GL_COLOR_BUFFER_BIT)) { |
(...skipping 4966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5794 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB
uffer() : 0; | 5794 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB
uffer() : 0; |
5795 } | 5795 } |
5796 #else | 5796 #else |
5797 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const | 5797 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const |
5798 { | 5798 { |
5799 return m_drawingBuffer.get(); | 5799 return m_drawingBuffer.get(); |
5800 } | 5800 } |
5801 #endif | 5801 #endif |
5802 | 5802 |
5803 } // namespace blink | 5803 } // namespace blink |
OLD | NEW |