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

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

Issue 15673005: cc: Add compositor name for easier GPU debugging. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 highp_threshold_min_(highp_threshold_min), 139 highp_threshold_min_(highp_threshold_min),
140 highp_threshold_cache_(0), 140 highp_threshold_cache_(0),
141 on_demand_tile_raster_resource_id_(0) { 141 on_demand_tile_raster_resource_id_(0) {
142 DCHECK(context_); 142 DCHECK(context_);
143 } 143 }
144 144
145 bool GLRenderer::Initialize() { 145 bool GLRenderer::Initialize() {
146 if (!context_->makeContextCurrent()) 146 if (!context_->makeContextCurrent())
147 return false; 147 return false;
148 148
149 context_->pushGroupMarkerEXT("CompositorContext"); 149 context_->pushGroupMarkerEXT(Settings().compositor_name.c_str());
150 150
151 std::string extensions_string = 151 std::string extensions_string =
152 UTF16ToASCII(context_->getString(GL_EXTENSIONS)); 152 UTF16ToASCII(context_->getString(GL_EXTENSIONS));
153 std::vector<std::string> extensions_list; 153 std::vector<std::string> extensions_list;
154 base::SplitString(extensions_string, ' ', &extensions_list); 154 base::SplitString(extensions_string, ' ', &extensions_list);
155 std::set<std::string> extensions(extensions_list.begin(), 155 std::set<std::string> extensions(extensions_list.begin(),
156 extensions_list.end()); 156 extensions_list.end());
157 157
158 if (Settings().accelerate_painting && 158 if (Settings().accelerate_painting &&
159 extensions.count("GL_EXT_texture_format_BGRA8888") && 159 extensions.count("GL_EXT_texture_format_BGRA8888") &&
(...skipping 2751 matching lines...) Expand 10 before | Expand all | Expand 10 after
2911 // The Skia GPU backend requires a stencil buffer. See ReinitializeGrCanvas 2911 // The Skia GPU backend requires a stencil buffer. See ReinitializeGrCanvas
2912 // implementation. 2912 // implementation.
2913 return gr_context_ && context_->getContextAttributes().stencil; 2913 return gr_context_ && context_->getContextAttributes().stencil;
2914 } 2914 }
2915 2915
2916 bool GLRenderer::IsContextLost() { 2916 bool GLRenderer::IsContextLost() {
2917 return (context_->getGraphicsResetStatusARB() != GL_NO_ERROR); 2917 return (context_->getGraphicsResetStatusARB() != GL_NO_ERROR);
2918 } 2918 }
2919 2919
2920 } // namespace cc 2920 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_settings.h » ('j') | content/browser/renderer_host/compositor_impl_android.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698