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

Side by Side Diff: cc/gl_renderer.cc

Issue 12284013: Shrink texture uploader when not visible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/resource_provider.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/gl_renderer.h" 5 #include "cc/gl_renderer.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after
1395 return ManagedMemoryPolicy::CUTOFF_ALLOW_NOTHING; 1395 return ManagedMemoryPolicy::CUTOFF_ALLOW_NOTHING;
1396 } 1396 }
1397 1397
1398 void GLRenderer::enforceMemoryPolicy() 1398 void GLRenderer::enforceMemoryPolicy()
1399 { 1399 {
1400 if (!m_visible) { 1400 if (!m_visible) {
1401 TRACE_EVENT0("cc", "GLRenderer::enforceMemoryPolicy dropping resources") ; 1401 TRACE_EVENT0("cc", "GLRenderer::enforceMemoryPolicy dropping resources") ;
1402 releaseRenderPassTextures(); 1402 releaseRenderPassTextures();
1403 if (m_discardBackbufferWhenNotVisible) 1403 if (m_discardBackbufferWhenNotVisible)
1404 discardBackbuffer(); 1404 discardBackbuffer();
1405 m_resourceProvider->releaseCachedData();
1405 GLC(m_context, m_context->flush()); 1406 GLC(m_context, m_context->flush());
1406 } 1407 }
1407 } 1408 }
1408 1409
1409 void GLRenderer::discardBackbuffer() 1410 void GLRenderer::discardBackbuffer()
1410 { 1411 {
1411 if (m_isBackbufferDiscarded) 1412 if (m_isBackbufferDiscarded)
1412 return; 1413 return;
1413 1414
1414 if (!m_capabilities.usingDiscardBackbuffer) 1415 if (!m_capabilities.usingDiscardBackbuffer)
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1831 1832
1832 releaseRenderPassTextures(); 1833 releaseRenderPassTextures();
1833 } 1834 }
1834 1835
1835 bool GLRenderer::isContextLost() 1836 bool GLRenderer::isContextLost()
1836 { 1837 {
1837 return (m_context->getGraphicsResetStatusARB() != GL_NO_ERROR); 1838 return (m_context->getGraphicsResetStatusARB() != GL_NO_ERROR);
1838 } 1839 }
1839 1840
1840 } // namespace cc 1841 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/resource_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698