mirror of
https://github.com/yshui/picom.git
synced 2025-04-14 17:53:25 -04:00
api/backend: backend_command doesn't need to be here
It's not part of the public backend API. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
e4eef7541d
commit
f326ad68ba
4 changed files with 45 additions and 43 deletions
|
@ -172,49 +172,6 @@ enum backend_image_capability {
|
|||
BACKEND_IMAGE_CAP_DST = 1 << 1,
|
||||
};
|
||||
|
||||
enum backend_command_op {
|
||||
BACKEND_COMMAND_INVALID = -1,
|
||||
BACKEND_COMMAND_BLIT,
|
||||
BACKEND_COMMAND_BLUR,
|
||||
BACKEND_COMMAND_COPY_AREA,
|
||||
};
|
||||
|
||||
/// Symbolic references used as render command source images. The actual `image_handle`
|
||||
/// will later be filled in by the renderer using this symbolic reference.
|
||||
enum backend_command_source {
|
||||
BACKEND_COMMAND_SOURCE_WINDOW,
|
||||
BACKEND_COMMAND_SOURCE_WINDOW_SAVED,
|
||||
BACKEND_COMMAND_SOURCE_SHADOW,
|
||||
BACKEND_COMMAND_SOURCE_BACKGROUND,
|
||||
};
|
||||
|
||||
// TODO(yshui) might need better names
|
||||
|
||||
struct backend_command {
|
||||
enum backend_command_op op;
|
||||
ivec2 origin;
|
||||
enum backend_command_source source;
|
||||
union {
|
||||
struct {
|
||||
struct backend_blit_args blit;
|
||||
/// Region of the screen that will be covered by this blit
|
||||
/// operations, in screen coordinates.
|
||||
region_t opaque_region;
|
||||
};
|
||||
struct {
|
||||
image_handle source_image;
|
||||
const region_t *region;
|
||||
} copy_area;
|
||||
struct backend_blur_args blur;
|
||||
};
|
||||
/// Source mask for the operation.
|
||||
/// If the `source_mask` of the operation's argument points to this, a mask image
|
||||
/// will be created for the operation for the renderer.
|
||||
struct backend_mask_image source_mask;
|
||||
/// Target mask for the operation.
|
||||
region_t target_mask;
|
||||
};
|
||||
|
||||
enum backend_quirk {
|
||||
/// Backend cannot do blur quickly. The compositor will avoid using blur to create
|
||||
/// shadows on this backend
|
||||
|
|
|
@ -9,6 +9,49 @@
|
|||
|
||||
#include "log.h"
|
||||
|
||||
enum backend_command_op {
|
||||
BACKEND_COMMAND_INVALID = -1,
|
||||
BACKEND_COMMAND_BLIT,
|
||||
BACKEND_COMMAND_BLUR,
|
||||
BACKEND_COMMAND_COPY_AREA,
|
||||
};
|
||||
|
||||
/// Symbolic references used as render command source images. The actual `image_handle`
|
||||
/// will later be filled in by the renderer using this symbolic reference.
|
||||
enum backend_command_source {
|
||||
BACKEND_COMMAND_SOURCE_WINDOW,
|
||||
BACKEND_COMMAND_SOURCE_WINDOW_SAVED,
|
||||
BACKEND_COMMAND_SOURCE_SHADOW,
|
||||
BACKEND_COMMAND_SOURCE_BACKGROUND,
|
||||
};
|
||||
|
||||
// TODO(yshui) might need better names
|
||||
|
||||
struct backend_command {
|
||||
enum backend_command_op op;
|
||||
ivec2 origin;
|
||||
enum backend_command_source source;
|
||||
union {
|
||||
struct {
|
||||
struct backend_blit_args blit;
|
||||
/// Region of the screen that will be covered by this blit
|
||||
/// operations, in screen coordinates.
|
||||
region_t opaque_region;
|
||||
};
|
||||
struct {
|
||||
image_handle source_image;
|
||||
const region_t *region;
|
||||
} copy_area;
|
||||
struct backend_blur_args blur;
|
||||
};
|
||||
/// Source mask for the operation.
|
||||
/// If the `source_mask` of the operation's argument points to this, a mask image
|
||||
/// will be created for the operation for the renderer.
|
||||
struct backend_mask_image source_mask;
|
||||
/// Target mask for the operation.
|
||||
region_t target_mask;
|
||||
};
|
||||
|
||||
bool backend_execute(struct backend_base *backend, image_handle target, unsigned ncmds,
|
||||
const struct backend_command cmds[ncmds]);
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
// Copyright (c) Yuxuan Shui <yshuiv7@gmail.com>
|
||||
|
||||
#include "backend/backend.h"
|
||||
#include "common.h"
|
||||
#include "layout.h"
|
||||
#include "utils/dynarr.h"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
// Copyright (c) Yuxuan Shui <yshuiv7@gmail.com>
|
||||
|
||||
#include "backend/backend.h"
|
||||
#include "layout.h"
|
||||
#include "region.h"
|
||||
#include "utils/dynarr.h"
|
||||
|
|
Loading…
Add table
Reference in a new issue