Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(833)

Side by Side Diff: Source/core/html/canvas/WebGLRenderingContext.cpp

Issue 17835002: Fix the crash issue for debug version when restoring texture binding at Unit 0 in DrawingBuffer::pr… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1642 matching lines...) Expand 10 before | Expand all | Expand 10 after
1653 void WebGLRenderingContext::deleteShader(WebGLShader* shader) 1653 void WebGLRenderingContext::deleteShader(WebGLShader* shader)
1654 { 1654 {
1655 deleteObject(shader); 1655 deleteObject(shader);
1656 } 1656 }
1657 1657
1658 void WebGLRenderingContext::deleteTexture(WebGLTexture* texture) 1658 void WebGLRenderingContext::deleteTexture(WebGLTexture* texture)
1659 { 1659 {
1660 if (!deleteObject(texture)) 1660 if (!deleteObject(texture))
1661 return; 1661 return;
1662 for (size_t i = 0; i < m_textureUnits.size(); ++i) { 1662 for (size_t i = 0; i < m_textureUnits.size(); ++i) {
1663 if (texture == m_textureUnits[i].m_texture2DBinding) 1663 if (texture == m_textureUnits[i].m_texture2DBinding) {
1664 m_textureUnits[i].m_texture2DBinding = 0; 1664 m_textureUnits[i].m_texture2DBinding = 0;
1665 if (!i)
1666 m_drawingBuffer->setTexture2DBinding(0);
1667 }
1665 if (texture == m_textureUnits[i].m_textureCubeMapBinding) 1668 if (texture == m_textureUnits[i].m_textureCubeMapBinding)
1666 m_textureUnits[i].m_textureCubeMapBinding = 0; 1669 m_textureUnits[i].m_textureCubeMapBinding = 0;
1667 } 1670 }
1668 if (m_framebufferBinding) 1671 if (m_framebufferBinding)
1669 m_framebufferBinding->removeAttachmentFromBoundFramebuffer(texture); 1672 m_framebufferBinding->removeAttachmentFromBoundFramebuffer(texture);
1670 } 1673 }
1671 1674
1672 void WebGLRenderingContext::depthFunc(GC3Denum func) 1675 void WebGLRenderingContext::depthFunc(GC3Denum func)
1673 { 1676 {
1674 if (isContextLost()) 1677 if (isContextLost())
(...skipping 3903 matching lines...) Expand 10 before | Expand all | Expand 10 after
5578 5581
5579 void WebGLRenderingContext::multisamplingChanged(bool enabled) 5582 void WebGLRenderingContext::multisamplingChanged(bool enabled)
5580 { 5583 {
5581 if (m_multisamplingAllowed != enabled) { 5584 if (m_multisamplingAllowed != enabled) {
5582 m_multisamplingAllowed = enabled; 5585 m_multisamplingAllowed = enabled;
5583 forceLostContext(WebGLRenderingContext::AutoRecoverSyntheticLostContext) ; 5586 forceLostContext(WebGLRenderingContext::AutoRecoverSyntheticLostContext) ;
5584 } 5587 }
5585 } 5588 }
5586 5589
5587 } // namespace WebCore 5590 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698