Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWin
Commits
8cc5e042
Commit
8cc5e042
authored
May 05, 2022
by
Vlad Zahorodnii
Browse files
scenes/opengl: Rename RenderContext::transforms to RenderContext::transformStack
It's a better name and it's consistent with opacityStack.
parent
63a866d9
Pipeline
#174677
passed with stage
in 13 minutes and 55 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/scenes/opengl/scene_opengl.cpp
View file @
8cc5e042
...
...
@@ -338,7 +338,7 @@ static WindowQuadList clipQuads(const Item *item, const SceneOpenGL::RenderConte
{
const
WindowQuadList
quads
=
item
->
quads
();
if
(
context
->
clip
!=
infiniteRegion
()
&&
!
context
->
hardwareClipping
)
{
const
QPoint
offset
=
context
->
transform
s
.
top
().
map
(
QPoint
(
0
,
0
));
const
QPoint
offset
=
context
->
transform
Stack
.
top
().
map
(
QPoint
(
0
,
0
));
WindowQuadList
ret
;
ret
.
reserve
(
quads
.
count
());
...
...
@@ -372,7 +372,7 @@ void SceneOpenGL::createRenderNode(Item *item, RenderContext *context)
QMatrix4x4
matrix
;
matrix
.
translate
(
item
->
position
().
x
(),
item
->
position
().
y
());
matrix
*=
item
->
transform
();
context
->
transform
s
.
push
(
context
->
transform
s
.
top
()
*
matrix
);
context
->
transform
Stack
.
push
(
context
->
transform
Stack
.
top
()
*
matrix
);
context
->
opacityStack
.
push
(
context
->
opacityStack
.
top
()
*
item
->
opacity
());
...
...
@@ -393,7 +393,7 @@ void SceneOpenGL::createRenderNode(Item *item, RenderContext *context)
context
->
renderNodes
.
append
(
RenderNode
{
.
texture
=
shadow
->
shadowTexture
(),
.
quads
=
quads
,
.
transformMatrix
=
context
->
transform
s
.
top
(),
.
transformMatrix
=
context
->
transform
Stack
.
top
(),
.
opacity
=
context
->
opacityStack
.
top
(),
.
hasAlpha
=
true
,
.
coordinateType
=
UnnormalizedCoordinates
,
...
...
@@ -406,7 +406,7 @@ void SceneOpenGL::createRenderNode(Item *item, RenderContext *context)
context
->
renderNodes
.
append
(
RenderNode
{
.
texture
=
renderer
->
texture
(),
.
quads
=
quads
,
.
transformMatrix
=
context
->
transform
s
.
top
(),
.
transformMatrix
=
context
->
transform
Stack
.
top
(),
.
opacity
=
context
->
opacityStack
.
top
(),
.
hasAlpha
=
true
,
.
coordinateType
=
UnnormalizedCoordinates
,
...
...
@@ -422,7 +422,7 @@ void SceneOpenGL::createRenderNode(Item *item, RenderContext *context)
context
->
renderNodes
.
append
(
RenderNode
{
.
texture
=
bindSurfaceTexture
(
surfaceItem
),
.
quads
=
quads
,
.
transformMatrix
=
context
->
transform
s
.
top
(),
.
transformMatrix
=
context
->
transform
Stack
.
top
(),
.
opacity
=
context
->
opacityStack
.
top
(),
.
hasAlpha
=
hasAlpha
,
.
coordinateType
=
UnnormalizedCoordinates
,
...
...
@@ -440,7 +440,7 @@ void SceneOpenGL::createRenderNode(Item *item, RenderContext *context)
}
}
context
->
transform
s
.
pop
();
context
->
transform
Stack
.
pop
();
context
->
opacityStack
.
pop
();
}
...
...
@@ -506,7 +506,7 @@ void SceneOpenGL::render(Item *item, int mask, const QRegion ®ion, const Wind
.
hardwareClipping
=
region
!=
infiniteRegion
()
&&
((
mask
&
Scene
::
PAINT_WINDOW_TRANSFORMED
)
||
(
mask
&
Scene
::
PAINT_SCREEN_TRANSFORMED
)),
};
renderContext
.
transform
s
.
push
(
QMatrix4x4
());
renderContext
.
transform
Stack
.
push
(
QMatrix4x4
());
renderContext
.
opacityStack
.
push
(
data
.
opacity
());
item
->
setTransform
(
transformForPaintData
(
mask
,
data
));
...
...
src/scenes/opengl/scene_opengl.h
View file @
8cc5e042
...
...
@@ -43,7 +43,7 @@ public:
struct
RenderContext
{
QVector
<
RenderNode
>
renderNodes
;
QStack
<
QMatrix4x4
>
transform
s
;
QStack
<
QMatrix4x4
>
transform
Stack
;
QStack
<
qreal
>
opacityStack
;
const
QRegion
clip
;
const
bool
hardwareClipping
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment