[PATCH weston 1/2] shot: add test for sub-surface with unmapped parent
Emilio Pozuelo Monfort
pochu27 at gmail.com
Fri Jul 6 15:31:14 UTC 2018
This reproduces https://bugs.freedesktop.org/show_bug.cgi?id=94735.
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo at collabora.co.uk>
---
tests/reference/subsurface_mapped-00.png | Bin 0 -> 5294 bytes
tests/reference/subsurface_mapped-01.png | Bin 0 -> 5612 bytes
tests/subsurface-shot-test.c | 76 +++++++++++++++++++++++
3 files changed, 76 insertions(+)
create mode 100644 tests/reference/subsurface_mapped-00.png
create mode 100644 tests/reference/subsurface_mapped-01.png
diff --git a/tests/reference/subsurface_mapped-00.png b/tests/reference/subsurface_mapped-00.png
new file mode 100644
index 0000000000000000000000000000000000000000..22dd566ab8c502c832e1338de9d1e1d27c785c46
GIT binary patch
literal 5294
zcmeHL=Q|q=*H5d}MNxakC^3SdMq}MIyU>B!o7!scQQWjCsZta{t43|*HiH;NiPmkV
zc9kS0LM1{-B(LZF`2Gp+^_+8^@$p<|UB7c)J}@_Bzbtea006Mxxoz|a066p4ssHEV
z*;CE1kk>gitZw&AjR4I5 at cW*s8~}jF{f^Ns%P0hKIoiPz`)gzmUl;1-$v+A6pS8yg
zRV>Lj-m=srdifTH^WJL-8O^Ls7E<zVpK>nnEU*r&&ZQ}KW*6XiDLB}tg2J at -9pZ!A
zPmzgi=Ico;*W at P%hw&(?yB30sICC@}{XN*r#Xqx%3-F#h_Tw%9Fe7%B^}WFV6=$Ll
zF?+|G2WU$W<tgs$2sl)3T at e8ceA4@AviHXD!fQ^Y5pvv5){)?vnz4LY*tHHK`N*r6
zHWyCS05B43^jxg01k<8BLh*JPjQGHYnwr)hoB-dl<0N&n>F{FCklykys8mneG*@WY
zHm4xhW=Lm(9w{{V;pbbbVcx6#>w7<l5mnQhVNl)XI-kNyAIyPv(%m_5G0M-GAv~`Z
zxG(zLui^NW&GRHFNhwwiG5XX!<)JUb!(WEKjA-5{%<!r;23?10R9e+q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3~x|M0~2G{;J=0
zwp)$fvJBptbL{d~w{gFDYk(J=be!UI5N0w|QJtk4?)W&qW}?3OGMZE;`x)_~%Hr&d
zf{sM)6vbU2k6ZBLUt!D4!#B^i&wmOUD4DYki|yID0&tMN|MHA%TGD^zzd88-*8>Oo
ZgGxg0jd>gKrw>TL9b<E&1_PJm{{dIeEKC3Z
literal 0
HcmV?d00001
diff --git a/tests/reference/subsurface_mapped-01.png b/tests/reference/subsurface_mapped-01.png
new file mode 100644
index 0000000000000000000000000000000000000000..39766ceb97af39451f3e44a1dde4c685768452c9
GIT binary patch
literal 5612
zcmdT|_d6Th`;PGvYVQ%elu~<d(poLrC>2_2uM&;DCA3w2QPe24R~3oXShcHKv-XG;
zvzihTTZ!@U{`&n3zVA8be$M&jzRq*q=X$PlpA+{0a)*(gj~)O3FdE-AumAukZe6W+
zfRtD9!c0>8YNByAy<-5l{I?gjm!$y!oJGb4w=F|+w{c;S_wcK|yLj(9v+0yqR!`BT
zrEuwIz|w4v_R>;`sc9<{ndU~0xb}?2qdgeZl(T`o>Rg1=#*%-MO{B;MCMpU{n;khK
zyC at 6HmMVwYACr+M*EIqfc~5?X4fp?u*+ox90|0q5s6`4uxi&S!ErtJ!js*=H16?a6
z<-&3PzK&o5-lY>7?gx<2KcT=fF!CsPr~9hq<F9ott3xu}c9~N}Ig#7Dp}&xOV at tkj
zfD5&ELbcL^4Bhpf*lIS|rLLG^#=40#5Ws1U{1RVWjxqr at r{oawzG9 at i<;SXusm`cC
zOuaQ8QA7R1W1ID3G9`AhnNwa3^V`9#II;NnVu|=YM-l}`o!fS5iTHTgkKBh-T9nLB
zPPjkOQynqy2&sC{Xp!33y+2XgzR=h2KA>qI^R}R)!%(X|o15Gsc_?R{ot at otuj}{T
zlTC;wX_bumYDtxRiwf{CI~u;OQ7H?9m#VQYla5#F={72EHsg~n!@ZYcp$T)1aKD1!
z0){QJ(OwTUQ_(^$-vrm@?l%#oEZNrYsyLjjNSy4#VUgfQkNK8zk8DfV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Q(J`SYn_LmkcU)SHhDk1Y2liYS)5KC|zz9}<{BIzi-%wU%i4M2*nhkBBRK
zq7!kH?iMzbtpX{lL!f&wzpYrW1pmsWr(LY>yH#md!K-;G-?colJJ&W(^a&B<Q3{qG
z#2}GKjPx~7iHWltcu at c#2+WZG@%HAmV*#zQedcvW<YMwyXLYBpQ_?vVrIMl&vyg6X
z$l7$vvj~&(k{-YV!}q5(Z;ta9FuBV)<sxBvLtFbpn|95qY5vRQC<WLM7i4sWp6k|O
zm-6paU;MabiXs%6qJ!zJ=wln)t2FBM=WB~(E3{dmyO~kV-Cdg-J9f<g+8!lD*J~fW
z`SHiZoEGlFj!X$S2I at Nl;)Nam8`y=mQz`e)sF$EZil`aP(c#=CqlKo<P}0{+YS42E
ziP-4>HhQcNnMPxTy`Ut at FLu7vG=)5r|8Yzdn(9GGQ~*o1q%Qyt{r{&RN72pvo|xIt
S_PP4L1sEGb465}UU;GbN*m+3+
literal 0
HcmV?d00001
diff --git a/tests/subsurface-shot-test.c b/tests/subsurface-shot-test.c
index e8bab676..53c54578 100644
--- a/tests/subsurface-shot-test.c
+++ b/tests/subsurface-shot-test.c
@@ -261,3 +261,79 @@ TEST(subsurface_z_order)
if (bufs[i])
buffer_destroy(bufs[i]);
}
+
+TEST(subsurface_mapped)
+{
+ const char *test_name = get_test_name();
+ struct client *client;
+ struct wl_surface *surface;
+ struct rectangle clip;
+ int fail = 0;
+ struct wl_subcompositor *subco;
+ struct wl_surface *child;
+ struct wl_subsurface *sub;
+ struct buffer *buf, *child_buf;
+ pixman_color_t red, blue;
+
+ color(&red, 255, 0, 0);
+ color(&blue, 0, 0, 255);
+
+ /* Create the client */
+ client = create_client();
+ assert(client);
+ client->surface = create_test_surface(client);
+ surface = client->surface->wl_surface;
+
+ /* move the pointer clearly away from our screenshooting area */
+ weston_test_move_pointer(client->test->weston_test, 0, 1, 0, 2, 30);
+
+ client->surface->x = 100;
+ client->surface->y = 100;
+ weston_test_move_surface(client->test->weston_test, client->surface->wl_surface,
+ client->surface->x, client->surface->y);
+
+ wl_surface_set_buffer_scale(surface, 1);
+ wl_surface_set_buffer_transform(surface, WL_OUTPUT_TRANSFORM_NORMAL);
+
+ wl_surface_commit(surface);
+
+ clip.x = 100;
+ clip.y = 100;
+ clip.width = 100;
+ clip.height = 100;
+ printf("Clip: %d,%d %d x %d\n", clip.x, clip.y, clip.width, clip.height);
+
+ /* create a wl_surface */
+ subco = get_subcompositor(client);
+ assert(subco);
+
+ child = wl_compositor_create_surface(client->wl_compositor);
+ assert(child);
+
+ /* make it a sub-surface */
+ sub = wl_subcompositor_get_subsurface(subco, child, surface);
+ assert(sub);
+
+ wl_subsurface_set_desync(sub);
+
+ /* give it content */
+ child_buf = surface_commit_color(client, child, &red, 50, 50);
+
+ /* verify that the sub-surface is not mapped */
+ fail += check_screen(client, test_name, 0, &clip, 0);
+
+ /* give a buffer to the parent surface and make sure both the
+ * parent and the child get mapped */
+ buf = surface_commit_color(client, surface, &blue, 100, 100);
+
+ fail += check_screen(client, test_name, 1, &clip, 1);
+
+ printf("Test complete\n");
+ assert(fail == 0);
+
+ wl_subsurface_destroy(sub);
+ wl_surface_destroy(child);
+ buffer_destroy(child_buf);
+ wl_surface_destroy(surface);
+ buffer_destroy(buf);
+}
--
2.18.0
More information about the wayland-devel
mailing list