зеркало из https://github.com/mozilla/pjs.git
Uncomment the Java compositor integration, except for the part that causes PowerVR crashes
This commit is contained in:
Родитель
b59a4a57f8
Коммит
fd17ee20f7
|
@ -224,6 +224,7 @@ public class GeckoGLLayerClient extends GeckoLayerClient
|
|||
// Create the shaders and textures if necessary.
|
||||
if (!mLayerRendererInitialized) {
|
||||
mLayerRenderer.onSurfaceCreated(null, null);
|
||||
mLayerRendererInitialized = true;
|
||||
}
|
||||
|
||||
// FIXME: This geometry is surely wrong.
|
||||
|
|
|
@ -212,6 +212,8 @@ public class LayerRenderer implements GLSurfaceView.Renderer {
|
|||
GLES20.glGetIntegerv(GLES20.GL_MAX_TEXTURE_SIZE, maxTextureSizeResult, 0);
|
||||
mMaxTextureSize = maxTextureSizeResult[0];
|
||||
|
||||
/*
|
||||
|
||||
// Add the program to the OpenGL environment
|
||||
GLES20.glUseProgram(mProgram);
|
||||
|
||||
|
@ -219,12 +221,19 @@ public class LayerRenderer implements GLSurfaceView.Renderer {
|
|||
GLES20.glUniformMatrix4fv(mTMatrixHandle, 1, false, TEXTURE_MATRIX, 0);
|
||||
|
||||
// Enable the arrays from which we get the vertex and texture coordinates
|
||||
Log.e(LOGTAG, "### Position handle is " + mPositionHandle + ", texture handle is " +
|
||||
mTextureHandle + ", last error is " + GLES20.glGetError());
|
||||
|
||||
// FIXME: This crashes PowerVR drivers. Seems that we cannot actually use multiple GL
|
||||
// programs reliably.
|
||||
GLES20.glEnableVertexAttribArray(mPositionHandle);
|
||||
GLES20.glEnableVertexAttribArray(mTextureHandle);
|
||||
|
||||
GLES20.glUniform1i(mSampleHandle, 0);
|
||||
|
||||
TextureGenerator.get().fill();
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
public int getMaxTextureSize() {
|
||||
|
|
|
@ -2388,30 +2388,37 @@ nsWindow::GetIMEUpdatePreference()
|
|||
#ifdef MOZ_JAVA_COMPOSITOR
|
||||
void
|
||||
nsWindow::DrawWindowUnderlay(LayerManager* aManager, nsIntRect aRect) {
|
||||
#if 0
|
||||
TransformLayerUserData* userData =
|
||||
static_cast<TransformLayerUserData*>(aManager->GetUserData(nsGkAtoms::transform));
|
||||
AndroidBridge::AutoLocalJNIFrame jniFrame(GetJNIForThread());
|
||||
|
||||
mozilla::layers::LayerUserData* userData = aManager->GetUserData(nsGkAtoms::transform);
|
||||
mozilla::layers::TransformLayerUserData* transformUserData =
|
||||
static_cast<mozilla::layers::TransformLayerUserData*>(userData);
|
||||
NS_ABORT_IF_FALSE(userData, "No transform user data!");
|
||||
|
||||
// Transform the unit square to figure out the offset and scale we need.
|
||||
gfxRect rect(0, 0, 1, 1);
|
||||
userData->matrix.TransformBounds(rect);
|
||||
transformUserData->matrix.TransformBounds(rect);
|
||||
|
||||
AndroidGeckoLayerClient& client = AndroidBridge::Bridge()->GetLayerClient();
|
||||
AndroidGeckoGLLayerClient& glClient = static_cast<AndroidGeckoGLLayerClient&>(client);
|
||||
glClient.CreateFrame(mLayerRendererFrame, rect.x, rect.y, rect.width);
|
||||
|
||||
#if 0
|
||||
mLayerRendererFrame.DrawBackground();
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
nsWindow::DrawWindowOverlay(LayerManager* aManager, nsIntRect aRect) {
|
||||
#if 0
|
||||
AndroidBridge::AutoLocalJNIFrame jniFrame(GetJNIForThread());
|
||||
NS_ABORT_IF_FALSE(!mLayerRendererFrame.isNull(),
|
||||
"Frame should have been created in DrawWindowUnderlay()!");
|
||||
|
||||
#if 0
|
||||
mLayerRendererFrame.DrawForeground();
|
||||
mLayerRendererFrame.Dispose();
|
||||
#endif
|
||||
|
||||
mLayerRendererFrame.Dispose();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче