mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge fixes
This commit is contained in:
parent
2f35d690b6
commit
ea6c7d744f
@ -48,6 +48,7 @@ import org.mozilla.gecko.gfx.GeckoSoftwareLayerClient;
|
||||
import org.mozilla.gecko.gfx.IntSize;
|
||||
import org.mozilla.gecko.gfx.Layer;
|
||||
import org.mozilla.gecko.gfx.LayerController;
|
||||
import org.mozilla.gecko.gfx.LayerView;
|
||||
import org.mozilla.gecko.gfx.PlaceholderLayerClient;
|
||||
import org.mozilla.gecko.gfx.RectUtils;
|
||||
import org.mozilla.gecko.gfx.SurfaceTextureLayer;
|
||||
|
@ -113,7 +113,8 @@ public class GeckoSoftwareLayerClient extends GeckoLayerClient {
|
||||
GeckoAppShell.registerGeckoEventListener("Viewport:UpdateLater", this);
|
||||
GeckoAppShell.registerGeckoEventListener("Checkerboard:Toggle", this);
|
||||
|
||||
sendResizeEventIfNecessary();
|
||||
// XXX: Review pcwalton. This signature changed on m-c, should force = false here?
|
||||
sendResizeEventIfNecessary(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -188,12 +189,6 @@ public class GeckoSoftwareLayerClient extends GeckoLayerClient {
|
||||
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 (mBufferSize.width != width || mBufferSize.height != height) {
|
||||
mBufferSize = new IntSize(width, height);
|
||||
@ -226,9 +221,7 @@ public class GeckoSoftwareLayerClient extends GeckoLayerClient {
|
||||
return;
|
||||
}
|
||||
|
||||
updatedRect.offset(mRenderOffset.x, mRenderOffset.y);
|
||||
((MultiTileLayer)mTileLayer).invalidate(updatedRect);
|
||||
((MultiTileLayer)mTileLayer).setRenderOffset(mRenderOffset);
|
||||
}
|
||||
|
||||
private void copyPixelsFromMultiTileLayer(Bitmap target) {
|
||||
|
@ -37,10 +37,10 @@
|
||||
|
||||
package org.mozilla.gecko.gfx;
|
||||
|
||||
import org.mozilla.gecko.GeckoInputConnection;
|
||||
import org.mozilla.gecko.gfx.FloatSize;
|
||||
import org.mozilla.gecko.gfx.InputConnectionHandler;
|
||||
import org.mozilla.gecko.gfx.LayerController;
|
||||
import org.mozilla.gecko.GeckoInputConnection;
|
||||
import org.mozilla.gecko.ui.SimpleScaleGestureDetector;
|
||||
import android.content.Context;
|
||||
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
|
||||
* mediator between the LayerRenderer and the LayerController.
|
||||
*/
|
||||
public class LayerView extends FlexibleGLSurfaceView implements GeckoEventListener {
|
||||
public class LayerView extends GLSurfaceView {
|
||||
public class LayerView extends FlexibleGLSurfaceView {
|
||||
private Context mContext;
|
||||
private LayerController mController;
|
||||
private InputConnectionHandler mInputConnectionHandler;
|
||||
@ -93,31 +92,6 @@ public class LayerView extends GLSurfaceView {
|
||||
setFocusable(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) {
|
||||
|
@ -808,6 +808,7 @@ AndroidGeckoSoftwareLayerClient::BeginDrawing(int aWidth, int aHeight, int aTile
|
||||
|
||||
void
|
||||
AndroidGeckoSoftwareLayerClient::EndDrawing(const nsIntRect &aRect)
|
||||
{
|
||||
NS_ASSERTION(!isNull(), "EndDrawing() called on null software layer client!");
|
||||
|
||||
JNIEnv *env = AndroidBridge::GetJNIEnv();
|
||||
|
@ -844,7 +844,10 @@ nsWindow::BindToTexture()
|
||||
bool
|
||||
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 sHasDirectTexture = false;
|
||||
|
Loading…
Reference in New Issue
Block a user