зеркало из https://github.com/mozilla/gecko-dev.git
Bug xxxx - Followups to java compositor changes. review comments to widget/. r=dougt
This commit is contained in:
Родитель
aba630ccd2
Коммит
e1df6e3620
|
@ -417,9 +417,7 @@ AndroidGeckoEvent::Init(JNIEnv *jenv, jobject jobj)
|
|||
break;
|
||||
|
||||
case DRAW:
|
||||
ALOG("### Draw, before ReadRectField");
|
||||
ReadRectField(jenv);
|
||||
ALOG("### Draw, after ReadRectField");
|
||||
break;
|
||||
|
||||
case ORIENTATION_EVENT:
|
||||
|
@ -523,13 +521,14 @@ jobject
|
|||
AndroidGeckoSoftwareLayerClient::LockBuffer()
|
||||
{
|
||||
NS_ASSERTION(!isNull(), "LockBuffer() called on null software layer client!");
|
||||
|
||||
AndroidBridge::AutoLocalJNIFrame(1);
|
||||
return JNI()->CallObjectMethod(wrapped_obj, jLockBufferMethod);
|
||||
}
|
||||
|
||||
unsigned char *
|
||||
AndroidGeckoSoftwareLayerClient::LockBufferBits()
|
||||
{
|
||||
AndroidBridge::AutoLocalJNIFrame(1);
|
||||
return reinterpret_cast<unsigned char *>(JNI()->GetDirectBufferAddress(LockBuffer()));
|
||||
}
|
||||
|
||||
|
@ -537,7 +536,7 @@ void
|
|||
AndroidGeckoSoftwareLayerClient::UnlockBuffer()
|
||||
{
|
||||
NS_ASSERTION(!isNull(), "UnlockBuffer() called on null software layer client!");
|
||||
|
||||
AndroidBridge::AutoLocalJNIFrame(1);
|
||||
JNI()->CallVoidMethod(wrapped_obj, jUnlockBufferMethod);
|
||||
}
|
||||
|
||||
|
@ -545,7 +544,7 @@ void
|
|||
AndroidGeckoSoftwareLayerClient::BeginDrawing()
|
||||
{
|
||||
NS_ASSERTION(!isNull(), "BeginDrawing() called on null software layer client!");
|
||||
|
||||
AndroidBridge::AutoLocalJNIFrame(1);
|
||||
return JNI()->CallVoidMethod(wrapped_obj, jBeginDrawingMethod);
|
||||
}
|
||||
|
||||
|
@ -553,7 +552,7 @@ void
|
|||
AndroidGeckoSoftwareLayerClient::EndDrawing(const nsIntRect &aRect)
|
||||
{
|
||||
NS_ASSERTION(!isNull(), "EndDrawing() called on null software layer client!");
|
||||
|
||||
AndroidBridge::AutoLocalJNIFrame(1);
|
||||
return JNI()->CallVoidMethod(wrapped_obj, jEndDrawingMethod, aRect.x, aRect.y, aRect.width,
|
||||
aRect.height);
|
||||
}
|
||||
|
@ -562,22 +561,13 @@ void
|
|||
AndroidRect::Init(JNIEnv *jenv, jobject jobj)
|
||||
{
|
||||
NS_ASSERTION(wrapped_obj == nsnull, "Init called on non-null wrapped_obj!");
|
||||
|
||||
ALOG("AndroidRect::Init point a");
|
||||
|
||||
wrapped_obj = jobj;
|
||||
|
||||
ALOG("AndroidRect::Init point b");
|
||||
|
||||
if (jobj) {
|
||||
ALOG("AndroidRect::Init point c");
|
||||
|
||||
mTop = jenv->GetIntField(jobj, jTopField);
|
||||
mLeft = jenv->GetIntField(jobj, jLeftField);
|
||||
mRight = jenv->GetIntField(jobj, jRightField);
|
||||
mBottom = jenv->GetIntField(jobj, jBottomField);
|
||||
|
||||
ALOG("AndroidRect::Init point d");
|
||||
} else {
|
||||
mTop = 0;
|
||||
mLeft = 0;
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
#include "nsRect.h"
|
||||
#include "nsString.h"
|
||||
|
||||
#define FORCE_ALOG 1
|
||||
//#define FORCE_ALOG 1
|
||||
|
||||
#ifndef ALOG
|
||||
#if defined(DEBUG) || defined(FORCE_ALOG)
|
||||
|
|
|
@ -60,8 +60,6 @@
|
|||
#include "prlog.h"
|
||||
#endif
|
||||
|
||||
#define DEBUG_ANDROID_EVENTS 1
|
||||
|
||||
#ifdef DEBUG_ANDROID_EVENTS
|
||||
#define EVLOG(args...) ALOG(args)
|
||||
#else
|
||||
|
|
|
@ -1019,9 +1019,11 @@ nsWindow::DrawTo(gfxASurface *targetSurface, const nsIntRect &invalidRect)
|
|||
if (!mIsVisible)
|
||||
return false;
|
||||
|
||||
#ifdef DEBUG
|
||||
nsWindowType windowType;
|
||||
GetWindowType(windowType);
|
||||
ALOG("Window type is %d", (int)windowType);
|
||||
#endif
|
||||
|
||||
nsEventStatus status;
|
||||
nsIntRect boundsRect(0, 0, mBounds.width, mBounds.height);
|
||||
|
@ -1145,30 +1147,6 @@ nsWindow::OnDraw(AndroidGeckoEvent *ae)
|
|||
client.EndDrawing(ae->Rect());
|
||||
} else {
|
||||
ALOG("### GL layers are disabled for now in the native UI Fennec");
|
||||
#if 0
|
||||
int drawType = sview.BeginDrawing();
|
||||
|
||||
if (drawType == AndroidGeckoSurfaceView::DRAW_DISABLED) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (drawType == AndroidGeckoSurfaceView::DRAW_ERROR) {
|
||||
ALOG("##### BeginDrawing failed!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!sValidSurface) {
|
||||
sGLContext->RenewSurface();
|
||||
sValidSurface = true;
|
||||
}
|
||||
|
||||
|
||||
NS_ASSERTION(sGLContext, "Drawing with GLES without a GL context?");
|
||||
|
||||
DrawTo(nsnull, ae->P0(), ae->Alpha());
|
||||
|
||||
sview.EndDrawing();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче