Bug 733184 - Remove more logging from widget. r=pcwalton

This commit is contained in:
Benoit Girard 2012-03-05 19:58:18 -05:00
parent b17cdc6f76
commit 921124c30e
9 changed files with 2 additions and 34 deletions

View File

@ -187,8 +187,8 @@ CompositorParent::Composite()
#ifdef COMPOSITOR_PERFORMANCE_WARNING
if (mExpectedComposeTime + TimeDuration::FromMilliseconds(15) < mozilla::TimeStamp::Now()) {
printf_stderr("Compositor: Compose frame took %i time then expected.\n",
(int)(mozilla::TimeStamp::Now() - mExpectedComposeTime).ToMilliseconds());
printf_stderr("Compositor: Composite took %i ms.\n",
15 + (int)(mozilla::TimeStamp::Now() - mExpectedComposeTime).ToMilliseconds());
}
#endif
}
@ -310,10 +310,6 @@ void
CompositorParent::RequestViewTransform()
{
mozilla::AndroidBridge::Bridge()->GetViewTransform(mScrollOffset, mXScale, mYScale);
__android_log_print(ANDROID_LOG_ERROR, "Gecko", "### mScrollOffset=%g %g "
"mXScale=%g mYScale=%g", (float)mScrollOffset.x, (float)mScrollOffset.y,
(float)mXScale, (float)mYScale);
}
#endif

View File

@ -766,8 +766,6 @@ LayerManagerOGL::Render()
if (width == 0 || height == 0)
return;
printf_stderr("render %i, %i\n", width, height);
// If the widget size changed, we have to force a MakeCurrent
// to make sure that GL sees the updated widget size.
if (mWidgetSize.width != width ||

View File

@ -960,7 +960,6 @@ ShadowThebesLayerOGL::Swap(const ThebesBuffer& aNewFront,
OptionalThebesBuffer* aReadOnlyFront,
nsIntRegion* aFrontUpdatedRegion)
{
printf_stderr("Thebes Swap\n");
if (!mDestroyed) {
if (!mBuffer) {
mBuffer = new ShadowBufferOGL(this);

View File

@ -245,7 +245,6 @@ public class GeckoLayerClient implements GeckoEventResponder,
private IntSize getBufferSize() {
View view = mLayerController.getView();
IntSize size = new IntSize(view.getWidth(), view.getHeight());
Log.e(LOGTAG, "### getBufferSize " + size);
return size;
}

View File

@ -233,7 +233,6 @@ public class LayerController implements Tabs.OnTabsChangedListener {
float newZoomFactor = size.width * oldZoomFactor / oldWidth;
mViewportMetrics.scaleTo(newZoomFactor, newFocus);
Log.d(LOGTAG, "setViewportSize: " + mViewportMetrics);
setForceRedraw();
if (mLayerClient != null) {
@ -250,7 +249,6 @@ public class LayerController implements Tabs.OnTabsChangedListener {
PointF origin = mViewportMetrics.getOrigin();
origin.offset(point.x, point.y);
mViewportMetrics.setOrigin(origin);
Log.d(LOGTAG, "scrollBy: " + mViewportMetrics);
notifyLayerClientOfGeometryChange();
GeckoApp.mAppContext.repositionPluginViews(false);
@ -263,7 +261,6 @@ public class LayerController implements Tabs.OnTabsChangedListener {
return;
mViewportMetrics.setPageSize(size);
Log.d(LOGTAG, "setPageSize: " + mViewportMetrics);
// Page size is owned by the layer client, so no need to notify it of
// this change.
@ -284,7 +281,6 @@ public class LayerController implements Tabs.OnTabsChangedListener {
*/
public void setViewportMetrics(ViewportMetrics viewport) {
mViewportMetrics = new ViewportMetrics(viewport);
Log.d(LOGTAG, "setViewportMetrics: " + mViewportMetrics);
// this function may or may not be called on the UI thread,
// but repositionPluginViews must only be called on the UI thread.
GeckoApp.mAppContext.runOnUiThread(new Runnable() {
@ -301,7 +297,6 @@ public class LayerController implements Tabs.OnTabsChangedListener {
*/
public void scaleWithFocus(float zoomFactor, PointF focus) {
mViewportMetrics.scaleTo(zoomFactor, focus);
Log.d(LOGTAG, "scaleWithFocus: " + mViewportMetrics + "; zf=" + zoomFactor);
// We assume the zoom level will only be modified by the
// PanZoomController, so no need to notify it of this change.

View File

@ -242,7 +242,6 @@ public class PanZoomController
*/
private boolean onTouchStart(MotionEvent event) {
Log.d(LOGTAG, "onTouchStart in state " + mState);
// user is taking control of movement, so stop
// any auto-movement we have going
stopAnimationTimer();
@ -269,7 +268,6 @@ public class PanZoomController
}
private boolean onTouchMove(MotionEvent event) {
Log.d(LOGTAG, "onTouchMove in state " + mState);
switch (mState) {
case NOTHING:
@ -315,7 +313,6 @@ public class PanZoomController
}
private boolean onTouchEnd(MotionEvent event) {
Log.d(LOGTAG, "onTouchEnd in " + mState);
switch (mState) {
case NOTHING:
@ -348,8 +345,6 @@ public class PanZoomController
}
private boolean onTouchCancel(MotionEvent event) {
Log.d(LOGTAG, "onTouchCancel in " + mState);
mState = PanZoomState.NOTHING;
// ensure we snap back if we're overscrolled
bounce();
@ -456,7 +451,6 @@ public class PanZoomController
}
mState = PanZoomState.FLING;
Log.d(LOGTAG, "end bounce at " + metrics);
startAnimationTimer(new BounceRunnable(bounceStartMetrics, metrics));
}

View File

@ -1070,10 +1070,8 @@ AndroidBridge::RegisterCompositor()
jmethodID registerCompositor = env->GetStaticMethodID(jFlexSurfaceView, "registerCxxCompositor", "()Lorg/mozilla/gecko/gfx/GLController;");
__android_log_print(ANDROID_LOG_ERROR, "Gecko", "### registerCxxCompositor()");
jobject glController = env->CallStaticObjectMethod(jFlexSurfaceView, registerCompositor);
__android_log_print(ANDROID_LOG_ERROR, "Gecko", "### Acquire()");
sController.Acquire(env, glController);
sController.SetGLVersion(2);
__android_log_print(ANDROID_LOG_ERROR, "Gecko", "Registered Compositor");
@ -1882,14 +1880,12 @@ AndroidBridge::ScheduleResumeComposition()
void
AndroidBridge::SetViewTransformGetter(AndroidViewTransformGetter& aViewTransformGetter)
{
__android_log_print(ANDROID_LOG_ERROR, "Gecko", "### SetViewTransformGetter()");
mViewTransformGetter = &aViewTransformGetter;
}
void
AndroidBridge::GetViewTransform(nsIntPoint& aScrollOffset, float& aScaleX, float& aScaleY)
{
__android_log_print(ANDROID_LOG_ERROR, "Gecko", "### GetViewTransform()");
if (mViewTransformGetter) {
(*mViewTransformGetter)(aScrollOffset, aScaleX, aScaleY);
}

View File

@ -894,21 +894,18 @@ Java_org_mozilla_gecko_GeckoAppShell_notifyReadingMessageListFailed(JNIEnv* jenv
NS_EXPORT void JNICALL
Java_org_mozilla_gecko_GeckoAppShell_scheduleComposite(JNIEnv*, jclass)
{
__android_log_print(ANDROID_LOG_ERROR, "Gecko", "### scheduleComposite()");
AndroidBridge::Bridge()->ScheduleComposite();
}
NS_EXPORT void JNICALL
Java_org_mozilla_gecko_GeckoAppShell_schedulePauseComposition(JNIEnv*, jclass)
{
__android_log_print(ANDROID_LOG_ERROR, "Gecko", "### schedulePauseComposition()");
AndroidBridge::Bridge()->SchedulePauseComposition();
}
NS_EXPORT void JNICALL
Java_org_mozilla_gecko_GeckoAppShell_scheduleResumeComposition(JNIEnv*, jclass)
{
__android_log_print(ANDROID_LOG_ERROR, "Gecko", "### scheduleResumeComposition()");
AndroidBridge::Bridge()->ScheduleResumeComposition();
}

View File

@ -1048,7 +1048,6 @@ nsWindow::DrawTo(gfxASurface *targetSurface, const nsIntRect &invalidRect)
switch (GetLayerManager(nsnull)->GetBackendType()) {
case LayerManager::LAYERS_BASIC: {
__android_log_print(ANDROID_LOG_ERROR, "Gecko", "### Basic layers drawing");
nsRefPtr<gfxContext> ctx = new gfxContext(targetSurface);
@ -1073,7 +1072,6 @@ nsWindow::DrawTo(gfxASurface *targetSurface, const nsIntRect &invalidRect)
}
case LayerManager::LAYERS_OPENGL: {
__android_log_print(ANDROID_LOG_ERROR, "Gecko", "### OGL layers drawing");
static_cast<mozilla::layers::LayerManagerOGL*>(GetLayerManager(nsnull))->
SetClippingRegion(nsIntRegion(boundsRect));
@ -1134,8 +1132,6 @@ nsWindow::OnDraw(AndroidGeckoEvent *ae)
return;
}
__android_log_print(ANDROID_LOG_ERROR, "Gecko", "### OnDraw()");
nsRefPtr<nsWindow> kungFuDeathGrip(this);
AndroidBridge::AutoLocalJNIFrame jniFrame;
@ -1212,12 +1208,10 @@ nsWindow::OnDraw(AndroidGeckoEvent *ae)
if (targetSurface->CairoStatus()) {
ALOG("### Failed to create a valid surface from the bitmap");
} else {
__android_log_print(ANDROID_LOG_ERROR, "Gecko", "### Calling DrawTo()!");
DrawTo(targetSurface, dirtyRect);
}
layers::renderTraceEventEnd("Widget draw to", "434646");
__android_log_print(ANDROID_LOG_ERROR, "Gecko", "### Calling EndDrawing()!");
layers::renderTraceEventStart("Widget end draw", "434747");
client.EndDrawing();
layers::renderTraceEventEnd("Widget end draw", "434747");