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
Marco Trevisan
xserver
Commits
307f3dbd
Commit
307f3dbd
authored
Oct 12, 2003
by
Anders Carlsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove this for now.
parent
ab3305d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
100 deletions
+0
-100
hw/kdrive/src/koffscreen.c
hw/kdrive/src/koffscreen.c
+0
-100
No files found.
hw/kdrive/src/koffscreen.c
deleted
100644 → 0
View file @
ab3305d0
/*
* $Id$
*
* Copyright © 2003 Anders Carlsson
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Anders Carlsson not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Anders Carlsson makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* ANDERS CARLSSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL ANDERS CARLSSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Header$ */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "kdrive.h"
static
unsigned
long
offGeneration
=
0
;
static
int
offScreenPrivateIndex
;
static
int
offPixmapPrivateIndex
;
typedef
struct
{
CARD8
*
base
;
int
size
;
CreatePixmapProcPtr
CreatePixmap
;
DestroyPixmapProcPtr
DestroyPixmap
;
}
OffScreenPrivRec
,
*
OffScreenPrivPtr
;
typedef
struct
{
int
score
;
}
OffPixmapPrivRec
,
*
OffPixmapPrivPtr
;
#define offPixmapPtr(p) OffPixmapPrivPtr pOffPixmap = (OffPixmapPrivPtr) (p)->devPrivates[offPixmapPrivateIndex].ptr
#define offScreenPriv(s) OffScreenPrivPtr pOffScr = (OffScreenPrivPtr) (s)->devPrivates[offScreenPrivateIndex].ptr
static
PixmapPtr
KdOffscreenCreatePixmap
(
ScreenPtr
pScreen
,
int
w
,
int
h
,
int
depth
)
{
offScreenPriv
(
pScreen
);
fprintf
(
stderr
,
"creating pixmap: %dx%d with depth %d
\n
"
,
w
,
h
,
depth
);
return
(
*
pOffScr
->
CreatePixmap
)
(
pScreen
,
w
,
h
,
depth
);
}
static
Bool
KdOffscreenDestroyPixmap
(
PixmapPtr
pixmap
)
{
offScreenPriv
(
pixmap
->
drawable
.
pScreen
);
return
(
*
pOffScr
->
DestroyPixmap
)
(
pixmap
);
}
Bool
KdOffscreenInit
(
ScreenPtr
pScreen
,
CARD8
*
off_screen_memory
,
int
off_screen_size
)
{
OffScreenPrivPtr
pOffScr
;
fprintf
(
stderr
,
"Initializing offscreen manager, size is: %d
\n
"
,
off_screen_size
);
if
(
offGeneration
!=
serverGeneration
)
{
offScreenPrivateIndex
=
AllocateScreenPrivateIndex
();
offGeneration
=
serverGeneration
;
}
AllocatePixmapPrivate
(
pScreen
,
offPixmapPrivateIndex
,
sizeof
(
OffPixmapPrivRec
));
pOffScr
=
xalloc
(
sizeof
(
OffScreenPrivRec
));
pScreen
->
devPrivates
[
offScreenPrivateIndex
].
ptr
=
pOffScr
;
pOffScr
->
base
=
off_screen_memory
;
pOffScr
->
size
=
off_screen_size
;
/* Override functions */
pOffScr
->
CreatePixmap
=
pScreen
->
CreatePixmap
;
pScreen
->
CreatePixmap
=
KdOffscreenCreatePixmap
;
pOffScr
->
DestroyPixmap
=
pScreen
->
DestroyPixmap
;
pScreen
->
DestroyPixmap
=
KdOffscreenDestroyPixmap
;
return
TRUE
;
}
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