mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-03-20 05:34:19 -04:00
output: move scaling to output instead of view
This commit is contained in:
parent
0e9dae18e6
commit
0489045405
2 changed files with 3 additions and 4 deletions
|
|
@ -28,6 +28,7 @@
|
||||||
|
|
||||||
#include "output.h"
|
#include "output.h"
|
||||||
#include "renderer.h"
|
#include "renderer.h"
|
||||||
|
#include "util.h"
|
||||||
#include "view.h"
|
#include "view.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -45,6 +46,7 @@ cage_output_damage_region(struct cg_output *output, struct wlr_box *region)
|
||||||
assert(region != NULL);
|
assert(region != NULL);
|
||||||
assert(output->wlr_output->enabled);
|
assert(output->wlr_output->enabled);
|
||||||
|
|
||||||
|
scale_box(region, output->wlr_output->scale);
|
||||||
wlr_output_damage_add_box(output->damage, region);
|
wlr_output_damage_add_box(output->damage, region);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
#include <wlr/util/region.h>
|
#include <wlr/util/region.h>
|
||||||
|
|
||||||
#include "output.h"
|
#include "output.h"
|
||||||
#include "util.h"
|
|
||||||
#include "view.h"
|
#include "view.h"
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
|
@ -99,13 +98,11 @@ cage_view_damage_whole(struct cg_view *view)
|
||||||
{
|
{
|
||||||
assert(view != NULL);
|
assert(view != NULL);
|
||||||
assert(view->impl->get_geometry != NULL);
|
assert(view->impl->get_geometry != NULL);
|
||||||
struct cg_output *output = view->output;
|
|
||||||
struct wlr_box box = {0};
|
struct wlr_box box = {0};
|
||||||
|
|
||||||
view->impl->get_geometry(view, &box.width, &box.height);
|
view->impl->get_geometry(view, &box.width, &box.height);
|
||||||
|
|
||||||
scale_box(&box, output->wlr_output->scale);
|
cage_output_damage_region(view->output, &box);
|
||||||
cage_output_damage_region(output, &box);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue