summaryrefslogtreecommitdiff
path: root/subprojects/packagefiles/libplacebo/cache_ref_rect.diff
blob: 647d637d8a2d2ea7685238b12895c24c78fd2e53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff --git a/src/renderer.c b/src/renderer.c
index 7622523..54869b9 100644
--- a/src/renderer.c
+++ b/src/renderer.c
@@ -31,6 +31,7 @@ struct cached_frame {
     struct pl_color_space color;
     struct pl_icc_profile profile;
     pl_rect2df crop;
+    pl_rect2df ref_rect;
     pl_tex tex;
     int comps;
     bool evict; // for garbage collection
@@ -3473,6 +3474,7 @@ retry:
             can_reuse = f->tex->params.w == out_w &&
                         f->tex->params.h == out_h &&
                         pl_rect2d_eq(f->crop, img->crop) &&
+                        pl_rect2d_eq(f->ref_rect, pass.ref_rect) &&
                         f->params_hash == par_info.hash &&
                         pl_color_space_equal(&f->color, &target->color) &&
                         pl_icc_profile_equal(&f->profile, &target->profile);
@@ -3568,6 +3570,7 @@ retry:
 
             f->params_hash = par_info.hash;
             f->crop = img->crop;
+            f->ref_rect = pass.ref_rect;
             f->color = inter_pass.img.color;
             f->comps = inter_pass.img.comps;
             f->profile = target->profile;