VirtualBox

Ignore:
Timestamp:
Oct 12, 2017 2:07:17 PM (7 years ago)
Author:
vboxsync
Message:

Additions/x11/vboxvideo: add our own, trival device memory allocator.
bugref:9017: Additions/x11: put vboxvideo into upstream X.Org

We currently pull the full-blown generic device memory allocator into the
X.Org vboxvideo driver, which in turn pulls in various IPRT dependencies.
This is not really necessary, as we only ever have one allocated buffer and
run single threaded. So this change makes us use a trivial allocator which
just returns a pointer to the beginning of the device memory area and fails
if there is already an allocation which has not yet been freed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/vboxvideo/Makefile.kmk

    r68846 r69061  
    3939        $(VBOX_PATH_X11_ROOT)/xproto-7.0.18 \
    4040        $(VBOX_GRAPHICS_INCS)
     41vboxvideo_override_INCLUDES = \
     42    -include $(PATH_ROOT)/src/VBox/Additions/x11/vboxvideo/HGSMIMemAlloc.h
    4143
    4244vboxvideo.c_DEPS = $(VBOX_SVN_REV_HEADER)
     
    4850#
    4951vboxvideo_drv_lib_TEMPLATE = VBOXGUESTR3XORGMOD
     52vboxvideo_drv_lib_CFLAGS += $(vboxvideo_override_INCLUDES)
     53vboxvideo_drv_lib_CXXFLAGS += $(vboxvideo_override_INCLUDES)
    5054ifeq ($(KBUILD_TARGET),solaris) # don't use .solaris or anything here.  Do we need this?  I don't want to find out.
    5155 vboxvideo_drv_lib_CFLAGS += -D_XPG6 -Wno-shadow # Use XPG6 until we have moved the C++ bits into a library.
     
    5761        $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/VBVABase.cpp \
    5862        $(PATH_ROOT)/src/VBox/GuestHost/HGSMI/HGSMICommon.cpp \
    59         $(PATH_ROOT)/src/VBox/GuestHost/HGSMI/HGSMIMemAlloc.cpp
     63        $(PATH_ROOT)/src/VBox/Additions/x11/vboxvideo/hgsmimemalloc.c
    6064vboxvideo_drv_lib_INCS = \
    6165        $(PATH_ROOT)/src/VBox/Runtime/include \
     
    7074endif   # target linux
    7175vboxvideo_drv_TEMPLATE = VBOXGUESTR3XF86MOD
     76vboxvideo_drv_CFLAGS += $(vboxvideo_override_INCLUDES)
    7277vboxvideo_drv_CFLAGS += -Wno-shadow # Avoid MBs of warnings in X11 and OpenGL headers (solaris mostly).
     78vboxvideo_drv_CXXFLAGS += $(vboxvideo_override_INCLUDES)
    7379vboxvideo_drv_DEFS.linux = linux
    7480vboxvideo_drv_DEFS.x86 = __i386__
     
    144150vboxvideo_drv_70_TEMPLATE = VBOXGUESTR3XORGMOD
    145151vboxvideo_drv_70_DEFS = $(vboxvideo_70_DEFS) XORG_VERSION_CURRENT=70000000
     152vboxvideo_drv_70_CFLAGS += $(vboxvideo_override_INCLUDES)
    146153ifeq ($(KBUILD_TARGET),solaris) # don't use .solaris or anything here.
    147154 vboxvideo_drv_70_CFLAGS += -D_XPG6 -Wno-shadow # Use XPG6 until we have moved the C++ bits into a library.
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette