<commit_before>import mapWebGLBlendModesToPixi from './utils/mapWebGLBlendModesToPixi';
import System from '../System';
import State from './State';

const BLEND = 0;
const OFFSET = 1;
const CULLING = 2;
const DEPTH_TEST = 3;
const WINDING = 4;

/**
 * System plugin to the renderer to manage WebGL state machines.
 *
 * @class
 * @extends PIXI.System
 * @memberof PIXI.systems
 */
export default class StateSystem extends System
{
    /**
     * @param {PIXI.Renderer} renderer - The renderer this System works for.
     */
    constructor(renderer)
    {
        super(renderer);

        /**
         * GL context
         * @member {WebGLRenderingContext}
         * @readonly
         */
        this.gl = null;

        /**
         * Return from MAX_VERTEX_ATTRIBS
         * @member {number}
         * @readonly
         */
        this.maxAttribs = null;

        /**
         * Check we have vao
         * @member {OES_vertex_array_object}
         * @readonly
         */
        this.nativeVaoExtension = null;

        /**
         * Attribute state
         * @member {object}
         * @readonly
         * @property {number[]} tempAttribState
         * @property {number[]} attribState
         */
        this.attribState = null;

        /**
         * State ID
         * @member {number}
         * @readonly
         */
        this.stateId = 0;

        /**
         * Polygon offset
         * @member {number}
         * @readonly
         */
        this.polygonOffset = 0;

        /**
         * Blend mode
         * @member {number}
         * @default 17
         * @readonly
         */
        this.blendMode = 17;

        /**
         * Collection of calls
         * @member {function[]}
         * @readonly
         */
        this.map = [];

        // map functions for when we set state..
        this.map[BLEND] = this.setBlend;
        this.map[OFFSET] = this.setOffset;
        this.map[CULLING] = this.setCullFace;
        this.map[DEPTH_TEST] = this.setDepthTest;
        this.map[WINDING] = this.setFrontFace;

        /**
         * Collection of check calls<commit_msg>Fix follow up to Blend Modes None (#5392)<commit_after>import mapWebGLBlendModesToPixi from './utils/mapWebGLBlendModesToPixi';
import System from '../System';
import State from './State';
import { BLEND_MODES } from '@pixi/constants';

const BLEND = 0;
const OFFSET = 1;
const CULLING = 2;
const DEPTH_TEST = 3;
const WINDING = 4;

/**
 * System plugin to the renderer to manage WebGL state machines.
 *
 * @class
 * @extends PIXI.System
 * @memberof PIXI.systems
 */
export default class StateSystem extends System
{
    /**
     * @param {PIXI.Renderer} renderer - The renderer this System works for.
     */
    constructor(renderer)
    {
        super(renderer);

        /**
         * GL context
         * @member {WebGLRenderingContext}
         * @readonly
         */
        this.gl = null;

        /**
         * Return from MAX_VERTEX_ATTRIBS
         * @member {number}
         * @readonly
         */
        this.maxAttribs = null;

        /**
         * Check we have vao
         * @member {OES_vertex_array_object}
         * @readonly
         */
        this.nativeVaoExtension = null;

        /**
         * Attribute state
         * @member {object}
         * @readonly
         * @property {number[]} tempAttribState
         * @property {number[]} attribState
         */
        this.attribState = null;

        /**
         * State ID
         * @member {number}
         * @readonly
         */
        this.stateId = 0;

        /**
         * Polygon offset
         * @member {number}
         * @readonly
         */
        this.polygonOffset = 0;

        /**
         * Blend mode
         * @member {number}
         * @default PIXI.BLEND_MODES.NONE
         * @readonly
         */
        this.blendMode = BLEND_MODES.NONE;

        /**
         * Collection of calls
         * @member {function[]}
         * @readonly
         */
        this.map = [];

        // map functions for when we set state..
        this.map[BLEND] = this.setBlend;
        this.map[OFFSET] = this.setOffset;
        this.map[CULLING] = this.setCullFace;
        this.map[DEPTH_TEST] = this.setDepthTest;
        this.map[WINDING] = this.setFrontFace;

        /**
         * Collection of check calls
{'fraction_non_alphanumeric': 0.11379310344827587, 'fraction_numerical': 0.005057471264367816, 'mean_word_length': 1.5715130023640662, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '807579', 'n_tokens_mistral': 1338, 'n_tokens_neox': 1280, 'n_words': 304}