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" |
9 #include "modules/webgl/WebGLExtension.h" | 10 #include "modules/webgl/WebGLExtension.h" |
10 | 11 |
11 namespace blink { | 12 namespace blink { |
12 | 13 |
13 class WebGL2RenderingContextBase; | 14 class WebGL2RenderingContextBase; |
14 | 15 |
15 class WebGLGetBufferSubDataAsync final : public WebGLExtension { | 16 class WebGLGetBufferSubDataAsync final : public WebGLExtension { |
16 DEFINE_WRAPPERTYPEINFO(); | 17 DEFINE_WRAPPERTYPEINFO(); |
17 | 18 |
18 public: | 19 public: |
19 static WebGLGetBufferSubDataAsync* Create(WebGLRenderingContextBase*); | 20 static WebGLGetBufferSubDataAsync* Create(WebGLRenderingContextBase*); |
20 static bool Supported(WebGLRenderingContextBase*); | 21 static bool Supported(WebGLRenderingContextBase*); |
21 static const char* ExtensionName(); | 22 static const char* ExtensionName(); |
22 | 23 |
23 WebGLExtensionName GetName() const override; | 24 WebGLExtensionName GetName() const override; |
24 | 25 |
25 ScriptPromise getBufferSubDataAsync(ScriptState*, | 26 ScriptPromise getBufferSubDataAsync(ScriptState*, |
26 GLenum target, | 27 GLenum target, |
27 GLintptr src_byte_offset, | 28 GLintptr src_byte_offset, |
28 DOMArrayBufferView*, | 29 NotShared<DOMArrayBufferView>, |
29 GLuint dst_offset, | 30 GLuint dst_offset, |
30 GLuint length); | 31 GLuint length); |
31 | 32 |
32 private: | 33 private: |
33 explicit WebGLGetBufferSubDataAsync(WebGLRenderingContextBase*); | 34 explicit WebGLGetBufferSubDataAsync(WebGLRenderingContextBase*); |
34 }; | 35 }; |
35 | 36 |
36 class WebGLGetBufferSubDataAsyncCallback | 37 class WebGLGetBufferSubDataAsyncCallback |
37 : public GarbageCollected<WebGLGetBufferSubDataAsyncCallback> { | 38 : public GarbageCollected<WebGLGetBufferSubDataAsyncCallback> { |
38 public: | 39 public: |
(...skipping 24 matching lines...) Expand all Loading... |
63 Member<DOMArrayBufferView> destination_array_buffer_view_; | 64 Member<DOMArrayBufferView> destination_array_buffer_view_; |
64 // Pointer into the offset into destinationArrayBufferView. | 65 // Pointer into the offset into destinationArrayBufferView. |
65 void* destination_data_ptr_; | 66 void* destination_data_ptr_; |
66 // Size in bytes of the copy operation being performed. | 67 // Size in bytes of the copy operation being performed. |
67 long long destination_byte_length_; | 68 long long destination_byte_length_; |
68 }; | 69 }; |
69 | 70 |
70 } // namespace blink | 71 } // namespace blink |
71 | 72 |
72 #endif // WebGLGetBufferSubDataAsync_h | 73 #endif // WebGLGetBufferSubDataAsync_h |
OLD | NEW |