Commit 80933144 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

QmlProfiler: Paint binding loop markers in timeline highlight color



Change-Id: I7cf12f87a4d78a2dcfc0a6e9fe7dc460a6ade70f
Reviewed-by: Alessandro Portale's avatarAlessandro Portale <alessandro.portale@qt.io>
parent d318b18c
......@@ -23,8 +23,9 @@
**
****************************************************************************/
lowp vec4 orange = vec4(1.0, 165.0 / 255.0, 0.0, 1.0);
varying lowp vec4 color;
void main()
{
gl_FragColor = orange;
gl_FragColor = color;
}
......@@ -27,6 +27,9 @@ attribute vec4 vertexCoord;
attribute vec2 postScaleOffset;
uniform mat4 matrix;
uniform vec4 bindingLoopsColor;
varying vec4 color;
void main()
{
......@@ -35,4 +38,5 @@ void main()
gl_Position.y += postScaleOffset.y * 0.01;
gl_Position.z -= 0.1;
gl_Position.w = 1.0;
color = bindingLoopsColor;
}
......@@ -26,6 +26,8 @@
#include "qmlprofilerbindingloopsrenderpass.h"
#include <utils/qtcassert.h>
#include <utils/theme/theme.h>
namespace QmlProfiler {
namespace Internal {
......@@ -302,6 +304,7 @@ private:
int m_matrix_id;
int m_z_range_id;
int m_color_id;
};
BindingLoopMaterialShader::BindingLoopMaterialShader()
......@@ -316,6 +319,9 @@ void BindingLoopMaterialShader::updateState(const RenderState &state, QSGMateria
if (state.isMatrixDirty()) {
program()->setUniformValue(m_matrix_id, state.combinedMatrix());
program()->setUniformValue(m_z_range_id, GLfloat(1.0));
program()->setUniformValue(
m_color_id,
Utils::creatorTheme()->color(Utils::Theme::Timeline_HighlightColor));
}
}
......@@ -329,6 +335,7 @@ void BindingLoopMaterialShader::initialize()
{
m_matrix_id = program()->uniformLocation("matrix");
m_z_range_id = program()->uniformLocation("_qt_zRange");
m_color_id = program()->uniformLocation("bindingLoopsColor");
}
......
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