mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-11-30 03:08:12 +08:00
improve x86 xlib performance
This commit is contained in:
parent
3dab39fbba
commit
1dffba0be4
@ -120,7 +120,7 @@ private:
|
||||
|
||||
static VelocityTrackerStrategy* createStrategy(const char* strategy);
|
||||
};
|
||||
const char* VelocityTrackerImpl::DEFAULT_STRATEGY = "lsq2";
|
||||
const char* VelocityTrackerImpl::DEFAULT_STRATEGY = "impulse";//"lsq2";
|
||||
|
||||
VelocityTrackerImpl::VelocityTrackerImpl(const char* strategy) :
|
||||
mLastEventTime(0), mCurrentPointerIdBits(0), mActivePointerId(-1) {
|
||||
|
77
src/gui/meson.build
Executable file
77
src/gui/meson.build
Executable file
@ -0,0 +1,77 @@
|
||||
project('gui', 'c++',
|
||||
version: '2.0',
|
||||
meson_version : '>= 0.56.0',
|
||||
default_options: [ 'buildtype=debugoptimized'],
|
||||
)
|
||||
|
||||
fc_version = meson.project_version()
|
||||
version_arr = fc_version.split('.')
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
|
||||
|
||||
freetype_dep = dependency('freetype2', method: 'pkg-config', version: freetype_req, required: false)
|
||||
|
||||
fonts_conf = configuration_data()
|
||||
|
||||
|
||||
if not get_option('tools').disabled()
|
||||
subdir('fc-cache')
|
||||
subdir('fc-cat')
|
||||
subdir('fc-conflist')
|
||||
subdir('fc-list')
|
||||
subdir('fc-match')
|
||||
subdir('fc-pattern')
|
||||
subdir('fc-query')
|
||||
subdir('fc-scan')
|
||||
subdir('fc-validate')
|
||||
endif
|
||||
|
||||
if not get_option('tests').disabled()
|
||||
subdir('test')
|
||||
endif
|
||||
|
||||
subdir('conf.d')
|
||||
subdir('its')
|
||||
|
||||
# xgettext is optional (on Windows for instance)
|
||||
if find_program('xgettext', required : get_option('nls')).found()
|
||||
subdir('po')
|
||||
subdir('po-conf')
|
||||
endif
|
||||
|
||||
if not get_option('doc').disabled()
|
||||
subdir('doc')
|
||||
endif
|
||||
|
||||
configure_file(output: 'config.h', configuration: conf)
|
||||
|
||||
configure_file(output: 'fonts.conf',
|
||||
input: 'fonts.conf.in',
|
||||
configuration: fonts_conf,
|
||||
install_dir: fc_baseconfigdir,
|
||||
install: true)
|
||||
|
||||
install_data('fonts.dtd',
|
||||
install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'xml/fontconfig')
|
||||
)
|
||||
|
||||
fc_headers = [
|
||||
'fontconfig/fontconfig.h',
|
||||
'fontconfig/fcfreetype.h',
|
||||
'fontconfig/fcprivate.h',
|
||||
]
|
||||
|
||||
install_headers(fc_headers, subdir: meson.project_name())
|
||||
|
||||
# Summary
|
||||
if meson.version().version_compare('>= 0.53')
|
||||
doc_targets = get_variable('doc_targets', [])
|
||||
|
||||
summary({
|
||||
'Documentation': (doc_targets.length() > 0 ? doc_targets : false),
|
||||
'NLS': not get_option('nls').disabled(),
|
||||
'Tests': not get_option('tests').disabled(),
|
||||
'Tools': not get_option('tools').disabled(),
|
||||
}, section: 'General', bool_yn: true, list_sep: ', ')
|
||||
endif
|
13
src/gui/meson_options.txt
Executable file
13
src/gui/meson_options.txt
Executable file
@ -0,0 +1,13 @@
|
||||
# Common feature options
|
||||
option('doc', type : 'feature', value : 'auto', yield: true,
|
||||
description: 'Build documentation')
|
||||
option('doc-txt', type: 'feature', value: 'auto')
|
||||
option('doc-man', type: 'feature', value: 'auto')
|
||||
option('doc-pdf', type: 'feature', value: 'auto')
|
||||
option('doc-html', type: 'feature', value: 'auto')
|
||||
option('nls', type : 'feature', value : 'auto', yield: true,
|
||||
description : 'Enable native language support (translations)')
|
||||
option('tests', type : 'feature', value : 'auto', yield : true,
|
||||
description: 'Enable unit tests')
|
||||
option('tools', type : 'feature', value : 'auto', yield : true,
|
||||
description: 'Build command-line tools (fc-list, fc-query, etc.)')
|
@ -2851,7 +2851,7 @@ void AbsListView::onTouchUp(MotionEvent&ev) {
|
||||
// Since we can potentially overfling more than we can overscroll, don't
|
||||
// allow the weird behavior where you can scroll to a boundary then
|
||||
// fling further.
|
||||
LOGD("Velocity [%d]%d:(%d,%d)",mActivePointerId,initialVelocity,mMinimumVelocity,mMaximumVelocity);
|
||||
LOGV("Velocity [%d]%d:(%d,%d)",mActivePointerId,initialVelocity,mMinimumVelocity,mMaximumVelocity);
|
||||
bool flingVelocity = std::abs(initialVelocity) > mMinimumVelocity;
|
||||
if (flingVelocity && !((mFirstPosition == 0 &&
|
||||
firstChildTop == contentTop - mOverscrollDistance) ||
|
||||
|
@ -2084,10 +2084,10 @@ void ViewGroup::addFocusables(std::vector<View*>& views, int direction, int focu
|
||||
}
|
||||
|
||||
std::vector<View*> children;
|
||||
for_each(mChildren.begin(),mChildren.end(),[&children](View*c){
|
||||
for(auto c:mChildren){
|
||||
if(c->getVisibility()==View::VISIBLE)
|
||||
children.push_back(c);
|
||||
});
|
||||
};
|
||||
FocusFinder::sort(children, 0, children.size(), this, isLayoutRtl());
|
||||
for (int i = 0; i < children.size(); ++i) {
|
||||
children[i]->addFocusables(views, direction, focusableMode);
|
||||
|
@ -1,9 +1,6 @@
|
||||
project (allwinner C CXX ASM)
|
||||
project (allwinner C CXX)
|
||||
set(ALLWINNER_SRCS
|
||||
input_linux.cc
|
||||
new_arm.S
|
||||
arm_asm.S
|
||||
memcpy-hybrid.S
|
||||
graph_nx5fb.c
|
||||
)
|
||||
include(CheckIncludeFile)
|
||||
|
@ -6,7 +6,6 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
#include <memcpy-hybrid.h>
|
||||
#ifdef ENABLE_RFB
|
||||
#include <rfb/rfb.h>
|
||||
#include <rfb/keysym.h>
|
||||
@ -346,7 +345,7 @@ DWORD GFXBlit(HANDLE dstsurface,int dx,int dy,HANDLE srcsurface,const GFXRect*sr
|
||||
pbd+=dy*ndst->pitch+dx*4;
|
||||
const int cpw=rs.w<<2;
|
||||
for(y=0;y<rs.h;y++){
|
||||
memcpy_hybrid(pbd,pbs,cpw);
|
||||
memcpy(pbd,pbs,cpw);
|
||||
pbs+=nsrc->pitch;
|
||||
pbd+=ndst->pitch;
|
||||
}
|
||||
|
@ -173,9 +173,9 @@ DWORD GFXFlip(HANDLE surface){
|
||||
XImage *img=(XImage*)surface;
|
||||
if(mainSurface==surface){
|
||||
GFXRect rect={0,0,img->width,img->height};
|
||||
X11Expose(0,0,img->width,img->height);
|
||||
//X11Expose(0,0,img->width,img->height);
|
||||
#if ENABLE_RFB
|
||||
rfbMarkRectAsModified(rfbScreen,rect.x,rect.y,rect.w,rect.h);
|
||||
//rfbMarkRectAsModified(rfbScreen,rect.x,rect.y,rect.w,rect.h);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user