Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Roman Gilg
xserver
Commits
fd95d37c
Commit
fd95d37c
authored
Jan 16, 2019
by
Roman Gilg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scale visible region
parent
97da8cc7
Pipeline
#15077
failed with stages
in 53 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
composite/compint.h
composite/compint.h
+3
-0
composite/compwindow.c
composite/compwindow.c
+1
-1
dix/dispatch.c
dix/dispatch.c
+9
-3
No files found.
composite/compint.h
View file @
fd95d37c
...
@@ -379,6 +379,9 @@ compSetOwnerSize(WindowPtr pWin, CARD16 ownerWidth, CARD16 ownerHeight, ClientPt
...
@@ -379,6 +379,9 @@ compSetOwnerSize(WindowPtr pWin, CARD16 ownerWidth, CARD16 ownerHeight, ClientPt
int
int
compSendOwnerSizeCoreEvents
(
WindowPtr
pWin
);
compSendOwnerSizeCoreEvents
(
WindowPtr
pWin
);
void
compScaleRegion
(
RegionPtr
pRegion
,
double
xscale
,
double
yscale
);
void
void
compScalePicture
(
WindowPtr
pWin
,
PicturePtr
picture
,
double
*
xscale
,
double
*
yscale
);
compScalePicture
(
WindowPtr
pWin
,
PicturePtr
picture
,
double
*
xscale
,
double
*
yscale
);
...
...
composite/compwindow.c
View file @
fd95d37c
...
@@ -633,7 +633,7 @@ compScaleBox(BoxPtr pBox, double xscale, double yscale)
...
@@ -633,7 +633,7 @@ compScaleBox(BoxPtr pBox, double xscale, double yscale)
return
pBox
->
x1
<
pBox
->
x2
&&
pBox
->
y1
<
pBox
->
y2
;
return
pBox
->
x1
<
pBox
->
x2
&&
pBox
->
y1
<
pBox
->
y2
;
}
}
static
void
void
compScaleRegion
(
RegionPtr
pRegion
,
double
xscale
,
double
yscale
)
compScaleRegion
(
RegionPtr
pRegion
,
double
xscale
,
double
yscale
)
{
{
if
(
!
compScaleBox
(
&
pRegion
->
extents
,
xscale
,
yscale
))
{
if
(
!
compScaleBox
(
&
pRegion
->
extents
,
xscale
,
yscale
))
{
...
...
dix/dispatch.c
View file @
fd95d37c
...
@@ -2123,9 +2123,6 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
...
@@ -2123,9 +2123,6 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
goto
out
;
goto
out
;
}
}
// TODO: this is still in owner-size
pVisibleRegion
=
&
pWin
->
borderClip
;
/* If the drawable is a window, the rectangle must be contained within
/* If the drawable is a window, the rectangle must be contained within
* its bounds (including the border). */
* its bounds (including the border). */
if
(
x
<
-
wBorderWidth
(
pWin
)
||
if
(
x
<
-
wBorderWidth
(
pWin
)
||
...
@@ -2136,6 +2133,9 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
...
@@ -2136,6 +2133,9 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
goto
out
;
goto
out
;
}
}
pVisibleRegion
=
RegionCreate
(
NullBox
,
0
);
RegionCopy
(
pVisibleRegion
,
&
pWin
->
borderClip
);
relx
+=
pDraw
->
x
;
relx
+=
pDraw
->
x
;
rely
+=
pDraw
->
y
;
rely
+=
pDraw
->
y
;
...
@@ -2175,6 +2175,10 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
...
@@ -2175,6 +2175,10 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
&
error
);
&
error
);
compScalePicture
(
pWin
,
pSrcPicture
,
&
scaleX
,
&
scaleY
);
compScalePicture
(
pWin
,
pSrcPicture
,
&
scaleX
,
&
scaleY
);
RegionTranslate
(
pVisibleRegion
,
-
pPix
->
screen_x
,
-
pPix
->
screen_y
);
compScaleRegion
(
pVisibleRegion
,
1
.
/
scaleX
,
1
.
/
scaleY
);
CompositePicture
(
PictOpSrc
,
pSrcPicture
,
0
,
pDstPicture
,
CompositePicture
(
PictOpSrc
,
pSrcPicture
,
0
,
pDstPicture
,
0
,
0
,
/* src_x, src_y */
0
,
0
,
/* src_x, src_y */
0
,
0
,
/* msk_x, msk_y */
0
,
0
,
/* msk_x, msk_y */
...
@@ -2328,6 +2332,8 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
...
@@ -2328,6 +2332,8 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
out:
out:
if
(
pDstPixmap
)
if
(
pDstPixmap
)
FreePixmap
(
pDstPixmap
);
FreePixmap
(
pDstPixmap
);
if
(
pVisibleRegion
)
RegionDestroy
(
pVisibleRegion
);
return
rc
;
return
rc
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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