summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwsdrawable.c60
-rw-r--r--src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwsdrawable.h15
2 files changed, 0 insertions, 75 deletions
diff --git a/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwsdrawable.c b/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwsdrawable.c
index c1b655a..17345a9 100644
--- a/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwsdrawable.c
+++ b/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwsdrawable.c
@@ -828,63 +828,3 @@ void pvrQwsSetSwapFunction
drawable->swapFunction = func;
drawable->userData = userData;
}
-
-unsigned long pvrQwsGetMemoryId(PvrQwsDrawable *drawable)
-{
- unsigned long addr;
- unsigned long start;
- unsigned long end;
- unsigned long off;
- unsigned long offset;
- FILE *file;
- char buffer[BUFSIZ];
- char flags[16];
-
- if (!drawable->backBuffersValid)
- return 0;
- addr = (unsigned long)
- (drawable->backBuffers[drawable->currentBackBuffer]->pBase);
-
- /* Search /proc/self/maps for the memory region that contains "addr".
- The file offset for that memory region is the identifier we need */
- file = fopen("/proc/self/maps", "r");
- if (!file) {
- perror("/proc/self/maps");
- return 0;
- }
- offset = 0;
- while (fgets(buffer, sizeof(buffer), file)) {
- if (sscanf(buffer, "%lx-%lx %s %lx",
- &start, &end, flags, &off) < 4)
- continue;
- if (start <= addr && addr < end) {
- offset = off;
- break;
- }
- }
- fclose(file);
- return offset;
-}
-
-void *pvrQwsMapMemory(unsigned long id, int size)
-{
- void *addr;
- int fd = open("/dev/pvrsrv", O_RDWR, 0);
- if (fd < 0) {
- perror("/dev/pvrsrv");
- return 0;
- }
- addr = mmap(0, (size_t)size, PROT_READ | PROT_WRITE,
- MAP_SHARED, fd, (off_t)id);
- if (addr == (void *)(-1)) {
- perror("mmap pvr memory region");
- addr = 0;
- }
- close(fd);
- return addr;
-}
-
-void pvrQwsUnmapMemory(void *addr, int size)
-{
- munmap(addr, size);
-}
diff --git a/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwsdrawable.h b/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwsdrawable.h
index b9e035f..55e0310 100644
--- a/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwsdrawable.h
+++ b/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwsdrawable.h
@@ -162,21 +162,6 @@ int pvrQwsSwapBuffers(PvrQwsDrawable *drawable, int repaintOnly);
void pvrQwsSetSwapFunction
(PvrQwsDrawable *drawable, PvrQwsSwapFunction func, void *userData);
-/* Get a memory identifier for the indicated drawable's buffer.
- The identifier can be passed to another process and then
- passed to pvrQwsMapMemory() to map the drawable's buffer into
- the other process's address space. Returns zero if the
- memory identifier could not be determined. This should only
- be used for pixmap drawables */
-unsigned long pvrQwsGetMemoryId(PvrQwsDrawable *drawable);
-
-/* Map the memory buffer of a foreign application's drawable, as
- indicated by "id" and "size". Returns null if the map failed */
-void *pvrQwsMapMemory(unsigned long id, int size);
-
-/* Unmap the memory obtained from pvrQwsMapMemory() */
-void pvrQwsUnmapMemory(void *addr, int size);
-
#ifdef __cplusplus
};
#endif