| 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 name() const override; | 24 WebGLExtensionName name() const override; |
| 24 | 25 |
| 25 ScriptPromise getBufferSubDataAsync(ScriptState*, | 26 ScriptPromise getBufferSubDataAsync(ScriptState*, |
| 26 GLenum target, | 27 GLenum target, |
| 27 GLintptr srcByteOffset, | 28 GLintptr srcByteOffset, |
| 28 DOMArrayBufferView*, | 29 const NotShared<DOMArrayBufferView>&, |
| 29 GLuint dstOffset, | 30 GLuint dstOffset, |
| 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> m_destinationArrayBufferView; | 64 Member<DOMArrayBufferView> m_destinationArrayBufferView; |
| 64 // Pointer into the offset into destinationArrayBufferView. | 65 // Pointer into the offset into destinationArrayBufferView. |
| 65 void* m_destinationDataPtr; | 66 void* m_destinationDataPtr; |
| 66 // Size in bytes of the copy operation being performed. | 67 // Size in bytes of the copy operation being performed. |
| 67 long long m_destinationByteLength; | 68 long long m_destinationByteLength; |
| 68 }; | 69 }; |
| 69 | 70 |
| 70 } // namespace blink | 71 } // namespace blink |
| 71 | 72 |
| 72 #endif // WebGLGetBufferSubDataAsync_h | 73 #endif // WebGLGetBufferSubDataAsync_h |
| OLD | NEW |