1
0
Fork 0
Commit graph

8 commits

Author SHA1 Message Date
Roman Stratiienko
0fade37afd drm_hwcomposer: Rework autofd
Motivation:

Current implementation of UniqueFd can be used in a different ways,
making analytical tracking of FD lifecycle much harder than it may be.
Keep this part clean is very important, since any wrong code may open
a hard-to-detect runtime bugs and fd leaks, which may accidentally slip
into the production.

Implementation:

1. Combine UniqueFd anf OutputFd into single class.
2. Reduce the API to be minimal and sufficient.
3. Document the API and use cases.
4. Move to utils/UniqueFd.h.
5. dup(fd) was replaced with fcntl(fd, F_DUPFD_CLOEXEC)) to
   address clang-tidy findings. Find more information at [1]

[1]: https://clang.llvm.org/extra/clang-tidy/checks/android-cloexec-dup.html

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2021-07-24 17:59:09 +03:00
Matvii Zorin
f0757c21ec drm_hwcomposer: Remove ctrc from DrmCompositionPlane
CRTC is set at CreateComposition function and it matches the current
display.

Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
2021-04-06 12:46:22 +03:00
Matvii Zorin
9f79c0cd7f drm_hwcomposer: Remove SquashState class declaration
There is no use of SquashState class, so the declaration could be removed
in the scope of cleanup.

Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
2021-04-06 12:46:22 +03:00
Matvii Zorin
5368b732c8 drm_hwcomposer: Remove DrmCompositionDisplayLayersMap
The structure is used only at the CreateComposition function.
Data consolidation is unnecessary in this case.

Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
2021-04-06 12:46:22 +03:00
Matvii Zorin
dcea03cd88 drm_hwcomposer: Remove DrmCompositionRegion struct
The structure is currently unused.

Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
2021-04-06 12:46:22 +03:00
Matvii Zorin
704ea0e8fb drm_hwcomposer: Cleanup DrmDisplayComposition initialization
Remove unused members (drm, importer, frame_no). Move initialization
from the proper function to the constructor.

Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
2021-04-06 12:46:22 +03:00
Roman Stratiienko
e2f2c92924 drm_hwcomposer: enable code analysis using clang-tidy
Drm hwcomposer project has some code-style inconsistencies.
This is the initial step to unify code-style of the code.

Clang-tidy is a great tool which can not only suggest correct styling,
but also allow predicting the errors in the code and suggest correct
coding approaches to avoid potential weaknesses.

CI was tuned to check clang-tidy recommendation for some part of the
code which is ready ATM (can be built outside AOSP tree).
For this part a limited set of clang-tidy checks has applied (coarse check).
Header files aren't checked at all.

Starting from now new code files must be included into the list that is
checked by almost all clang-tidy checks (fine checklist). New header files
should be also included into this list.
See '.gitlab-ci-clang-tidy-fine.sh'.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2021-03-03 16:07:25 +02:00
Roman Stratiienko
13cc3666c6 drm_hwcomposer: use CamelCase in source/header files related to class
Main goal is to increase readability of file names.
AOSP uses camelcase for files in many projects.
Lets do the same for drm_hwcomposer.

Keep platform/ directory as is, since class names is different from file names.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Change-Id: I7e992357851c2a86711f4da1241c4d507359e56b
2020-09-08 22:34:52 +03:00
Renamed from compositor/drmdisplaycomposition.h (Browse further)