Merge "[AT-SPI] Add ScreenReaderEnabled, Disabled" into devel/master
authorShinwoo Kim <cinoo.kim@samsung.com>
Mon, 28 Mar 2022 08:10:15 +0000 (08:10 +0000)
committerGerrit Code Review <gerrit@review>
Mon, 28 Mar 2022 08:10:15 +0000 (08:10 +0000)
32 files changed:
automated-tests/images/flag-24bpp.bmp.buffer [moved from automated-tests/images/flag-24bpp.buffer with 100% similarity]
automated-tests/images/test-image.wbmp.buffer [new file with mode: 0644]
automated-tests/images/w3c_home_256.bmp [new file with mode: 0755]
automated-tests/images/w3c_home_256.bmp.buffer [new file with mode: 0644]
automated-tests/src/dali-adaptor-internal/CMakeLists.txt
automated-tests/src/dali-adaptor-internal/image-loaders.cpp
automated-tests/src/dali-adaptor-internal/utc-Dali-BmpLoader.cpp
automated-tests/src/dali-adaptor-internal/utc-Dali-WbmpLoader.cpp [new file with mode: 0644]
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-command-buffer.h
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-controller.cpp
build/tizen/deps-check.cmake
dali/internal/graphics/gles-impl/egl-graphics-controller.cpp
dali/internal/graphics/gles-impl/gles-context.cpp
dali/internal/graphics/gles-impl/gles-context.h
dali/internal/graphics/gles-impl/gles-graphics-command-buffer.cpp
dali/internal/graphics/gles-impl/gles-graphics-command-buffer.h
dali/internal/graphics/gles-impl/gles-graphics-types.h
dali/internal/imaging/common/loader-bmp.cpp
dali/internal/imaging/common/loader-wbmp.cpp
dali/internal/system/common/widget-controller.h
dali/internal/system/tizen-wayland/widget-application-impl-tizen.cpp
dali/internal/system/tizen-wayland/widget-application-impl-tizen.h
dali/internal/system/tizen-wayland/widget-controller-tizen.cpp
dali/internal/system/tizen-wayland/widget-controller-tizen.h
dali/internal/system/ubuntu-x11/widget-controller-x.cpp
dali/internal/system/ubuntu-x11/widget-controller-x.h
dali/internal/system/windows/widget-controller-win.cpp
dali/internal/system/windows/widget-controller-win.h
dali/public-api/adaptor-framework/widget-impl.cpp
dali/public-api/adaptor-framework/widget-impl.h
dali/public-api/dali-adaptor-version.cpp
packaging/dali-adaptor.spec

diff --git a/automated-tests/images/test-image.wbmp.buffer b/automated-tests/images/test-image.wbmp.buffer
new file mode 100644 (file)
index 0000000..b40d0bc
Binary files /dev/null and b/automated-tests/images/test-image.wbmp.buffer differ
diff --git a/automated-tests/images/w3c_home_256.bmp b/automated-tests/images/w3c_home_256.bmp
new file mode 100755 (executable)
index 0000000..4b714ff
Binary files /dev/null and b/automated-tests/images/w3c_home_256.bmp differ
diff --git a/automated-tests/images/w3c_home_256.bmp.buffer b/automated-tests/images/w3c_home_256.bmp.buffer
new file mode 100644 (file)
index 0000000..ecee152
--- /dev/null
@@ -0,0 +1 @@
+\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4üþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü\8c\8a\8c\8c\8a\8c\8c\8a\8ctvt¼º¼üþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü\8c\8a\8cÌÎÌ\8c\8a\8c\8c\8a\8cÌÎÌ\8c\8a\8cÌÎÌüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü\8c\8a\8cüþüDFDìîìDFDüþü\8c\8a\8cüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü\8c\8a\8cüþü$"$DFD¼º¼üþü\8c\8a\8cüþüüþüìòüÄÎäÄÎäÄÎäÄÎäìòüüþüüþüüþüüþüüþüüþüÜæôÄÎäÄÎäÄÎäÄÎäüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü¼Æä\94ªÔ\94ªÔ\94ªÔ¤¶ÜÄÎäÄÎäÄÎäÄÎäÄÎäÄÎäÄÎäÄÎäÄÎäÄÎäÄÎäìòüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüÌÎÌüþüüþütvtüþüDFDÌÎÌDFDÜÞÜ\8c\8a\8cüþüüþüÜæô\fF\9c\fF\9c\fF\9c\fF\9c¤¶ÜüþüüþüüþüüþüüþüüþüÔÚì\fF\9c\fF\9c\fF\9c\fF\9cÄÎäüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü\14\fF\9c\fF\9c\14\fF\9c\fF\9c\fF\9c\fF\9c\14\fF\9c\fF\9c\fF\9c\14\fF\9c\fF\9c\fF\9cÄÎäüþüüþüüþüüþüüþüÌÎÌLNL\ 4\ 2\ 4\f\ e\f\^\ÜÞÜüþüüþüüþüìîì,.,üþüüþü¼º¼\8c\8a\8cüþüüþüìîìtvtìîìüþüüþüüþü$Z¬\fF\9c\fF\9c\fF\9cd\8aÄüþüüþüüþüüþüüþüüþüüþü\14\fF\9c\fF\9c\14N¤t\96ÄüþüüþüüþüüþüüþüüþüüþüüþüüþüÄÎä\fB\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\14\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9cÄÎäüþüüþüüþüüþü\9c\9e\9c\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\9c\9e\9cüþüüþü|~|\ 4\ 2\ 4üþüüþüüþüÌÎÌ\8c\8a\8c\8c\8a\8c\8c\8a\8cìîìüþüüþüüþüüþüt\96Ä\14\fF\9c\fF\9c\14N¤üþüüþüüþüüþüüþüüþüüþüd\8aÄ\fF\9c\fF\9c\fF\9c$Z¬üþüüþüüþüüþüüþüüþüüþüüþüüþüt\96Ä\fB\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\14\fF\9c\fF\9c\14N¤Dr´üþüüþüüþüüþüÌÎÌ\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4¼º¼ìîì\f\ e\f\ 4\ 2\ 4¼¾¼üþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüÄÎä\fF\9c\fF\9c\fF\9c\14N¤ÔÚìüþüüþüüþüüþüüþüüþü¤¶Ü\fF\9c\fF\9c\fF\9c\fF\9cÜæôüþüüþüüþüüþüüþüüþüüþüüþü4f¬\fB\9c\14\fF\9c\fF\9c\14\fF\9c\fF\9c\14\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9cÄÎäüþüüþüüþüüþü\1c\1e\1c\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\1c\1e\1clnl\ 4\ 2\ 4\ 4\ 2\ 4\9c\9e\9cüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü\14\fF\9c\fF\9c\fF\9ct\96Äüþüüþüüþüüþüüþüüþüìòü\fF\9c\fF\9c\fF\9c\fF\9c\94ªÔüþüüþüüþüüþüüþüüþüüþüÜæô\fF\9c\fF\9c\fF\9c\fF\9cl\8aÄüþüüþüüþüüþüüþü´Âä\fF\9c\fF\9c\fF\9c\fF\9cd\8aÄüþüüþüüþüüþü\9c\9e\9c\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4,.,|~|lnl$"$\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\f\ e\fìîìüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüT~¼\fF\9c\fF\9c\fF\9c4f¬üþüüþüüþüüþüüþüüþüüþüDr´\fF\9c\14\fF\9cT~¼üþüüþüüþüüþüüþüüþüüþü\94ªÔ\fF\9c\fF\9c\fF\9c\fF\9cìòüüþüüþüüþüüþüüþü$Z¬\fF\9c\fF\9c\fF\9c\14N¤ìòüüþüüþüüþüüþü<><\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\9c\9e\9cüþüüþüüþüìîì\^\\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4|~|üþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü¤¶Ü\fF\9c\fF\9c\14\fF\9cÜæôüþüüþüüþüüþüüþüüþüd\8aÄ\fF\9c\fF\9c\fF\9c\fF\9cìòüüþüüþüüþüüþüüþüüþüT~¼\fF\9c\fB\9c\fF\9c<j´üþüüþüüþüüþüüþü\84\9eÌ\fF\9c\14\fF\9c\fF\9c\84\9eÌüþüüþüüþüüþüìîì\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\9c\9e\9cüþüüþüüþüüþüüþüüþü\^\\ 4\ 2\ 4\f\ e\fìîìüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüìòü\fF\9c\fF\9c\fF\9c\fF\9c¤¶Üüþüüþüüþüüþüüþüüþü\14\fF\9c\fF\9c\fF\9c\fF\9c¼Æäüþüüþüüþüüþüüþüüþü\fF\9c\fF\9c\14\fF\9c\94ªÔüþüüþüüþüüþüìòü\14\fF\9c\fF\9c\fF\9c$Z¬üþüüþüüþüüþüüþü¬®¬\ 4\ 2\ 4\ 4\ 2\ 4\^\üþüüþüüþüüþüüþüüþüüþüüþü,.,|~|üþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü<j´\fF\9c\fF\9c\fF\9cT~¼üþüüþüüþüüþüüþüÔÚì\14\fF\9c\fF\9c\fF\9c\fF\9cd\8aÄüþüüþüüþüüþüüþü¼Æä\fF\9c\fF\9c\fF\9c\fF\9cÔÚìüþüüþüüþüüþüd\8aÄ\fF\9c\fF\9c\fF\9c\fF\9c¼Æäüþüüþüüþüüþüüþü|~|\ 4\ 2\ 4\ 4\ 2\ 4ÜÞÜüþüüþüüþüüþüüþüüþüüþüüþüÌÎÌìîìüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü\94ªÔ\fF\9c\fF\9c\fF\9c\fF\9cüþüüþüüþüüþüüþü\84\9eÌ\fF\9c\fF\9c\14\fF\9c\fF\9c$Z¬üþüüþüüþüüþüüþüd\8aÄ\fF\9c\fF\9c\fF\9c$Z¬üþüüþüüþüüþüÄÎä\fF\9c\fF\9c\14\fF\9cDr´üþüüþüüþüüþüüþüüþüLNL\ 4\ 2\ 4LNLüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüÔÚì\fF\9c\fF\9c\14\fF\9c´Âäüþüüþüüþüüþü4f¬\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9cÔÚìüþüüþüüþüüþü$Z¬\fF\9c\fF\9c\fF\9ct\96ÄüþüüþüüþüüþüDr´\fF\9c\fF\9c\fF\9c\fF\9cÜæôüþüüþüüþüüþüüþüüþü<><\ 4\ 2\ 4\9c\9e\9cüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü$Z¬\fF\9c\fF\9c\fF\9ct\96ÄüþüüþüüþüÜæô\fF\9c\14\fF\9c\fF\9c\fF\9c\fF\9c\14\84\9eÌüþüüþüüþüÔÚì\fF\9c\fF\9c\fF\9c\fF\9c´Âäüþüüþüüþü¤¶Ü\fF\9c\fF\9c\fF\9c\fF\9cd\8aÄüþüüþüüþüüþüüþüüþüüþü<><\ 4\ 2\ 4ìîìüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüd\8aÄ\fF\9c\fF\9c\fF\9c$Z¬üþüüþüüþü¤¶Ü\fF\9c\fF\9c\fF\9c\14\fF\9c\fF\9c\fF\9c4f¬üþüüþüüþü\94ªÔ\fF\9c\fF\9c\14\14N¤üþüüþüüþüìòü$Z¬\fF\9c\14\fF\9c\fF\9c\fF\9c<j´ÔÚìüþüüþüüþüüþüüþü<><\1c\1e\1cüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü¼Æä\fF\9c\fF\9c\14\fF\9cÔÚìüþüüþüT~¼\fF\9c\fF\9c\14\84\9eÌ\fF\9c\fF\9c\fF\9c\fF\9cìòüüþüüþü<j´\fF\9c\fF\9c\fF\9cT~¼üþüüþüüþü\94ªÔ\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\14\fF\9c\fF\9c¤¶Üüþüüþüüþüüþü<><<><üþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü\fF\9c\fF\9c\fF\9c\fF\9c\94ªÔüþüüþü\14\fF\9c\fF\9c\fF\9cÜæôT~¼\fF\9c\14\fF\9c¤¶Üüþüìòü\fF\9c\fF\9c\fF\9c\fF\9c¤¶Üüþüüþüüþü\84\9eÌ\14\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c¤¶Üüþüüþüüþü|~|<><üþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüT~¼\fF\9c\fF\9c\fF\9cDr´üþü´Âä\fF\9c\fF\9c\fF\9c4f¬üþü\94ªÔ\fF\9c\fF\9c\fF\9cT~¼üþü¤¶Ü\fF\9c\fF\9c\fF\9c\fF\9cÜæôüþüüþüüþüÄÎä\84\9eÌ\84\9eÌ\84\9eÌ4f¬\14\fF\9c\fF\9c\14\fF\9c\14N¤ìòüüþüüþü\9c\9e\9c<><üþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü¤¶Ü\fF\9c\14\fF\9c\fF\9cìòüt\96Ä\fF\9c\fF\9c\14N¤t\96ÄüþüÜæô\fF\9c\fF\9c\fF\9c\14N¤üþüd\8aÄ\fF\9c\14\fF\9c<j´üþüüþüüþüüþüüþüüþüüþüüþüüþüÄÎä\14\fF\9c\fF\9c\fF\9c\fF\9c\84\9eÌüþüüþüÜÞÜ<><üþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüÜæô\fF\9c\fF\9c\fF\9c\fF\9c¤¶Ü$Z¬\fF\9c\fF\9c\fF\9cÔÚìüþüüþü$Z¬\fF\9c\fF\9c\fF\9cÄÎä\14\fF\9c\fF\9c\fF\9c\84\9eÌüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüÔÚì\fF\9c\fF\9c\fF\9c\fF\9c\14N¤üþüüþüüþü|~|üþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü4f¬\fF\9c\fF\9c\fF\9c<j´\fF\9c\fF\9c\fF\9c\14N¤üþüüþüüþüt\96Ä\14\fF\9c\fF\9c<j´\fF\9c\fF\9c\fF\9c\fF\9cÔÚìüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüd\8aÄ\fF\9c\14\fF\9c\fF\9cÔÚìüþüüþü¼¾¼üþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüt\96Ä\14\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9cd\8aÄüþüüþüüþüÄÎä\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c$Z¬üþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü´Âä\fF\9c\fF\9c\fF\9c\14\94ªÔüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüÔÚì\fF\9c\fF\9c\14\fF\9c\fF\9c\14\fF\9c¼Æäüþüüþüüþüüþü\14\fF\9c\fF\9c\fF\9c\14\fF\9c\fF\9cd\8aÄüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüÔÚì\fF\9c\fF\9c\fF\9c\fF\9c\84\9eÌüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü\14\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9cìòüüþüüþüüþüüþüd\8aÄ\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c¼Æäüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü\14\fF\9c\fF\9c\fF\9c\84\9eÌüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüd\8aÄ\fF\9c\fF\9c\fF\9c\fF\9c\fF\9cT~¼üþüüþüüþüüþüüþü¤¶Ü\fF\9c\14\fF\9c\fF\9c\fF\9c\fF\9cìòüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüÜæô\fF\9c\fF\9c\14\fF\9cl\8aļ¾¼üþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüìîìüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü¼Æä\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\94ªÔüþüüþüüþüüþüüþüìòü\fF\9c\fF\9c\fF\9c\14\fF\9cT~¼üþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüÄÎä\fF\9c\fF\9c\fF\9c\fF\9c\84\9eÌLNLüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü<><ÜÞÜüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüìòü\fF\9c\fF\9c\14\fF\9c\fF\9cÜæôüþüüþüüþüüþüüþüüþüDr´\fF\9c\fF\9c\fF\9c\fF\9c\94ªÔüþüüþüüþü¼ÆäT~¼4f¬üþüüþüüþüüþüüþüüþüüþüt\96Ä\fF\9c\14\fF\9c\fF\9cÄÎä\8c\8e\8c|~|üþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü\8c\8a\8c\ 4\ 2\ 4¬®¬üþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüDr´\fF\9c\fF\9c\fF\9c<j´üþüüþüüþüüþüüþüüþüüþü\94ªÔ\fF\9c\fF\9c\fF\9c\fF\9cÜæôüþüüþü4f¬\fF\9c\fF\9c\fF\9c¼Æäüþüüþüüþüüþüüþüìòü$Z¬\fF\9c\fF\9c\fF\9c\fF\9cìòüÜÞÜ\ 4\ 2\ 4\9c\9e\9cüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüÌÎÌ\f\ e\f\ 4\ 2\ 4|~|üþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü\94ªÔ\fF\9c\fF\9c\fF\9ct\96ÄüþüüþüüþüüþüüþüüþüüþüÜæô\fF\9c\fF\9c\fF\9c<j´üþüüþüüþüd\8aÄ\fF\9c\fF\9c\fF\9c\14N¤ÔÚìüþüüþüüþüüþüt\96Ä\fF\9c\fF\9c\fF\9c\fF\9cT~¼üþüüþülnl\ 4\ 2\ 4\9c\9e\9cüþüüþüüþüüþüüþüüþüüþüüþüÌÎÌ\f\ e\f\ 4\ 2\ 4\ 4\ 2\ 4\9c\9e\9cüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüÜæô\fF\9c\fF\9c\14N¤ÄÎäüþüüþüüþüüþüüþüüþüüþüüþü$Z¬\14\fF\9ct\96ÄüþüüþüüþüÜæô\14\fF\9c\fF\9c\fF\9c\14\84\9eÌÄÎäÔÚìd\8aÄ\fF\9c\14\fF\9c\fF\9c\14N¤ÄÎäüþüüþüìîì\f\ e\f\ 4\ 2\ 4\8c\8a\8cüþüüþüüþüüþüüþüüþü\8c\8a\8c\f\ e\f\ 4\ 2\ 4\ 4\ 2\ 4,.,üþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü$Z¬\fF\9c\14N¤üþüüþüüþüüþüüþüüþüüþüüþüüþüt\96Ä\fF\9c\fF\9cÄÎäüþüüþüüþüüþü\84\9eÌ\fF\9c\fF\9c\14\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9cT~¼üþüüþüüþüüþü¬®¬\ 4\ 2\ 4\ 4\ 2\ 4\1c\1e\1clnl¬®¬¬®¬lnl\1c\1e\1c\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\f\ e\fÜÞÜüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüt\96Ä\fF\9cd\8aÄüþüüþüüþüüþüüþüüþüüþüüþüüþüÄÎä\fF\9c\14N¤üþüüþüüþüüþüüþüüþüDr´\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\14\fF\9c\fF\9c\fF\9c\fF\9c4f¬ìòüüþüüþüüþüüþüüþü\9c\9e\9c\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\f\ e\fÌÎÌüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüÄÎä\fF\9c¤¶Üüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü\14N¤d\8aÄüþüüþüüþüüþüüþüüþüìòül\8aÄ\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c\fF\9c<j´ìòüüþüüþüüþüüþüüþüüþüüþü\9c\9e\9c\f\ e\f\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\1c\1e\1cÌÎÌüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü\14N¤ìòüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüd\8aĤ¶ÜüþüüþüüþüüþüüþüüþüüþüüþüÄÎäT~¼\fF\9c\14\fF\9c\fF\9c<j´¤¶ÜüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüÜÞÜlnl,.,\ 4\ 2\ 4\ 4\ 2\ 4<><\8c\8e\8cìîìüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþüüþü\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4\ 4\ 2\ 4
\ No newline at end of file
index b6c2ec9..4fe46cf 100644 (file)
@@ -17,6 +17,7 @@ SET(TC_SOURCES
     utc-Dali-Internal-PixelBuffer.cpp
     utc-Dali-Lifecycle-Controller.cpp
     utc-Dali-TiltSensor.cpp
+    utc-Dali-WbmpLoader.cpp
 )
 
 
index 843cb92..28449f0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -120,7 +120,7 @@ void TestImageLoading(const ImageDetails& image, const LoadFunctions& functions,
     if(*bufferPtr != *refBufferPtr)
     {
       tet_result(TET_FAIL);
-      tet_printf("%s Failed in %s at line %d\n", __PRETTY_FUNCTION__, __FILE__, __LINE__);
+      tet_printf("%s Failed in %s at line %d, %u'th buffer (input : %u != expect : %u)\n", __PRETTY_FUNCTION__, __FILE__, __LINE__, i, static_cast<unsigned int>(*bufferPtr), static_cast<unsigned int>(*refBufferPtr));
       break;
     }
   }
index 8200c65..7babde8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -38,3 +38,11 @@ int UtcDaliBmp24bpp(void)
 
   END_TEST;
 }
+int UtcDaliBmpRGB8(void)
+{
+  ImageDetails image(TEST_IMAGE_DIR "/w3c_home_256.bmp", 72u, 48u);
+
+  TestImageLoading(image, BmpLoaders);
+
+  END_TEST;
+}
\ No newline at end of file
diff --git a/automated-tests/src/dali-adaptor-internal/utc-Dali-WbmpLoader.cpp b/automated-tests/src/dali-adaptor-internal/utc-Dali-WbmpLoader.cpp
new file mode 100644 (file)
index 0000000..8b2b6d7
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <dali-test-suite-utils.h>
+#include <stdlib.h>
+#include <iostream>
+
+#include <dali/internal/imaging/common/loader-wbmp.h>
+#include "image-loaders.h"
+
+using namespace Dali;
+
+namespace
+{
+static const LoadFunctions WbmpLoaders(TizenPlatform::LoadWbmpHeader, TizenPlatform::LoadBitmapFromWbmp);
+
+} // Unnamed namespace.
+
+int UtcDaliWbmpLoader(void)
+{
+  ImageDetails image(TEST_IMAGE_DIR "/test-image.wbmp", 32u, 64u);
+
+  TestImageLoading(image, WbmpLoaders);
+
+  END_TEST;
+}
\ No newline at end of file
index 96b0021..407dade 100644 (file)
@@ -65,6 +65,7 @@ enum class CommandType
   SET_DEPTH_COMPARE_OP    = 1 << 24,
   SET_DEPTH_TEST_ENABLE   = 1 << 25,
   SET_DEPTH_WRITE_ENABLE  = 1 << 26,
+  DRAW_NATIVE             = 1 << 27,
 };
 
 std::ostream& operator<<(std::ostream& os, Graphics::StencilOp op);
@@ -123,7 +124,8 @@ struct DrawCallDescriptor
   {
     DRAW,
     DRAW_INDEXED,
-    DRAW_INDEXED_INDIRECT
+    DRAW_INDEXED_INDIRECT,
+    DRAW_NATIVE
   };
 
   Type type{}; ///< Type of the draw call
@@ -166,6 +168,11 @@ struct DrawCallDescriptor
       uint32_t                  drawCount;
       uint32_t                  stride;
     } drawIndexedIndirect;
+
+    struct
+    {
+      Graphics::DrawNativeInfo drawNativeInfo;
+    } drawNative;
   };
 };
 
@@ -265,6 +272,12 @@ struct Command
         data.bindUniformBuffers = rhs.data.bindUniformBuffers;
         break;
       }
+      case CommandType::DRAW_NATIVE:
+      {
+        data.draw.type       = rhs.data.draw.type;
+        data.draw.drawNative = rhs.data.draw.drawNative;
+        break;
+      }
       case CommandType::DRAW:
       {
         data.draw.type = rhs.data.draw.type;
@@ -418,6 +431,12 @@ struct Command
         data.bindPipeline = rhs.data.bindPipeline;
         break;
       }
+      case CommandType::DRAW_NATIVE:
+      {
+        data.draw.type       = rhs.data.draw.type;
+        data.draw.drawNative = rhs.data.draw.drawNative;
+        break;
+      }
       case CommandType::DRAW:
       {
         data.draw.type = rhs.data.draw.type;
@@ -800,6 +819,16 @@ public:
     mCallStack.PushCall("ExecuteCommandBuffers", "");
   }
 
+  void DrawNative(const Graphics::DrawNativeInfo* drawInfo)
+  {
+    mCommands.emplace_back();
+    mCommands.back().type         = CommandType::DRAW_NATIVE;
+    auto& cmd                     = mCommands.back().data.draw;
+    cmd.type                      = DrawCallDescriptor::Type::DRAW_NATIVE;
+    cmd.drawNative.drawNativeInfo = *drawInfo;
+    mCallStack.PushCall("DrawNative", "");
+  }
+
   void Draw(
     uint32_t vertexCount,
     uint32_t instanceCount,
index bedce18..6a8eab4 100644 (file)
@@ -693,6 +693,12 @@ void TestGraphicsController::ProcessCommandBuffer(TestGraphicsCommandBuffer& com
         BindPipeline(currentPipeline);
         break;
       }
+      case CommandType::DRAW_NATIVE:
+      {
+        auto info = &cmd.data.draw.drawNative.drawNativeInfo;
+        CallbackBase::ExecuteReturn<bool>(*info->callback, info->userData);
+        break;
+      }
       case CommandType::DRAW:
       {
         if(currentPipeline)
index 8eecbda..a13dc7d 100755 (executable)
@@ -369,6 +369,7 @@ IF( enable_appfw )
     ${ECORE_IMF_CFLAGS}
     ${FRIBIDI_CFLAGS}
     ${COMPONENT_BASED_CORE_BASE_CFLAGS}
+    ${SCREENCONNECTORPROVIDER_CFLAGS}
   )
 
   SET( DALI_LDFLAGS ${DALI_LDFLAGS}
@@ -384,6 +385,7 @@ IF( enable_appfw )
     ${ECORE_IMF_LDFLAGS}
     ${FRIBIDI_LDFLAGS}
     ${COMPONENT_BASED_CORE_BASE_LDFLAGS}
+    ${SCREENCONNECTORPROVIDER_LDFLAGS}
   )
 ELSE()
   SET( DALI_CFLAGS ${DALI_CFLAGS}
@@ -440,11 +442,9 @@ IF( WEARABLE_PROFILE )
   SET( DALI_CFLAGS ${DALI_CFLAGS}
     ${HAPTIC_CFLAGS}
     ${EFL_ASSIST_CFLAGS}
-    ${SCREENCONNECTORPROVIDER_CFLAGS}
     ${APPCORE_WATCH_CFLAGS}
   )
   SET( DALI_LDFLAGS ${DALI_LDFLAGS}
-    ${SCREENCONNECTORPROVIDER_LDFLAGS}
     ${APPCORE_WATCH_LDFLAGS}
   )
 ENDIF()
index 3667844..56c5f2d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -583,6 +583,17 @@ void EglGraphicsController::ProcessCommandBuffer(const GLES::CommandBuffer& comm
         }
         break;
       }
+      case GLES::CommandType::DRAW_NATIVE:
+      {
+        auto* info = &cmd.drawNative.drawNativeInfo;
+
+        mCurrentContext->PrepareForNativeRendering();
+
+        CallbackBase::ExecuteReturn<bool>(*info->callback, info->userData);
+
+        mCurrentContext->RestoreFromNativeRendering();
+        break;
+      }
     }
   }
 }
index de5e058..f38ed4a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include "gles-graphics-render-pass.h"
 #include "gles-graphics-render-target.h"
 
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
 #include <map>
 
+
 namespace Dali::Graphics::GLES
 {
 struct Context::Impl
 {
-  Impl(EglGraphicsController& controller)
+  explicit Impl(EglGraphicsController& controller)
   : mController(controller)
   {
   }
@@ -206,6 +209,12 @@ struct Context::Impl
   GLStateCache                           mGlStateCache{};             ///< GL status cache
 
   bool mGlContextCreated{false}; ///< True if the OpenGL context has been created
+
+  EGLContext mNativeDrawContext{0u}; ///< Native rendering EGL context compatible with window context
+
+  EGLSurface mCacheDrawReadSurface{0u};    ///< cached 'read' surface
+  EGLSurface mCacheDrawWriteSurface{0u};   ///< cached 'write' surface
+  EGLContext mCacheEGLGraphicsContext{0u}; ///< cached window context
 };
 
 Context::Context(EglGraphicsController& controller)
@@ -213,7 +222,15 @@ Context::Context(EglGraphicsController& controller)
   mImpl = std::make_unique<Impl>(controller);
 }
 
-Context::~Context() = default;
+Context::~Context()
+{
+  // Destroy native rendering context if one exists
+  if(mImpl->mNativeDrawContext)
+  {
+    eglDestroyContext(eglGetCurrentDisplay(), mImpl->mNativeDrawContext);
+    mImpl->mNativeDrawContext = EGL_NO_CONTEXT;
+  }
+}
 
 void Context::Flush(bool reset, const GLES::DrawCallDescriptor& drawCall)
 {
@@ -954,4 +971,55 @@ void Context::InvalidateCachedPipeline(GLES::Pipeline* pipeline)
   }
 }
 
+void Context::PrepareForNativeRendering()
+{
+  // this should be pretty much constant
+  auto display     = eglGetCurrentDisplay();
+  auto drawSurface = eglGetCurrentSurface(EGL_DRAW);
+  auto readSurface = eglGetCurrentSurface(EGL_READ);
+  auto context     = eglGetCurrentContext();
+
+  // push the surface and context data to the impl
+  // It's needed to restore context
+  if(!mImpl->mCacheEGLGraphicsContext)
+  {
+    mImpl->mCacheDrawWriteSurface   = drawSurface;
+    mImpl->mCacheDrawReadSurface    = readSurface;
+    mImpl->mCacheEGLGraphicsContext = context;
+  }
+
+  if(!mImpl->mNativeDrawContext)
+  {
+    EGLint configId{0u};
+    EGLint size{0u};
+    eglGetConfigs(display, nullptr, 0, &size);
+    std::vector<EGLConfig> configs;
+    configs.resize(size);
+    eglGetConfigs(display, configs.data(), configs.size(), &size);
+
+    eglQueryContext(display, context, EGL_CONFIG_ID, &configId);
+
+    auto version = int(mImpl->mController.GetGLESVersion());
+
+    std::vector<EGLint> attribs;
+    attribs.push_back(EGL_CONTEXT_MAJOR_VERSION_KHR);
+    attribs.push_back(version / 10);
+    attribs.push_back(EGL_CONTEXT_MINOR_VERSION_KHR);
+    attribs.push_back(version % 10);
+    attribs.push_back(EGL_NONE);
+
+    mImpl->mNativeDrawContext = eglCreateContext(display, configs[configId], EGL_NO_CONTEXT, attribs.data());
+  }
+
+  eglMakeCurrent(display, drawSurface, readSurface, mImpl->mNativeDrawContext);
+}
+
+void Context::RestoreFromNativeRendering()
+{
+  auto display = eglGetCurrentDisplay();
+
+  // bring back original context
+  eglMakeCurrent(display, mImpl->mCacheDrawWriteSurface, mImpl->mCacheDrawReadSurface, mImpl->mCacheEGLGraphicsContext);
+}
+
 } // namespace Dali::Graphics::GLES
index a4c3c8b..12e62cd 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_GRAPHICS_GLES_CONTEXT_H
 
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -164,6 +164,25 @@ public:
    */
   void InvalidateCachedPipeline(GLES::Pipeline* pipeline);
 
+  /**
+   * @brief Sets up EGL context for native rendering
+   *
+   * - The native rendering uses dedicated context
+   * - There is one EGL native rendering context per GLES::Context object
+   * - Native rendering context is compatible with the window/surface context
+   * - Native rendering context dies with GLES::Context object
+   *
+   * When native rendering is about to be executed, the dedicated EGL context
+   * is acquired (created or reused) and made current. The Window/Surface context
+   * is cached to be restored afterwards.
+   */
+  void PrepareForNativeRendering();
+
+  /**
+   * @brief Restores window/surface context after native rendering.
+   */
+  void RestoreFromNativeRendering();
+
   void ActiveTexture(uint32_t textureBindingIndex);
   void BindTexture(GLenum target, BoundTextureType textureTypeId, uint32_t textureId);
   void GenerateMipmap(GLenum target);
index 8a4cfc9..177b6b9 100644 (file)
@@ -430,6 +430,13 @@ void CommandBuffer::DrawIndexedIndirect(
   cmd.drawIndexedIndirect.stride    = stride;
 }
 
+void CommandBuffer::DrawNative(const DrawNativeInfo* drawNativeInfo)
+{
+  auto  command = mCommandPool->AllocateCommand(CommandType::DRAW_NATIVE);
+  auto& cmd     = command->drawNative;
+  memcpy(&cmd.drawNativeInfo, drawNativeInfo, sizeof(DrawNativeInfo));
+}
+
 void CommandBuffer::Reset()
 {
   mCommandPool->Rollback(false);
index 983bc9c..07c5561 100644 (file)
@@ -66,6 +66,7 @@ enum class CommandType
   SET_DEPTH_COMPARE_OP,
   SET_DEPTH_TEST_ENABLE,
   SET_DEPTH_WRITE_ENABLE,
+  DRAW_NATIVE,
 };
 
 /**
@@ -215,6 +216,11 @@ struct Command
     {
       bool enabled;
     } colorMask;
+
+    struct
+    {
+      DrawNativeInfo drawNativeInfo;
+    } drawNative;
   };
 };
 
@@ -316,6 +322,11 @@ public:
     uint32_t          stride) override;
 
   /**
+   * @copydoc Dali::Graphics::CommandBuffer::DrawNative
+   */
+  void DrawNative(const DrawNativeInfo* drawNativeInfo) override;
+
+  /**
    * @copydoc Dali::Graphics::CommandBuffer::Reset
    */
   void Reset() override;
index 18069eb..dc90a98 100644 (file)
@@ -1527,7 +1527,7 @@ struct DrawCallDescriptor
   {
     DRAW,
     DRAW_INDEXED,
-    DRAW_INDEXED_INDIRECT
+    DRAW_INDEXED_INDIRECT,
   };
 
   Type type{}; ///< Type of the draw call
index fe87cf9..80c455d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -147,9 +147,9 @@ bool DecodeRGB24V5(FILE*          fp,
     return false;
   }
 
-  for(unsigned int yPos = 0; yPos < height; yPos++)
+  for(std::uint32_t yPos = 0; yPos < height; ++yPos)
   {
-    unsigned char* pixelsPtr = NULL;
+    std::uint8_t* pixelsPtr = NULL;
     if(topDown)
     {
       pixelsPtr = pixels + (yPos * rowStride);
@@ -163,11 +163,11 @@ bool DecodeRGB24V5(FILE*          fp,
       DALI_LOG_ERROR("Error reading the BMP image\n");
       return false;
     }
-    for(unsigned int i = 0; i < rowStride; i += 3)
+    for(std::uint32_t i = 0; i < rowStride; i += 3)
     {
-      unsigned char temp = pixelsPtr[i];
-      pixelsPtr[i]       = pixelsPtr[i + 2];
-      pixelsPtr[i + 2]   = temp;
+      std::uint8_t temp = pixelsPtr[i];
+      pixelsPtr[i]      = pixelsPtr[i + 2];
+      pixelsPtr[i + 2]  = temp;
     }
 
     if(padding)
@@ -214,9 +214,9 @@ bool DecodeBF32V4(FILE*          fp,
     return false;
   }
 
-  for(unsigned int yPos = 0; yPos < height; yPos++)
+  for(std::uint32_t yPos = 0; yPos < height; ++yPos)
   {
-    unsigned char* pixelsPtr = NULL;
+    std::uint8_t* pixelsPtr = NULL;
     if(topDown)
     {
       pixelsPtr = pixels + (yPos * rowStride);
@@ -230,11 +230,11 @@ bool DecodeBF32V4(FILE*          fp,
       DALI_LOG_ERROR("Error reading the BMP image\n");
       return false;
     }
-    for(unsigned int i = 0; i < rowStride; i += 4)
+    for(std::uint32_t i = 0; i < rowStride; i += 4)
     {
-      unsigned char temp = pixelsPtr[i];
-      pixelsPtr[i]       = pixelsPtr[i + 2];
-      pixelsPtr[i + 2]   = temp;
+      std::uint8_t temp = pixelsPtr[i];
+      pixelsPtr[i]      = pixelsPtr[i + 2];
+      pixelsPtr[i + 2]  = temp;
     }
     if(padding)
     {
@@ -280,9 +280,9 @@ bool DecodeBF32(FILE*          fp,
     return false;
   }
 
-  for(unsigned int yPos = 0; yPos < height; yPos++)
+  for(std::uint32_t yPos = 0; yPos < height; ++yPos)
   {
-    unsigned char* pixelsPtr;
+    std::uint8_t* pixelsPtr;
     if(topDown)
     {
       // the data in the file is top down, and we store the data top down
@@ -299,11 +299,11 @@ bool DecodeBF32(FILE*          fp,
       DALI_LOG_ERROR("Error reading the BMP image\n");
       return false;
     }
-    for(unsigned int i = 0; i < rowStride; i += 4)
+    for(std::uint32_t i = 0; i < rowStride; i += 4)
     {
-      unsigned char temp = pixelsPtr[i];
-      pixelsPtr[i]       = pixelsPtr[i + 2];
-      pixelsPtr[i + 2]   = temp;
+      std::uint8_t temp = pixelsPtr[i];
+      pixelsPtr[i]      = pixelsPtr[i + 2];
+      pixelsPtr[i + 2]  = temp;
     }
 
     if(padding)
@@ -346,12 +346,12 @@ bool DecodeBF565(FILE*          fp,
     return false;
   }
 
-  width                  = ((width & 3) != 0) ? width + 4 - (width & 3) : width;
-  unsigned int rowStride = width * 2;
+  width                   = ((width & 3) != 0) ? width + 4 - (width & 3) : width;
+  std::uint32_t rowStride = width * 2;
 
-  for(unsigned int i = 0; i < height; i++)
+  for(std::uint32_t i = 0; i < height; ++i)
   {
-    unsigned char* pixelsPtr = NULL;
+    std::uint8_t* pixelsPtr = NULL;
     if(topDown)
     {
       // the data in the file is top down, and we store the data top down
@@ -402,12 +402,12 @@ bool DecodeBF555(FILE*          fp,
 
   width = ((width & 3) != 0) ? width + 4 - (width & 3) : width;
 
-  std::vector<char> raw(width * height * 2);
-  unsigned int      rawStride = width * 2;
-  unsigned int      rowStride = width * 3;
+  std::vector<std::uint8_t> raw(width * height * 2);
+  std::uint32_t             rawStride = width * 2;
+  std::uint32_t             rowStride = width * 3;
 
-  char* rawPtr = NULL;
-  for(unsigned int j = 0; j < height; j++)
+  std::uint8_t* rawPtr = NULL;
+  for(std::uint32_t j = 0; j < height; ++j)
   {
     rawPtr = &raw[0] + (j * rawStride);
     if(fread(rawPtr, 1, rawStride, fp) != rawStride)
@@ -416,9 +416,9 @@ bool DecodeBF555(FILE*          fp,
     }
   }
 
-  for(unsigned int yPos = 0; yPos < height; yPos++)
+  for(std::uint32_t yPos = 0; yPos < height; ++yPos)
   {
-    unsigned char* pixelsPtr = NULL;
+    std::uint8_t* pixelsPtr = NULL;
     if(topDown)
     {
       // the data in the file is top down, and we store the data top down
@@ -430,9 +430,9 @@ bool DecodeBF555(FILE*          fp,
       pixelsPtr = pixels + (((height - 1) - yPos) * rowStride);
     }
 
-    for(unsigned int k = 0; k < width; k++)
+    for(std::uint32_t k = 0; k < width; ++k)
     {
-      int index            = yPos * rawStride + 2 * k;
+      std::uint32_t index  = yPos * rawStride + 2 * k;
       pixelsPtr[3 * k]     = ((raw[index + 1] >> 2) & 0x1F) * 0xFF / 0x1F;
       pixelsPtr[3 * k + 1] = (((raw[index + 1] & 0x03) << 3) | (raw[index] >> 5)) * 0xFF / 0x1F;
       pixelsPtr[3 * k + 2] = (raw[index] & 0x1F) * 0xFF / 0x1F;
@@ -470,12 +470,12 @@ bool DecodeRGB555(FILE*          fp,
   }
 
   width = ((width & 3) != 0) ? width + 4 - (width & 3) : width;
-  std::vector<char> raw(width * height * 2);
-  unsigned int      rawStride = width * 2;
-  unsigned int      rowStride = width * 3;
+  std::vector<std::uint8_t> raw(width * height * 2);
+  std::uint32_t             rawStride = width * 2;
+  std::uint32_t             rowStride = width * 3;
 
-  char* rawPtr = NULL;
-  for(unsigned int j = 0; j < height; j++)
+  std::uint8_t* rawPtr = NULL;
+  for(std::uint32_t j = 0; j < height; ++j)
   {
     rawPtr = &raw[0] + (j * rawStride);
     if(fread(rawPtr, 1, rawStride, fp) != rawStride)
@@ -483,9 +483,9 @@ bool DecodeRGB555(FILE*          fp,
       return false;
     }
   }
-  for(unsigned int i = 0; i < height; i++)
+  for(std::uint32_t i = 0; i < height; ++i)
   {
-    unsigned char* pixelsPtr = NULL;
+    std::uint8_t* pixelsPtr = NULL;
     if(topDown)
     {
       // the data in the file is top down, and we store the data top down
@@ -496,9 +496,9 @@ bool DecodeRGB555(FILE*          fp,
       // the data in the file is bottom up, and we store the data top down
       pixelsPtr = pixels + (((height - 1) - i) * rowStride);
     }
-    for(unsigned int k = 0; k < width; k++)
+    for(std::uint32_t k = 0; k < width; ++k)
     {
-      int index            = i * rawStride + 2 * k;
+      std::uint32_t index  = i * rawStride + 2 * k;
       pixelsPtr[3 * k]     = ((raw[index + 1] >> 2) & 0x1F) * 0xFF / 0x1F;
       pixelsPtr[3 * k + 1] = (((raw[index + 1] & 0x03) << 3) | (raw[index] >> 5)) * 0xFF / 0x1F;
       pixelsPtr[3 * k + 2] = (raw[index] & 0x1F) * 0xFF / 0x1F;
@@ -535,18 +535,18 @@ bool DecodeRGB1(FILE*          fp,
     return false;
   }
 
-  unsigned char     colorTable[8] = {0};
-  char              cmd;
-  unsigned int      fillw = ((width & 63) != 0) ? width + 64 - (width & 63) : width;
-  std::vector<char> colorIndex(fillw * height);
-  unsigned int      rowStride = fillw * 3; // RGB
+  std::uint8_t              colorTable[8] = {0};
+  std::uint8_t              cmd;
+  std::uint32_t             fillw = ((width & 63) != 0) ? width + 64 - (width & 63) : width;
+  std::vector<std::uint8_t> colorIndex(fillw * height);
+  std::uint32_t             rowStride = fillw * 3; // RGB
 
   if(fread(colorTable, 1, 8, fp) != 8)
   {
     return false;
   }
 
-  for(unsigned int i = 0; i < fillw * height; i += 8)
+  for(std::uint32_t i = 0; i < fillw * height; i += 8)
   {
     if(fread(&cmd, 1, 1, fp) != 1)
     {
@@ -563,9 +563,9 @@ bool DecodeRGB1(FILE*          fp,
     colorIndex[i + 7] = (cmd & 0x01);
   }
 
-  for(unsigned int index = 0; index < height; index = index + 1)
+  for(std::uint32_t index = 0; index < height; ++index)
   {
-    unsigned char* pixelsPtr = NULL;
+    std::uint8_t* pixelsPtr = NULL;
     if(topDown)
     {
       // the data in the file is top down, and we store the data top down
@@ -576,9 +576,9 @@ bool DecodeRGB1(FILE*          fp,
       // the data in the file is bottom up, and we store the data top down
       pixelsPtr = pixels + (((height - 1) - index) * rowStride);
     }
-    for(unsigned int j = 0; j < fillw; j++)
+    for(std::uint32_t j = 0; j < fillw; ++j)
     {
-      unsigned int ctIndex = 0;
+      std::uint32_t ctIndex = 0;
       if((fillw * index + j) < (fillw * height))
       {
         ctIndex = colorIndex[fillw * index + j];
@@ -627,18 +627,18 @@ bool DecodeRGB4(FILE*          fp,
     return false;
   }
 
-  char              colorTable[64];
-  char              cmd;
-  unsigned int      fillw = ((width & 3) != 0) ? width + 4 - (width & 3) : width;
-  std::vector<char> colorIndex(fillw * height);
-  unsigned int      rowStride = fillw * 3;
+  std::uint8_t              colorTable[64];
+  std::uint8_t              cmd;
+  std::uint32_t             fillw = ((width & 3) != 0) ? width + 4 - (width & 3) : width;
+  std::vector<std::uint8_t> colorIndex(fillw * height);
+  std::uint32_t             rowStride = fillw * 3;
 
   if(fread(colorTable, 1, 64, fp) != 64)
   {
     return false;
   }
 
-  for(unsigned int i = 0; i < fillw * height; i += 2)
+  for(std::uint32_t i = 0; i < fillw * height; i += 2)
   {
     if(fread(&cmd, 1, 1, fp) != 1)
     {
@@ -648,11 +648,11 @@ bool DecodeRGB4(FILE*          fp,
     colorIndex[i]     = cmd >> 4;
     colorIndex[i + 1] = cmd & (0x0F);
   }
-  unsigned int ctIndex = 0;
+  std::uint32_t ctIndex = 0;
 
-  for(unsigned int index = 0; index < height; index = index + 1)
+  for(std::uint32_t index = 0; index < height; ++index)
   {
-    unsigned char* pixelsPtr = NULL;
+    std::uint8_t* pixelsPtr = NULL;
     if(topDown)
     {
       // the data in the file is top down, and we store the data top down
@@ -663,7 +663,7 @@ bool DecodeRGB4(FILE*          fp,
       // the data in the file is bottom up, and we store the data top down
       pixelsPtr = pixels + (((height - 1) - index) * rowStride);
     }
-    for(unsigned int j = 0; j < fillw; j++)
+    for(std::uint32_t j = 0; j < fillw; ++j)
     {
       ctIndex                = colorIndex[fillw * index + j];
       pixelsPtr[3 * j]       = colorTable[4 * ctIndex + 2];
@@ -703,29 +703,23 @@ bool DecodeRGB8(FILE*          fp,
     return false;
   }
 
-  std::vector<char> colorTable(1024);
+  std::vector<std::uint8_t> colorTable(1024);
   width = ((width & 3) != 0) ? width + 4 - (width & 3) : width;
-  char              cmd;
-  std::vector<char> colorIndex(width * height);
-  unsigned int      rowStride = width * 3; //RGB8->RGB24
+  std::vector<std::uint8_t> colorIndex(width * height);
+  std::uint32_t             rowStride = width * 3; //RGB8->RGB24
 
   if(fread(&colorTable[0], 1, 1024, fp) != 1024)
   {
     return false;
   }
-  for(unsigned int i = 0; i < width * height; i++)
+  if(fread(&colorIndex[0], 1, width * height, fp) != width * height)
   {
-    if(fread(&cmd, 1, 1, fp) != 1)
-    {
-      return false;
-    }
-
-    colorIndex[i] = cmd;
+    return false;
   }
-  unsigned int ctIndex = 0;
-  for(unsigned int index = 0; index < height; index = index + 1)
+  std::uint8_t ctIndex = 0;
+  for(std::uint32_t index = 0; index < height; ++index)
   {
-    unsigned char* pixelsPtr = NULL;
+    std::uint8_t* pixelsPtr = NULL;
     if(topDown)
     {
       // the data in the file is top down, and we store the data top down
@@ -736,7 +730,7 @@ bool DecodeRGB8(FILE*          fp,
       // the data in the file is bottom up, and we store the data top down
       pixelsPtr = pixels + (((height - 1) - index) * rowStride);
     }
-    for(unsigned int j = 0; j < width; j++)
+    for(std::uint8_t j = 0; j < width; ++j)
     {
       ctIndex                = colorIndex[width * index + j];
       pixelsPtr[3 * j]       = colorTable[4 * ctIndex + 2];
@@ -769,17 +763,17 @@ bool DecodeRLE4(FILE*          fp,
     DALI_LOG_ERROR("Error decoding BMP_RLE4 format\n");
     return false;
   }
-  unsigned char* pixelsPtr = pixels;
-  width                    = ((width & 3) != 0) ? width + 4 - (width & 3) : width;
-  char              cmd[2];
-  unsigned int      cmdStride = 2;
-  char              colorTable[64];
-  std::vector<char> colorIndex(width * height >> 1);
-  std::vector<char> run;
-  unsigned int      x  = 0;
-  unsigned int      y  = 0;
-  unsigned int      dx = 0;
-  unsigned int      dy = 0;
+  std::uint8_t* pixelsPtr = pixels;
+  width                   = ((width & 3) != 0) ? width + 4 - (width & 3) : width;
+  std::uint8_t              cmd[2];
+  std::uint32_t             cmdStride = 2;
+  std::uint8_t              colorTable[64];
+  std::vector<std::uint8_t> colorIndex(width * height >> 1);
+  std::vector<std::uint8_t> run;
+  std::uint32_t             x  = 0;
+  std::uint32_t             y  = 0;
+  std::uint32_t             dx = 0;
+  std::uint32_t             dy = 0;
   width += (width & 1);
   width = width >> 1;
 
@@ -830,9 +824,9 @@ bool DecodeRLE4(FILE*          fp,
           break;
         default:
           // decode a literal run
-          unsigned int length = cmd[1] & (0xFF);
+          std::uint32_t length = cmd[1] & (0xFF);
           //size of run, which is word aligned
-          unsigned int bytesize = length;
+          std::uint32_t bytesize = length;
           bytesize += (bytesize & 1);
           bytesize >>= 1;
           bytesize += (bytesize & 1);
@@ -846,14 +840,14 @@ bool DecodeRLE4(FILE*          fp,
           {
             length += (length & 1);
             length >>= 1;
-            for(unsigned int i = 0; i < length; i += 1)
+            for(std::uint32_t i = 0; i < length; ++i)
             {
               colorIndex[(x >> 1) + width * (height - y - 1) + i] = run[i];
             }
           }
           else
           {
-            for(unsigned int i = 0; i < length; i++)
+            for(std::uint32_t i = 0; i < length; ++i)
             {
               if((i & 1) == 0) //copy high to low
               {
@@ -871,19 +865,19 @@ bool DecodeRLE4(FILE*          fp,
     }
     else
     {
-      unsigned int length = cmd[0] & (0xFF);
+      std::uint32_t length = cmd[0] & (0xFF);
       if((x & 1) == 0)
       {
         length += (length & 1);
         length >>= 1;
-        for(unsigned int i = 0; i < length; i++)
+        for(std::uint32_t i = 0; i < length; ++i)
         {
           colorIndex[(height - y - 1) * width + i + (x >> 1)] = cmd[1];
         }
       }
       else
       {
-        for(unsigned int i = 0; i < length; i++)
+        for(std::uint32_t i = 0; i < length; ++i)
         {
           if((i & 1) == 0)
           {
@@ -899,9 +893,9 @@ bool DecodeRLE4(FILE*          fp,
     }
   }
 
-  int ctIndexHigh = 0;
-  int ctIndexLow  = 0;
-  for(unsigned int index = 0; index < (width * height); index = index + 1)
+  std::uint32_t ctIndexHigh = 0;
+  std::uint32_t ctIndexLow  = 0;
+  for(std::uint32_t index = 0; index < (width * height); ++index)
   {
     ctIndexHigh              = colorIndex[index] >> 4;
     ctIndexLow               = colorIndex[index] & (0x0F);
@@ -937,15 +931,15 @@ bool DecodeRLE8(FILE*          fp,
     DALI_LOG_ERROR("Error decoding BMP_RLE8 format\n");
     return false;
   }
-  unsigned char* pixelsPtr = pixels;
-  unsigned int   x         = 0;
-  unsigned int   y         = 0;
-  unsigned int   cmdStride = 2;
+  std::uint8_t* pixelsPtr = pixels;
+  std::uint32_t x         = 0;
+  std::uint32_t y         = 0;
+  std::uint32_t cmdStride = 2;
 
   width = ((width & 3) != 0) ? width + 4 - (width & 3) : width;
-  std::vector<char> colorTable(1024);
-  char              cmd[2];
-  std::vector<char> colorIndex(width * height);
+  std::vector<std::uint8_t> colorTable(1024);
+  std::uint8_t              cmd[2];
+  std::vector<std::uint8_t> colorIndex(width * height);
 
   if(fseek(fp, offset, SEEK_SET))
   {
@@ -958,12 +952,12 @@ bool DecodeRLE8(FILE*          fp,
     return false;
   }
 
-  unsigned int      dx         = 0;
-  unsigned int      dy         = 0;
-  bool              finish     = false;
-  unsigned int      length     = 0;
-  unsigned int      copylength = 0;
-  std::vector<char> run;
+  std::uint32_t             dx         = 0;
+  std::uint32_t             dy         = 0;
+  bool                      finish     = false;
+  std::uint32_t             length     = 0;
+  std::uint32_t             copylength = 0;
+  std::vector<std::uint8_t> run;
   while((x + y * width) < width * height)
   {
     if(finish)
@@ -1010,7 +1004,7 @@ bool DecodeRLE8(FILE*          fp,
             return false;
           }
 
-          for(unsigned int i = 0; i < length; i += 1)
+          for(std::uint32_t i = 0; i < length; ++i)
           {
             colorIndex[x + width * (height - y - 1) + i] = run[i];
           }
@@ -1021,15 +1015,15 @@ bool DecodeRLE8(FILE*          fp,
     else
     {
       length = cmd[0] & (0xFF);
-      for(unsigned int i = 0; i < length; i++)
+      for(std::uint32_t i = 0; i < length; ++i)
       {
         colorIndex[(height - y - 1) * width + x] = cmd[1];
         x++;
       }
     }
   }
-  int ctIndex = 0;
-  for(unsigned int index = 0; index < width * height; index = index + 1)
+  std::uint32_t ctIndex = 0;
+  for(std::uint32_t index = 0; index < width * height; ++index)
   {
     ctIndex                  = colorIndex[index];
     pixelsPtr[3 * index]     = colorTable[4 * ctIndex + 2];
index f20b5ce..aee8621 100644 (file)
@@ -37,6 +37,9 @@ namespace
 Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_LOADER_WBMP");
 #endif
 
+// TODO : We need to determine it in dali-common.h or something else. Currently, we set this value in code level.
+#define DALI_BYTE_ORDER_BIG_ENDIAN 0
+
 #define IMG_MAX_SIZE 65536
 
 #define IMG_TOO_BIG(w, h)                                 \
@@ -84,6 +87,35 @@ int extractMultiByteInteger(unsigned int* data, void* map, size_t length, size_t
   return 0;
 }
 
+// Calculate 4bit integer into 4byte integer
+constexpr std::uint32_t Calculate4BitTo4Byte(const std::uint8_t& input)
+{
+  std::uint32_t output = 0;
+#if DALI_BYTE_ORDER_BIG_ENDIAN
+  output |= static_cast<std::uint32_t>(input & 0x08) << 21;
+  output |= static_cast<std::uint32_t>(input & 0x04) << 14;
+  output |= static_cast<std::uint32_t>(input & 0x02) << 7;
+  output |= static_cast<std::uint32_t>(input & 0x01);
+#else
+  output |= static_cast<std::uint32_t>(input & 0x08) >> 3;
+  output |= static_cast<std::uint32_t>(input & 0x04) << 6;
+  output |= static_cast<std::uint32_t>(input & 0x02) << 15;
+  output |= static_cast<std::uint32_t>(input & 0x01) << 24;
+#endif
+  return output * 0xff;
+}
+
+/**
+ * @brief Calculation result bit-->byte table in compile.
+ * Required memory = 16 * 4byte = 64byte
+ */
+// clang-format off
+constexpr std::uint32_t cachedCalculation4BitTo4ByteTable[16] = {
+  Calculate4BitTo4Byte(0x00), Calculate4BitTo4Byte(0x01), Calculate4BitTo4Byte(0x02), Calculate4BitTo4Byte(0x03),
+  Calculate4BitTo4Byte(0x04), Calculate4BitTo4Byte(0x05), Calculate4BitTo4Byte(0x06), Calculate4BitTo4Byte(0x07),
+  Calculate4BitTo4Byte(0x08), Calculate4BitTo4Byte(0x09), Calculate4BitTo4Byte(0x0a), Calculate4BitTo4Byte(0x0b),
+  Calculate4BitTo4Byte(0x0c), Calculate4BitTo4Byte(0x0d), Calculate4BitTo4Byte(0x0e), Calculate4BitTo4Byte(0x0f)};
+// clang-format on
 } // end unnamed namespace
 
 bool LoadBitmapFromWbmp(const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap)
@@ -95,14 +127,11 @@ bool LoadBitmapFromWbmp(const Dali::ImageLoader::Input& input, Dali::Devel::Pixe
     return false;
   }
   Dali::Vector<unsigned char> map;
-  Dali::Vector<unsigned char> surface; //unsigned int
   size_t                      position = 0;
 
-  unsigned int   w, h;
-  unsigned int   type;
-  unsigned int   line_length;
-  unsigned char* line = NULL;
-  unsigned int   cur  = 0, x, y;
+  std::uint32_t w, h;
+  std::uint32_t type;
+  std::uint32_t lineByteLength;
 
   if(fseek(fp, 0, SEEK_END))
   {
@@ -172,36 +201,70 @@ bool LoadBitmapFromWbmp(const Dali::ImageLoader::Input& input, Dali::Devel::Pixe
     return false;
   }
 
-  surface.ResizeUninitialized(w * h); //(w * h * 4);
-  memset(&surface[0], 0, w * h);      // w * h * 4
+  lineByteLength = (w + 7) >> 3;
+  // fsize was wrong! Load failed.
+  if(DALI_UNLIKELY(position + h * lineByteLength > fsize))
+  {
+    DALI_LOG_ERROR("Pixel infomation is bigger than file size! (%u + %u * %u > %u)\n", static_cast<std::uint32_t>(position), h, lineByteLength, fsize);
+    return false;
+  }
 
-  line_length = (w + 7) >> 3;
-  for(y = 0; y < h; y++)
+  // w >= 1 and h >= 1. So we can assume that outputPixels is not null.
+  auto outputPixels = (bitmap = Dali::Devel::PixelBuffer::New(w, h, Pixel::L8)).GetBuffer();
+  /**
+   * @code
+   * std::uint8_t* line = NULL;
+   * std::uint32_t cur  = 0, x, y;
+   * for(y = 0; y < h; y++)
+   * {
+   *   line = &map[0] + position;
+   *   position += lineByteLength;
+   *   for(x = 0; x < w; x++)
+   *   {
+   *     int idx    = x >> 3;
+   *     int offset = 1 << (0x07 - (x & 0x07));
+   *     if(line[idx] & offset)
+   *     {
+   *       outputPixels[cur] = 0xff; //0xffffffff;
+   *     }
+   *     else
+   *     {
+   *       outputPixels[cur] = 0x00; //0xff000000;
+   *     }
+   *     cur++;
+   *   }
+   * }
+   * @endcode
+   */
+
+  const std::uint8_t* inputPixels                  = &map[0] + position;
+  const std::uint32_t lineByteLengthWithoutPadding = w >> 3;
+  const std::uint8_t  linePadding                  = w & 0x07;
+
+  for(std::uint32_t y = 0; y < h; y++)
   {
-    if(position + line_length > fsize)
+    for(std::uint32_t x = 0; x < lineByteLengthWithoutPadding; x++)
     {
-      return false;
+      // memset whole 8 bits
+      // outputPixels filled 4 bytes in one operation.
+      // cachedCalculation4BitTo4ByteTable calculated in compile-time.
+      *(reinterpret_cast<std::uint32_t*>(outputPixels + 0)) = cachedCalculation4BitTo4ByteTable[((*inputPixels) >> 4) & 0x0f];
+      *(reinterpret_cast<std::uint32_t*>(outputPixels + 4)) = cachedCalculation4BitTo4ByteTable[(*inputPixels) & 0x0f];
+      outputPixels += 8;
+      ++inputPixels;
     }
-    line = &map[0] + position;
-    position += line_length;
-    for(x = 0; x < w; x++)
+    if(linePadding > 0)
     {
-      int idx    = x >> 3;
-      int offset = 1 << (0x07 - (x & 0x07));
-      if(line[idx] & offset)
+      // memset linePadding bits naive.
+      for(std::uint8_t x = 0; x < linePadding; ++x)
       {
-        surface[cur] = 0xff; //0xffffffff;
+        const std::uint8_t offset = (0x07 - (x & 0x07));
+        *outputPixels             = ((*inputPixels) >> offset) & 1 ? 0xff : 0x00;
+        ++outputPixels;
       }
-      else
-      {
-        surface[cur] = 0x00; //0xff000000;
-      }
-      cur++;
+      ++inputPixels;
     }
   }
-  auto pixels = (bitmap = Dali::Devel::PixelBuffer::New(w, h, Pixel::L8)).GetBuffer();
-
-  memcpy(pixels, &surface[0], w * h); //w * h * 4
 
   return true;
 }
index 99b8995..7353f9b 100644 (file)
@@ -40,6 +40,31 @@ public:
    * Set content information to widget framework
    */
   virtual void SetContentInfo(const std::string& contentInfo) = 0;
+
+  /**
+   * Check Widget is using key
+   */
+  virtual bool IsKeyEventUsing() const = 0;
+
+  /**
+   * Set the flag that widget is using keyEvent
+   */
+  virtual void SetUsingKeyEvent(bool flag) = 0;
+
+  /**
+   * Set the Information of widget
+   */
+  virtual void SetInformation(Dali::Window window, const std::string& widgetId) = 0;
+
+  /**
+   * Get the window
+   */
+  virtual Dali::Window GetWindow() const = 0;
+
+  /**
+   * Get the widget id
+   */
+  virtual std::string GetWidgetId() const = 0;
 };
 
 } // namespace Adaptor
index 227284a..2faa238 100644 (file)
@@ -24,6 +24,7 @@
 #include <dali/internal/system/tizen-wayland/widget-controller-tizen.h>
 #include <dali/public-api/adaptor-framework/widget-impl.h>
 #include <dali/public-api/adaptor-framework/widget.h>
+#include <dali/devel-api/events/key-event-devel.h>
 
 // EXTERNAL INCLUDES
 #include <bundle.h>
@@ -35,6 +36,45 @@ namespace Internal
 {
 namespace
 {
+/**
+ * This Api is called when widget viewer send keyEvent.
+ * In this API, widget framework create a new keyEvent, find the proper widget and send this event.
+ * Finally widget framework receive feedback from widget.
+ */
+#ifdef OVER_TIZEN_VERSION_7
+bool OnKeyEventCallback(const char *id, screen_connector_event_type_e eventType, int keyCode, const char *keyName, long long cls, long long subcls, const char* identifier, long long timestamp, void *userData)
+{
+  Dali::Internal::Adaptor::WidgetApplicationTizen* application = static_cast<Dali::Internal::Adaptor::WidgetApplicationTizen*>(userData);
+
+  // Create new key for widget
+  Dali::KeyEvent::State state = Dali::KeyEvent::DOWN;
+  if(eventType == SCREEN_CONNECTOR_EVENT_TYPE_KEY_DOWN)
+  {
+    state = Dali::KeyEvent::DOWN;
+  }
+  else if(eventType == SCREEN_CONNECTOR_EVENT_TYPE_KEY_UP)
+  {
+    state = Dali::KeyEvent::UP;
+  }
+
+  bool consumed = true;
+  std::string keyEventName = std::string(keyName);
+  Dali::KeyEvent event = Dali::DevelKeyEvent::New(keyEventName, "", "", keyCode, 0, timestamp, state, "", "", Device::Class::NONE, Device::Subclass::NONE);
+
+  if(application)
+  {
+    std::string widgetId = std::string(id);
+    widget_base_instance_h instanceHandle = application->GetWidgetInstanceFromWidgetId(widgetId);
+    if(instanceHandle)
+    {
+      consumed = application->FeedKeyEvent(instanceHandle, event);
+    }
+  }
+
+  return consumed;
+}
+#endif
+
 int OnInstanceInit(widget_base_instance_h instanceHandle, bundle* content, int w, int h, void* classData)
 {
   char* id;
@@ -79,11 +119,12 @@ int OnInstanceInit(widget_base_instance_h instanceHandle, bundle* content, int w
   Dali::WidgetApplication::CreateWidgetFunction                        createFunction = pair.second;
 
   Dali::Widget widgetInstance = createFunction(pair.first);
-  application->AddWidget(instanceHandle, widgetInstance, window);
 
   Dali::Internal::Adaptor::Widget::Impl* widgetImpl = new Dali::Internal::Adaptor::WidgetImplTizen(instanceHandle);
   Internal::Adaptor::GetImplementation(widgetInstance).SetImpl(widgetImpl);
 
+  application->AddWidget(instanceHandle, widgetInstance, window, std::string(id));
+
   std::string encodedContentString = "";
 
   if(bundle_get_count(content))
@@ -98,6 +139,11 @@ int OnInstanceInit(widget_base_instance_h instanceHandle, bundle* content, int w
 
   Internal::Adaptor::GetImplementation(widgetInstance).OnCreate(encodedContentString, window);
 
+  // connect keyEvent for widget
+#ifdef OVER_TIZEN_VERSION_7
+  application->ConnectKeyEvent(window);
+#endif
+
   return 0;
 }
 
@@ -172,7 +218,7 @@ int OnInstanceResize(widget_base_instance_h instanceHandle, int w, int h, void*
 
   // Get Dali::Widget instance.
   Dali::Widget widgetInstance = application->GetWidget(instanceHandle);
-  Dali::Window window         = application->GetWindowFromWidget(instanceHandle);
+  Dali::Window window         = application->GetWindowFromWidget(widgetInstance);
   window.SetSize(Dali::Window::WindowSize(w, h));
   Internal::Adaptor::GetImplementation(widgetInstance).OnResize(window);
 
@@ -225,7 +271,9 @@ WidgetApplicationPtr WidgetApplicationTizen::New(
 }
 
 WidgetApplicationTizen::WidgetApplicationTizen(int* argc, char** argv[], const std::string& stylesheet)
-: WidgetApplication(argc, argv, stylesheet)
+: WidgetApplication(argc, argv, stylesheet),
+  mConnectedKeyEvent(false),
+  mReceivedKeyEvent(false)
 {
 }
 
@@ -269,10 +317,10 @@ WidgetApplicationTizen::CreateWidgetFunctionPair WidgetApplicationTizen::GetWidg
   return CreateWidgetFunctionPair("", NULL);
 }
 
-void WidgetApplicationTizen::AddWidget(widget_base_instance_h widgetBaseInstance, Dali::Widget widget, Dali::Window window)
+void WidgetApplicationTizen::AddWidget(widget_base_instance_h widgetBaseInstance, Dali::Widget widget, Dali::Window window, const std::string& widgetId)
 {
   mWidgetInstanceContainer.push_back(WidgetInstancePair(widgetBaseInstance, widget));
-  mWindowInstanceContainer.push_back(WindowInstancePair(widgetBaseInstance, window));
+  Internal::Adaptor::GetImplementation(widget).SetInformation(window, widgetId);
 }
 
 Dali::Widget WidgetApplicationTizen::GetWidget(widget_base_instance_h widgetBaseInstance) const
@@ -298,29 +346,29 @@ void WidgetApplicationTizen::DeleteWidget(widget_base_instance_h widgetBaseInsta
   {
     mWidgetInstanceContainer.erase(widgetInstance);
   }
+}
 
-  // Delete WindowInstance
-  auto windowInstance = std::find_if(mWindowInstanceContainer.begin(),
-                                     mWindowInstanceContainer.end(),
-                                     [widgetBaseInstance](WindowInstancePair pair) { return (pair.first == widgetBaseInstance); });
-
-  if(windowInstance != mWindowInstanceContainer.end())
+Dali::Window WidgetApplicationTizen::GetWindowFromWidget(Dali::Widget widgetInstance) const
+{
+  if(widgetInstance)
   {
-    mWindowInstanceContainer.erase(windowInstance);
+    return Internal::Adaptor::GetImplementation(widgetInstance).GetWindow();
   }
+
+  return Dali::Window();
 }
 
-Dali::Window WidgetApplicationTizen::GetWindowFromWidget(widget_base_instance_h widgetBaseInstance) const
+widget_base_instance_h WidgetApplicationTizen::GetWidgetInstanceFromWidgetId(std::string& widgetId) const
 {
-  for(auto&& iter : mWindowInstanceContainer)
+  for(auto&& iter : mWidgetInstanceContainer)
   {
-    if((iter).first == widgetBaseInstance)
+    if(widgetId == Internal::Adaptor::GetImplementation((iter).second).GetWidgetId())
     {
-      Dali::Window ret = (iter).second;
-      return ret;
+      return (iter).first;
     }
   }
-  return Dali::Window();
+
+  return nullptr;
 }
 
 int WidgetApplicationTizen::GetWidgetCount()
@@ -328,6 +376,51 @@ int WidgetApplicationTizen::GetWidgetCount()
   return mWidgetInstanceContainer.size();
 }
 
+void WidgetApplicationTizen::ConnectKeyEvent(Dali::Window window)
+{
+  if(!mConnectedKeyEvent)
+  {
+#ifdef OVER_TIZEN_VERSION_7
+    screen_connector_provider_set_key_event_cb(OnKeyEventCallback, this);
+#endif
+    mConnectedKeyEvent = true;
+  }
+  window.KeyEventSignal().Connect(this, &WidgetApplicationTizen::OnWindowKeyEvent);
+}
+
+void WidgetApplicationTizen::OnWindowKeyEvent(const Dali::KeyEvent& event)
+{
+  //If Widget Application consume key event, this api is not called.
+  mReceivedKeyEvent = true;
+}
+
+bool WidgetApplicationTizen::FeedKeyEvent(widget_base_instance_h instanceHandle, const Dali::KeyEvent& keyEvent)
+{
+  bool consumed = true;
+
+  // Check if application consume key event
+  Dali::Widget widgetInstance = GetWidget(instanceHandle);
+  if(widgetInstance)
+  {
+    Dali::Window window = GetWindowFromWidget(widgetInstance);
+
+    // Reset the state of key received
+    mReceivedKeyEvent = false;
+
+    // Feed the keyEvent to widget window
+    DevelWindow::FeedKeyEvent(window, keyEvent);
+
+    // if the application is not using a key event, verify that the window in the widget has received a key event.
+    if(Internal::Adaptor::GetImplementation(widgetInstance).IsKeyEventUsing() == false)
+    {
+      // if the window has received a key event, widget need to consume its key event
+      consumed = (mReceivedKeyEvent) ? false : true;
+    }
+  }
+
+  return consumed;
+}
+
 void WidgetApplicationTizen::OnInit()
 {
   WidgetApplication::OnInit();
index f2462bd..80166bd 100644 (file)
@@ -20,6 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <widget_base.h>
+#include <screen_connector_provider.h>
 
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/window-devel.h>
@@ -40,7 +41,7 @@ typedef IntrusivePtr<WidgetApplication> WidgetApplicationPtr;
 /**
  * Implementation of the WidgetApplication class.
  */
-class WidgetApplicationTizen : public WidgetApplication
+class WidgetApplicationTizen : public WidgetApplication, public ConnectionTracker
 {
 public:
   typedef std::pair<const std::string, Dali::WidgetApplication::CreateWidgetFunction> CreateWidgetFunctionPair;
@@ -78,7 +79,7 @@ public:
   /**
    * Add widget_base_instance_h - Widget instance pair to container.
    */
-  void AddWidget(widget_base_instance_h widgetBaseInstance, Dali::Widget widget, Dali::Window window);
+  void AddWidget(widget_base_instance_h widgetBaseInstance, Dali::Widget widget, Dali::Window window, const std::string& widgetId);
 
   /**
    * Find and get Widget instance in container by widget_base_instance_h.
@@ -93,13 +94,42 @@ public:
   /**
    * Find and get Window instance in container by widget_base_instance_h.
    */
-  Dali::Window GetWindowFromWidget(widget_base_instance_h widgetBaseInstance) const;
+  Dali::Window GetWindowFromWidget(Dali::Widget widget) const;
 
   /**
+   * Find and get widget_base_instance in container by widget id.
+   */
+  widget_base_instance_h GetWidgetInstanceFromWidgetId(std::string& widgetId) const;
+  /**
    * Get the number of created widget.
    */
   int32_t GetWidgetCount();
 
+  /**
+   * @brief connect the keyEvent for window
+   *
+   * @param[in] window window for connecting keyEvent
+   */
+  void ConnectKeyEvent(Dali::Window window);
+
+  /**
+   * @brief Callback for widget window
+   *
+   * If Widget Application consume key event, this api is not called.
+   *
+   * @param[in] event The key event.
+   */
+  void OnWindowKeyEvent(const Dali::KeyEvent& event);
+
+  /**
+   * @brief Feed keyEvent to Widget.
+   *
+   * @param[in] instanceHandle the handle of widget instance
+   * @param[in] keyEvent The key event for widget
+   * @return True if widget consume keyEvent, false otherwise.
+   */
+  bool FeedKeyEvent(widget_base_instance_h instanceHandle, const Dali::KeyEvent& keyEvent);
+
 protected:
   /**
    * Private Constructor
@@ -124,9 +154,8 @@ private:
   CreateWidgetFunctionContainer mCreateWidgetFunctionContainer;
   WidgetInstanceContainer       mWidgetInstanceContainer;
 
-  typedef std::pair<widget_base_instance_h, Dali::Window> WindowInstancePair;
-  typedef std::vector<WindowInstancePair>                 WindowInstanceContainer;
-  WindowInstanceContainer                                 mWindowInstanceContainer;
+  bool mConnectedKeyEvent; // Check if keyEvent is connected
+  bool mReceivedKeyEvent;  // Check if application receive keyEvent
 };
 
 } // namespace Adaptor
index d4c4498..efe9f16 100644 (file)
@@ -30,7 +30,10 @@ namespace Adaptor
 {
 WidgetImplTizen::WidgetImplTizen(widget_base_instance_h instanceHandle)
 : Widget::Impl(),
-  mInstanceHandle(instanceHandle)
+  mInstanceHandle(instanceHandle),
+  mWindow(),
+  mWidgetId(),
+  mUsingKeyEvent(false)
 {
 }
 
@@ -50,6 +53,32 @@ void WidgetImplTizen::SetContentInfo(const std::string& contentInfo)
   bundle_free(contentBundle);
 }
 
+bool WidgetImplTizen::IsKeyEventUsing() const
+{
+  return mUsingKeyEvent;
+}
+
+void WidgetImplTizen::SetUsingKeyEvent(bool flag)
+{
+  mUsingKeyEvent = flag;
+}
+
+void WidgetImplTizen::SetInformation(Dali::Window window, const std::string& widgetId)
+{
+  mWindow = window;
+  mWidgetId = widgetId;
+}
+
+Dali::Window WidgetImplTizen::GetWindow() const
+{
+  return mWindow;
+}
+
+std::string WidgetImplTizen::GetWidgetId() const
+{
+  return mWidgetId;
+}
+
 } // namespace Adaptor
 
 } // namespace Internal
index de6ae1d..5877f42 100644 (file)
@@ -54,8 +54,36 @@ public:
    */
   void SetContentInfo(const std::string& contentInfo) override;
 
+  /**
+   * Check Widget is using key
+   */
+  bool IsKeyEventUsing() const override;
+
+  /**
+   * Set the flag that widget is using keyEvent
+   */
+  void SetUsingKeyEvent(bool flag) override;
+
+  /**
+   * Set the Information of widget
+   */
+  void SetInformation(Dali::Window window, const std::string& widgetId) override;
+
+  /**
+   * Get the window
+   */
+  Dali::Window GetWindow() const override;
+
+  /**
+   * Get the widget id
+   */
+  std::string GetWidgetId() const override;
+
 private:
   widget_base_instance_h mInstanceHandle;
+  Dali::Window           mWindow;
+  std::string            mWidgetId;
+  bool                   mUsingKeyEvent;
 };
 
 } // namespace Adaptor
index dc40cdd..2596642 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -36,6 +36,29 @@ void WidgetImplUbuntu::SetContentInfo(const std::string& contentInfo)
 {
 }
 
+bool WidgetImplUbuntu::IsKeyEventUsing() const
+{
+  return false;
+}
+
+void WidgetImplUbuntu::SetUsingKeyEvent(bool flag)
+{
+}
+
+void WidgetImplUbuntu::SetInformation(Dali::Window window, const std::string& widgetId)
+{
+}
+
+Dali::Window WidgetImplUbuntu::GetWindow() const
+{
+  return Dali::Window();
+}
+
+std::string WidgetImplUbuntu::GetWidgetId() const
+{
+  return std::string();
+}
+
 } // namespace Adaptor
 
 } // namespace Internal
index 685e52a..798e066 100644 (file)
@@ -51,6 +51,31 @@ public:
    * Set content information to widget framework
    */
   void SetContentInfo(const std::string& contentInfo) override;
+
+  /**
+   * Check Widget is using key
+   */
+  bool IsKeyEventUsing() const override;
+
+  /**
+   * Set the flag that widget is using keyEvent
+   */
+  void SetUsingKeyEvent(bool flag) override;
+
+  /**
+   * Set the Information of widget
+   */
+  void SetInformation(Dali::Window window, const std::string& widgetId) override;
+
+  /**
+   * Get the window
+   */
+  Dali::Window GetWindow() const override;
+
+  /**
+   * Get the widget id
+   */
+  std::string GetWidgetId() const override;
 };
 
 } // namespace Adaptor
index 7dd6686..5c8022e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -36,6 +36,29 @@ void WidgetImplWin::SetContentInfo(const std::string& contentInfo)
 {
 }
 
+bool WidgetImplWin::IsKeyEventUsing() const
+{
+  return false;
+}
+
+void WidgetImplWin::SetUsingKeyEvent(bool flag)
+{
+}
+
+void WidgetImplWin::SetInformation(Dali::Window window, const std::string& widgetId)
+{
+}
+
+Dali::Window WidgetImplWin::GetWindow() const
+{
+  return Dali::Window();
+}
+
+std::string WidgetImplWin::GetWidgetId() const
+{
+  return std::string();
+}
+
 } // namespace Adaptor
 
 } // namespace Internal
index 63fe4e4..de1e896 100644 (file)
@@ -51,6 +51,31 @@ public:
    * Set content information to widget framework
    */
   void SetContentInfo(const std::string& contentInfo) override;
+
+  /**
+   * Check Widget is using key
+   */
+  bool IsKeyEventUsing() const override;
+
+  /**
+   * Set the flag that widget is using keyEvent
+   */
+  void SetUsingKeyEvent(bool flag) override;
+
+  /**
+   * Set the Information of widget
+   */
+  void SetInformation(Dali::Window window, const std::string& widgetId) override;
+
+  /**
+   * Get the window
+   */
+  Dali::Window GetWindow() const override;
+
+  /**
+   * Get the widget id
+   */
+  std::string GetWidgetId() const override;
 };
 
 } // namespace Adaptor
index 6df39a0..8ac4d30 100644 (file)
@@ -87,11 +87,59 @@ void Widget::SetContentInfo(const std::string& contentInfo)
   }
 }
 
+bool Widget::IsKeyEventUsing() const
+{
+  if(mImpl != nullptr)
+  {
+    return mImpl->IsKeyEventUsing();
+  }
+
+  //if mImpl is null, return default value
+  return false;
+}
+
+void Widget::SetUsingKeyEvent(bool flag)
+{
+  if(mImpl != nullptr)
+  {
+    mImpl->SetUsingKeyEvent(flag);
+  }
+}
+
 void Widget::SetImpl(Impl* impl)
 {
   mImpl = impl;
 }
 
+
+void Widget::SetInformation(Dali::Window window, const std::string& widgetId)
+{
+  if(mImpl != nullptr)
+  {
+    mImpl->SetInformation(window, widgetId);
+  }
+}
+
+Dali::Window Widget::GetWindow() const
+{
+  if(mImpl != nullptr)
+  {
+    return mImpl->GetWindow();
+  }
+
+  return Dali::Window();
+}
+
+std::string Widget::GetWidgetId() const
+{
+  if(mImpl != nullptr)
+  {
+    return mImpl->GetWidgetId();
+  }
+
+  return std::string();
+}
+
 Internal::Adaptor::Widget& GetImplementation(Dali::Widget& widget)
 {
   DALI_ASSERT_ALWAYS(widget && "widget handle is empty");
index 3e7e87a..06e990f 100644 (file)
@@ -131,6 +131,22 @@ public:
    */
   void SetContentInfo(const std::string& contentInfo);
 
+  /**
+   * @brief Check Widget is using key
+   *
+   * widget can set flag to SetUsingKeyEvent
+   *
+   * @return True if Widget is using key
+   */
+  bool IsKeyEventUsing() const;
+
+  /**
+   * @brief Set the flag that widget is using keyEvent
+   *
+   * @param[in] flag The flag to set.
+   */
+  void SetUsingKeyEvent(bool flag);
+
 protected:
   /**
    * @brief WidgetImpl constructor
@@ -152,6 +168,28 @@ public:
    */
   void SetImpl(Impl* impl);
 
+  /**
+   * @brief Set the Information of widget
+   *
+   * @param window The window to set the information of widget
+   * @param widgetId The Id of widget
+   */
+  void SetInformation(Dali::Window window, const std::string& widgetId);
+
+  /**
+   * @brief Get the Window of widget
+   *
+   * @return the window of widget
+   */
+  Dali::Window GetWindow() const;
+
+  /**
+   * @brief Get the id of widget
+   *
+   * @return the id of widget
+   */
+  std::string GetWidgetId() const;
+
 private:
   Impl* mImpl;
 
index e89a8ad..d352b4b 100644 (file)
@@ -27,7 +27,7 @@ namespace Dali
 {
 const unsigned int ADAPTOR_MAJOR_VERSION = 2;
 const unsigned int ADAPTOR_MINOR_VERSION = 1;
-const unsigned int ADAPTOR_MICRO_VERSION = 13;
+const unsigned int ADAPTOR_MICRO_VERSION = 15;
 const char* const  ADAPTOR_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index e59f8e1..1d3a665 100644 (file)
@@ -17,7 +17,7 @@
 
 Name:       dali2-adaptor
 Summary:    The DALi Tizen Adaptor
-Version:    2.1.13
+Version:    2.1.15
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT
@@ -36,9 +36,9 @@ BuildRequires:  pkgconfig(libtzplatform-config)
 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
 BuildRequires:  pkgconfig(capi-appfw-watch-application)
 BuildRequires:  pkgconfig(appcore-watch)
-BuildRequires:  pkgconfig(screen_connector_provider)
 %endif
 
+BuildRequires:  pkgconfig(screen_connector_provider)
 BuildRequires:  pkgconfig(gles20)
 BuildRequires:  pkgconfig(glesv2)
 BuildRequires:  pkgconfig(ttrace)