Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
xserver
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Drew DeVault
xserver
Commits
15e58b5f
Commit
15e58b5f
authored
Feb 08, 2010
by
Eric Anholt
Committed by
Zhigang Gong
Sep 26, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
glamor: Split the copy path out into its own function.
parent
ad67299f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
24 deletions
+48
-24
glamor/glamor_render.c
glamor/glamor_render.c
+48
-24
No files found.
glamor/glamor_render.c
View file @
15e58b5f
...
...
@@ -446,6 +446,49 @@ glamor_get_picture_location(PicturePtr picture)
return
glamor_get_drawable_location
(
picture
->
pDrawable
);
}
static
Bool
glamor_composite_copy
(
CARD8
op
,
PicturePtr
source
,
PicturePtr
dest
,
INT16
x_source
,
INT16
y_source
,
INT16
x_dest
,
INT16
y_dest
,
CARD16
width
,
CARD16
height
)
{
RegionRec
region
;
if
(
!
compatible_formats
(
op
,
dest
,
source
))
return
FALSE
;
if
(
source
->
repeat
||
source
->
transform
)
return
FALSE
;
x_dest
+=
dest
->
pDrawable
->
x
;
y_dest
+=
dest
->
pDrawable
->
y
;
x_source
+=
source
->
pDrawable
->
x
;
y_source
+=
source
->
pDrawable
->
y
;
if
(
!
miComputeCompositeRegion
(
&
region
,
source
,
NULL
,
dest
,
x_source
,
y_source
,
0
,
0
,
x_dest
,
y_dest
,
width
,
height
))
return
TRUE
;
glamor_copy_n_to_n
(
source
->
pDrawable
,
dest
->
pDrawable
,
NULL
,
REGION_RECTS
(
&
region
),
REGION_NUM_RECTS
(
&
region
),
x_source
-
x_dest
,
y_source
-
y_dest
,
FALSE
,
FALSE
,
0
,
NULL
);
REGION_UNINIT
(
dest
->
pDrawable
->
pScreen
,
&
region
);
return
TRUE
;
}
void
glamor_composite
(
CARD8
op
,
PicturePtr
source
,
...
...
@@ -491,30 +534,11 @@ glamor_composite(CARD8 op,
}
if
(
!
mask
)
{
if
(
compatible_formats
(
op
,
dest
,
source
))
{
if
(
!
source
->
repeat
&&
!
source
->
transform
)
{
x_dest
+=
dest
->
pDrawable
->
x
;
y_dest
+=
dest
->
pDrawable
->
y
;
x_source
+=
source
->
pDrawable
->
x
;
y_source
+=
source
->
pDrawable
->
y
;
if
(
!
miComputeCompositeRegion
(
&
region
,
source
,
NULL
,
dest
,
x_source
,
y_source
,
0
,
0
,
x_dest
,
y_dest
,
width
,
height
))
return
;
glamor_copy_n_to_n
(
source
->
pDrawable
,
dest
->
pDrawable
,
NULL
,
REGION_RECTS
(
&
region
),
REGION_NUM_RECTS
(
&
region
),
x_source
-
x_dest
,
y_source
-
y_dest
,
FALSE
,
FALSE
,
0
,
NULL
);
REGION_UNINIT
(
dest
->
pDrawable
->
pScreen
,
&
region
);
return
;
}
}
if
(
glamor_composite_copy
(
op
,
source
,
dest
,
x_source
,
y_source
,
x_dest
,
y_dest
,
width
,
height
))
return
;
}
goto
fail
;
...
...
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