cyclerHolder.I 607 B

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * PANDA 3D SOFTWARE
  3. * Copyright (c) Carnegie Mellon University. All rights reserved.
  4. *
  5. * All use of this software is subject to the terms of the revised BSD
  6. * license. You should have received a copy of this license along
  7. * with this source code in a file named "LICENSE."
  8. *
  9. * @file cyclerHolder.I
  10. * @author drose
  11. * @date 2006-02-09
  12. */
  13. /**
  14. *
  15. */
  16. INLINE CyclerHolder::
  17. CyclerHolder(PipelineCyclerBase &cycler) {
  18. #ifdef DO_PIPELINING
  19. _cycler = &cycler;
  20. _cycler->acquire();
  21. #endif
  22. }
  23. /**
  24. *
  25. */
  26. INLINE CyclerHolder::
  27. ~CyclerHolder() {
  28. #ifdef DO_PIPELINING
  29. _cycler->release();
  30. #endif
  31. }