| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 WebGLSync_h | 5 #ifndef WebGLSync_h |
| 6 #define WebGLSync_h | 6 #define WebGLSync_h |
| 7 | 7 |
| 8 #include "core/html/canvas/WebGLSharedObject.h" | 8 #include "core/html/canvas/WebGLSharedObject.h" |
| 9 #include "public/platform/WebGraphicsContext3D.h" | 9 #include "public/platform/WebGraphicsContext3D.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class WebGL2RenderingContextBase; | 13 class WebGL2RenderingContextBase; |
| 14 | 14 |
| 15 class WebGLSync : public WebGLSharedObject { | 15 class WebGLSync : public WebGLSharedObject { |
| 16 DEFINE_WRAPPERTYPEINFO(); | 16 DEFINE_WRAPPERTYPEINFO(); |
| 17 public: | 17 public: |
| 18 ~WebGLSync() override; | 18 ~WebGLSync() override; |
| 19 | 19 |
| 20 WGC3Dsync object() const { return m_object; } | 20 WGC3Dsync object() const { return m_object; } |
| 21 | 21 |
| 22 protected: | 22 protected: |
| 23 WebGLSync(WebGL2RenderingContextBase*, WGC3Dsync, GLenum objectType); | 23 WebGLSync(WebGL2RenderingContextBase*, WGC3Dsync, GLenum objectType); |
| 24 | 24 |
| 25 bool hasObject() const override { return m_object != 0; } | 25 bool hasObject() const override { return m_object != 0; } |
| 26 void deleteObjectImpl(blink::WebGraphicsContext3D*) override; | 26 void deleteObjectImpl(WebGraphicsContext3D*) override; |
| 27 | 27 |
| 28 GLenum objectType() const { return m_objectType; } | 28 GLenum objectType() const { return m_objectType; } |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 bool isSync() const override { return true; } | 31 bool isSync() const override { return true; } |
| 32 | 32 |
| 33 WGC3Dsync m_object; | 33 WGC3Dsync m_object; |
| 34 GLenum m_objectType; | 34 GLenum m_objectType; |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 } // namespace blink | 37 } // namespace blink |
| 38 | 38 |
| 39 #endif // WebGLSync_h | 39 #endif // WebGLSync_h |
| OLD | NEW |