diff options
author | Manuel Castilla <manzanillawork@gmail.com> | 2021-08-26 19:49:40 +0300 |
---|---|---|
committer | Manuel Castilla <manzanillawork@gmail.com> | 2021-08-26 19:49:40 +0300 |
commit | e8f41f1b9399471d83f99914c9a2c5074dc0beb3 (patch) | |
tree | 1e1f69845904d4a8a8258a025d1c7d99872bac09 /source/blender/compositor/operations/COM_RenderLayersProg.cc | |
parent | c8897efa53fd33262433ac0c62b0d39df86bf44f (diff) |
Compositor: Replace resolution concept by canvas
This is a code refactor in preparation of supporting canvas
compositing and fix all cropping issues on full frame implementation.
No functional changes, all canvases are at (0, 0) position matching
tiled implementation.
Diffstat (limited to 'source/blender/compositor/operations/COM_RenderLayersProg.cc')
-rw-r--r-- | source/blender/compositor/operations/COM_RenderLayersProg.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cc b/source/blender/compositor/operations/COM_RenderLayersProg.cc index 72e2c92c9cf..5c8d7aa2936 100644 --- a/source/blender/compositor/operations/COM_RenderLayersProg.cc +++ b/source/blender/compositor/operations/COM_RenderLayersProg.cc @@ -196,15 +196,13 @@ void RenderLayersProg::deinitExecution() } } -void RenderLayersProg::determineResolution(unsigned int resolution[2], - unsigned int /*preferredResolution*/[2]) +void RenderLayersProg::determine_canvas(const rcti &preferred_area, rcti &r_area) { Scene *sce = this->getScene(); Render *re = (sce) ? RE_GetSceneRender(sce) : nullptr; RenderResult *rr = nullptr; - resolution[0] = 0; - resolution[1] = 0; + r_area = COM_AREA_NONE; if (re) { rr = RE_AcquireResultRead(re); @@ -215,8 +213,7 @@ void RenderLayersProg::determineResolution(unsigned int resolution[2], if (view_layer) { RenderLayer *rl = RE_GetRenderLayer(rr, view_layer->name); if (rl) { - resolution[0] = rl->rectx; - resolution[1] = rl->recty; + BLI_rcti_init(&r_area, 0, rl->rectx, 0, rl->recty); } } } |