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

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

Issue 251023004: WebGL: Free temporary GPU resources held by inactive or hidden WebGL. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use ASSERT instead of 'if' in prepareMailbox() Created 6 years, 5 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
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 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 webContext()->stencilMaskSeparate(GL_FRONT, m_stencilMask); 824 webContext()->stencilMaskSeparate(GL_FRONT, m_stencilMask);
825 webContext()->depthMask(m_depthMask); 825 webContext()->depthMask(m_depthMask);
826 } 826 }
827 827
828 void WebGLRenderingContextBase::markLayerComposited() 828 void WebGLRenderingContextBase::markLayerComposited()
829 { 829 {
830 if (!isContextLost()) 830 if (!isContextLost())
831 m_drawingBuffer->markLayerComposited(); 831 m_drawingBuffer->markLayerComposited();
832 } 832 }
833 833
834 void WebGLRenderingContextBase::setIsHidden(bool hidden)
835 {
836 if (!isContextLost())
837 m_drawingBuffer->setIsHidden(hidden);
838 }
839
834 void WebGLRenderingContextBase::paintRenderingResultsToCanvas() 840 void WebGLRenderingContextBase::paintRenderingResultsToCanvas()
835 { 841 {
836 if (isContextLost()) { 842 if (isContextLost()) {
837 canvas()->clearPresentationCopy(); 843 canvas()->clearPresentationCopy();
838 return; 844 return;
839 } 845 }
840 846
841 if (canvas()->document().printing()) 847 if (canvas()->document().printing())
842 canvas()->clearPresentationCopy(); 848 canvas()->clearPresentationCopy();
843 849
(...skipping 4850 matching lines...) Expand 10 before | Expand all | Expand 10 after
5694 if (m_textureUnits[i].m_texture2DBinding 5700 if (m_textureUnits[i].m_texture2DBinding
5695 || m_textureUnits[i].m_textureCubeMapBinding) { 5701 || m_textureUnits[i].m_textureCubeMapBinding) {
5696 m_onePlusMaxNonDefaultTextureUnit = i + 1; 5702 m_onePlusMaxNonDefaultTextureUnit = i + 1;
5697 return; 5703 return;
5698 } 5704 }
5699 } 5705 }
5700 m_onePlusMaxNonDefaultTextureUnit = 0; 5706 m_onePlusMaxNonDefaultTextureUnit = 0;
5701 } 5707 }
5702 5708
5703 } // namespace WebCore 5709 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698