[Android] Activity now working with all framework stubs.

This commit is contained in:
vng 2011-07-02 20:18:21 +03:00 committed by Alex Zolotarev
parent a5df61eca8
commit c5be1ba598
5 changed files with 20 additions and 12 deletions

View file

@ -55,6 +55,7 @@ void AndroidFramework::Resize(int w, int h)
void AndroidFramework::DrawFrame()
{
/*
LOG(LDEBUG, ("AF::DrawFrame 1"));
shared_ptr<DrawerYG> p = m_view->drawer();
@ -71,4 +72,5 @@ void AndroidFramework::DrawFrame()
p->endFrame();
LOG(LDEBUG, ("AF::DrawFrame 6"));
*/
}

View file

@ -24,7 +24,7 @@ extern "C"
GetAndroidPlatform().Initialize(env, thiz, path);
LOG(LDEBUG, ("MWMActivity::Init 2"));
//g_work = new AndroidFramework();
g_work = new AndroidFramework();
LOG(LDEBUG, ("MWMActivity::Init 3"));
}
@ -36,8 +36,8 @@ extern "C"
JNIEXPORT void JNICALL
Java_com_mapswithme_maps_MainGLView_nativeInit(JNIEnv * env, jobject thiz)
{
//ASSERT ( g_work, () );
//g_work->SetParentView(env, thiz);
ASSERT ( g_work, () );
g_work->SetParentView(env, thiz);
}
JNIEXPORT void JNICALL
@ -59,21 +59,21 @@ extern "C"
JNIEXPORT void JNICALL
Java_com_mapswithme_maps_MainRenderer_nativeInit(JNIEnv * env, jobject thiz)
{
//ASSERT ( g_work, () );
//g_work->InitRenderer();
ASSERT ( g_work, () );
g_work->InitRenderer();
}
JNIEXPORT void JNICALL
Java_com_mapswithme_maps_MainRenderer_nativeResize(JNIEnv * env, jobject thiz, jint w, jint h)
{
//ASSERT ( g_work, () );
//g_work->Resize(w, h);
ASSERT ( g_work, () );
g_work->Resize(w, h);
}
JNIEXPORT void JNICALL
Java_com_mapswithme_maps_MainRenderer_nativeDraw(JNIEnv * env, jobject thiz)
{
//ASSERT ( g_work, () );
//g_work->DrawFrame();
ASSERT ( g_work, () );
g_work->DrawFrame();
}
}

View file

@ -12,6 +12,11 @@ void AndroidPlatform::Initialize(JNIEnv * env, jobject activity, jstring path)
LOG(LDEBUG, ("Writable path = ", m_writableDir));
}
void AndroidPlatform::GetFontNames(FilesList & res) const
{
/// @todo Need to make refactoring of yg fonts
}
int AndroidPlatform::CpuCores() const
{
return 1;

View file

@ -9,6 +9,7 @@ class AndroidPlatform : public BasePlatformImpl
public:
void Initialize(JNIEnv * env, jobject activity, jstring path);
virtual void GetFontNames(FilesList & res) const;
virtual int CpuCores() const;
virtual string DeviceID() const;
};

View file

@ -26,9 +26,9 @@ shared_ptr<yg::ResourceManager> CreateResourceManager()
blitVBSize, blitIBSize, 10,
512, 256, 6,
512, 256, 4,
pl.ReadPathForFile("unicode_blocks.txt").c_str(),
pl.ReadPathForFile("fonts_whitelist.txt").c_str(),
pl.ReadPathForFile("fonts_blacklist.txt").c_str(),
"unicode_blocks.txt",
"fonts_whitelist.txt",
"fonts_blacklist.txt",
1 * 1024 * 1024,
500 * 1024,
yg::Rt8Bpp,