VirtualBox

Changeset 23746 in vbox


Ignore:
Timestamp:
Oct 14, 2009 8:40:44 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53471
Message:

video 2d accel: some code cleaning

Location:
trunk
Files:
1 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxGL2D.h

    r23740 r23746  
    2424
    2525#include <iprt/types.h>
    26 
    27 #if defined(DEBUG) && !defined(DEBUG_sandervl)
    28 # include "iprt/stream.h"
    29 # define VBOXQGLLOG(_m) RTPrintf _m
    30 # define VBOXQGLLOGREL(_m) do { RTPrintf _m ; LogRel( _m ); } while(0)
    31 #else
    32 # define VBOXQGLLOG(_m)    do {}while(0)
    33 # define VBOXQGLLOGREL(_m) LogRel( _m )
    34 #endif
    35 #define VBOXQGLLOG_ENTER(_m)
    36 //do{VBOXQGLLOG(("==>[%s]:", __FUNCTION__)); VBOXQGLLOG(_m);}while(0)
    37 #define VBOXQGLLOG_EXIT(_m)
    38 //do{VBOXQGLLOG(("<==[%s]:", __FUNCTION__)); VBOXQGLLOG(_m);}while(0)
    39 #ifdef DEBUG
    40  #define VBOXQGL_ASSERTNOERR() \
    41     do { GLenum err = glGetError(); \
    42         if(err != GL_NO_ERROR) VBOXQGLLOG(("gl error ocured (0x%x)\n", err)); \
    43         Assert(err == GL_NO_ERROR); \
    44     }while(0)
    45 
    46  #define VBOXQGL_CHECKERR(_op) \
    47     do { \
    48         glGetError(); \
    49         _op \
    50         VBOXQGL_ASSERTNOERR(); \
    51     }while(0)
    52 #else
    53  #define VBOXQGL_ASSERTNOERR() \
    54     do {}while(0)
    55 
    56  #define VBOXQGL_CHECKERR(_op) \
    57     do { \
    58         _op \
    59     }while(0)
    60 #endif
    61 
    62 #ifdef DEBUG
    63 #include <iprt/time.h>
    64 
    65 #define VBOXGETTIME() RTTimeNanoTS()
    66 
    67 #define VBOXPRINTDIF(_nano, _m) do{\
    68         uint64_t cur = VBOXGETTIME(); \
    69         VBOXQGLLOG(_m); \
    70         VBOXQGLLOG(("(%Lu)\n", cur - (_nano))); \
    71     }while(0)
    72 
    73 class VBoxVHWADbgTimeCounter
    74 {
    75 public:
    76     VBoxVHWADbgTimeCounter(const char* msg) {mTime = VBOXGETTIME(); mMsg=msg;}
    77     ~VBoxVHWADbgTimeCounter() {VBOXPRINTDIF(mTime, (mMsg));}
    78 private:
    79     uint64_t mTime;
    80     const char* mMsg;
    81 };
    82 
    83 #define VBOXQGLLOG_METHODTIME(_m) VBoxVHWADbgTimeCounter _dbgTimeCounter(_m)
    84 
    85 #define VBOXQG_CHECKCONTEXT() \
    86         { \
    87             const GLubyte * str; \
    88             VBOXQGL_CHECKERR(   \
    89                     str = glGetString(GL_VERSION); \
    90             ); \
    91             Assert(str); \
    92             if(str) \
    93             { \
    94                 Assert(str[0]); \
    95             } \
    96         }
    97 #else
    98 #define VBOXQGLLOG_METHODTIME(_m)
    99 #define VBOXQG_CHECKCONTEXT() do{}while(0)
    100 #endif
    101 
    102 #define VBOXQGLLOG_QRECT(_p, _pr, _s) do{\
    103     VBOXQGLLOG((_p " x(%d), y(%d), w(%d), h(%d)" _s, (_pr)->x(), (_pr)->y(), (_pr)->width(), (_pr)->height()));\
    104     }while(0)
    105 
    106 #define VBOXQGLLOG_CKEY(_p, _pck, _s) do{\
    107     VBOXQGLLOG((_p " l(0x%x), u(0x%x)" _s, (_pck)->lower(), (_pck)->upper()));\
    108     }while(0)
    10926
    11027typedef char GLchar;
  • trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk

    r23740 r23746  
    688688#  VBoxOGL2D_LRCTOOL = QT4
    689689  VBoxOGL2D_SDKS = QT4
    690   VBoxOGL2D_DEFS = IN_RING3 QT_NO_DEBUG QT_THREAD_SUPPORT QT_SHARED HAVE_CONFIG_H $(ARCH_BITS_DEFS)
     690  VBoxOGL2D_DEFS = IN_RING3 QT_NO_DEBUG QT_THREAD_SUPPORT QT_SHARED HAVE_CONFIG_H $(ARCH_BITS_DEFS) VBOX_WITH_VIDEOHWACCEL VBOX_GUI_USE_QGL
    691691  VBoxOGL2D_QT_MODULES += OpenGL
    692692  VBoxOGL2D_SOURCES = \
    693693      src/VBoxGLSupportInfo.cpp
     694  VBoxOGL2D_INCS = include
    694695 endif
    695696endif
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxFBOverlay.h

    r23740 r23746  
    2222#ifndef __VBoxFBOverlay_h__
    2323#define __VBoxFBOverlay_h__
    24 #if defined (VBOX_GUI_USE_QGL)
     24#if defined (VBOX_GUI_USE_QGL) || defined(VBOX_WITH_VIDEOHWACCEL)
    2525
    2626//#define VBOXQGL_PROF_BASE 1
     
    3333
    3434#include <VBox/VBoxGL2D.h>
     35#include "VBoxFBOverlayCommon.h"
    3536
    3637#define VBOXVHWA_ALLOW_PRIMARY_AND_OVERLAY_ONLY 1
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGLSupportInfo.cpp

    r23743 r23746  
    3535
    3636#include <VBox/VBoxGL2D.h>
     37#include "VBoxFBOverlayCommon.h"
    3738
    3839/*****************/
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