-
Notifications
You must be signed in to change notification settings - Fork 40
Add DirectFb backend #56
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
Open
munezbn
wants to merge
14
commits into
WebPlatformForEmbedded:master
Choose a base branch
from
nagra-opentv:directfb-backend
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 13 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
e45a5a3
Added Initial version of Directfb Backend [ Not Tested ]
munezbn 1fa73b0
Moved FindDirectFB to root cmake directory and also updated the license
munezbn af7a108
Added comments for platform specific changes
munezbn b270c68
Cleanup BCM Platform specific code
munezbn 8d246e2
Wpebackend-rdk lib Must link to directfb libraries
munezbn f48f24b
commented verbose prints. In future we need to add Logging macro
munezbn 4188677
Enable DirectFB backend by default
ekegulskiy d1f4a06
When backend renderer window is resized, free graphics memory for ver…
fd60860
Fix DFB window initialization problem when surface capabilities are n…
9a5791c
Enable support for non-focused popup windows (e.g. window.open)
8bc431c
Cleanup unused CFLAGS/LDFLAGS
f1f646a
Added assert, abort and Logging Macro for Directfb Backend.
ef411bf
Use Pixel format of the graphics layer instead of forcing ABGR
munezbn f9c10e2
By default keep Directfb Backend OFF as other backends
munezbn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # - Try to Find DirectFB | ||
| # Once done, this will define | ||
| # | ||
| # DIRECTFB_FOUND - system has DirectFB. | ||
| # DIRECTFB_INCLUDE_DIRS - the DirectFB include directories | ||
| # DIRECTFB_LIBRARIES - link these to use DirectFB. | ||
| # | ||
| # Copyright (C) 2014 Igalia S.L. | ||
| # Copyright (C) 1994-2020 OpenTV, Inc. and Nagravision S.A. | ||
| # | ||
| # Redistribution and use in source and binary forms, with or without | ||
| # modification, are permitted provided that the following conditions | ||
| # are met: | ||
| # 1. Redistributions of source code must retain the above copyright | ||
| # notice, this list of conditions and the following disclaimer. | ||
| # 2. Redistributions in binary form must reproduce the above copyright | ||
| # notice, this list of conditions and the following disclaimer in the | ||
| # documentation and/or other materials provided with the distribution. | ||
| # | ||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS | ||
| # IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
| # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS | ||
| # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
| # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
| # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | ||
| # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
| # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | ||
| # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | ||
| # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
|
||
|
|
||
|
|
||
| find_package(PkgConfig) | ||
|
|
||
| pkg_check_modules(PC_DIRECTFB directfb) | ||
|
|
||
| if (PC_DIRECTFB_FOUND) | ||
| set(DIRECTFB_DEFINITIONS ${PC_DIRECTFB_CFLAGS_OTHER}) | ||
| endif () | ||
|
|
||
| find_path(DIRECTFB_INCLUDE_DIRS NAMES directfb.h | ||
| HINTS ${PC_DIRECTFB_INCLUDEDIR} ${PC_DIRECTFB_INCLUDE_DIRS} | ||
| ) | ||
|
|
||
| find_library(DIRECTFB_LIBRARIES directfb | ||
| HINTS ${PC_DIRECTFB_LIBDIR} ${PC_DIRECTFB_LIBRARY_DIRS} | ||
| ) | ||
|
|
||
| include(FindPackageHandleStandardArgs) | ||
| FIND_PACKAGE_HANDLE_STANDARD_ARGS(DIRECTFB DEFAULT_MSG DIRECTFB_INCLUDE_DIRS DIRECTFB_LIBRARIES) | ||
|
|
||
| mark_as_advanced(DIRECTFB_INCLUDE_DIRS DIRECTFB_LIBRARIES) | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/src/directfb/cmake") | ||
|
|
||
| find_package(EGL REQUIRED) | ||
| find_package(DirectFB REQUIRED) | ||
|
|
||
| add_definitions(-DBACKEND_DIRECTFB=1) | ||
|
|
||
| list(APPEND WPE_PLATFORM_INCLUDE_DIRECTORIES | ||
| ${DIRECTFB_INCLUDE_DIRS} | ||
| "${CMAKE_SOURCE_DIR}/src/diretfb/" | ||
| ) | ||
|
|
||
| list(APPEND WPE_PLATFORM_LIBRARIES | ||
| ${DIRECTFB_LIBRARIES} | ||
| ${EGL_LIBRARIES_dbpl} | ||
| ) | ||
|
|
||
| list(APPEND WPE_PLATFORM_SOURCES | ||
| src/directfb/renderer-backend.cpp | ||
| src/directfb/view-backend.cpp | ||
| src/directfb/display.cpp | ||
| ) | ||
|
|
||
| if (USE_INPUT_LIBINPUT OR USE_VIRTUAL_KEYBOARD) | ||
| add_definitions(-DKEY_INPUT_HANDLING_LIBINPUT=1) | ||
| endif () | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| /* | ||
| * Copyright (C) 2018-2020 OpenTV, Inc. and Nagravision S.A. | ||
| * All rights reserved. | ||
| * | ||
| * Redistribution and use in source and binary forms, with or without | ||
| * modification, are permitted provided that the following conditions | ||
| * are met: | ||
| * 1. Redistributions of source code must retain the above copyright | ||
| * notice, this list of conditions and the following disclaimer. | ||
| * 2. Redistributions in binary form must reproduce the above copyright | ||
| * notice, this list of conditions and the following disclaimer in the | ||
| * documentation and/or other materials provided with the distribution. | ||
| * | ||
| * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A | ||
| * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
| * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
| * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
| * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| */ | ||
|
|
||
| #ifndef __DFB_BACKEND_LOG_H | ||
| #define __DFB_BACKEND_LOG_H | ||
|
|
||
| #include <stdint.h> | ||
|
|
||
| #define WPEB_DFB_LOG_DEFAULT_TYPE 1 /* Default fprintf with color logging */ | ||
|
|
||
| #define WPEB_DFB_ABORT(cond) abort() | ||
| #define WPEB_DFB_ASSERT(cond) assert((cond)) | ||
|
|
||
| #if defined (WPEB_DFB_LOG_DEFAULT_TYPE) && (WPEB_DFB_LOG_DEFAULT_TYPE == 1) | ||
|
|
||
| #define WPEB_DFB_LOG_LEVEL 3 /* 0 Critical, 1 Error, 2 Warning, 3 Info, 4 Debug, 5 Trace */ | ||
|
|
||
| #if (WPEB_DFB_LOG_LEVEL >= 0) | ||
| #define WPEB_DFB_LOG_CRITICAL(msg, args...) fprintf(stderr, "\033[22;31m[WPEBACKEND_DFB] [CRITICAL] %-24s +%-4d : \033[22;0m" msg , __FILE__, __LINE__, ## args); | ||
| #else | ||
| #define WPEB_DFB_LOG_CRITICAL(msg, args...) ((void)0) | ||
| #endif | ||
|
|
||
| #if (WPEB_DFB_LOG_LEVEL >= 1) | ||
| #define WPEB_DFB_LOG_ERROR(msg, args...) fprintf(stderr, "\033[22;31m[WPEBACKEND_DFB] [ERROR] %-24s +%-4d : \033[22;0m" msg , __FILE__, __LINE__, ## args); | ||
| #else | ||
| #define WPEB_DFB_LOG_ERROR(msg, args...) ((void)0) | ||
| #endif | ||
|
|
||
| #if (WPEB_DFB_LOG_LEVEL >= 2) | ||
| #define WPEB_DFB_LOG_WARNING(msg, args...) fprintf(stderr, "\033[22;35m[WPEBACKEND_DFB] [WARN] %-24s +%-4d : \033[22;0m" msg , __FILE__, __LINE__, ## args); | ||
| #else | ||
| #define WPEB_DFB_LOG_WARNING(msg, args...) ((void)0) | ||
| #endif | ||
|
|
||
| #if (WPEB_DFB_LOG_LEVEL >= 3) | ||
| #define WPEB_DFB_LOG_INFO(msg, args...) fprintf(stderr, "\033[22;34m[WPEBACKEND_DFB] [INFO] %-24s +%-4d : \033[22;0m" msg , __FILE__, __LINE__, ## args); | ||
| #else | ||
| #define WPEB_DFB_LOG_INFO(msg, args...) ((void)0) | ||
| #endif | ||
|
|
||
| #if (WPEB_DFB_LOG_LEVEL >= 4) | ||
| #define WPEB_DFB_LOG_DEBUG(msg, args...) fprintf(stderr, "\033[22;32m[WPEBACKEND_DFB] [DEBUG] %-24s +%-4d : \033[22;0m" msg , __FILE__, __LINE__, ## args); | ||
| #else | ||
| #define WPEB_DFB_LOG_DEBUG(msg, args...) ((void)0) | ||
| #endif | ||
|
|
||
| #if (WPEB_DFB_LOG_LEVEL >= 5) | ||
| #define WPEB_DFB_LOG_TRACE(msg, args...) fprintf(stderr, "\033[22;33m[WPEBACKEND_DFB] [TRACE] %-24s +%-4d : \033[22;0m" msg , __FILE__, __LINE__, ## args); | ||
| #else | ||
| #define WPEB_DFB_LOG_TRACE(msg, args...) ((void)0) | ||
| #endif | ||
|
|
||
| #else /* Disable logging */ | ||
|
|
||
| #define WPEB_DFB_LOG_CRITICAL ((void)0) | ||
| #define WPEB_DFB_LOG_ERROR ((void)0) | ||
| #define WPEB_DFB_LOG_WARNING ((void)0) | ||
| #define WPEB_DFB_LOG_INFO ((void)0) | ||
| #define WPEB_DFB_LOG_DEBUG ((void)0) | ||
| #define WPEB_DFB_LOG_TRACE ((void)0) | ||
|
|
||
| #endif /* WPEB_DFB_LOG_DEFAULT_TYPE*/ | ||
|
|
||
| #endif /*__DFB_BACKEND_LOG_H*/ |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.