OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WebGLGetBufferSubDataAsync_h | 5 #ifndef WebGLGetBufferSubDataAsync_h |
6 #define WebGLGetBufferSubDataAsync_h | 6 #define WebGLGetBufferSubDataAsync_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
9 #include "core/dom/NotShared.h" | |
10 #include "modules/webgl/WebGLExtension.h" | 9 #include "modules/webgl/WebGLExtension.h" |
11 | 10 |
12 namespace blink { | 11 namespace blink { |
13 | 12 |
14 class WebGL2RenderingContextBase; | 13 class WebGL2RenderingContextBase; |
15 | 14 |
16 class WebGLGetBufferSubDataAsync final : public WebGLExtension { | 15 class WebGLGetBufferSubDataAsync final : public WebGLExtension { |
17 DEFINE_WRAPPERTYPEINFO(); | 16 DEFINE_WRAPPERTYPEINFO(); |
18 | 17 |
19 public: | 18 public: |
20 static WebGLGetBufferSubDataAsync* Create(WebGLRenderingContextBase*); | 19 static WebGLGetBufferSubDataAsync* Create(WebGLRenderingContextBase*); |
21 static bool Supported(WebGLRenderingContextBase*); | 20 static bool Supported(WebGLRenderingContextBase*); |
22 static const char* ExtensionName(); | 21 static const char* ExtensionName(); |
23 | 22 |
24 WebGLExtensionName GetName() const override; | 23 WebGLExtensionName GetName() const override; |
25 | 24 |
26 ScriptPromise getBufferSubDataAsync(ScriptState*, | 25 ScriptPromise getBufferSubDataAsync(ScriptState*, |
27 GLenum target, | 26 GLenum target, |
28 GLintptr src_byte_offset, | 27 GLintptr src_byte_offset, |
29 NotShared<DOMArrayBufferView>, | 28 DOMArrayBufferView*, |
30 GLuint dst_offset, | 29 GLuint dst_offset, |
31 GLuint length); | 30 GLuint length); |
32 | 31 |
33 private: | 32 private: |
34 explicit WebGLGetBufferSubDataAsync(WebGLRenderingContextBase*); | 33 explicit WebGLGetBufferSubDataAsync(WebGLRenderingContextBase*); |
35 }; | 34 }; |
36 | 35 |
37 class WebGLGetBufferSubDataAsyncCallback | 36 class WebGLGetBufferSubDataAsyncCallback |
38 : public GarbageCollected<WebGLGetBufferSubDataAsyncCallback> { | 37 : public GarbageCollected<WebGLGetBufferSubDataAsyncCallback> { |
39 public: | 38 public: |
(...skipping 24 matching lines...) Expand all Loading... |
64 Member<DOMArrayBufferView> destination_array_buffer_view_; | 63 Member<DOMArrayBufferView> destination_array_buffer_view_; |
65 // Pointer into the offset into destinationArrayBufferView. | 64 // Pointer into the offset into destinationArrayBufferView. |
66 void* destination_data_ptr_; | 65 void* destination_data_ptr_; |
67 // Size in bytes of the copy operation being performed. | 66 // Size in bytes of the copy operation being performed. |
68 long long destination_byte_length_; | 67 long long destination_byte_length_; |
69 }; | 68 }; |
70 | 69 |
71 } // namespace blink | 70 } // namespace blink |
72 | 71 |
73 #endif // WebGLGetBufferSubDataAsync_h | 72 #endif // WebGLGetBufferSubDataAsync_h |
OLD | NEW |