Chromium Code Reviews| 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 "modules/webgl/WebGLSharedObject.h" | 8 #include "modules/webgl/WebGLSharedObject.h" |
| 9 #include "public/platform/WebGraphicsContext3D.h" | 9 #include "public/platform/WebGraphicsContext3D.h" |
| 10 #include "third_party/khronos/GLES2/gl2.h" | |
| 10 | 11 |
| 11 namespace blink { | 12 namespace blink { |
| 12 | 13 |
| 13 class WebGL2RenderingContextBase; | 14 class WebGL2RenderingContextBase; |
| 14 | 15 |
| 15 class WebGLSync : public WebGLSharedObject { | 16 class WebGLSync : public WebGLSharedObject { |
| 16 DEFINE_WRAPPERTYPEINFO(); | 17 DEFINE_WRAPPERTYPEINFO(); |
| 17 public: | 18 public: |
| 18 ~WebGLSync() override; | 19 ~WebGLSync() override; |
| 19 | 20 |
| 20 WGC3Dsync object() const { return m_object; } | 21 GLsync object() const { return m_object; } |
| 21 | 22 |
| 22 protected: | 23 protected: |
| 23 WebGLSync(WebGL2RenderingContextBase*, WGC3Dsync, GLenum objectType); | 24 WebGLSync(WebGL2RenderingContextBase*, GLsync, GLenum objectType); |
| 24 | 25 |
| 25 bool hasObject() const override { return m_object != 0; } | 26 bool hasObject() const override { return m_object != nullptr; } |
| 26 void deleteObjectImpl(WebGraphicsContext3D*, gpu::gles2::GLES2Interface*) ov erride; | 27 void deleteObjectImpl(WebGraphicsContext3D*, gpu::gles2::GLES2Interface*) ov erride; |
| 27 | 28 |
| 28 GLenum objectType() const { return m_objectType; } | 29 GLenum objectType() const { return m_objectType; } |
| 29 | 30 |
| 30 private: | 31 private: |
| 31 bool isSync() const override { return true; } | 32 bool isSync() const override { return true; } |
| 32 | 33 |
| 33 WGC3Dsync m_object; | 34 GLsync m_object; |
|
piman
2016/03/19 01:28:35
nit: is WGC3Dsync still used anywhere? If not, rem
danakj
2016/03/21 22:02:38
Done.
| |
| 34 GLenum m_objectType; | 35 GLenum m_objectType; |
| 35 }; | 36 }; |
| 36 | 37 |
| 37 } // namespace blink | 38 } // namespace blink |
| 38 | 39 |
| 39 #endif // WebGLSync_h | 40 #endif // WebGLSync_h |
| OLD | NEW |