Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_packages_services_VncFlinger
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LMODroid
platform_packages_services_VncFlinger
Commits
7185075c
Commit
7185075c
authored
5 years ago
by
Steve Kondik
Browse files
Options
Downloads
Patches
Plain Diff
More changes for latest TigerVNC
parent
f19d1422
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/AndroidDesktop.cpp
+10
-11
10 additions, 11 deletions
src/AndroidDesktop.cpp
src/AndroidDesktop.h
+4
-3
4 additions, 3 deletions
src/AndroidDesktop.h
with
14 additions
and
14 deletions
src/AndroidDesktop.cpp
+
10
−
11
View file @
7185075c
...
...
@@ -12,7 +12,6 @@
#include
<rfb/PixelFormat.h>
#include
<rfb/Rect.h>
#include
<rfb/ScreenSet.h>
#include
<rfb/VNCServerST.h>
#include
"AndroidDesktop.h"
#include
"AndroidPixelBuffer.h"
...
...
@@ -41,7 +40,7 @@ AndroidDesktop::~AndroidDesktop() {
void
AndroidDesktop
::
start
(
rfb
::
VNCServer
*
vs
)
{
mMainDpy
=
SurfaceComposerClient
::
getBuiltInDisplay
(
ISurfaceComposer
::
eDisplayIdMain
);
mServer
=
(
rfb
::
VNCServerST
*
)
vs
;
mServer
=
vs
;
mPixels
=
new
AndroidPixelBuffer
();
mPixels
->
setDimensionsChangedListener
(
this
);
...
...
@@ -137,10 +136,6 @@ void AndroidDesktop::onFrameAvailable(const BufferItem& item) {
notify
();
}
rfb
::
Point
AndroidDesktop
::
getFbSize
()
{
return
rfb
::
Point
(
mPixels
->
width
(),
mPixels
->
height
());
}
void
AndroidDesktop
::
keyEvent
(
rdr
::
U32
keysym
,
__unused_attr
rdr
::
U32
keycode
,
bool
down
)
{
mInputDevice
->
keyEvent
(
down
,
keysym
);
}
...
...
@@ -173,6 +168,13 @@ status_t AndroidDesktop::updateDisplayInfo() {
return
NO_ERROR
;
}
rfb
::
ScreenSet
AndroidDesktop
::
computeScreenLayout
()
{
rfb
::
ScreenSet
screens
;
screens
.
add_screen
(
rfb
::
Screen
(
0
,
0
,
0
,
mPixels
->
width
(),
mPixels
->
height
(),
0
));
return
screens
;
mServer
->
setScreenLayout
(
screens
);
}
void
AndroidDesktop
::
onBufferDimensionsChanged
(
uint32_t
width
,
uint32_t
height
)
{
ALOGV
(
"Dimensions changed: old=(%ux%u) new=(%ux%u)"
,
mDisplayRect
.
getWidth
(),
mDisplayRect
.
getHeight
(),
width
,
height
);
...
...
@@ -184,11 +186,8 @@ void AndroidDesktop::onBufferDimensionsChanged(uint32_t width, uint32_t height)
mInputDevice
->
reconfigure
(
mDisplayRect
.
getWidth
(),
mDisplayRect
.
getHeight
());
mServer
->
setPixelBuffer
(
mPixels
.
get
());
rfb
::
ScreenSet
screens
;
screens
.
add_screen
(
rfb
::
Screen
(
0
,
0
,
0
,
mPixels
->
width
(),
mPixels
->
height
(),
0
));
mServer
->
setScreenLayout
(
screens
);
mServer
->
setPixelBuffer
(
mPixels
.
get
(),
computeScreenLayout
());
mServer
->
setScreenLayout
(
computeScreenLayout
());
}
void
AndroidDesktop
::
queryConnection
(
network
::
Socket
*
sock
,
__unused_attr
const
char
*
userName
)
{
...
...
This diff is collapsed.
Click to expand it.
src/AndroidDesktop.h
+
4
−
3
View file @
7185075c
...
...
@@ -14,7 +14,7 @@
#include
<rfb/PixelBuffer.h>
#include
<rfb/SDesktop.h>
#include
<rfb/
VNCServerST
.h>
#include
<rfb/
ScreenSet
.h>
#include
"AndroidPixelBuffer.h"
#include
"InputDevice.h"
...
...
@@ -36,7 +36,6 @@ class AndroidDesktop : public rfb::SDesktop,
virtual
void
stop
();
virtual
void
terminate
();
virtual
rfb
::
Point
getFbSize
();
virtual
unsigned
int
setScreenLayout
(
int
fb_width
,
int
fb_height
,
const
rfb
::
ScreenSet
&
layout
);
virtual
void
keyEvent
(
rdr
::
U32
keysym
,
rdr
::
U32
keycode
,
bool
down
);
...
...
@@ -59,6 +58,8 @@ class AndroidDesktop : public rfb::SDesktop,
virtual
status_t
updateDisplayInfo
();
virtual
rfb
::
ScreenSet
computeScreenLayout
();
Rect
mDisplayRect
;
Mutex
mLock
;
...
...
@@ -68,7 +69,7 @@ class AndroidDesktop : public rfb::SDesktop,
int
mEventFd
;
// Server instance
rfb
::
VNCServer
ST
*
mServer
;
rfb
::
VNCServer
*
mServer
;
// Pixel buffer
sp
<
AndroidPixelBuffer
>
mPixels
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment