author Oleg Romashin <>
Sat, 22 Nov 2014 12:15:00 +0100
changeset 219062 cadfee0aa2af0fa0c5d3e192423024d417b3183a
parent 218929 c9c62f7fb8b236f7dd1a89e04f2eea2cb68af575
child 234479 0b0c492a33b545fb9daa9b041969e17b5dcbe00e
permissions -rw-r--r--
Bug 1103412 - Gecko does not compile with printing disabled. r=mconley

/* -*- 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 */

#ifndef WEBGL_1_CONTEXT_H_
#define WEBGL_1_CONTEXT_H_

#include "WebGLContext.h"

namespace mozilla {

class WebGL1Context
    : public WebGLContext
    static WebGL1Context* Create();


    virtual ~WebGL1Context();

    virtual bool IsWebGL2() const MOZ_OVERRIDE {
        return false;

    // nsWrapperCache
    virtual JSObject* WrapObject(JSContext* cx) MOZ_OVERRIDE;

    virtual bool ValidateAttribPointerType(bool integerMode, GLenum type, GLsizei* alignment, const char* info) MOZ_OVERRIDE;
    virtual bool ValidateBufferTarget(GLenum target, const char* info) MOZ_OVERRIDE;
    virtual bool ValidateBufferIndexedTarget(GLenum target, const char* info) MOZ_OVERRIDE;
    virtual bool ValidateBufferForTarget(GLenum target, WebGLBuffer* buffer, const char* info) MOZ_OVERRIDE;

} // namespace mozilla

#endif // WEBGL_1_CONTEXT_H_