Commit graph

67 commits

Author SHA1 Message Date
hujianwei
fa29286c98 Check in files for buffer scale tests
* tests/buffer_scale_1_1.dump:
* tests/buffer_scale_1_2.dump:
* tests/buffer_scale_1_2_1.dump:
* tests/buffer_scale_1_2_2.dump:
* tests/buffer_scale_2_1.dump:
* tests/buffer_scale_2_2.dump:
* tests/buffer_scale_2_2_1.dump:
* tests/buffer_scale_2_2_2.dump:
* tests/scale.png:
* tests/scale_damage.png:
* tests/scale_test.c: New files.
2022-11-05 08:12:29 +00:00
hujianwei
cde0e6d701 Add viewporter tests with transforms
* tests/viewporter_test.c (enum test_kind, test_names): Add new
test VIEWPORT_SRC_250_50_200_200_DEST_50_75_90CW_KIND.
(LAST_TEST): Set to
VIEWPORT_SRC_250_50_200_200_DEST_50_75_90CW_KIND.
(test_single_step): Implement
VIEWPORT_SRC_250_50_200_200_DEST_50_75_90CW_KIND.
2022-11-05 06:25:41 +00:00
hujianwei
38f398d7dd Check in files for new test
* tests/viewport_src_250_50_200_200_dest_50_75_90cw_1.dump:
* tests/viewport_src_250_50_200_200_dest_50_75_90cw_2.dump: New
files.
2022-11-05 06:24:22 +00:00
hujianwei
ca4d00c38f Update subsurface tests and fix discovered bugs
* subcompositor.c (DoCull): Fix leak of temp region upon
encountering opaque view.
* tests/subsurface_test.c (enum test_kind, test_names): New test
SUBSURFACE_GROW_SHRINK_KIND.
(LAST_TEST): Make it the last test.
(test_single_step): Implement SUBSURFACE_GROW_SHRINK_KIND.
2022-11-05 05:59:05 +00:00
hujianwei
88ac22aa27 Check in files for new subsurface grow/shrink tests
* tests/big.png:
* tests/small.png:
* tests/subsurface_test_15.dump:
* tests/subsurface_test_16.dump:
* tests/subsurface_test_17.dump: New files.
2022-11-05 05:57:25 +00:00
hujianwei
47a650cfd6 Add tests for subsurfaces and fix bug found by them
* subcompositor.c (ViewInsert, ViewInsertAfter)
(ViewInsertBefore): Update bounds for child, not parent view.
* tests/Imakefile (SRCS1, OBJS1): Build imgview first.
(SRCS6, OBJS6): Add subcompositor tests.
(PROGRAMS): Add subsurface_test.
(subsurface_test): New program target.
* tests/run_tests.sh (standard_tests): Add subsurface_test.
* tests/svnignore.txt: Add subsurface_test.
* tests/test_harness.c (swizzle_png_row_premultiply): New
function.
(load_png_image): Premultiply images w/ alpha channel.
* tests/test_harness.h: Include more headers.
2022-11-05 03:44:48 +00:00
hujianwei
b8143cf32b * tests/tiny.png: New file. 2022-11-05 03:41:20 +00:00
hujianwei
f2a504e6eb Check in files for subsurface tests
* tests/cow_transparent.png:
* tests/gradient.png:
* tests/subsurface_1.png:
* tests/subsurface_1_damaged.png:
* tests/subsurface_base.png:
* tests/subsurface_damage.png:
* tests/subsurface_test.c:
* tests/subsurface_test_1.dump:
* tests/subsurface_test_10.dump:
* tests/subsurface_test_11.dump:
* tests/subsurface_test_12.dump:
* tests/subsurface_test_13.dump:
* tests/subsurface_test_14.dump:
* tests/subsurface_test_2.dump:
* tests/subsurface_test_3.dump:
* tests/subsurface_test_4.dump:
* tests/subsurface_test_5.dump:
* tests/subsurface_test_6.dump:
* tests/subsurface_test_7.dump:
* tests/subsurface_test_8.dump:
* tests/subsurface_test_9.dump:
* tests/subsurface_transparency.png: New files.
2022-11-05 03:40:54 +00:00
hujianwei
9faad05a8d Add viewporter shrinking test
* tests/run_tests.sh: Add missed shebang.
* tests/viewporter_test.c (enum test_kind): Add
VIEWPORT_SRC_50_50_200_200_DEST_50_75_KIND.
(test_names): Add name for new test.
(LAST_TEST): Make VIEWPORT_SRC_50_50_200_200_DEST_50_75_KIND.
(test_single_step): Handle
VIEWPORT_SRC_50_50_200_200_DEST_50_75_KIND.
2022-11-04 12:47:38 +00:00
hujianwei
df8f5c7763 Add files for viewporter shrink test
* tests/viewport_src_50_50_200_200_dest_50_75_1.dump:
* tests/viewport_src_50_50_200_200_dest_50_75_2.dump: New files.
2022-11-04 12:46:45 +00:00
hujianwei
1879608d1a Check in new viewporter test files
* tests/imgview.c:
* tests/viewport_dest_200_150_1.dump:
* tests/viewport_dest_200_150_2.dump:
* tests/viewport_src_50_50_200_200_1.dump:
* tests/viewport_src_50_50_200_200_2.dump:
* tests/viewport_src_50_50_200_200_dest_500_500_1.dump:
* tests/viewport_src_50_50_200_200_dest_500_500_2.dump:
* tests/viewporter_test.c:
* tests/viewporter_test.png:
* tests/viewporter_test_1.png: New files.
2022-11-04 12:21:39 +00:00
hujianwei
b5e71e73b6 ; * tests/test_harness.c (struct image_data_header): Add missing pad. 2022-11-04 07:38:59 +00:00
hujianwei
6a0506a169 Add test for buffer transforms
* tests/Imakefile (OBJS3, SRCS3): New program.
(PROGRAMS): Add transform_test.
* tests/README: Document what these tests are.
* tests/damage_test.c (test_names): Fix coding style.
* tests/run_tests.sh (standard_tests): Add `standard_tests'.
* tests/svnignore.txt: Add transform_test.
* tests/test_harness.c (load_image_data): Fix stride validation
when height > width.
* tests/test_harness.h (FALLTHROUGH): New macro.
2022-11-04 07:22:57 +00:00
hujianwei
2875ae8df1 Check in new files for transform tests
* tests/transform_test.c:
* tests/transform_test_180_1.dump:
* tests/transform_test_180_2.dump:
* tests/transform_test_270_1.dump:
* tests/transform_test_270_2.dump:
* tests/transform_test_90_1.dump:
* tests/transform_test_90_2.dump:
* tests/transform_test_flipped_1.dump:
* tests/transform_test_flipped_180_1.dump:
* tests/transform_test_flipped_180_2.dump:
* tests/transform_test_flipped_2.dump:
* tests/transform_test_flipped_270_1.dump:
* tests/transform_test_flipped_270_2.dump:
* tests/transform_test_flipped_90_1.dump:
* tests/transform_test_flipped_90_2.dump: New files.
2022-11-04 07:19:25 +00:00
hujianwei
5d033bc93f Add new damage test and unify buffer release code in xdg_surface
* 12to11-test.xml (test_surface): <description>: Document when
frame callbacks are run.
* 12to11.c (HandleCmdline): Accept new arg `printsocket'.
(XLMain): Pass socket to HandleCmdline.
* 12to11.man: Document new `printsocket' option.
* mime0.awk:
* mime1.awk:
* mime2.awk:
* mime3.awk:
* mime4.awk: Fix typos in copyright blurb.
* test.c (NoteBounds): Sync with X server after XResizeWindow.
(Commit): Run frame callbacks after unmap as well.
(GetTestSurface): Make windows override redirect.

* tests/Imakefile (SRCS2, OBJS2): New program.
(PROGRAMS): Add damage_test.
(damage_test): New program.  Depend on SRCS2.
* tests/README: Improve documentation on how to run tests.
* tests/simple_test.c (test_names): New list.
(LAST_TEST): New define.
(verify_single_step): Complete test upon last test being run.
(test_single_step): Submit correct surface damage.
(test_next_step): New function.  Does nothing here.
(handle_wl_callback_done): Run the next test.
(submit_surface_damage): New function.
* tests/svnignore.txt: Add damage_test and Makefile.bak.
* tests/test_harness.c (test_complete): New function.
* tests/test_harness.h: New prototypes.
* xdg_surface.c (struct _XdgRole): Use a buffer release helper.
(struct _ReleaseLaterRecord, DeleteRecord, FreeRecords)
(AddRecordAfter): Delete unused structs and functions.
(RunFrameCallbacksConditionally, BufferIdleCallback)
(ReleaseBacking, ReleaseBuffer, XLGetXdgSurface): Use and free
buffer release helper; run frame callbacks from its callback.
2022-11-04 05:36:10 +00:00
hujianwei
ad7443ebd3 Check in new test related files
* tests/basic_damage.png:
* tests/damage_test.c:
* tests/damage_test_1.dump:
* tests/damage_test_2.dump:
* tests/run_tests.sh: New files.
2022-11-04 05:26:16 +00:00
hujianwei
83a2d26df3 Check in tests
* tests/Imakefile:
* tests/README
* tests/basic_test_card.png:
* tests/blue.png:
* tests/simple_test.c:
* tests/simple_test.dump:
* tests/svnignore.txt:
* tests/test_harness.c:
* tests/test_harness.h: New files.
2022-11-04 02:41:19 +00:00