Pull out tile dimensions being passed around uselessly

This commit is contained in:
Kartikaya Gupta
2012-02-24 10:51:41 -05:00
parent 5af87c6049
commit 4352728c3b
5 changed files with 12 additions and 22 deletions

View File

@@ -347,7 +347,7 @@ AndroidGeckoLayerClient::InitGeckoLayerClientClass(JNIEnv *jEnv)
jGeckoLayerClientClass = getClassGlobalRef("org/mozilla/gecko/gfx/GeckoLayerClient");
jBeginDrawingMethod = getMethod("beginDrawing", "(IIIILjava/lang/String;)Landroid/graphics/Rect;");
jBeginDrawingMethod = getMethod("beginDrawing", "(IILjava/lang/String;)Landroid/graphics/Rect;");
jEndDrawingMethod = getMethod("endDrawing", "(IIII)V");
jGetViewTransformMethod = getMethod("getViewTransform",
"()Lorg/mozilla/gecko/gfx/ViewTransform;");
@@ -511,7 +511,7 @@ AndroidGeckoEvent::Init(JNIEnv *jenv, jobject jobj)
switch (mType) {
case SIZE_CHANGED:
ReadPointArray(mPoints, jenv, jPoints, 3);
ReadPointArray(mPoints, jenv, jPoints, 2);
break;
case KEY_EVENT:
@@ -764,8 +764,7 @@ AndroidGeckoSurfaceView::Draw2D(jobject buffer, int stride)
}
bool
AndroidGeckoLayerClient::BeginDrawing(int aWidth, int aHeight, int aTileWidth, int aTileHeight,
nsIntRect &aDirtyRect, const nsAString &aMetadata)
AndroidGeckoLayerClient::BeginDrawing(int aWidth, int aHeight, nsIntRect &aDirtyRect, const nsAString &aMetadata)
{
NS_ASSERTION(!isNull(), "BeginDrawing() called on null layer client!");
JNIEnv *env = AndroidBridge::GetJNIEnv();
@@ -776,7 +775,7 @@ AndroidGeckoLayerClient::BeginDrawing(int aWidth, int aHeight, int aTileWidth, i
jstring jMetadata = env->NewString(nsPromiseFlatString(aMetadata).get(), aMetadata.Length());
jobject rectObject = env->CallObjectMethod(wrapped_obj, jBeginDrawingMethod,
aWidth, aHeight, aTileWidth, aTileHeight,
aWidth, aHeight,
jMetadata);
if (rectObject == nsnull)