1// Copyright 2017 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5module viz.mojom; 6 7import "gpu/ipc/common/mailbox.mojom"; 8import "gpu/ipc/common/sync_token.mojom"; 9import "services/viz/public/mojom/compositing/texture_releaser.mojom"; 10import "skia/public/mojom/bitmap.mojom"; 11import "ui/gfx/geometry/mojom/geometry.mojom"; 12import "ui/gfx/mojom/color_space.mojom"; 13 14// See components/viz/common/frame_sinks/copy_output_result.h. 15enum CopyOutputResultFormat { 16 RGBA_BITMAP, 17 RGBA_TEXTURE, 18}; 19 20// See components/viz/common/frame_sinks/copy_output_result.h. 21struct CopyOutputResult { 22 CopyOutputResultFormat format; 23 gfx.mojom.Rect rect; 24 25 // Present when the format is RGBA_BITMAP. 26 // If the result is empty, since Bitmap is nullable, |bitmap| will also not be 27 // present. 28 skia.mojom.Bitmap? bitmap; 29 30 // Present when the format is RGBA_TEXTURE. 31 // If the result is empty, then the |mailbox| will be present but empty. 32 gpu.mojom.Mailbox? mailbox; 33 gpu.mojom.SyncToken? sync_token; 34 gfx.mojom.ColorSpace? color_space; 35 // Present when the format is RGBA_TEXTURE and |mailbox| is non-empty. 36 pending_remote<TextureReleaser>? releaser; 37}; 38