Commit a9f0cfdf authored by epenner@chromium.org's avatar epenner@chromium.org

cc: Add compositor name for easier GPU debugging.

Allows for custom name to be passed to GPU process,
where it can be used for debugging.

BUG=181711

Review URL: https://chromiumcodereview.appspot.com/15673005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202824 0039d316-1c4b-4281-b951-d872f2087c98
parent 1e47cd6d
......@@ -146,7 +146,7 @@ bool GLRenderer::Initialize() {
if (!context_->makeContextCurrent())
return false;
context_->pushGroupMarkerEXT("CompositorContext");
context_->pushGroupMarkerEXT(Settings().compositor_name.c_str());
std::string extensions_string =
UTF16ToASCII(context_->getString(GL_EXTENSIONS));
......
......@@ -55,7 +55,8 @@ LayerTreeSettings::LayerTreeSettings()
highp_threshold_min(0),
force_direct_layer_drawing(false),
strict_layer_property_change_checking(false),
use_map_image(false) {
use_map_image(false),
compositor_name("ChromiumCompositor") {
// TODO(danakj): Renable surface caching when we can do it more realiably.
// crbug.com/170713
cache_render_pass_contents = false;
......
......@@ -5,6 +5,8 @@
#ifndef CC_TREES_LAYER_TREE_SETTINGS_H_
#define CC_TREES_LAYER_TREE_SETTINGS_H_
#include <string>
#include "base/basictypes.h"
#include "cc/base/cc_export.h"
#include "cc/debug/layer_tree_debug_state.h"
......@@ -60,6 +62,7 @@ class CC_EXPORT LayerTreeSettings {
bool force_direct_layer_drawing; // With Skia GPU backend.
bool strict_layer_property_change_checking;
bool use_map_image;
std::string compositor_name;
LayerTreeDebugState initial_debug_state;
};
......
......@@ -201,6 +201,7 @@ void CompositorImpl::SetVisible(bool visible) {
host_.reset();
} else if (!host_) {
cc::LayerTreeSettings settings;
settings.compositor_name = "BrowserCompositor";
settings.refresh_rate = 60.0;
settings.impl_side_painting = false;
settings.calculate_top_controls_position = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment