Kaydet (Commit) 541ec41f authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl Kaydeden (comit) Miklos Vajna

android: LOEvents - remove unndeded, comments

Change-Id: I67976c2b72bf0f7ca044e479fa71b8adbaafdefc
üst 6c729114
......@@ -11,29 +11,26 @@ import org.mozilla.gecko.gfx.SubTile;
public class LOEvent implements Comparable<LOEvent> {
public static final int SIZE_CHANGED = 1;
public static final int TILE_SIZE = 2;
public static final int CHANGE_PART = 3;
public static final int LOAD = 4;
public static final int CLOSE = 5;
public static final int REDRAW = 6;
public static final int TILE_REEVALUATION_REQUEST = 7;
public static final int THUMBNAIL = 8;
public static final int TILE_INVALIDATION = 9;
public static final int TOUCH = 10;
public static final int KEY_EVENT = 11;
public static final int CHANGE_PART = 2;
public static final int LOAD = 3;
public static final int CLOSE = 4;
public static final int TILE_REEVALUATION_REQUEST = 5;
public static final int THUMBNAIL = 6;
public static final int TILE_INVALIDATION = 7;
public static final int TOUCH = 8;
public static final int KEY_EVENT = 9;
public final int mType;
public int mPriority = 0;
public String mTypeString;
public ThumbnailCreator.ThumbnailCreationTask mTask;
public String mTypeString;
public int mPartIndex;
public String mFilename;
public ComposedTileLayer mComposedTileLayer;
public String mTouchType;
public MotionEvent mMotionEvent;
public PointF mDocumentTouchCoordinate;
public String mKeyEventType;
public KeyEvent mKeyEvent;
public RectF mInvalidationRect;
......@@ -41,11 +38,6 @@ public class LOEvent implements Comparable<LOEvent> {
mType = type;
}
public LOEvent(int type, int widthPixels, int heightPixels) {
mType = type;
mTypeString = "Size Changed: " + widthPixels + " " + heightPixels;
}
public LOEvent(int type, ComposedTileLayer composedTileLayer) {
mType = type;
mTypeString = "Tile Reevaluation";
......@@ -58,11 +50,6 @@ public class LOEvent implements Comparable<LOEvent> {
mFilename = filename;
}
public LOEvent(int type, IntSize tileSize) {
mType = type;
mTypeString = "Tile size";
}
public LOEvent(int type, int partIndex) {
mType = type;
mPartIndex = partIndex;
......
......@@ -113,14 +113,16 @@ public class LOKitShell {
LOKitShell.sendEvent(new LOEvent(LOEvent.CLOSE));
}
public static void sendRedrawEvent() {
LOKitShell.sendEvent(new LOEvent(LOEvent.REDRAW));
}
/**
* Send tile reevaluation to LOKitThread.
*/
public static void sendTileReevaluationRequest(ComposedTileLayer composedTileLayer) {
LOKitShell.sendEvent(new LOEvent(LOEvent.TILE_REEVALUATION_REQUEST, composedTileLayer));
}
/**
* Send tile invalidation to LOKitThread.
*/
public static void sendTileInvalidationRequest(RectF rect) {
LOKitShell.sendEvent(new LOEvent(LOEvent.TILE_INVALIDATION, rect));
}
......
......@@ -93,7 +93,9 @@ public class LOKitThread extends Thread {
mLayerClient.forceRender();
}
/** Handle the geometry change + draw. */
/**
* Handle the geometry change + draw.
*/
private void redraw() {
if (mLayerClient == null || mTileProvider == null) {
// called too early...
......@@ -128,7 +130,9 @@ public class LOKitThread extends Thread {
}
}
/** Invalidate everything + handle the geometry change */
/**
* Invalidate everything + handle the geometry change
*/
private void refresh() {
mLayerClient.clearAndResetlayers();
redraw();
......@@ -177,7 +181,6 @@ public class LOKitThread extends Thread {
closeDocument();
break;
case LOEvent.SIZE_CHANGED:
Log.i(LOGTAG, "Size change event!");
redraw();
break;
case LOEvent.CHANGE_PART:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment