Su易做图ceFlinger
D:\linux\ubuntu\touch\libhybris\libhybris_0.1.0+git20130606+c5d897a.orig\libhybris-0.1.0+git20130606+c5d897a\compat\su易做图ce_flinger\su易做图ce_flinger_compatibility_layer.cpp
SfSu易做图ce* sf_su易做图ce_create(SfClient* client, SfSu易做图ceCreationParameters* params)
{
assert(client);
assert(params);
SfSu易做图ce* su易做图ce = new SfSu易做图ce();
su易做图ce->client = client;
su易做图ce->su易做图ce_control = su易做图ce->client->client->createSu易做图ce(
android::String8(params->name),
params->w,
params->h,
android::PIXEL_FORMAT_RGBA_8888,
0x300);
if (su易做图ce->su易做图ce_control == NULL) {
report_su易做图ce_control_is_null_during_creation();
delete(su易做图ce);
return NULL;
}
void report_su易做图ce_control_is_null_during_creation()
{
printf("Could not acquire su易做图ce control object during su易做图ce creation");
}
SfClient* sf_client_create()
{
return sf_client_create_full(true);
}
SfClient* sf_client_create_full(bool egl_support)
{
SfClient* client = new SfClient();
client->client = new android::Su易做图ceComposerClient();
D:\linux\ubuntu\touch\libhybris\libhybris_0.1.0+git20130606+c5d897a.orig\libhybris-0.1.0+git20130606+c5d897a\compat\su易做图ce_flinger\direct_sf_test.cpp
int main(int argc, char** argv)
{
SfClient* sf_client = sf_client_create();
SfSu易做图ce* sf_su易做图ce = sf_su易做图ce_create(sf_client, ¶ms);
D:\linux\ubuntu\touch\libhybris\libhybris_0.1.0+git20130606+c5d897a.orig\su易做图ce_flinger_compatibility_layer_internal.h
struct SfClient
{
android::sp<android::Su易做图ceComposerClient> client;
EGLDisplay egl_display;
EGLConfig egl_config;
EGLContext egl_context;
bool egl_support;
};
F:\linux\phablet-ubuntu-20130618\frameworks\native\libs\gui\Su易做图ceComposerClient.cpp
sp<Su易做图ceControl> Su易做图ceComposerClient::createSu易做图ce(
const String8& name,
uint32_t w,
uint32_t h,
PixelFormat format,
uint32_t flags)
{
sp<Su易做图ceControl> result;
if (mStatus == NO_ERROR) {
ISu易做图ceComposerClient::su易做图ce_data_t data;
sp<ISu易做图ce> su易做图ce = mClient->createSu易做图ce(&data, name,
w, h, format, flags);
if (su易做图ce != 0) {
result = new Su易做图ceControl(this, su易做图ce, data);
}
}
return result;
}
void Su易做图ceComposerClient::onFirstRef() {
sp<ISu易做图ceComposer> sm(ComposerService::getComposerService());
if (sm != 0) {
sp<ISu易做图ceComposerClient> conn = sm->createConnection();
if (conn != 0) {
mClient = conn;
mStatus = NO_ERROR;
}
}
}
F:\linux\phablet-ubuntu-20130618\frameworks\native\include\binder\Binder.h
class BpRefBase : public virtual RefBase
{
inline IBinder* remote() { return mRemote; }
inline IBinder* remote() const { return mRemote; }
******************************
F:\linux\phablet-ubuntu-20130618\frameworks\native\libs\gui\ISu易做图ceComposerClient.cpp
class BpSu易做图ceComposerClient : public BpInte易做图ce<ISu易做图ceComposerClient>
{
virtual sp<ISu易做图ce> createSu易做图ce( su易做图ce_data_t* params,
const String8& name,
uint32_t w,
uint32_t h,
PixelFormat format,
uint32_t flags)
{
remote()->transact(CREATE_SURFACE, data, &reply);
status_t BnSu易做图ceComposerClient::onTransact(
uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
{
sp<ISu易做图ce> s = createSu易做图ce(¶ms, name, w, h,
format, flags);
f:\linux\phablet-ubuntu-20130618\frameworks\native\services\su易做图ceflinger\Client.cpp
sp<ISu易做图ce> Client::createSu易做图ce(
ISu易做图ceComposerClient::su易做图ce_data_t* params,
const String8& name,
uint32_t w, uint32_t h, PixelFormat format,
uint32_t flags)
{
mFlinger->postMessageSync(msg); //segfault
status_t Su易做图ceFlinger::postMessageSync(const sp<MessageBase>& msg,
nsecs_t reltime, uint32_t flags) {
status_t res = mEventQueue.postMessage(msg, reltime);
if (res == NO_ERROR) {
msg->wait(); //segfault
}
return res;
}
sp<ISu易做图ce> Su易做图ceFlinger::createLayer(
ISu易做图ceComposerClient::su易做图ce_data_t* params,
const String8& name,
&nb
补充:移动开发 , Android ,