зеркало из https://github.com/mozilla/pjs.git
Turn on OMTC by default; fix crash when acquiring EGL surface
This commit is contained in:
Родитель
69c676f39d
Коммит
829c9c1dff
|
@ -594,6 +594,8 @@ pref("layers.acceleration.disabled", false);
|
|||
pref("layers.acceleration.disabled", true);
|
||||
#endif
|
||||
|
||||
pref("layers.offmainthreadcomposition.enabled", true);
|
||||
|
||||
pref("notification.feature.enabled", true);
|
||||
|
||||
// prevent tooltips from showing up
|
||||
|
|
|
@ -1036,12 +1036,17 @@ AndroidBridge::RegisterCompositor()
|
|||
return NULL;
|
||||
|
||||
AutoLocalJNIFrame jniFrame(env, 3);
|
||||
|
||||
jmethodID registerCompositor = env->GetStaticMethodID(jFlexSurfaceView, "registerCxxCompositor", "()Lorg/mozilla/gecko/gfx/GLController;");
|
||||
|
||||
jobject glController = env->CallStaticObjectMethod(jFlexSurfaceView, registerCompositor);
|
||||
|
||||
sController.Acquire(env, glController);
|
||||
sController.WaitForValidSurface();
|
||||
sController.SetGLVersion(2);
|
||||
sController.InitGLContext();
|
||||
|
||||
sController.WaitForValidSurface();
|
||||
return sController.GetEGLSurface();
|
||||
}
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include <cassert>
|
||||
#include <cstdlib>
|
||||
#include <pthread.h>
|
||||
#include <android/log.h>
|
||||
|
||||
template<typename T>
|
||||
class AndroidEGLObject {
|
||||
|
|
|
@ -1199,6 +1199,29 @@ nsWindow::OnDraw(AndroidGeckoEvent *ae)
|
|||
if (gAndroidBounds.width <= 0 || gAndroidBounds.height <= 0)
|
||||
return;
|
||||
|
||||
#if 0
|
||||
// BEGIN HACK: gl layers
|
||||
nsPaintEvent event(true, NS_PAINT, this);
|
||||
nsIntRect tileRect(0, 0, gAndroidBounds.width, gAndroidBounds.height);
|
||||
event.region = tileRect;
|
||||
|
||||
unsigned char *bits2 = new unsigned char[gAndroidBounds.width * gAndroidBounds.height * 2];
|
||||
nsRefPtr<gfxImageSurface> targetSurface =
|
||||
new gfxImageSurface(bits2,
|
||||
gfxIntSize(gAndroidBounds.width, gAndroidBounds.height),
|
||||
gAndroidBounds.width * 2,
|
||||
gfxASurface::ImageFormatRGB16_565);
|
||||
|
||||
nsRefPtr<gfxContext> ctx = new gfxContext(targetSurface);
|
||||
AutoLayerManagerSetup
|
||||
setupLayerManager(this, ctx, BasicLayerManager::BUFFER_NONE);
|
||||
DispatchEvent(&event);
|
||||
|
||||
delete[] bits2;
|
||||
return;
|
||||
// END HACK: gl layers
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Check to see whether the presentation shell corresponding to the document on the screen
|
||||
* is suppressing painting. If it is, we bail out, as continuing would result in a mismatch
|
||||
|
|
Загрузка…
Ссылка в новой задаче