summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/Source/modules/webgl/WebGLSync.h
blob: 1668130295abd0c315a16f42f4a22ebc4c3fe7b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef WebGLSync_h
#define WebGLSync_h

#include "modules/webgl/WebGLSharedObject.h"
#include "public/platform/WebGraphicsContext3D.h"

namespace blink {

class WebGL2RenderingContextBase;

class WebGLSync : public WebGLSharedObject {
    DEFINE_WRAPPERTYPEINFO();
public:
    ~WebGLSync() override;

    WGC3Dsync object() const { return m_object; }

protected:
    WebGLSync(WebGL2RenderingContextBase*, WGC3Dsync, GLenum objectType);

    bool hasObject() const override { return m_object != 0; }
    void deleteObjectImpl(WebGraphicsContext3D*) override;

    GLenum objectType() const { return m_objectType; }

private:
    bool isSync() const override { return true; }

    WGC3Dsync m_object;
    GLenum m_objectType;
};

} // namespace blink

#endif // WebGLSync_h