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

Side by Side Diff: cc/gl_renderer.cc

Issue 12224129: cc: Disable memory management in the browser compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | cc/layer_tree_settings.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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 if (m_client->hasImplThread()) 129 if (m_client->hasImplThread())
130 m_capabilities.usingSwapCompleteCallback = extensions.count("GL_CHROMIUM _swapbuffers_complete_callback"); 130 m_capabilities.usingSwapCompleteCallback = extensions.count("GL_CHROMIUM _swapbuffers_complete_callback");
131 if (m_capabilities.usingSwapCompleteCallback) 131 if (m_capabilities.usingSwapCompleteCallback)
132 m_context->setSwapBuffersCompleteCallbackCHROMIUM(this); 132 m_context->setSwapBuffersCompleteCallbackCHROMIUM(this);
133 133
134 m_capabilities.usingSetVisibility = extensions.count("GL_CHROMIUM_set_visibi lity"); 134 m_capabilities.usingSetVisibility = extensions.count("GL_CHROMIUM_set_visibi lity");
135 135
136 if (extensions.count("GL_CHROMIUM_iosurface")) 136 if (extensions.count("GL_CHROMIUM_iosurface"))
137 DCHECK(extensions.count("GL_ARB_texture_rectangle")); 137 DCHECK(extensions.count("GL_ARB_texture_rectangle"));
138 138
139 m_capabilities.usingGpuMemoryManager = extensions.count("GL_CHROMIUM_gpu_mem ory_manager"); 139 m_capabilities.usingGpuMemoryManager = extensions.count("GL_CHROMIUM_gpu_mem ory_manager")
140 && settings().useMemoryManagement;
140 if (m_capabilities.usingGpuMemoryManager) 141 if (m_capabilities.usingGpuMemoryManager)
141 m_context->setMemoryAllocationChangedCallbackCHROMIUM(this); 142 m_context->setMemoryAllocationChangedCallbackCHROMIUM(this);
142 143
143 m_capabilities.usingDiscardBackbuffer = extensions.count("GL_CHROMIUM_discar d_backbuffer"); 144 m_capabilities.usingDiscardBackbuffer = extensions.count("GL_CHROMIUM_discar d_backbuffer");
144 145
145 m_capabilities.usingEglImage = extensions.count("GL_OES_EGL_image_external") ; 146 m_capabilities.usingEglImage = extensions.count("GL_OES_EGL_image_external") ;
146 147
147 m_capabilities.maxTextureSize = m_resourceProvider->maxTextureSize(); 148 m_capabilities.maxTextureSize = m_resourceProvider->maxTextureSize();
148 m_capabilities.bestTextureFormat = m_resourceProvider->bestTextureFormat(); 149 m_capabilities.bestTextureFormat = m_resourceProvider->bestTextureFormat();
149 150
(...skipping 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after
1813 1814
1814 releaseRenderPassTextures(); 1815 releaseRenderPassTextures();
1815 } 1816 }
1816 1817
1817 bool GLRenderer::isContextLost() 1818 bool GLRenderer::isContextLost()
1818 { 1819 {
1819 return (m_context->getGraphicsResetStatusARB() != GL_NO_ERROR); 1820 return (m_context->getGraphicsResetStatusARB() != GL_NO_ERROR);
1820 } 1821 }
1821 1822
1822 } // namespace cc 1823 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layer_tree_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698