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

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: rebase to ToT Created 6 years, 8 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 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 webContext()->stencilMaskSeparate(GL_FRONT, m_stencilMask); 815 webContext()->stencilMaskSeparate(GL_FRONT, m_stencilMask);
816 webContext()->depthMask(m_depthMask); 816 webContext()->depthMask(m_depthMask);
817 } 817 }
818 818
819 void WebGLRenderingContextBase::markLayerComposited() 819 void WebGLRenderingContextBase::markLayerComposited()
820 { 820 {
821 if (!isContextLost()) 821 if (!isContextLost())
822 m_drawingBuffer->markLayerComposited(); 822 m_drawingBuffer->markLayerComposited();
823 } 823 }
824 824
825 void WebGLRenderingContextBase::setIsHidden(bool hidden)
826 {
827 if (!isContextLost())
828 m_drawingBuffer->setIsHidden(hidden);
829 }
830
825 void WebGLRenderingContextBase::paintRenderingResultsToCanvas() 831 void WebGLRenderingContextBase::paintRenderingResultsToCanvas()
826 { 832 {
827 if (isContextLost()) { 833 if (isContextLost()) {
828 canvas()->clearPresentationCopy(); 834 canvas()->clearPresentationCopy();
829 return; 835 return;
830 } 836 }
831 837
832 if (canvas()->document().printing()) 838 if (canvas()->document().printing())
833 canvas()->clearPresentationCopy(); 839 canvas()->clearPresentationCopy();
834 840
(...skipping 4832 matching lines...) Expand 10 before | Expand all | Expand 10 after
5667 if (m_textureUnits[i].m_texture2DBinding 5673 if (m_textureUnits[i].m_texture2DBinding
5668 || m_textureUnits[i].m_textureCubeMapBinding) { 5674 || m_textureUnits[i].m_textureCubeMapBinding) {
5669 m_onePlusMaxNonDefaultTextureUnit = i + 1; 5675 m_onePlusMaxNonDefaultTextureUnit = i + 1;
5670 return; 5676 return;
5671 } 5677 }
5672 } 5678 }
5673 m_onePlusMaxNonDefaultTextureUnit = 0; 5679 m_onePlusMaxNonDefaultTextureUnit = 0;
5674 } 5680 }
5675 5681
5676 } // namespace WebCore 5682 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698