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

Side by Side Diff: cc/gl_renderer.cc

Issue 12217102: cc: Avoid power of two textures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Lower-case vendor. 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_host.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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 m_capabilities.usingDiscardBackbuffer = extensions.count("GL_CHROMIUM_discar d_backbuffer"); 143 m_capabilities.usingDiscardBackbuffer = extensions.count("GL_CHROMIUM_discar d_backbuffer");
144 144
145 m_capabilities.usingEglImage = extensions.count("GL_OES_EGL_image_external") ; 145 m_capabilities.usingEglImage = extensions.count("GL_OES_EGL_image_external") ;
146 146
147 m_capabilities.maxTextureSize = m_resourceProvider->maxTextureSize(); 147 m_capabilities.maxTextureSize = m_resourceProvider->maxTextureSize();
148 m_capabilities.bestTextureFormat = m_resourceProvider->bestTextureFormat(); 148 m_capabilities.bestTextureFormat = m_resourceProvider->bestTextureFormat();
149 149
150 // The updater can access textures while the GLRenderer is using them. 150 // The updater can access textures while the GLRenderer is using them.
151 m_capabilities.allowPartialTextureUpdates = true; 151 m_capabilities.allowPartialTextureUpdates = true;
152 152
153 // Check for texture fast paths. Currently we always use MO8 textures,
154 // so we only need to avoid POT textures if we have an NPOT fast-path.
155 m_capabilities.avoidPow2Textures = extensions.count("GL_CHROMIUM_fast_NPOT_M O8_textures");
156
153 m_isUsingBindUniform = extensions.count("GL_CHROMIUM_bind_uniform_location") ; 157 m_isUsingBindUniform = extensions.count("GL_CHROMIUM_bind_uniform_location") ;
154 158
155 // Make sure scissoring starts as disabled. 159 // Make sure scissoring starts as disabled.
156 GLC(m_context, m_context->disable(GL_SCISSOR_TEST)); 160 GLC(m_context, m_context->disable(GL_SCISSOR_TEST));
157 DCHECK(!m_isScissorEnabled); 161 DCHECK(!m_isScissorEnabled);
158 162
159 if (!initializeSharedObjects()) 163 if (!initializeSharedObjects())
160 return false; 164 return false;
161 165
162 // Make sure the viewport and context gets initialized, even if it is to zer o. 166 // Make sure the viewport and context gets initialized, even if it is to zer o.
(...skipping 1650 matching lines...) Expand 10 before | Expand all | Expand 10 after
1813 1817
1814 releaseRenderPassTextures(); 1818 releaseRenderPassTextures();
1815 } 1819 }
1816 1820
1817 bool GLRenderer::isContextLost() 1821 bool GLRenderer::isContextLost()
1818 { 1822 {
1819 return (m_context->getGraphicsResetStatusARB() != GL_NO_ERROR); 1823 return (m_context->getGraphicsResetStatusARB() != GL_NO_ERROR);
1820 } 1824 }
1821 1825
1822 } // namespace cc 1826 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698