naiveproxy/ui/gfx/image/mojo/image.mojom

33 lines
1.0 KiB
Plaintext
Raw Normal View History

2018-02-02 13:49:39 +03:00
// Copyright 2017 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.
module gfx.mojom;
// Mojo transport for a SkBitmap via shared buffer.
// TODO: Merge into bitmap.mojom in skia and maybe share pixel buffer directly
// to make less copies.
struct SharedBufferSkBitmap {
// Shared buffer handle to hold a serialized SkBitmap.
handle<shared_buffer> shared_buffer_handle;
// Byte size of the shared buffer.
uint64 buffer_byte_size;
};
// Mojo transport for an ImageSkiaRep using SharedBufferSkBitmap.
struct ImageSkiaRep {
// Transport of the bitmap in this representation.
SharedBufferSkBitmap bitmap;
// Corresponding scale of the bitmap or 0 if unscaled.
float scale;
};
// Mojo transport for an ImageSkia via shared buffer. Note that transporting an
// ImageSkia over mojo will load all of its image representations for supported
// scales.
struct ImageSkia {
array<ImageSkiaRep> image_reps;
};