GPUQuerySetDescriptor.js 638 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /**
  2. * Reusable descriptor for `GPUDevice.createQuerySet()`.
  3. *
  4. * @private
  5. */
  6. class GPUQuerySetDescriptor {
  7. constructor() {
  8. /**
  9. * The label of the query set.
  10. *
  11. * @type {string}
  12. */
  13. this.label = '';
  14. /**
  15. * The type of queries managed by the set.
  16. *
  17. * @type {string|undefined}
  18. */
  19. this.type = undefined;
  20. /**
  21. * The number of queries managed by the set.
  22. *
  23. * @type {number}
  24. * @default 0
  25. */
  26. this.count = 0;
  27. }
  28. /**
  29. * Resets the descriptor to its default state.
  30. */
  31. reset() {
  32. this.label = '';
  33. this.type = undefined;
  34. this.count = 0;
  35. }
  36. }
  37. export default GPUQuerySetDescriptor;
粤ICP备19079148号