dom/canvas/WebGLVertexArrayFake.h
author Gurzau Raul <rgurzau@mozilla.com>
Wed, 24 Oct 2018 22:46:34 +0300
changeset 491134 13b39a6aa15fa631096b96d4351c2b1d08a4626e
parent 491129 4b5b1ff23dd7247ed098ac805c60292743f8eb20
child 491138 00540e73e97c2684b19c518fe098c0d8361f334f
permissions -rw-r--r--
Backed out changeset 4b5b1ff23dd7 (bug 1372157) for failing at webgl-conf/generated/test_2_conformance2__vertex_arrays__vertex-array-object.html on a CLOSED TREE

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef WEBGL_VERTEX_ARRAY_FAKE_H_
#define WEBGL_VERTEX_ARRAY_FAKE_H_

#include "WebGLVertexArray.h"

namespace mozilla {

class WebGLVertexArrayFake final
    : public WebGLVertexArray
{
    friend class WebGLVertexArray;

protected:
    virtual void BindVertexArrayImpl() override;
    virtual void DeleteImpl() override;
    virtual void GenVertexArray() override {};
    virtual bool IsVertexArrayImpl() const override;

private:
    explicit WebGLVertexArrayFake(WebGLContext* webgl);

    ~WebGLVertexArrayFake() {
        DeleteOnce();
    }

    bool mIsVAO;
};

} // namespace mozilla

#endif // WEBGL_VERTEX_ARRAY_FAKE_H_