| 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 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1240 } | 1240 } |
| 1241 if (contextAttributes.get().stencil() || drawingBuffer()->hasImplicitStencil
Buffer()) { | 1241 if (contextAttributes.get().stencil() || drawingBuffer()->hasImplicitStencil
Buffer()) { |
| 1242 if (combinedClear && (mask & GL_STENCIL_BUFFER_BIT)) | 1242 if (combinedClear && (mask & GL_STENCIL_BUFFER_BIT)) |
| 1243 contextGL()->ClearStencil(m_clearStencil & m_stencilMask); | 1243 contextGL()->ClearStencil(m_clearStencil & m_stencilMask); |
| 1244 else | 1244 else |
| 1245 contextGL()->ClearStencil(0); | 1245 contextGL()->ClearStencil(0); |
| 1246 clearMask |= GL_STENCIL_BUFFER_BIT; | 1246 clearMask |= GL_STENCIL_BUFFER_BIT; |
| 1247 contextGL()->StencilMaskSeparate(GL_FRONT, 0xFFFFFFFF); | 1247 contextGL()->StencilMaskSeparate(GL_FRONT, 0xFFFFFFFF); |
| 1248 } | 1248 } |
| 1249 | 1249 |
| 1250 contextGL()->ColorMask(true, true, true, !drawingBuffer()->defaultBufferRequ
iresAlphaChannelToBePreserved()); |
| 1250 drawingBuffer()->clearFramebuffers(clearMask); | 1251 drawingBuffer()->clearFramebuffers(clearMask); |
| 1251 | 1252 |
| 1252 restoreStateAfterClear(); | 1253 restoreStateAfterClear(); |
| 1253 drawingBuffer()->restoreFramebufferBindings(); | 1254 drawingBuffer()->restoreFramebufferBindings(); |
| 1254 drawingBuffer()->setBufferClearNeeded(false); | 1255 drawingBuffer()->setBufferClearNeeded(false); |
| 1255 | 1256 |
| 1256 return combinedClear ? CombinedClear : JustClear; | 1257 return combinedClear ? CombinedClear : JustClear; |
| 1257 } | 1258 } |
| 1258 | 1259 |
| 1259 void WebGLRenderingContextBase::restoreStateAfterClear() | 1260 void WebGLRenderingContextBase::restoreStateAfterClear() |
| (...skipping 5174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6434 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, 1); | 6435 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, 1); |
| 6435 } | 6436 } |
| 6436 | 6437 |
| 6437 void WebGLRenderingContextBase::restoreUnpackParameters() | 6438 void WebGLRenderingContextBase::restoreUnpackParameters() |
| 6438 { | 6439 { |
| 6439 if (m_unpackAlignment != 1) | 6440 if (m_unpackAlignment != 1) |
| 6440 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); | 6441 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); |
| 6441 } | 6442 } |
| 6442 | 6443 |
| 6443 } // namespace blink | 6444 } // namespace blink |
| OLD | NEW |