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

Side by Side Diff: cc/output/gl_renderer.cc

Issue 14409006: cc: Changes to use GL API for GpuMemoryBuffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@glapi
Patch Set: Move settings check to GLRenderer::Initialize Created 7 years, 7 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 // 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/output/gl_renderer.h" 5 #include "cc/output/gl_renderer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 // The updater can access textures while the GLRenderer is using them. 183 // The updater can access textures while the GLRenderer is using them.
184 capabilities_.allow_partial_texture_updates = true; 184 capabilities_.allow_partial_texture_updates = true;
185 185
186 // Check for texture fast paths. Currently we always use MO8 textures, 186 // Check for texture fast paths. Currently we always use MO8 textures,
187 // so we only need to avoid POT textures if we have an NPOT fast-path. 187 // so we only need to avoid POT textures if we have an NPOT fast-path.
188 capabilities_.avoid_pow2_textures = 188 capabilities_.avoid_pow2_textures =
189 extensions.count("GL_CHROMIUM_fast_NPOT_MO8_textures") > 0; 189 extensions.count("GL_CHROMIUM_fast_NPOT_MO8_textures") > 0;
190 190
191 capabilities_.using_offscreen_context3d = true; 191 capabilities_.using_offscreen_context3d = true;
192 192
193 capabilities_.using_map_image =
194 extensions.count("GL_CHROMIUM_map_image") > 0 &&
195 Settings().use_map_image;
196
193 is_using_bind_uniform_ = 197 is_using_bind_uniform_ =
194 extensions.count("GL_CHROMIUM_bind_uniform_location") > 0; 198 extensions.count("GL_CHROMIUM_bind_uniform_location") > 0;
195 199
196 // Make sure scissoring starts as disabled. 200 // Make sure scissoring starts as disabled.
197 GLC(context_, context_->disable(GL_SCISSOR_TEST)); 201 GLC(context_, context_->disable(GL_SCISSOR_TEST));
198 DCHECK(!is_scissor_enabled_); 202 DCHECK(!is_scissor_enabled_);
199 203
200 if (!InitializeSharedObjects()) 204 if (!InitializeSharedObjects())
201 return false; 205 return false;
202 206
(...skipping 2594 matching lines...) Expand 10 before | Expand all | Expand 10 after
2797 resource_provider_->DeleteResource(on_demand_tile_raster_resource_id_); 2801 resource_provider_->DeleteResource(on_demand_tile_raster_resource_id_);
2798 2802
2799 ReleaseRenderPassTextures(); 2803 ReleaseRenderPassTextures();
2800 } 2804 }
2801 2805
2802 bool GLRenderer::IsContextLost() { 2806 bool GLRenderer::IsContextLost() {
2803 return (context_->getGraphicsResetStatusARB() != GL_NO_ERROR); 2807 return (context_->getGraphicsResetStatusARB() != GL_NO_ERROR);
2804 } 2808 }
2805 2809
2806 } // namespace cc 2810 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698