blob: b02833af03fc8792aea533f8655f07544fa748e9 [file] [log] [blame]
// 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.
// This file contains structures used to represent SkBitmaps in Mojo.
module skia.mojom;
// Mirror of SkColorType.
enum ColorType {
UNKNOWN,
ALPHA_8,
RGB_565,
ARGB_4444,
RGBA_8888,
BGRA_8888,
INDEX_8,
GRAY_8,
};
// Mirror of SkAlphaType.
enum AlphaType {
UNKNOWN,
ALPHA_TYPE_OPAQUE,
PREMUL,
UNPREMUL,
};
// Capture of the (simple) gamma of SkColorSpace. Need to eventually
// serialize the actual colorspace object.
enum ColorProfileType {
LINEAR,
SRGB,
};
struct Bitmap {
ColorType color_type;
AlphaType alpha_type;
ColorProfileType profile_type;
uint32 width;
uint32 height;
uint64 row_bytes;
array<uint8> pixel_data;
};