mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-24 17:44:19 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18f51a113d | ||
|
|
12313a2646 | ||
|
|
3ce8e5e8af | ||
|
|
a8b54bc301 | ||
|
|
7f711b383a | ||
|
|
bbda500121 | ||
|
|
deb248c96e | ||
|
|
c8e9b72663 | ||
|
|
0ff551a2da | ||
|
|
aef1e366f4 | ||
|
|
41d8a80c8e | ||
|
|
cbd2cea0e9 | ||
|
|
0c5f5115e6 | ||
|
|
86da42231c | ||
|
|
20974f305a | ||
|
|
5a22e67680 | ||
|
|
bae24f0964 | ||
|
|
2871657b65 | ||
|
|
767a8b088e | ||
|
|
2f77a0a8c8 | ||
|
|
2900f37c23 | ||
|
|
57bdcd4754 | ||
|
|
b95538a415 | ||
|
|
fa7c84b2b5 | ||
|
|
bc77048488 | ||
|
|
2f21b22a49 | ||
|
|
ec91986854 | ||
|
|
e7b03037be | ||
|
|
9ff822c7fd | ||
|
|
239924c63e | ||
|
|
2f85645e9d |
+2
-2
@@ -1,5 +1,5 @@
|
||||
MAJOR_VERSION = 4
|
||||
MINOR_VERSION = 1
|
||||
MAJOR_VERSION = 5
|
||||
MINOR_VERSION = 0
|
||||
MICRO_VERSION = 0
|
||||
EXTRAVERSION =
|
||||
|
||||
|
||||
@@ -6,18 +6,22 @@ A mature and proven cross-platform GUI system for embedded and smart IoT devices
|
||||
## TABLE OF CONTENTS
|
||||
|
||||
- [INTRODUCTION](#introduction)
|
||||
+ [What's MiniGUI](#whats-minigui)
|
||||
+ [MiniGUI Components](#minigui-components)
|
||||
+ [Open Source Apps Based-on MiniGUI](#open-source-apps-based-on-minigui)
|
||||
+ [MiniGUI and HybridOS](#minigui-and-hybridos)
|
||||
+ [Source Code Repositories](#source-code-repositories)
|
||||
- [NEW FEATURES IN VERSION 5.0.x](#new-features-in-version-50x)
|
||||
+ [Compositing schema](#compositing-schema)
|
||||
+ [New main window types](#new-main-window-types)
|
||||
+ [Virtual window](#virtual-window)
|
||||
+ [Other enhancements](#other-enhancements)
|
||||
+ [Compositing Schema](#compositing-schema)
|
||||
+ [New Main Window Types](#new-main-window-types)
|
||||
+ [Virtual Window](#virtual-window)
|
||||
+ [Other Enhancements](#other-enhancements)
|
||||
- [NEW FEATURES IN VERSION 4.0.x](#new-features-in-version-40x)
|
||||
- [NEW FEATURES IN VERSION 3.2.x](#new-features-in-version-32x)
|
||||
- [THE RUNTIME MODES OF MINIGUI](#the-runtime-modes-of-minigui)
|
||||
- [A BRIEF BUILDING INSTRUCTION](#a-brief-building-instruction)
|
||||
+ [Prerequisites](#prerequisites)
|
||||
+ [Building Whole MiniGUI](#building-whole-minigui)
|
||||
+ [Building MiniGUI Core](#building-minigui-core)
|
||||
+ [Building whole MiniGUI](#building-whole-minigui)
|
||||
+ [Unit Tests](#unit-tests)
|
||||
- [HISTORY](#history)
|
||||
- [AUTHORS AND COPYING](#authors-and-copying)
|
||||
@@ -28,6 +32,8 @@ A mature and proven cross-platform GUI system for embedded and smart IoT devices
|
||||
|
||||
## INTRODUCTION
|
||||
|
||||
### What's MiniGUI
|
||||
|
||||
MiniGUI is a mature cross-platform windowing system and a GUI (Graphics
|
||||
User Interface) support system for embedded systems and smart IoT devices.
|
||||
This is the version 5.0.x of MiniGUI maintained by WEI Yongming.
|
||||
@@ -44,6 +50,8 @@ Nucleus, pSOS, uC/OS-II, and OSE.
|
||||
This is the source tree of MiniGUI Core, which provides the windowing
|
||||
and graphics interfaces as well as a lot of standard controls (toolkit).
|
||||
|
||||
### MiniGUI Components
|
||||
|
||||
Besides MiniGUI Core, FMSoft also provides some components
|
||||
for the developers to develop app much easier:
|
||||
|
||||
@@ -82,22 +90,80 @@ from the download zone of the site:
|
||||
|
||||
<http://www.minigui.com>
|
||||
|
||||
### Open Source Apps Based-on MiniGUI
|
||||
|
||||
FMSoft also releases some open source apps for MiniGUI on the site above,
|
||||
for examples:
|
||||
|
||||
* mDolphin, licensed under Apache 2.0, is a full-featured
|
||||
* `mDolphin`, licensed under Apache 2.0, is a full-featured
|
||||
WEB/WAP browser, which is developed based on the open source browser
|
||||
core WebKit and uses MiniGUI as its underlying graphics support system.
|
||||
* mGallery, licensed under Apache 2.0, intends to
|
||||
* `mGallery`, licensed under Apache 2.0, intends to
|
||||
provide a total solution for PMP (Portable Multimedia Player),
|
||||
which uses MiniGUI as the graphics platform.
|
||||
* mSpider, licensed under GPL 3.0, intends to provide a
|
||||
* `mSpider`, licensed under GPL 3.0, intends to provide a
|
||||
light-weight MiniGUI-based web browser (HTML 3.2 and part JavaScript)
|
||||
* mEagle, licensed under GPL 3.0, is an embedded GIS development platform
|
||||
* `mEagle`, licensed under GPL 3.0, is an embedded GIS development platform
|
||||
which addresses the needs of map browse, query, analysis, etc
|
||||
|
||||
### MiniGUI and HybridOS
|
||||
|
||||
HybridOS is another large open source project initiated by FMSoft. It is
|
||||
a totally new open source operating system designed for smart IoT devices
|
||||
and cloud computing environment.
|
||||
|
||||
In practice, MiniGUI and the software which are used to integrated with GPU
|
||||
constitute the graphics stack of HybridOS.
|
||||
|
||||
HybridOS uses MiniGUI as the underlying windowing system, and the members of
|
||||
HybridOS project are now maintaining the whole graphics stack.
|
||||
The following chart shows the graphics stack of HybridOS:
|
||||
|
||||
```
|
||||
-----------------------------------------------
|
||||
| MiniGUI/HybridOS Apps |
|
||||
|-----------------------------------------------|
|
||||
| | (Graphics Stack) |
|
||||
| | ---------------------|
|
||||
| | | hiMesa |
|
||||
| | hiCairo | ------------------|
|
||||
| | MiniGUI | | EGL for MiniGUI |
|
||||
| C++ libs | hiDRMDrivers | | GL, GLES, VG |
|
||||
| C libs | libDRM | | GPU drivers |
|
||||
|-----------------------------------------------|
|
||||
| Linux Kernel |
|
||||
| -----------------------------------|
|
||||
| | DRI and DRI Drivers |
|
||||
-----------------------------------------------
|
||||
```
|
||||
|
||||
As shown in the chart above, the HybridOS graphics stack consists of
|
||||
the following software:
|
||||
|
||||
- `libDRM` provides some user land APIs for Linux Direct Rendering Infrastructure.
|
||||
- `hiDRMDrivers` contains the drivers (user land drivers, not kernel drivers) for
|
||||
MiniGUI DRM engine. The drivers implement the basic hardware accelerated
|
||||
2D graphics operations of various GPUs for MiniGUI.
|
||||
- `hiMesa` is the Mesa derivative for HybridOS, while Mesa is the open source
|
||||
implementation of OpenGL and other graphics APIs, including OpenGL ES
|
||||
(versions 1, 2, 3), OpenCL, OpenMAX, and Vulkan. It contains the following
|
||||
components:
|
||||
+ The implementation of OpenGL, OpenGL ES (v1, 2, 3), and other
|
||||
graphics APIs.
|
||||
+ The EGL implementation for MiniGUI platform.
|
||||
+ The graphics drivers for various GPUs and a software driver called `swrast`.
|
||||
- `hiCairo` is the Cairo derivative for HybridOS. Cairo is a 2D vector graphics
|
||||
library for Gtk. We provide support for MiniGUI backend in `hiCairo`.
|
||||
|
||||
For more information about HybridOS, please refer to:
|
||||
|
||||
<https://hybridos.fmsoft.cn/>
|
||||
|
||||
### Source Code Repositories
|
||||
|
||||
FMSoft had created the public repositories for MiniGUI Core, MiniGUI
|
||||
components, and other open source apps on GitHub. You can visit them on:
|
||||
components, HybridOS, and other open source apps on GitHub. You can visit
|
||||
them on:
|
||||
|
||||
<https://github.com/VincentWei>
|
||||
|
||||
@@ -114,7 +180,7 @@ We now maintain all documents about MiniGUI on the following public repo:
|
||||
In version 5.0.0, we introduced some new and exciting features, and refactored
|
||||
a lot basic modules of MiniGUI Core.
|
||||
|
||||
### Compositing schema
|
||||
### Compositing Schema
|
||||
|
||||
In this version, we enhanced the MiniGUI-Processes runtime mode to support
|
||||
the compositing schema. Under compositing schema, regardless a main window
|
||||
@@ -136,7 +202,7 @@ implementation for multi-process environment:
|
||||
- Better security. One client created by different user cannot
|
||||
read/write contents in/to another windows owned by other clients.
|
||||
|
||||
### New main window types
|
||||
### New Main Window Types
|
||||
|
||||
In this version, we also enhanced the window manager of MiniGUI Core
|
||||
to support some special main window types.
|
||||
@@ -162,7 +228,7 @@ There are eight levels in MiniGUI from top to bottom:
|
||||
This enhancement allows us to create a special app which acts as
|
||||
screen lock, docker, or launcher.
|
||||
|
||||
### Virtual window
|
||||
### Virtual Window
|
||||
|
||||
You know that we can post or send a message to other windows which
|
||||
may run in another thread under MiniGUI-Threads. The MiniGUI
|
||||
@@ -193,7 +259,7 @@ and the new thread.
|
||||
This enhancement provides a very useful facility to you in order to
|
||||
develop a well-designed multithreaded application.
|
||||
|
||||
### Other enhancements
|
||||
### Other Enhancements
|
||||
|
||||
We also tune or enhance the following modules of MiniGUI Core:
|
||||
|
||||
@@ -226,7 +292,7 @@ so that the old applications can smoothly migrate to the new
|
||||
version. However, there are still some slight changes you need to take care.
|
||||
For more information, please refer to `RELEASE-NOTES.md` file:
|
||||
|
||||
<https://github.com/VincentWei/minigui/blob/master/RELEASE-NOTES.md>
|
||||
<https://github.com/VincentWei/minigui/blob/rel-5-0/RELEASE-NOTES.md>
|
||||
|
||||
## NEW FEATURES IN VERSION 4.0.x
|
||||
|
||||
@@ -257,7 +323,7 @@ in order to support [HybridOS Foundation Class Library].
|
||||
|
||||
For more information, please refer to `RELEASE-NOTES.md` file:
|
||||
|
||||
<https://github.com/VincentWei/minigui/blob/tree/rel-4-0/RELEASE-NOTES.md>
|
||||
<https://github.com/VincentWei/minigui/blob/rel-4-0/RELEASE-NOTES.md>
|
||||
|
||||
Because of the changes of some APIs, we recommended strongly that you
|
||||
use this version for new projects.
|
||||
@@ -319,12 +385,30 @@ clients and the server.
|
||||
|
||||
## A BRIEF BUILDING INSTRUCTION
|
||||
|
||||
This instruction assumes that you are using Ubuntu Linux.
|
||||
### Building Whole MiniGUI
|
||||
|
||||
### Prerequisites
|
||||
If you are anxious to see the comprehensive demo of MiniGUI Core
|
||||
and MiniGUI components, please fetch one of the following repositories
|
||||
from GitHub and follow the instructions to build MiniGUI Core,
|
||||
MiniGUI components, the samples, and the demonstration programs:
|
||||
|
||||
You should run `apt install <package_name>` to install the following packages
|
||||
on your Ubuntu Linux.
|
||||
<https://github.com/VincentWei/build-minigui-5.0>
|
||||
|
||||
or
|
||||
|
||||
<https://github.com/VincentWei/build-minigui-4.0>
|
||||
|
||||
or
|
||||
|
||||
<https://github.com/VincentWei/build-minigui-3.2>
|
||||
|
||||
### Building MiniGUI Core
|
||||
|
||||
We recommend that you use a latest Linux distribution with long term support,
|
||||
for example, Ubuntu Linux LTS 16.04 or 18.04.
|
||||
|
||||
On Ubuntu Linux LTS 16.04 or 18.04, you should run `apt install <package_name>`
|
||||
to install the following packages:
|
||||
|
||||
* Building tools:
|
||||
* autoconf
|
||||
@@ -333,8 +417,6 @@ on your Ubuntu Linux.
|
||||
* libpng12-dev (use libpng-dev on Ubuntu Linux 18.04 LTS)
|
||||
* libfreetype6-dev
|
||||
|
||||
### Building MiniGUI Core
|
||||
|
||||
MiniGUI Core uses GNU autoconf/automake scripts to configure and build the project.
|
||||
|
||||
Run
|
||||
@@ -353,23 +435,6 @@ For more information, please run
|
||||
|
||||
$ ./configure --help
|
||||
|
||||
### Building whole MiniGUI
|
||||
|
||||
If you are anxious to see the comprehensive demo of MiniGUI Core
|
||||
and MiniGUI components, please fetch one of the following repositories
|
||||
from GitHub and follow the instructions to build MiniGUI Core,
|
||||
MiniGUI components, the samples, and the demonstration programs:
|
||||
|
||||
<https://github.com/VincentWei/build-minigui-5.0>
|
||||
|
||||
or
|
||||
|
||||
<https://github.com/VincentWei/build-minigui-4.0>
|
||||
|
||||
or
|
||||
|
||||
<https://github.com/VincentWei/build-minigui-3.2>
|
||||
|
||||
### Unit Tests
|
||||
|
||||
Since MiniGUI 4.0.0, we organize the unit test code of MiniGUI APIs in the
|
||||
@@ -483,7 +548,7 @@ A brief history description of the development progress is listed as follow:
|
||||
1. Feb., 2018: FMSoft released MiniGUI version 3.2.0.
|
||||
1. Apr., 2019: FMSoft released MiniGUI version 3.2.2.
|
||||
1. Jul., 2019: FMSoft released MiniGUI version 4.0.0.
|
||||
1. Apr., 2020: FMSoft released MiniGUI version 5.0.0.
|
||||
1. Mar., 2020: FMSoft released MiniGUI version 5.0.0.
|
||||
|
||||
## AUTHORS AND COPYING
|
||||
|
||||
|
||||
+12
-20
@@ -1,7 +1,7 @@
|
||||
# Release Notes
|
||||
|
||||
- [Version 4.9.2](#version-492)
|
||||
+ [What's new in this version](#whats-new-in-this-version)
|
||||
- [Version 5.0.0](#version-500)
|
||||
+ [What's new in version 5.0.0](#whats-new-in-version-500)
|
||||
+ [Compositing schema](#compositing-schema)
|
||||
+ [New main window styles](#new-main-window-styles)
|
||||
+ [Virtual window](#virtual-window)
|
||||
@@ -10,25 +10,22 @@
|
||||
+ [Changes leading to incompatibility](#changes-leading-to-incompatibility)
|
||||
+ [Deprecated APIs](#deprecated-apis)
|
||||
|
||||
## Version 4.9.2
|
||||
## Version 5.0.0
|
||||
|
||||
The MiniGUI development team announces the availability of MiniGUI 4.9.2,
|
||||
which is the third preview release of MiniGUI 5.0.0.
|
||||
The MiniGUI development team announces the availability of MiniGUI 5.0.0,
|
||||
which is the first official release of MiniGUI 5.0.x.
|
||||
|
||||
This is an unstable release to show you some new and exciting features.
|
||||
Here `unstable` means that the new APIs we introduced in this version
|
||||
may change in the official release.
|
||||
|
||||
Nevertheless, we did our best to ensure backward compatibility of the
|
||||
existed APIs so that the old applications can smoothly migrate to the new
|
||||
version. We recommend that you test this version and report any bugs and
|
||||
This version brings us some new and exciting features, and we did our best
|
||||
to ensure backward compatibility of the existed APIs so that the old
|
||||
applications can smoothly migrate to the new version.
|
||||
We recommend that you use this version and report any bugs and
|
||||
incompatibilities in
|
||||
|
||||
<https://github.com/VincentWei/minigui/tree/dev-4-1>
|
||||
<https://github.com/VincentWei/minigui/tree/rel-5-0>
|
||||
|
||||
### What's new in this version
|
||||
### What's new in version 5.0.0
|
||||
|
||||
In the development of version 4.9.x, we introduced the following new and
|
||||
In the development of version 5.0.x, we introduced the following new and
|
||||
exciting features for MiniGUI:
|
||||
|
||||
* ENHANCEMENTS:
|
||||
@@ -82,11 +79,6 @@ exciting features for MiniGUI:
|
||||
message queue, event/message handling, and part of graphics abstract
|
||||
layer.
|
||||
|
||||
The following new features will be developed in the successive versions of
|
||||
4.9.x:
|
||||
|
||||
- Enhance other frequently used GAL engines to support compositing schema.
|
||||
|
||||
### Compositing schema
|
||||
|
||||
In this version, we enhanced the MiniGUI-Processes runtime mode to support
|
||||
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
Version 5.0.0 (2019/03/31)
|
||||
Version 5.0.0 (2019/03/30)
|
||||
|
||||
This is the second preview version of MiniGUI 5.0.0, an unstable version.
|
||||
This is the first official release of MiniGUI 5.0.x, the stable version.
|
||||
|
||||
Other packages for MiniGUI resource, tools, components, and samples:
|
||||
|
||||
- GVFB: `gvfb-1.2.4.tar.gz`
|
||||
- The resource package: `minigui-res-4.0.0.tar.gz`
|
||||
- GVFB: `gvfb-1.2.5.tar.gz`
|
||||
- The resource package: `minigui-res-5.0.0.tar.gz`
|
||||
- mGUtils component: `libmgutils-1.5.0.tar.gz`
|
||||
- mGPlus component: `libmgplus-1.5.0.tar.gz`
|
||||
- mGEff component: `libmgeff-1.5.0.tar.gz`
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_PREREQ(2.60)
|
||||
AC_INIT(libminigui, 4.9.2)
|
||||
AC_INIT(libminigui, 5.0.0)
|
||||
AC_CONFIG_SRCDIR(src/main/main.c)
|
||||
|
||||
dnl Set various version strings - taken gratefully from the SDL sources
|
||||
@@ -14,9 +14,9 @@ dnl Set various version strings - taken gratefully from the SDL sources
|
||||
# if backwards compatibility has been broken,
|
||||
# set MINIGUI_BINARY_AGE and MINIGUI_INTERFACE_AGE to 0.
|
||||
#
|
||||
MINIGUI_MAJOR_VERSION=4
|
||||
MINIGUI_MINOR_VERSION=9
|
||||
MINIGUI_MICRO_VERSION=2
|
||||
MINIGUI_MAJOR_VERSION=5
|
||||
MINIGUI_MINOR_VERSION=0
|
||||
MINIGUI_MICRO_VERSION=0
|
||||
MINIGUI_INTERFACE_AGE=0
|
||||
MINIGUI_BINARY_AGE=0
|
||||
MINIGUI_VERSION=$MINIGUI_MAJOR_VERSION.$MINIGUI_MINOR_VERSION.$MINIGUI_MICRO_VERSION
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ double_buffering=true
|
||||
|
||||
# The filename of the shared library for the external driver.
|
||||
# The equivalent environment variable: MG_GAL_DRM_DRIVER
|
||||
exdriver=libhidrmdrivers.so.0
|
||||
exdriver=libhidrmdrivers-0.2.so.0
|
||||
#}}
|
||||
|
||||
#{{ifdef _MGIAL_LIBINPUT
|
||||
|
||||
+7
-7
@@ -298,7 +298,7 @@ typedef struct _DrmDriverOps {
|
||||
ColorLogicalOp logic_op);
|
||||
|
||||
/**
|
||||
* This operation blits pixles from a source buffer with the source alpha
|
||||
* This operation blits pixels from a source buffer with the source alpha
|
||||
* value specified to a destination buffer.
|
||||
*
|
||||
* \note If this operation is set as NULL, the driver does not support
|
||||
@@ -310,7 +310,7 @@ typedef struct _DrmDriverOps {
|
||||
uint8_t alpha);
|
||||
|
||||
/**
|
||||
* This operation blits pixles from a source buffer to a destination buffer,
|
||||
* This operation blits pixels from a source buffer to a destination buffer,
|
||||
* but skipping the pixel value specified by \a color_key.
|
||||
*
|
||||
* \note If this operation is set as NULL, the driver does not support
|
||||
@@ -322,7 +322,7 @@ typedef struct _DrmDriverOps {
|
||||
uint32_t color_key);
|
||||
|
||||
/**
|
||||
* This operation blits pixles from a source buffer with the source alpha
|
||||
* This operation blits pixels from a source buffer with the source alpha
|
||||
* value specified to a destination buffer, but skipping the pixel value
|
||||
* specified.
|
||||
*
|
||||
@@ -335,7 +335,7 @@ typedef struct _DrmDriverOps {
|
||||
uint8_t alpha, uint32_t color_key);
|
||||
|
||||
/**
|
||||
* This operation blits pixles from a source buffer with the source alpha
|
||||
* This operation blits pixels from a source buffer with the source alpha
|
||||
* value of pixels to the destination buffer, and with the specified color
|
||||
* compositing/blending method (\a ColorBlendMethod).
|
||||
*
|
||||
@@ -372,12 +372,12 @@ typedef struct _DrmDriverOps {
|
||||
* For example, for Intel i915/i965 GPUs, the driver name will be `i915`.
|
||||
* \param device_fd This argument gives the file descriptor of the
|
||||
* opened DRI device.
|
||||
* \param version A pointer to an integer which will contain the
|
||||
* versionc of the DRM engine driver.
|
||||
* \param version A pointer to an integer which will be used to return
|
||||
* the interface version of the DRM engine driver.
|
||||
*
|
||||
* \return NULL or a valid pointer to DrmDriverOps.
|
||||
*
|
||||
* \note We use the version control since 4.0.7. It will be intialized
|
||||
* \note We use the version control since 4.0.7. It will be initialized
|
||||
* to zero by MiniGUI before calling this function. Because an old
|
||||
* driver for MiniGUI 4.0.6 or earlier will not change the value,
|
||||
* MiniGUI will deny to load the old driver.
|
||||
|
||||
+1
-1
@@ -5393,6 +5393,7 @@ static BOOL _wndInvalidateRect(HWND hWnd, const RECT* prc, BOOL bEraseBkgnd, int
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
_WRN_PRINTF ("The invalid region is forzen\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -5573,7 +5574,6 @@ HDC GUIAPI BeginPaint (HWND hWnd)
|
||||
MG_CHECK_RET (MG_IS_NORMAL_WINDOW(hWnd), HDC_INVALID);
|
||||
pWin = MG_GET_WINDOW_PTR (hWnd);
|
||||
|
||||
|
||||
if (pWin->pCaretInfo && pWin->pCaretInfo->fBlink) {
|
||||
HideCaretEx (hWnd, FALSE);
|
||||
pWin->pCaretInfo->fBlink = TRUE;
|
||||
|
||||
@@ -7,4 +7,4 @@ noinst_HEADERS = \
|
||||
ourhdr.h client.h server.h sharedres.h sockio.h drawsemop.h \
|
||||
gal.h newgal.h memops.h incoreres.h sysres.h clipboard.h \
|
||||
glyph.h license.h mgsock.h unicode-ops.h \
|
||||
linux-tty.h debug.h
|
||||
linux-tty.h debug.h map.h
|
||||
|
||||
@@ -77,7 +77,7 @@ struct _CompositorCtxt {
|
||||
CLIPRGN wins_rgn; // visible region for all windows (subtract popup menus)
|
||||
CLIPRGN dirty_rgn; // the dirty region
|
||||
CLIPRGN inv_rgn; // the invalid region for a specific znode
|
||||
//Uint32 dirty_types;// the dirty znode types.
|
||||
Uint32 dirty_types;// the dirty znode types.
|
||||
};
|
||||
|
||||
static CompositorCtxt* initialize (const char* name)
|
||||
@@ -334,9 +334,11 @@ static void composite_ppp_znodes (CompositorCtxt* ctxt)
|
||||
ClipRgnIntersect (&ctxt->inv_rgn, &ctxt->dirty_rgn, rgn);
|
||||
if (IsEmptyClipRgn (&ctxt->inv_rgn)) {
|
||||
ServerReleasePopupMenuZNodeHeader (zidx);
|
||||
break;
|
||||
_DBG_PRINTF ("ppp %d skipped\n", zidx);
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
_DBG_PRINTF ("ppp %d composited\n", zidx);
|
||||
// blit this popup menu to screen
|
||||
SelectClipRegion (HDC_SCREEN_SYS, &ctxt->inv_rgn);
|
||||
BitBlt (znode_hdr->mem_dc, 0, 0,
|
||||
@@ -612,14 +614,15 @@ static BOOL reset_dirty_region (CompositorCtxt* ctxt, MG_Layer* layer)
|
||||
if (layer != mgTopmostLayer)
|
||||
return FALSE;
|
||||
|
||||
//ctxt->dirty_types = 0;
|
||||
ctxt->dirty_types = 0;
|
||||
EmptyClipRgn (&ctxt->dirty_rgn);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL generate_dirty_region (CompositorCtxt* ctxt,
|
||||
static BOOL merge_dirty_region (CompositorCtxt* ctxt,
|
||||
const ZNODEHEADER* znode_hdr, const CLIPRGN* znode_rgn)
|
||||
{
|
||||
EmptyClipRgn (&ctxt->inv_rgn);
|
||||
if (znode_hdr && znode_hdr->dirty_rcs) {
|
||||
int i;
|
||||
for (i = 0; i < znode_hdr->nr_dirty_rcs; i++) {
|
||||
@@ -628,16 +631,23 @@ static BOOL generate_dirty_region (CompositorCtxt* ctxt,
|
||||
// device coordinates to screen coordinates
|
||||
rc = znode_hdr->dirty_rcs [i];
|
||||
OffsetRect (&rc, znode_hdr->rc.left, znode_hdr->rc.top);
|
||||
AddClipRect (&ctxt->dirty_rgn, &rc);
|
||||
AddClipRect (&ctxt->inv_rgn, &rc);
|
||||
}
|
||||
|
||||
if (znode_rgn)
|
||||
IntersectRegion (&ctxt->dirty_rgn, &ctxt->dirty_rgn, znode_rgn);
|
||||
IntersectRegion (&ctxt->inv_rgn, &ctxt->inv_rgn, znode_rgn);
|
||||
else
|
||||
IntersectClipRect (&ctxt->dirty_rgn, &ctxt->rc_screen);
|
||||
IntersectClipRect (&ctxt->inv_rgn, &ctxt->rc_screen);
|
||||
|
||||
}
|
||||
|
||||
return !IsEmptyClipRgn (&ctxt->dirty_rgn);
|
||||
if (IsEmptyClipRgn (&ctxt->inv_rgn)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
UnionRegion (&ctxt->dirty_rgn, &ctxt->dirty_rgn, &ctxt->inv_rgn);
|
||||
EmptyClipRgn (&ctxt->inv_rgn);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL merge_dirty_ppp (CompositorCtxt* ctxt, MG_Layer* layer, int zidx)
|
||||
@@ -649,15 +659,16 @@ static BOOL merge_dirty_ppp (CompositorCtxt* ctxt, MG_Layer* layer, int zidx)
|
||||
_DBG_PRINTF("called: %d\n", zidx);
|
||||
|
||||
/* the fallback compositor only manages znodes on the topmost layer. */
|
||||
if (layer != mgTopmostLayer || zidx <= 0)
|
||||
if (layer != mgTopmostLayer)
|
||||
return rc;
|
||||
|
||||
znode_hdr = ServerGetPopupMenuZNodeHeader (zidx, (void**)&rgn, TRUE);
|
||||
if (generate_dirty_region (ctxt, znode_hdr, rgn)) {
|
||||
//ctxt->dirty_types |= DIRTY_ZT_PPP;
|
||||
if (merge_dirty_region (ctxt, znode_hdr, rgn)) {
|
||||
ctxt->dirty_types |= DIRTY_ZT_PPP;
|
||||
rc = TRUE;
|
||||
}
|
||||
ServerReleasePopupMenuZNodeHeader (zidx);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -668,15 +679,15 @@ static BOOL merge_dirty_win (CompositorCtxt* ctxt, MG_Layer* layer, int zidx)
|
||||
CLIPRGN *rgn;
|
||||
|
||||
/* the fallback compositor only manages znodes on the topmost layer. */
|
||||
if (layer != mgTopmostLayer || zidx <= 0)
|
||||
if (layer != mgTopmostLayer)
|
||||
return rc;
|
||||
|
||||
_DBG_PRINTF("called: %d\n", zidx);
|
||||
|
||||
/* merge the dirty region */
|
||||
znode_hdr = ServerGetWinZNodeHeader (NULL, zidx, (void**)&rgn, TRUE);
|
||||
if (generate_dirty_region (ctxt, znode_hdr, rgn)) {
|
||||
//ctxt->dirty_types |= DIRTY_ZT_WIN;
|
||||
if (merge_dirty_region (ctxt, znode_hdr, rgn)) {
|
||||
ctxt->dirty_types |= DIRTY_ZT_WIN;
|
||||
rc = TRUE;
|
||||
}
|
||||
ServerReleaseWinZNodeHeader (NULL, zidx);
|
||||
@@ -689,10 +700,10 @@ static BOOL merge_dirty_wpp (CompositorCtxt* ctxt, MG_Layer* layer)
|
||||
const ZNODEHEADER* znode_hdr;
|
||||
|
||||
znode_hdr = ServerGetWinZNodeHeader (NULL, 0, NULL, TRUE);
|
||||
if (generate_dirty_region (ctxt, znode_hdr, NULL)) {
|
||||
if (merge_dirty_region (ctxt, znode_hdr, NULL)) {
|
||||
tile_dirty_region_for_wallpaper (ctxt);
|
||||
//subtract_opaque_win_znodes_above (ctxt, 0);
|
||||
//ctxt->dirty_types |= DIRTY_ZT_WPP;
|
||||
ctxt->dirty_types |= DIRTY_ZT_WPP;
|
||||
rc = TRUE;
|
||||
}
|
||||
|
||||
@@ -706,10 +717,13 @@ BOOL refresh_dirty_region (CompositorCtxt* ctxt, MG_Layer* layer)
|
||||
if (layer != mgTopmostLayer || IsEmptyClipRgn (&ctxt->dirty_rgn))
|
||||
return FALSE;
|
||||
|
||||
composite_ppp_znodes (ctxt);
|
||||
if (ctxt->dirty_types & DIRTY_ZT_PPP)
|
||||
composite_ppp_znodes (ctxt);
|
||||
composite_on_dirty_region (ctxt, 0);
|
||||
|
||||
EmptyClipRgn (&ctxt->dirty_rgn);
|
||||
|
||||
SyncUpdateDC (HDC_SCREEN_SYS);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -270,8 +270,9 @@ static void composite_layer (MG_Layer* layer, CompositorCtxt* ctxt,
|
||||
if (!ops->reset_dirty_region (ctxt, layer))
|
||||
return;
|
||||
|
||||
/* travel menu znodes on the layer */
|
||||
if (zi->nr_popupmenus > 0) {
|
||||
/* travel menu znodes on the layer;
|
||||
this will only work for topmost layer */
|
||||
if (layer == mgTopmostLayer && zi->nr_popupmenus > 0) {
|
||||
nodes = GET_MENUNODE(zi);
|
||||
for (i = 0; i < zi->nr_popupmenus; i++) {
|
||||
pdc = dc_HDC2PDC (nodes[i].mem_dc);
|
||||
@@ -301,21 +302,23 @@ static void composite_layer (MG_Layer* layer, CompositorCtxt* ctxt,
|
||||
}
|
||||
}
|
||||
|
||||
/* check wallpaper pattern */
|
||||
pdc = dc_HDC2PDC (HDC_SCREEN);
|
||||
if (pdc->surface->w > 0 && pdc->surface->h > 0) {
|
||||
assert (pdc->surface->dirty_info);
|
||||
lock_znode_surface (pdc, nodes);
|
||||
changes_in_dc = pdc->surface->dirty_info->dirty_age;
|
||||
if (changes_in_dc != nodes[0].changes) {
|
||||
ops->merge_dirty_wpp (ctxt, layer);
|
||||
/* check wallpaper pattern; only call for topmost layer */
|
||||
if (layer == mgTopmostLayer) {
|
||||
pdc = dc_HDC2PDC (HDC_SCREEN);
|
||||
if (pdc->surface->w > 0 && pdc->surface->h > 0) {
|
||||
assert (pdc->surface->dirty_info);
|
||||
lock_znode_surface (pdc, nodes);
|
||||
changes_in_dc = pdc->surface->dirty_info->dirty_age;
|
||||
if (changes_in_dc != nodes[0].changes) {
|
||||
ops->merge_dirty_wpp (ctxt, layer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ops->refresh_dirty_region (ctxt, layer);
|
||||
|
||||
/* unlock the znode surfaces for popup menus */
|
||||
if (zi->nr_popupmenus > 0) {
|
||||
if (layer == mgTopmostLayer && zi->nr_popupmenus > 0) {
|
||||
nodes = GET_MENUNODE(zi);
|
||||
for (i = 0; i < zi->nr_popupmenus; i++) {
|
||||
pdc = dc_HDC2PDC (nodes[i].mem_dc);
|
||||
@@ -338,12 +341,15 @@ static void composite_layer (MG_Layer* layer, CompositorCtxt* ctxt,
|
||||
}
|
||||
}
|
||||
|
||||
/* unlock the znode surfaces for wallpaper patter */
|
||||
pdc = dc_HDC2PDC (HDC_SCREEN);
|
||||
if (pdc->surface->w > 0 && pdc->surface->h > 0) {
|
||||
nodes[0].changes = pdc->surface->dirty_info->dirty_age;
|
||||
pdc->surface->dirty_info->nr_dirty_rcs = 0;
|
||||
unlock_znode_surface (pdc, nodes);
|
||||
/* unlock the znode surfaces for wallpaper pattern;
|
||||
only for topmost layer */
|
||||
if (layer == mgTopmostLayer) {
|
||||
pdc = dc_HDC2PDC (HDC_SCREEN);
|
||||
if (pdc->surface->w > 0 && pdc->surface->h > 0) {
|
||||
nodes[0].changes = pdc->surface->dirty_info->dirty_age;
|
||||
pdc->surface->dirty_info->nr_dirty_rcs = 0;
|
||||
unlock_znode_surface (pdc, nodes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ static HCURSOR load_cursor_from_mem (const void* area)
|
||||
const Uint8* p = (Uint8*)area;
|
||||
WORD16 wTemp;
|
||||
|
||||
int w = 0, h = 0, xhot = 0, yhot = 0, colornum = 0;
|
||||
int w, h, xhot, yhot, colornum;
|
||||
#if 0
|
||||
DWORD32 size;
|
||||
#endif
|
||||
|
||||
@@ -298,8 +298,10 @@ static int update_client_window_rgn (int cli, HWND hwnd)
|
||||
msg.lParam = MAKELONG (crc->rc.right, crc->rc.bottom);
|
||||
|
||||
ret = __mg_send2client (&msg, mgClients + cli);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
_WRN_PRINTF ("__mg_send2client failed\n");
|
||||
break;
|
||||
}
|
||||
|
||||
crc = crc->next;
|
||||
}
|
||||
@@ -830,7 +832,6 @@ static int srvAllocZOrderNode (int cli, HWND hwnd, HWND main_win,
|
||||
|
||||
if (surf) {
|
||||
memdc = CreateMemDCFromSurface (surf);
|
||||
_WRN_PRINTF ("surface (%p) refcount: %d\n", surf, surf->refcount);
|
||||
if (memdc == HDC_INVALID) {
|
||||
if (cli > 0) {
|
||||
GAL_FreeSurface (surf);
|
||||
@@ -867,16 +868,25 @@ static BOOL _cb_update_cli_znode (void* context,
|
||||
if (znode->cli == cli && znode->flags & ZOF_VISIBLE && znode->hwnd) {
|
||||
MSG msg = {znode->hwnd, MSG_UPDATECLIWIN, 0, 0, __mg_tick_counter};
|
||||
|
||||
if (!IsRectEmpty(&(znode->dirty_rc))) {
|
||||
if (!IsRectEmpty(&znode->dirty_rc)) {
|
||||
|
||||
IntersectRect(&rcInv, &znode->dirty_rc, &rcScr);
|
||||
if (IntersectRect(&rcScr, &znode->rc, &rcScr) &&
|
||||
IntersectRect(&rcInv, &znode->dirty_rc, &rcScr)) {
|
||||
rcInv = znode->dirty_rc;
|
||||
msg.wParam = MAKELONG (rcInv.left, rcInv.top);
|
||||
msg.lParam = MAKELONG (rcInv.right, rcInv.bottom);
|
||||
|
||||
msg.wParam = MAKELONG (rcInv.left, rcInv.top);
|
||||
msg.lParam = MAKELONG (rcInv.right, rcInv.bottom);
|
||||
_DBG_PRINTF ("Send MSG_UPDATECLIWIN to client window (%s): "
|
||||
"%d, %d, %d x %d\n",
|
||||
znode->caption,
|
||||
rcInv.left, rcInv.top,
|
||||
rcInv.right - rcInv.left,
|
||||
rcInv.bottom - rcInv.top);
|
||||
|
||||
SetRectEmpty (&(znode->dirty_rc));
|
||||
__mg_send2client (&msg, mgClients + znode->cli);
|
||||
}
|
||||
|
||||
__mg_send2client (&msg, mgClients + znode->cli);
|
||||
SetRectEmpty (&znode->dirty_rc);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -1201,6 +1211,7 @@ static int do_drag_drop_window (int msg, int x, int y)
|
||||
#ifndef _MGSCHEMA_COMPOSITING
|
||||
FocusRect (HDC_SCREEN_SYS, _dd_info.rc.left, _dd_info.rc.top,
|
||||
_dd_info.rc.right, _dd_info.rc.bottom);
|
||||
SyncUpdateDC (HDC_SCREEN_SYS);
|
||||
#else /* not defined _MGSCHEMA_COMPOSITING */
|
||||
|
||||
msg.wParam = MAKELONG (_dd_info.rc.left, _dd_info.rc.top);
|
||||
@@ -1228,6 +1239,7 @@ static int do_drag_drop_window (int msg, int x, int y)
|
||||
SetPenColor (HDC_SCREEN_SYS, PIXEL_lightwhite);
|
||||
FocusRect (HDC_SCREEN_SYS, _dd_info.rc.left, _dd_info.rc.top,
|
||||
_dd_info.rc.right, _dd_info.rc.bottom);
|
||||
SyncUpdateDC (HDC_SCREEN_SYS);
|
||||
#endif /* not defined _MGSCHEMA_COMPOSITING */
|
||||
|
||||
/* post MSG_WINDOWDROPPED to the target window */
|
||||
|
||||
+44
-30
@@ -188,7 +188,7 @@ static BOOL subtract_rgn_by_node (PCLIPRGN region, const ZORDERINFO* zi,
|
||||
else
|
||||
SubtractClipRect(region, &(node->rc));
|
||||
|
||||
return TRUE;
|
||||
return !IsEmptyClipRgn(region);
|
||||
}
|
||||
|
||||
#else /* not defined _MGSCHEMA_COMPOSITING */
|
||||
@@ -427,15 +427,18 @@ void __mg_update_window (HWND hwnd,
|
||||
((pWin->WinType == TYPE_CONTROL &&
|
||||
(pWin->dwExStyle & WS_EX_CTRLASMAINWIN)) ||
|
||||
pWin->WinType != TYPE_CONTROL) && pWin->dwStyle & WS_VISIBLE) {
|
||||
RECT invrc;
|
||||
SetRect(&invrc, left, top, right, bottom);
|
||||
RECT rcInv;
|
||||
SetRect(&rcInv, left, top, right, bottom);
|
||||
|
||||
if (IsRectEmpty (&invrc)) {
|
||||
_DBG_PRINTF ("Update window (%s): %d, %d, %d, %d\n",
|
||||
pWin->spCaption, left, top, right, bottom);
|
||||
|
||||
if (IsRectEmpty (&rcInv)) {
|
||||
SendAsyncMessage ((HWND)pWin, MSG_NCPAINT, 0, 0);
|
||||
InvalidateRect ((HWND)pWin, NULL, TRUE);
|
||||
}
|
||||
else {
|
||||
RECT rcTemp, rcInv, rcWin;
|
||||
RECT rcTemp, rcWin;
|
||||
|
||||
if (pWin->WinType == TYPE_CONTROL &&
|
||||
(pWin->dwExStyle & WS_EX_CTRLASMAINWIN)){
|
||||
@@ -444,13 +447,18 @@ void __mg_update_window (HWND hwnd,
|
||||
else
|
||||
GetWindowRect(hwnd, &rcWin);
|
||||
|
||||
if (IntersectRect (&rcTemp,
|
||||
&rcWin, &invrc)) {
|
||||
/* XXX: when we move a window fast, there are some dirty rectangles
|
||||
were not updated. We update whole area of the window for a work
|
||||
around. */
|
||||
if (IntersectRect (&rcTemp, &rcWin, &rcInv)) {
|
||||
dskScreenToWindow (pWin, &rcTemp, &rcInv);
|
||||
SendAsyncMessage ((HWND)pWin,
|
||||
MSG_NCPAINT, 0, (LPARAM)(&rcInv));
|
||||
MSG_NCPAINT, 0, 0); // (LPARAM)(&rcInv));
|
||||
dskScreenToClient (pWin, &rcTemp, &rcInv);
|
||||
InvalidateRect ((HWND)pWin, &rcInv, TRUE);
|
||||
InvalidateRect ((HWND)pWin, NULL/*&rcInv*/, TRUE);
|
||||
}
|
||||
else {
|
||||
_DBG_PRINTF ("IGNORED update\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -465,6 +473,9 @@ static int update_client_window (ZORDERNODE* znode, const RECT* rc)
|
||||
|
||||
if (znode->cli != 0) {
|
||||
if (rc) {
|
||||
_DBG_PRINTF ("Update window (%s): %d, %d, %d x %d\n",
|
||||
znode->caption, rc->left, rc->top,
|
||||
RECTWP(rc), RECTHP(rc));
|
||||
|
||||
if (IsRectEmpty (&znode->dirty_rc)) {
|
||||
SetRect (&znode->dirty_rc,
|
||||
@@ -473,8 +484,8 @@ static int update_client_window (ZORDERNODE* znode, const RECT* rc)
|
||||
else {
|
||||
GetBoundRect (&znode->dirty_rc, &znode->dirty_rc, rc);
|
||||
}
|
||||
mgClients [znode->cli].has_dirty = TRUE;
|
||||
}
|
||||
mgClients [znode->cli].has_dirty = TRUE;
|
||||
}
|
||||
else
|
||||
#endif /* defined _MGRM_PROCESSES */
|
||||
@@ -494,7 +505,8 @@ static BOOL _cb_update_znode (void* context,
|
||||
{
|
||||
const RECT* rc = (RECT*)context;
|
||||
|
||||
if (znode->flags & ZOF_VISIBLE && znode->flags & ZOF_IF_REFERENCE) {
|
||||
if (znode->flags & ZOF_VISIBLE &&
|
||||
znode->flags & ZOF_IF_REFERENCE) {
|
||||
update_client_window (znode, rc);
|
||||
znode->flags &= ~ZOF_IF_REFERENCE;
|
||||
return TRUE;
|
||||
@@ -3235,7 +3247,7 @@ static int dskMoveWindow (int cli, int idx_znode, HDC memdc, const RECT* rcWin)
|
||||
slot = nodes [idx_znode].next;
|
||||
for (; slot != 0; slot = nodes [slot].next) {
|
||||
if (nodes [slot].flags & ZOF_VISIBLE &&
|
||||
DoesIntersect (rcWin, &nodes [slot].rc)) {
|
||||
DoesIntersect (rcWin, &nodes [slot].rc)) {
|
||||
nodes [slot].age++;
|
||||
}
|
||||
}
|
||||
@@ -3248,6 +3260,7 @@ static int dskMoveWindow (int cli, int idx_znode, HDC memdc, const RECT* rcWin)
|
||||
//SetClipRgn (&sg_UpdateRgn, rcInv + i);
|
||||
SetClipRgn (&sg_UpdateRgn, &(nodes [idx_znode].rc));
|
||||
|
||||
/* znodes below current znode in the same level */
|
||||
slot = nodes [idx_znode].next;
|
||||
for (; slot > 0; slot = nodes [slot].next) {
|
||||
if (nodes [slot].flags & ZOF_VISIBLE &&
|
||||
@@ -3258,6 +3271,7 @@ static int dskMoveWindow (int cli, int idx_znode, HDC memdc, const RECT* rcWin)
|
||||
}
|
||||
}
|
||||
|
||||
/* znodes below current level */
|
||||
for (level = 0; level < NR_ZORDER_LEVELS; level++) {
|
||||
if (type > _zof_types_for_level[level]) {
|
||||
slot = zi->first_in_levels[level];
|
||||
@@ -3372,12 +3386,10 @@ static int dskMoveWindow (int cli, int idx_znode, HDC memdc, const RECT* rcWin)
|
||||
do_for_all_znodes (NULL, zi, _cb_exclude_rc, ZT_ALL);
|
||||
}
|
||||
|
||||
while (slot && slot != idx_znode) {
|
||||
#if 0
|
||||
if (nodes [slot].flags & ZOF_VISIBLE) {
|
||||
ExcludeClipRect (HDC_SCREEN_SYS, &nodes [slot].rc);
|
||||
}
|
||||
#endif
|
||||
while (slot) {
|
||||
if (slot == idx_znode)
|
||||
break;
|
||||
|
||||
/* houhh 20090730, if slot window is no regular.*/
|
||||
if (nodes [slot].flags & ZOF_VISIBLE) {
|
||||
if (nodes[slot].idx_mask_rect == 0) {
|
||||
@@ -3404,6 +3416,7 @@ static int dskMoveWindow (int cli, int idx_znode, HDC memdc, const RECT* rcWin)
|
||||
}
|
||||
slot = nodes [slot].next;
|
||||
}
|
||||
|
||||
BitBlt (HDC_SCREEN_SYS, rcOld.left, rcOld.top,
|
||||
MIN (RECTWP (rcWin), RECTW (rcOld)),
|
||||
MIN (RECTHP (rcWin), RECTH (rcOld)),
|
||||
@@ -3417,17 +3430,22 @@ static int dskMoveWindow (int cli, int idx_znode, HDC memdc, const RECT* rcWin)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* unlock zi for change ... */
|
||||
unlock_zi_for_change (zi);
|
||||
do_for_all_znodes (&rcOld, zi, _cb_update_znode, ZT_ALL);
|
||||
|
||||
/* check the invalid rect of the window */
|
||||
if (nodes [0].flags & ZOF_IF_REFERENCE) {
|
||||
SendMessage (HWND_DESKTOP,
|
||||
MSG_ERASEDESKTOP, 0, (LPARAM)&rcOld);
|
||||
nodes [0].flags &= ~ZOF_IF_REFERENCE;
|
||||
}
|
||||
|
||||
/* check the invalid rectangles of the being moved window */
|
||||
EmptyClipRgn (&sg_UpdateRgn);
|
||||
nInvCount = SubtractRect (rcInv, &rcOld, &rcScr);
|
||||
for (i = 0; i < nInvCount; i++) {
|
||||
AddClipRect (&sg_UpdateRgn, rcInv + i);
|
||||
}
|
||||
|
||||
/* Since 5.0.0: handle levels */
|
||||
/* Since 5.0.0: handle levels above the current level */
|
||||
for (level = 0; level < NR_ZORDER_LEVELS; level++) {
|
||||
if (type < _zof_types_for_level[level]) {
|
||||
slot = zi->first_in_levels[level];
|
||||
@@ -3439,6 +3457,7 @@ static int dskMoveWindow (int cli, int idx_znode, HDC memdc, const RECT* rcWin)
|
||||
}
|
||||
}
|
||||
|
||||
/* handle znodes above the current znode */
|
||||
slot = *first;
|
||||
for (; slot != idx_znode; slot = nodes [slot].next) {
|
||||
if (nodes [slot].flags & ZOF_VISIBLE &&
|
||||
@@ -3446,20 +3465,15 @@ static int dskMoveWindow (int cli, int idx_znode, HDC memdc, const RECT* rcWin)
|
||||
AddClipRect(&sg_UpdateRgn, &rcInter);
|
||||
}
|
||||
|
||||
do_for_all_znodes (&rcOld, zi, _cb_update_znode, ZT_ALL);
|
||||
|
||||
if (nodes [0].flags & ZOF_IF_REFERENCE) {
|
||||
SendMessage (HWND_DESKTOP,
|
||||
MSG_ERASEDESKTOP, 0, (LPARAM)&rcOld);
|
||||
nodes [0].flags &= ~ZOF_IF_REFERENCE;
|
||||
}
|
||||
|
||||
OffsetRegion (&sg_UpdateRgn,
|
||||
rcWin->left - rcOld.left,
|
||||
rcWin->top - rcOld.top);
|
||||
|
||||
update_client_window_rgn (nodes [idx_znode].cli,
|
||||
nodes [idx_znode].hwnd);
|
||||
|
||||
/* unlock zi for change ... */
|
||||
unlock_zi_for_change (zi);
|
||||
}
|
||||
else {
|
||||
lock_zi_for_change (zi);
|
||||
|
||||
@@ -61,8 +61,6 @@
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef _MGUSE_SHMOPEN
|
||||
#include <sys/mman.h>
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define _DEBUG
|
||||
#include "common.h"
|
||||
|
||||
#ifdef _MGGAL_DRM
|
||||
@@ -2005,7 +2004,7 @@ static DrmSurfaceBuffer *drm_create_dumb_buffer(DrmVideoData* vdata,
|
||||
surface_buffer->handle,
|
||||
surface_buffer->width, surface_buffer->height,
|
||||
surface_buffer->pitch,
|
||||
(long unsigned int)surface_buffer->size, (long unsigned int)surface_buffer->offset);
|
||||
surface_buffer->size, surface_buffer->offset);
|
||||
|
||||
/* prepare buffer for memory mapping */
|
||||
memset(&mreq, 0, sizeof(mreq));
|
||||
@@ -2134,7 +2133,7 @@ static DrmSurfaceBuffer *drm_create_dumb_buffer_from_prime_fd(DrmVideoData* vdat
|
||||
return NULL;
|
||||
}
|
||||
|
||||
_DBG_PRINTF("size got by calling lseek: %lu\n", (long unsigned int)size);
|
||||
_DBG_PRINTF("size got by calling lseek: %lu\n", size);
|
||||
}
|
||||
|
||||
ret = drmPrimeFDToHandle (vdata->dev_fd, prime_fd, &handle);
|
||||
@@ -3493,7 +3492,7 @@ GAL_Surface* __drm_create_surface_from_name (GHANDLE video,
|
||||
|
||||
/* called by drmCreateDCFromHandle */
|
||||
GAL_Surface* __drm_create_surface_from_handle (GHANDLE video, uint32_t handle,
|
||||
size_t size, uint32_t drm_format, uint32_t pixels_off,
|
||||
unsigned long size, uint32_t drm_format, uint32_t pixels_off,
|
||||
uint32_t width, uint32_t height, uint32_t pitch)
|
||||
{
|
||||
GAL_VideoDevice *this = (GAL_VideoDevice *)video;
|
||||
|
||||
@@ -257,9 +257,11 @@ static int FB_EnterGraphicsMode (_THIS)
|
||||
_WRN_PRINTF ("Can't open %s: %m\n", tty_dev);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (ioctl (ttyfd, KDSETMODE, KD_GRAPHICS) == -1) {
|
||||
_WRN_PRINTF ("Error when setting the terminal to graphics mode: %m\n");
|
||||
_WRN_PRINTF ("Maybe is not a console.\n");
|
||||
_WRN_PRINTF ("Error when setting the terminal (%s) "
|
||||
"to graphics mode: %m\n", tty_dev);
|
||||
_WRN_PRINTF ("It might is not a console.\n");
|
||||
goto fail;
|
||||
}
|
||||
#ifdef _MGRM_PROCESSES
|
||||
@@ -864,7 +866,8 @@ static void FB_FreeHWSurfaces(_THIS)
|
||||
surfaces.next = NULL;
|
||||
}
|
||||
|
||||
static void FB_RequestHWSurface (_THIS, const REQ_HWSURFACE* request, REP_HWSURFACE* reply)
|
||||
static void FB_RequestHWSurface (_THIS, const REQ_HWSURFACE* request,
|
||||
REP_HWSURFACE* reply)
|
||||
{
|
||||
if (request->bucket == NULL) { /* alloc hw surface */
|
||||
vidmem_bucket *bucket;
|
||||
@@ -954,9 +957,9 @@ static void FB_RequestHWSurface (_THIS, const REQ_HWSURFACE* request, REP_HWSURF
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (bucket && bucket->used) {
|
||||
/* Add the memory back to the total */
|
||||
_DBG_PRINTF ("Freeing bucket of %d bytes\n", bucket->size);
|
||||
surfaces_memleft += bucket->size;
|
||||
|
||||
/* Can we merge the space with surrounding buckets? */
|
||||
@@ -1015,12 +1018,14 @@ static int FB_AllocHWSurface (_THIS, GAL_Surface *surface)
|
||||
surface->pitch = reply.pitch;
|
||||
surface->pixels = mapped_mem + reply.offset;
|
||||
surface->hwdata = (struct private_hwdata *)reply.bucket;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void FB_FreeHWSurface(_THIS, GAL_Surface *surface)
|
||||
{
|
||||
REQ_HWSURFACE request = {surface->w, surface->h, surface->pitch, 0, surface->hwdata};
|
||||
REQ_HWSURFACE request = {surface->w, surface->h, surface->pitch, 0,
|
||||
surface->hwdata};
|
||||
REP_HWSURFACE reply = {0, 0};
|
||||
|
||||
request.offset = (char*)surface->pixels - (char*)mapped_mem;
|
||||
|
||||
+2
-2
@@ -219,7 +219,7 @@ static GAL_Surface* create_wp_surface(GAL_Surface* screen)
|
||||
screen->format->BitsPerPixel,
|
||||
screen->format->Rmask, screen->format->Gmask,
|
||||
screen->format->Bmask, screen->format->Amask);
|
||||
_WRN_PRINTF ("GAL_CreateSharedRGBSurface: map size: %lu, fd: %d, RGBAmasks: %x, %x, %x, %x\n",
|
||||
_DBG_PRINTF ("GAL_CreateSharedRGBSurface: map size: %lu, fd: %d, RGBAmasks: %x, %x, %x, %x\n",
|
||||
wp_surf->shared_header->map_size, wp_surf->shared_header->fd,
|
||||
wp_surf->format->Rmask, wp_surf->format->Gmask,
|
||||
wp_surf->format->Bmask, wp_surf->format->Amask);
|
||||
@@ -243,7 +243,7 @@ static GAL_Surface* create_wp_surface(GAL_Surface* screen)
|
||||
&info, sizeof (SHAREDSURFINFO), &fd) < 0) || (fd < 0))
|
||||
goto empty;
|
||||
|
||||
_WRN_PRINTF ("REQID_GETSHAREDSURFACE: size (%lu), flags (0x%x), fd: %d\n",
|
||||
_DBG_PRINTF ("REQID_GETSHAREDSURFACE: size (%lu), flags (0x%x), fd: %d\n",
|
||||
info.size, info.flags, fd);
|
||||
wp_surf = GAL_AttachSharedRGBSurface (fd, info.size,
|
||||
info.flags, TRUE);
|
||||
|
||||
@@ -269,6 +269,8 @@ static void PCXVFB_UpdateRects (_THIS, int numrects, GAL_Rect *rects)
|
||||
|
||||
static BOOL PCXVFB_SyncUpdate (_THIS)
|
||||
{
|
||||
RECT dirty_rc;
|
||||
|
||||
if (IsRectEmpty (&this->hidden->dirty_rc))
|
||||
return FALSE;
|
||||
|
||||
@@ -278,6 +280,16 @@ static BOOL PCXVFB_SyncUpdate (_THIS)
|
||||
shm_lock(semid);
|
||||
#endif
|
||||
|
||||
dirty_rc.left = this->hidden->hdr->dirty_rc_l;
|
||||
dirty_rc.top = this->hidden->hdr->dirty_rc_t;
|
||||
dirty_rc.right = this->hidden->hdr->dirty_rc_r;
|
||||
dirty_rc.bottom = this->hidden->hdr->dirty_rc_b;
|
||||
if (dirty_rc.right == -1) dirty_rc.right = 0;
|
||||
if (dirty_rc.bottom == -1) dirty_rc.bottom = 0;
|
||||
|
||||
GetBoundRect (&this->hidden->dirty_rc, &dirty_rc,
|
||||
&this->hidden->dirty_rc);
|
||||
|
||||
shadowScreen_BlitToReal (this);
|
||||
|
||||
this->hidden->hdr->dirty_rc_l = this->hidden->dirty_rc.left;
|
||||
|
||||
+8
-2
@@ -628,6 +628,13 @@ void GAL_SetVideoModeInfo(GAL_Surface* screen)
|
||||
{
|
||||
assert(screen);
|
||||
|
||||
if (GAL_VideoSurface) {
|
||||
GAL_Surface *ready_to_go;
|
||||
ready_to_go = GAL_VideoSurface;
|
||||
GAL_VideoSurface = NULL;
|
||||
GAL_FreeSurface (ready_to_go);
|
||||
}
|
||||
|
||||
GAL_VideoSurface = screen;
|
||||
__mg_current_video->info.vfmt = __gal_screen->format;
|
||||
__mg_current_video->offset_x = 0;
|
||||
@@ -817,6 +824,7 @@ static inline void add_rects_to_update_region (CLIPRGN* region,
|
||||
rc.bottom = rects[i].y + rects[i].h;
|
||||
AddClipRect (region, &rc);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void GAL_UpdateRects (GAL_Surface *surface, int numrects, GAL_Rect *rects)
|
||||
@@ -922,8 +930,6 @@ BOOL GAL_SyncUpdate (GAL_Surface *surface)
|
||||
if (this->SyncUpdate) {
|
||||
rc = this->SyncUpdate (this);
|
||||
}
|
||||
|
||||
_DBG_PRINTF ("%d rects updated\n", numrects);
|
||||
}
|
||||
|
||||
EmptyClipRgn (&surface->update_region);
|
||||
|
||||
Reference in New Issue
Block a user