Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.0 #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

2.0.0 #1

wants to merge 6 commits into from

Conversation

dtoartist
Copy link
Owner

merge 2.0.0 to master

YoungJun added 6 commits March 17, 2020 11:04
- It supports that the Qt application could set the global coordinates.
- It hacks to initial position in wayland shell surface.
- To support background alpha blending.
- Alpha value needs for tcc custom h/w layer.
- weston linux dmabuf align DMABUF exposed formats with EGL supported formats
- This is a sample code for /dev/ion driver
@@ -343,6 +345,8 @@ nested_client_destroy(struct nested_client *client)
wl_registry_destroy(client->registry);
wl_display_flush(client->display);
wl_display_disconnect(client->display);
eglTerminate(client->egl_display);
eglReleaseThread();
}

int
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with code review

1.The wl_egl_window_destroy() method should be placed after the weston_platform_destroy_egl_surface() method to avoid memory leak as we need to make sure that the egl surface is destroyed before destroying the window.

  1. The eglTerminate() and eglReleaseThread() methods should be called before disconnecting the display. This will ensure that the display is properly disconnected.

* to ensure fractional values are still tested.
*/
src_width = wl_fixed_from_int(RECT_W / BUFFER_SCALE);
src_height = wl_fixed_from_int(RECT_H / BUFFER_SCALE);
wp_viewport_set_source(box->viewport, src_x, src_y,
src_width, src_height);
break;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the code review

The patch looks good, it adds necessary comments which explains why fractional width/height values are used in SRC_ONLY mode.

Suggestion: The code can be improved by adding more comments to explain the purpose and logic of the code. Also, you can add some validation checks on the input parameters to make sure they are valid before setting them.

* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

#include "config.h"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from the code review:

  1. The copyright statements are well-formatted and easy to understand.
  2. Permission is given for the user to use, copy, modify, merge, publish, distribute, sublicense and sell the software, which is a good practice.
  3. The copyright holders have provided a warranty for the software, so that users can feel safe when using it.
  4. The copyright holders have also disclaimed all warranties related to the software, so that users are aware of any risks they may face when using it.
  5. The code has been updated to provide a more clear and concise description of the rights and responsibilities associated with using the software.

* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

#include "config.h"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with a brief code review.

The patch seems to be an update of the software's copyright notice and permissions. The original copyright notice and permission is replaced by a more detailed version. The new version includes more details about the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the software, as well as conditions for using the software. It also adds a disclaimer of warranties and a statement that the authors or copyright holders shall not be liable for any claims, damages, or other liability.

Overall, the code looks good and there doesn't appear to be any bugs or risks.

@@ -436,7 +457,8 @@ destroy_surface(struct window *window)
eglMakeCurrent(window->display->egl.dpy, EGL_NO_SURFACE, EGL_NO_SURFACE,
EGL_NO_CONTEXT);

eglDestroySurface(window->display->egl.dpy, window->egl_surface);
weston_platform_destroy_egl_surface(window->display->egl.dpy,
window->egl_surface);
wl_egl_window_destroy(window->native);

if (window->xdg_toplevel)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the code review:

  1. This code looks to be adding an include for "ivi-application-client-protocol.h" and "shared/helpers.h". This is a good addition as it will make sure that all the necessary libraries are included in the program.

  2. The code appears to be adding a static const array of structs that are used to store extension names and their corresponding entrypoints. This is another good addition as it allows for the code to be more organized and readable.

  3. The code appears to be adding a function call to "weston_platform_destroy_egl_surface()" when destroying a surface. This is an important addition as it ensures that all surfaces are properly destroyed and any resources associated with them are released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant