VirtualBox

source: vbox/trunk/src/VBox/GuestHost/OpenGL/packer/pack_init.c@ 78341

Last change on this file since 78341 was 78341, checked in by vboxsync, 6 years ago

Config.kmk,Additions/common/crOpenGL,VBox/GuestHost/OpenGL,HostServices/SharedOpenGL: Remove CHROMIUM_THREADSAFE define and apply the current default

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 1.1 KB
Line 
1/* Copyright (c) 2001, Stanford University
2 * All rights reserved
3 *
4 * See the file LICENSE.txt for information on redistributing this software.
5 */
6
7#include "cr_error.h"
8#include "cr_mem.h"
9#include "packer.h"
10#include <stdio.h>
11
12CRtsd _PackerTSD;
13int cr_packer_globals; /* dummy - for the sake of packer.def */
14uint32_t cr_packer_cmd_blocks_enabled = 0;
15
16CRPackContext *crPackNewContext(void)
17{
18 CRPackContext *pc = crCalloc(sizeof(CRPackContext));
19 if (!pc)
20 return NULL;
21 crInitMutex(&pc->mutex);
22 pc->u32CmdBlockState = 0;
23 pc->Flush = NULL;
24 pc->SendHuge = NULL;
25 pc->updateBBOX = 0;
26 return pc;
27}
28
29void crPackDeleteContext(CRPackContext *pc)
30{
31 crFreeMutex(&pc->mutex);
32 crFree(pc);
33}
34
35/* Set packing context for the calling thread */
36void crPackSetContext( CRPackContext *pc )
37{
38 crSetTSD( &_PackerTSD, pc );
39}
40
41
42/* Return packing context for the calling thread */
43CRPackContext *crPackGetContext( void )
44{
45 return (CRPackContext *) crGetTSD( &_PackerTSD );
46}
47
48void crPackCapsSet(uint32_t u32Caps)
49{
50 cr_packer_cmd_blocks_enabled = (u32Caps & (CR_VBOX_CAP_CMDBLOCKS_FLUSH | CR_VBOX_CAP_CMDBLOCKS));
51}
Note: See TracBrowser for help on using the repository browser.

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