// services/viz/public/mojom/compositing/internal/singleplanar_format.mojom.js is auto generated by mojom_bindings_generator.py, do not edit

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

'use strict';

(function() {
  var mojomId = 'services/viz/public/mojom/compositing/internal/singleplanar_format.mojom';
  if (mojo.internal.isMojomLoaded(mojomId)) {
    console.warn('The following mojom is loaded multiple times: ' + mojomId);
    return;
  }
  mojo.internal.markMojomLoaded(mojomId);
  var bindings = mojo;
  var associatedBindings = mojo;
  var codec = mojo.internal;
  var validator = mojo.internal;

  var exports = mojo.internal.exposeNamespace('viz.mojom');


  var SingleplanarFormat = {};
  SingleplanarFormat.RGBA_8888 = 0;
  SingleplanarFormat.RGBA_4444 = 1;
  SingleplanarFormat.BGRA_8888 = 2;
  SingleplanarFormat.ALPHA_8 = 3;
  SingleplanarFormat.BGR_565 = 4;
  SingleplanarFormat.ETC1 = 5;
  SingleplanarFormat.R_8 = 6;
  SingleplanarFormat.RG_88 = 7;
  SingleplanarFormat.LUMINANCE_F16 = 8;
  SingleplanarFormat.RGBA_F16 = 9;
  SingleplanarFormat.R_16 = 10;
  SingleplanarFormat.RG_1616 = 11;
  SingleplanarFormat.RGBX_8888 = 12;
  SingleplanarFormat.BGRX_8888 = 13;
  SingleplanarFormat.RGBA_1010102 = 14;
  SingleplanarFormat.BGRA_1010102 = 15;
  SingleplanarFormat.R_F16 = 16;
  SingleplanarFormat.MIN_VALUE = 0;
  SingleplanarFormat.MAX_VALUE = 16;

  SingleplanarFormat.isKnownEnumValue = function(value) {
    switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
    case 7:
    case 8:
    case 9:
    case 10:
    case 11:
    case 12:
    case 13:
    case 14:
    case 15:
    case 16:
      return true;
    }
    return false;
  };

  SingleplanarFormat.toKnownEnumValue = function(value) {
    return value;
  };

  SingleplanarFormat.validate = function(enumValue) {
    const isExtensible = false;
    if (isExtensible || this.isKnownEnumValue(enumValue))
      return validator.validationError.NONE;

    return validator.validationError.UNKNOWN_ENUM_VALUE;
  };

  exports.SingleplanarFormat = SingleplanarFormat;
})();