зеркало из https://github.com/mozilla/pjs.git
Merge fixes
This commit is contained in:
Родитель
715ac9e901
Коммит
67bc14415d
|
@ -48,6 +48,7 @@ import org.mozilla.gecko.gfx.GeckoSoftwareLayerClient;
|
||||||
import org.mozilla.gecko.gfx.IntSize;
|
import org.mozilla.gecko.gfx.IntSize;
|
||||||
import org.mozilla.gecko.gfx.Layer;
|
import org.mozilla.gecko.gfx.Layer;
|
||||||
import org.mozilla.gecko.gfx.LayerController;
|
import org.mozilla.gecko.gfx.LayerController;
|
||||||
|
import org.mozilla.gecko.gfx.LayerView;
|
||||||
import org.mozilla.gecko.gfx.PlaceholderLayerClient;
|
import org.mozilla.gecko.gfx.PlaceholderLayerClient;
|
||||||
import org.mozilla.gecko.gfx.RectUtils;
|
import org.mozilla.gecko.gfx.RectUtils;
|
||||||
import org.mozilla.gecko.gfx.SurfaceTextureLayer;
|
import org.mozilla.gecko.gfx.SurfaceTextureLayer;
|
||||||
|
|
|
@ -113,7 +113,8 @@ public class GeckoSoftwareLayerClient extends GeckoLayerClient {
|
||||||
GeckoAppShell.registerGeckoEventListener("Viewport:UpdateLater", this);
|
GeckoAppShell.registerGeckoEventListener("Viewport:UpdateLater", this);
|
||||||
GeckoAppShell.registerGeckoEventListener("Checkerboard:Toggle", this);
|
GeckoAppShell.registerGeckoEventListener("Checkerboard:Toggle", this);
|
||||||
|
|
||||||
sendResizeEventIfNecessary();
|
// XXX: Review pcwalton. This signature changed on m-c, should force = false here?
|
||||||
|
sendResizeEventIfNecessary(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -188,12 +189,6 @@ public class GeckoSoftwareLayerClient extends GeckoLayerClient {
|
||||||
originChanged = !origin.equals(oldOrigin);
|
originChanged = !origin.equals(oldOrigin);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (originChanged) {
|
|
||||||
Point tileOrigin = new Point((origin.x / TILE_SIZE.width) * TILE_SIZE.width,
|
|
||||||
(origin.y / TILE_SIZE.height) * TILE_SIZE.height);
|
|
||||||
mRenderOffset.set(origin.x - tileOrigin.x, origin.y - tileOrigin.y);
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the window size has changed, reallocate the buffer to match.
|
// If the window size has changed, reallocate the buffer to match.
|
||||||
if (mBufferSize.width != width || mBufferSize.height != height) {
|
if (mBufferSize.width != width || mBufferSize.height != height) {
|
||||||
mBufferSize = new IntSize(width, height);
|
mBufferSize = new IntSize(width, height);
|
||||||
|
@ -226,9 +221,7 @@ public class GeckoSoftwareLayerClient extends GeckoLayerClient {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
updatedRect.offset(mRenderOffset.x, mRenderOffset.y);
|
|
||||||
((MultiTileLayer)mTileLayer).invalidate(updatedRect);
|
((MultiTileLayer)mTileLayer).invalidate(updatedRect);
|
||||||
((MultiTileLayer)mTileLayer).setRenderOffset(mRenderOffset);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void copyPixelsFromMultiTileLayer(Bitmap target) {
|
private void copyPixelsFromMultiTileLayer(Bitmap target) {
|
||||||
|
|
|
@ -37,10 +37,10 @@
|
||||||
|
|
||||||
package org.mozilla.gecko.gfx;
|
package org.mozilla.gecko.gfx;
|
||||||
|
|
||||||
|
import org.mozilla.gecko.GeckoInputConnection;
|
||||||
import org.mozilla.gecko.gfx.FloatSize;
|
import org.mozilla.gecko.gfx.FloatSize;
|
||||||
import org.mozilla.gecko.gfx.InputConnectionHandler;
|
import org.mozilla.gecko.gfx.InputConnectionHandler;
|
||||||
import org.mozilla.gecko.gfx.LayerController;
|
import org.mozilla.gecko.gfx.LayerController;
|
||||||
import org.mozilla.gecko.GeckoInputConnection;
|
|
||||||
import org.mozilla.gecko.ui.SimpleScaleGestureDetector;
|
import org.mozilla.gecko.ui.SimpleScaleGestureDetector;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.opengl.GLSurfaceView;
|
import android.opengl.GLSurfaceView;
|
||||||
|
@ -62,8 +62,7 @@ import java.util.LinkedList;
|
||||||
* This view delegates to LayerRenderer to actually do the drawing. Its role is largely that of a
|
* This view delegates to LayerRenderer to actually do the drawing. Its role is largely that of a
|
||||||
* mediator between the LayerRenderer and the LayerController.
|
* mediator between the LayerRenderer and the LayerController.
|
||||||
*/
|
*/
|
||||||
public class LayerView extends FlexibleGLSurfaceView implements GeckoEventListener {
|
public class LayerView extends FlexibleGLSurfaceView {
|
||||||
public class LayerView extends GLSurfaceView {
|
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
private LayerController mController;
|
private LayerController mController;
|
||||||
private InputConnectionHandler mInputConnectionHandler;
|
private InputConnectionHandler mInputConnectionHandler;
|
||||||
|
@ -93,31 +92,6 @@ public class LayerView extends GLSurfaceView {
|
||||||
setFocusable(true);
|
setFocusable(true);
|
||||||
setFocusableInTouchMode(true);
|
setFocusableInTouchMode(true);
|
||||||
|
|
||||||
GeckoAppShell.registerGeckoEventListener("Preferences:Data", this);
|
|
||||||
JSONArray jsonPrefs = new JSONArray();
|
|
||||||
jsonPrefs.put(touchEventsPrefName);
|
|
||||||
GeckoEvent event = new GeckoEvent("Preferences:Get", jsonPrefs.toString());
|
|
||||||
GeckoAppShell.sendEventToGecko(event);
|
|
||||||
|
|
||||||
createGLThread();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void handleMessage(String event, JSONObject message) {
|
|
||||||
if (event.equals("Preferences:Data")) {
|
|
||||||
try {
|
|
||||||
JSONArray jsonPrefs = message.getJSONArray("preferences");
|
|
||||||
for (int i = 0; i < jsonPrefs.length(); i++) {
|
|
||||||
JSONObject jPref = jsonPrefs.getJSONObject(i);
|
|
||||||
final String prefName = jPref.getString("name");
|
|
||||||
if (prefName.equals(touchEventsPrefName)) {
|
|
||||||
touchEventsEnabled = jPref.getBoolean("value");
|
|
||||||
GeckoAppShell.unregisterGeckoEventListener("Preferences:Data", this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch(JSONException ex) {
|
|
||||||
Log.e(LOGTAG, "Error decoding JSON", ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addToEventQueue(MotionEvent event) {
|
private void addToEventQueue(MotionEvent event) {
|
||||||
|
|
|
@ -808,6 +808,7 @@ AndroidGeckoSoftwareLayerClient::BeginDrawing(int aWidth, int aHeight, int aTile
|
||||||
|
|
||||||
void
|
void
|
||||||
AndroidGeckoSoftwareLayerClient::EndDrawing(const nsIntRect &aRect)
|
AndroidGeckoSoftwareLayerClient::EndDrawing(const nsIntRect &aRect)
|
||||||
|
{
|
||||||
NS_ASSERTION(!isNull(), "EndDrawing() called on null software layer client!");
|
NS_ASSERTION(!isNull(), "EndDrawing() called on null software layer client!");
|
||||||
|
|
||||||
JNIEnv *env = AndroidBridge::GetJNIEnv();
|
JNIEnv *env = AndroidBridge::GetJNIEnv();
|
||||||
|
|
|
@ -844,7 +844,10 @@ nsWindow::BindToTexture()
|
||||||
bool
|
bool
|
||||||
nsWindow::HasDirectTexture()
|
nsWindow::HasDirectTexture()
|
||||||
{
|
{
|
||||||
return false;
|
// XXX: Checking fix me
|
||||||
|
// This is currently causes some crashes so disable it for now
|
||||||
|
if (true)
|
||||||
|
return false;
|
||||||
|
|
||||||
static bool sTestedDirectTexture = false;
|
static bool sTestedDirectTexture = false;
|
||||||
static bool sHasDirectTexture = false;
|
static bool sHasDirectTexture = false;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче