1 // Copyright 2019 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_WEBGPU_GPU_BUFFER_USAGE_H_
6 #define THIRD_PARTY_BLINK_RENDERER_MODULES_WEBGPU_GPU_BUFFER_USAGE_H_
7 
8 #include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
9 
10 namespace blink {
11 
12 class GPUBufferUsage : public ScriptWrappable {
13   DEFINE_WRAPPERTYPEINFO();
14 
15  public:
16   // gpu_buffer_usage.idl
17   static constexpr uint32_t kMapRead = 1;
18   static constexpr uint32_t kMapWrite = 2;
19   static constexpr uint32_t kCopySrc = 4;
20   static constexpr uint32_t kCopyDst = 8;
21   static constexpr uint32_t kIndex = 16;
22   static constexpr uint32_t kVertex = 32;
23   static constexpr uint32_t kUniform = 64;
24   static constexpr uint32_t kStorage = 128;
25   static constexpr uint32_t kIndirect = 256;
26 
27  private:
28   DISALLOW_COPY_AND_ASSIGN(GPUBufferUsage);
29 };
30 
31 }  // namespace blink
32 
33 #endif  // THIRD_PARTY_BLINK_RENDERER_MODULES_WEBGPU_GPU_BUFFER_USAGE_H_
34