Bug 728622. Remove dead code for dealing with view in Layer.java. r=clord

Now that bug 727939 has landed we don't seem to have any need to keep
the view around.
This commit is contained in:
Jeff Muizelaar 2012-02-21 11:05:09 -05:00
parent 45c832eb71
commit c38da242ab
5 changed files with 9 additions and 15 deletions

View File

@ -185,7 +185,7 @@ public abstract class GeckoLayerClient implements GeckoEventListener,
if (!bufferRect.intersect(currentRect)) {
// If there's no intersection, we have no need to render anything,
// but make sure to update the viewport size.
mTileLayer.beginTransaction(mLayerController.getView());
mTileLayer.beginTransaction();
try {
updateViewport(true);
} finally {
@ -196,7 +196,7 @@ public abstract class GeckoLayerClient implements GeckoEventListener,
bufferRect.offset(Math.round(-currentOrigin.x), Math.round(-currentOrigin.y));
}
mTileLayer.beginTransaction(mLayerController.getView());
mTileLayer.beginTransaction();
// Be sure to adjust the buffer size; if it's not at least as large as the viewport size,
// ViewportMetrics.getOptimumViewportOffset() gets awfully confused and severe display

View File

@ -53,7 +53,6 @@ public abstract class Layer {
private boolean mInTransaction;
private Point mNewOrigin;
private float mNewResolution;
private LayerView mView;
protected Point mOrigin;
protected float mResolution;
@ -115,19 +114,14 @@ public abstract class Layer {
*
* This function may block, so you should never call this on the main UI thread.
*/
public void beginTransaction(LayerView aView) {
public void beginTransaction() {
if (mTransactionLock.isHeldByCurrentThread())
throw new RuntimeException("Nested transactions are not supported");
mTransactionLock.lock();
mView = aView;
mInTransaction = true;
mNewResolution = mResolution;
}
public void beginTransaction() {
beginTransaction(null);
}
/** Call this when you're done modifying the layer. */
public void endTransaction() {
if (!mInTransaction)

View File

@ -217,7 +217,7 @@ public class MultiTileLayer extends Layer {
IntSize size = getSize();
for (SubTile layer : mTiles) {
if (!inTransaction) {
layer.beginTransaction(null);
layer.beginTransaction();
}
if (origin != null) {
@ -246,11 +246,11 @@ public class MultiTileLayer extends Layer {
}
@Override
public void beginTransaction(LayerView aView) {
super.beginTransaction(aView);
public void beginTransaction() {
super.beginTransaction();
for (SubTile layer : mTiles) {
layer.beginTransaction(aView);
layer.beginTransaction();
}
}

View File

@ -87,7 +87,7 @@ public class PlaceholderLayerClient {
BufferedCairoImage image = new BufferedCairoImage(mBuffer, mWidth, mHeight, mFormat);
SingleTileLayer tileLayer = new SingleTileLayer(image);
tileLayer.beginTransaction(mLayerController.getView());
tileLayer.beginTransaction();
try {
tileLayer.setOrigin(PointUtils.round(mViewport.getDisplayportOrigin()));
} finally {

View File

@ -141,7 +141,7 @@ public class SurfaceTextureLayer extends Layer implements SurfaceTexture.OnFrame
}
public void update(Point origin, IntSize size, float resolution, boolean inverted, boolean blend) {
beginTransaction(null);
beginTransaction();
setOrigin(origin);
setResolution(resolution);