struct JavaGlue {
jweak m_obj;
- jmethodID m_calcOurContentVisibleRectF;
jmethodID m_overrideLoading;
jmethodID m_scrollBy;
jmethodID m_sendMoveFocus;
}
} m_javaGlue;
-WebView(JNIEnv* env, jobject javaWebView, int viewImpl, WTF::String drawableDir) :
+WebView(JNIEnv* env, jobject javaWebView, int viewImpl, WTF::String drawableDir,
+ bool isHighEndGfx) :
m_ring((WebViewCore*) viewImpl)
+ , m_isHighEndGfx(isHighEndGfx)
{
jclass clazz = env->FindClass("android/webkit/WebView");
// m_javaGlue = new JavaGlue;
m_javaGlue.m_obj = env->NewWeakGlobalRef(javaWebView);
m_javaGlue.m_scrollBy = GetJMethod(env, clazz, "setContentScrollBy", "(IIZ)Z");
- m_javaGlue.m_calcOurContentVisibleRectF = GetJMethod(env, clazz, "calcOurContentVisibleRectF", "(Landroid/graphics/RectF;)V");
m_javaGlue.m_overrideLoading = GetJMethod(env, clazz, "overrideLoading", "(Ljava/lang/String;)V");
m_javaGlue.m_sendMoveFocus = GetJMethod(env, clazz, "sendMoveFocus", "(II)V");
m_javaGlue.m_sendMoveMouse = GetJMethod(env, clazz, "sendMoveMouse", "(IIII)V");
m_javaGlue.m_viewInvalidateRect = GetJMethod(env, clazz, "viewInvalidate", "(IIII)V");
m_javaGlue.m_postInvalidateDelayed = GetJMethod(env, clazz,
"viewInvalidateDelayed", "(JIIII)V");
- m_javaGlue.m_pageSwapCallback = GetJMethod(env, clazz, "pageSwapCallback", "()V");
+ m_javaGlue.m_pageSwapCallback = GetJMethod(env, clazz, "pageSwapCallback", "(Z)V");
m_javaGlue.m_inFullScreenMode = GetJMethod(env, clazz, "inFullScreenMode", "()Z");
m_javaGlue.m_getTextHandleScale = GetJMethod(env, clazz, "getTextHandleScale", "()F");
env->DeleteLocalRef(clazz);
m_ringAnimationEnd = 0;
m_baseLayer = 0;
m_glDrawFunctor = 0;
+ m_isDrawingPaused = false;
m_buttonSkin = drawableDir.isEmpty() ? 0 : new RenderSkinButton(drawableDir);
#if USE(ACCELERATED_COMPOSITING)
m_glWebViewState = 0;
}
#endif
-// Traverse our stored array of buttons that are in our picture, and update
-// their subpictures according to their current state.
-// Called from the UI thread. This is the one place in the UI thread where we
-// access the buttons stored in the WebCore thread.
-// hasFocus keeps track of whether the WebView has focus && windowFocus.
-// If not, we do not want to draw the button in a selected or pressed state
-void nativeRecordButtons(bool hasFocus, bool pressed, bool invalidate)
-{
- bool cursorIsOnButton = false;
- const CachedFrame* cachedFrame;
- const CachedNode* cachedCursor = 0;
- // Lock the mutex, since we now share with the WebCore thread.
- m_viewImpl->gButtonMutex.lock();
- if (m_viewImpl->m_buttons.size() && m_buttonSkin) {
- // FIXME: In a future change, we should keep track of whether the selection
- // has changed to short circuit (note that we would still need to update
- // if we received new buttons from the WebCore thread).
- WebCore::Node* cursor = 0;
- CachedRoot* root = getFrameCache(DontAllowNewer);
- if (root) {
- cachedCursor = root->currentCursor(&cachedFrame);
- if (cachedCursor)
- cursor = (WebCore::Node*) cachedCursor->nodePointer();
- }
-
- // Traverse the array, and update each button, depending on whether it
- // is selected.
- Container* end = m_viewImpl->m_buttons.end();
- for (Container* ptr = m_viewImpl->m_buttons.begin(); ptr != end; ptr++) {
- RenderSkinAndroid::State state = RenderSkinAndroid::kNormal;
- if (ptr->matches(cursor)) {
- cursorIsOnButton = true;
- // If the WebView is out of focus/window focus, set the state to
- // normal, but still keep track of the fact that the selected is a
- // button
- if (hasFocus) {
- if (pressed || m_ring.m_isPressed)
- state = RenderSkinAndroid::kPressed;
- else if (SkTime::GetMSecs() < m_ringAnimationEnd)
- state = RenderSkinAndroid::kFocused;
- }
- }
- ptr->updateFocusState(state, m_buttonSkin);
- }
- }
- m_viewImpl->gButtonMutex.unlock();
- if (invalidate && cachedCursor && cursorIsOnButton) {
- const WebCore::IntRect& b = cachedCursor->bounds(cachedFrame);
- viewInvalidateRect(b.x(), b.y(), b.maxX(), b.maxY());
- }
-}
-
void scrollToCurrentMatch()
{
if (!m_findOnPage.currentMatchIsInLayer()) {
{
if (rect.isEmpty())
return;
- SkRect visible;
- calcOurContentVisibleRect(&visible);
int dx = 0;
int left = rect.x();
int right = rect.maxX();
- if (left < visible.fLeft) {
- dx = left - visible.fLeft;
+ if (left < m_visibleRect.fLeft)
+ dx = left - m_visibleRect.fLeft;
// Only scroll right if the entire width can fit on screen.
- } else if (right > visible.fRight && right - left < visible.width()) {
- dx = right - visible.fRight;
- }
+ else if (right > m_visibleRect.fRight
+ && right - left < m_visibleRect.width())
+ dx = right - m_visibleRect.fRight;
int dy = 0;
int top = rect.y();
int bottom = rect.maxY();
- if (top < visible.fTop) {
- dy = top - visible.fTop;
+ if (top < m_visibleRect.fTop)
+ dy = top - m_visibleRect.fTop;
// Only scroll down if the entire height can fit on screen
- } else if (bottom > visible.fBottom && bottom - top < visible.height()) {
- dy = bottom - visible.fBottom;
- }
+ else if (bottom > m_visibleRect.fBottom
+ && bottom - top < m_visibleRect.height())
+ dy = bottom - m_visibleRect.fBottom;
if ((dx|dy) == 0 || !scrollBy(dx, dy))
return;
viewInvalidate();
}
-void calcOurContentVisibleRect(SkRect* r)
-{
- JNIEnv* env = JSC::Bindings::getJNIEnv();
- AutoJObject javaObject = m_javaGlue.object(env);
- if (!javaObject.get())
- return;
- jclass rectClass = env->FindClass("android/graphics/RectF");
- jmethodID init = env->GetMethodID(rectClass, "<init>", "(FFFF)V");
- jobject jRect = env->NewObject(rectClass, init, 0, 0, 0, 0);
- env->CallVoidMethod(javaObject.get(), m_javaGlue.m_calcOurContentVisibleRectF, jRect);
- r->fLeft = env->GetFloatField(jRect, m_javaGlue.m_rectFLeft);
- r->fTop = env->GetFloatField(jRect, m_javaGlue.m_rectFTop);
- r->fRight = r->fLeft + env->CallFloatMethod(jRect, m_javaGlue.m_rectFWidth);
- r->fBottom = r->fTop + env->CallFloatMethod(jRect, m_javaGlue.m_rectFHeight);
- env->DeleteLocalRef(rectClass);
- env->DeleteLocalRef(jRect);
- checkException(env);
-}
-
void resetCursorRing()
{
m_ringAnimationEnd = 0;
#if USE(ACCELERATED_COMPOSITING)
if (node->isInLayer() && root->rootLayer()) {
LayerAndroid* layer = root->rootLayer();
- SkRect visible;
- calcOurContentVisibleRect(&visible);
- layer->updateFixedLayersPositions(visible);
+ layer->updateFixedLayersPositions(m_visibleRect);
layer->updatePositions();
}
#endif
}
}
-bool drawGL(WebCore::IntRect& viewRect, WebCore::IntRect* invalRect, WebCore::IntRect& webViewRect,
- int titleBarHeight, WebCore::IntRect& clip, float scale, int extras)
+bool drawGL(WebCore::IntRect& viewRect, WebCore::IntRect* invalRect,
+ WebCore::IntRect& webViewRect, int titleBarHeight,
+ WebCore::IntRect& clip, float scale, int extras)
{
#if USE(ACCELERATED_COMPOSITING)
if (!m_baseLayer || inFullScreenMode())
return false;
if (!m_glWebViewState) {
- m_glWebViewState = new GLWebViewState(&m_viewImpl->gButtonMutex);
+ m_glWebViewState = new GLWebViewState();
+ m_glWebViewState->setHighEndGfx(m_isHighEndGfx);
m_glWebViewState->glExtras()->setCursorRingExtra(&m_ring);
m_glWebViewState->glExtras()->setFindOnPageExtra(&m_findOnPage);
if (m_baseLayer->content()) {
unsigned int pic = m_glWebViewState->currentPictureCounter();
m_glWebViewState->glExtras()->setDrawExtra(extra);
- LayerAndroid* compositeLayer = compositeRoot();
- if (compositeLayer)
- compositeLayer->setExtra(0);
-
- SkRect visibleRect;
- calcOurContentVisibleRect(&visibleRect);
// Make sure we have valid coordinates. We might not have valid coords
// if the zoom manager is still initializing. We will be redrawn
// once the correct scale is set
- if (!visibleRect.hasValidCoordinates())
+ if (!m_visibleRect.hasValidCoordinates())
return false;
- bool pagesSwapped = false;
- bool ret = m_glWebViewState->drawGL(viewRect, visibleRect, invalRect,
+ bool treesSwapped = false;
+ bool newTreeHasAnim = false;
+ bool ret = m_glWebViewState->drawGL(viewRect, m_visibleRect, invalRect,
webViewRect, titleBarHeight, clip, scale,
- &pagesSwapped);
- if (m_pageSwapCallbackRegistered && pagesSwapped) {
+ &treesSwapped, &newTreeHasAnim);
+ if (treesSwapped && (m_pageSwapCallbackRegistered || newTreeHasAnim)) {
m_pageSwapCallbackRegistered = false;
LOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!");
JNIEnv* env = JSC::Bindings::getJNIEnv();
AutoJObject javaObject = m_javaGlue.object(env);
if (javaObject.get()) {
- env->CallVoidMethod(javaObject.get(), m_javaGlue.m_pageSwapCallback);
+ env->CallVoidMethod(javaObject.get(), m_javaGlue.m_pageSwapCallback, newTreeHasAnim);
checkException(env);
}
}
if (ret || m_glWebViewState->currentPictureCounter() != pic)
- return true;
+ return !m_isDrawingPaused;
#endif
return false;
}
break;
case DrawExtrasCursorRing:
if (drawCursorPreamble(root) && m_ring.setup()) {
- if (!m_ring.m_isButton)
- extra = &m_ring;
+ extra = &m_ring;
drawCursorPostamble();
}
break;
default:
;
}
+#if USE(ACCELERATED_COMPOSITING)
+ LayerAndroid* compositeLayer = compositeRoot();
+ if (compositeLayer) {
+ // call this to be sure we've adjusted for any scrolling or animations
+ // before we actually draw
+ compositeLayer->updateFixedLayersPositions(m_visibleRect);
+ compositeLayer->updatePositions();
+ // We have to set the canvas' matrix on the base layer
+ // (to have fixed layers work as intended)
+ SkAutoCanvasRestore restore(canvas, true);
+ m_baseLayer->setMatrix(canvas->getTotalMatrix());
+ canvas->resetMatrix();
+ m_baseLayer->draw(canvas);
+ }
+#endif
if (extra) {
IntRect dummy; // inval area, unused for now
extra->draw(canvas, &mainPicture, &dummy);
}
-#if USE(ACCELERATED_COMPOSITING)
- LayerAndroid* compositeLayer = compositeRoot();
- if (!compositeLayer)
- return ret;
- compositeLayer->setExtra(extra);
- SkRect visible;
- calcOurContentVisibleRect(&visible);
- // call this to be sure we've adjusted for any scrolling or animations
- // before we actually draw
- compositeLayer->updateFixedLayersPositions(visible);
- compositeLayer->updatePositions();
- // We have to set the canvas' matrix on the base layer
- // (to have fixed layers work as intended)
- SkAutoCanvasRestore restore(canvas, true);
- m_baseLayer->setMatrix(canvas->getTotalMatrix());
- canvas->resetMatrix();
- m_baseLayer->draw(canvas);
-#endif
return ret;
}
m_frameCacheUI->setRootLayer(compositeRoot());
#if USE(ACCELERATED_COMPOSITING)
if (layerId >= 0) {
- SkRect visible;
- calcOurContentVisibleRect(&visible);
LayerAndroid* layer = const_cast<LayerAndroid*>(
m_frameCacheUI->rootLayer());
if (layer) {
- layer->updateFixedLayersPositions(visible);
+ layer->updateFixedLayersPositions(m_visibleRect);
layer->updatePositions();
}
}
void getTextSelectionRegion(SkRegion *region)
{
- m_selectText.getSelectionRegion(getVisibleRect(), region);
+ m_selectText.getSelectionRegion(getVisibleRect(), region, compositeRoot());
+}
+
+void getTextSelectionHandles(int* handles)
+{
+ m_selectText.getSelectionHandles(handles, compositeRoot());
}
void replaceBaseContent(PictureSet* set)
return m_baseLayer;
}
+void setVisibleRect(SkRect& visibleRect) {
+ m_visibleRect = visibleRect;
+}
+
+ bool m_isDrawingPaused;
private: // local state for WebView
// private to getFrameCache(); other functions operate in a different thread
CachedRoot* m_frameCacheUI; // navigation data ready for use
bool m_pageSwapCallbackRegistered;
#endif
RenderSkinButton* m_buttonSkin;
+ SkRect m_visibleRect;
+ bool m_isHighEndGfx;
}; // end of WebView class
class GLDrawFunctor : Functor {
public:
GLDrawFunctor(WebView* _wvInstance,
- bool(WebView::*_funcPtr)(WebCore::IntRect&, WebCore::IntRect*, WebCore::IntRect&, int, WebCore::IntRect&, jfloat, jint),
+ bool(WebView::*_funcPtr)(WebCore::IntRect&, WebCore::IntRect*,
+ WebCore::IntRect&, int, WebCore::IntRect&,
+ jfloat, jint),
WebCore::IntRect _viewRect, float _scale, int _extras) {
wvInstance = _wvInstance;
funcPtr = _funcPtr;
info->clipRight - info->clipLeft,
info->clipBottom - info->clipTop);
- bool retVal = (*wvInstance.*funcPtr)(localViewRect, &inval, webViewRect, titlebarHeight, clip, scale, extras);
+ bool retVal = (*wvInstance.*funcPtr)(localViewRect, &inval, webViewRect,
+ titlebarHeight, clip, scale, extras);
if (retVal) {
IntRect finalInval;
if (inval.isEmpty()) {
}
private:
WebView* wvInstance;
- bool (WebView::*funcPtr)(WebCore::IntRect&, WebCore::IntRect*, WebCore::IntRect&, int, WebCore::IntRect&, float, int);
+ bool (WebView::*funcPtr)(WebCore::IntRect&, WebCore::IntRect*,
+ WebCore::IntRect&, int, WebCore::IntRect&, float, int);
WebCore::IntRect viewRect;
WebCore::IntRect webViewRect;
jfloat scale;
view->clearCursor();
}
-static void nativeCreate(JNIEnv *env, jobject obj, int viewImpl, jstring drawableDir)
+static void nativeCreate(JNIEnv *env, jobject obj, int viewImpl,
+ jstring drawableDir, jboolean isHighEndGfx)
{
WTF::String dir = jstringToWtfString(env, drawableDir);
- WebView* webview = new WebView(env, obj, viewImpl, dir);
+ WebView* webview = new WebView(env, obj, viewImpl, dir, isHighEndGfx);
// NEED THIS OR SOMETHING LIKE IT!
//Release(obj);
}
static WebCore::IntRect jrect_to_webrect(JNIEnv* env, jobject obj)
{
- int L, T, R, B;
- GraphicsJNI::get_jrect(env, obj, &L, &T, &R, &B);
- return WebCore::IntRect(L, T, R - L, B - T);
+ if (obj) {
+ int L, T, R, B;
+ GraphicsJNI::get_jrect(env, obj, &L, &T, &R, &B);
+ return WebCore::IntRect(L, T, R - L, B - T);
+ } else
+ return WebCore::IntRect();
+}
+
+static SkRect jrectf_to_rect(JNIEnv* env, jobject obj)
+{
+ SkRect rect = SkRect::MakeEmpty();
+ if (obj)
+ GraphicsJNI::jrectf_to_rect(env, obj, &rect);
+ return rect;
}
static bool nativeCursorIntersects(JNIEnv *env, jobject obj, jobject visRect)
#endif
}
-static jint nativeDraw(JNIEnv *env, jobject obj, jobject canv, jint color,
+static jint nativeDraw(JNIEnv *env, jobject obj, jobject canv,
+ jobject visible, jint color,
jint extras, jboolean split) {
SkCanvas* canvas = GraphicsJNI::getNativeCanvas(env, canv);
- return reinterpret_cast<jint>(GET_NATIVE_VIEW(env, obj)->draw(canvas, color, extras, split));
-}
-
-static jint nativeGetDrawGLFunction(JNIEnv *env, jobject obj, jobject jrect, jobject jviewrect,
- jfloat scale, jint extras) {
- WebCore::IntRect viewRect;
- if (jrect == NULL) {
- viewRect = WebCore::IntRect();
- } else {
- viewRect = jrect_to_webrect(env, jrect);
- }
- WebView *wvInstance = GET_NATIVE_VIEW(env, obj);
- GLDrawFunctor* functor = new GLDrawFunctor(wvInstance, &android::WebView::drawGL,
- viewRect, scale, extras);
+ WebView* webView = GET_NATIVE_VIEW(env, obj);
+ SkRect visibleRect = jrectf_to_rect(env, visible);
+ webView->setVisibleRect(visibleRect);
+ PictureSet* pictureSet = webView->draw(canvas, color, extras, split);
+ return reinterpret_cast<jint>(pictureSet);
+}
+
+static jint nativeGetDrawGLFunction(JNIEnv *env, jobject obj, jint nativeView,
+ jobject jrect, jobject jviewrect,
+ jobject jvisiblerect,
+ jfloat scale, jint extras) {
+ WebCore::IntRect viewRect = jrect_to_webrect(env, jrect);
+ WebView *wvInstance = (WebView*) nativeView;
+ SkRect visibleRect = jrectf_to_rect(env, jvisiblerect);
+ wvInstance->setVisibleRect(visibleRect);
+
+ GLDrawFunctor* functor = new GLDrawFunctor(wvInstance,
+ &android::WebView::drawGL, viewRect, scale, extras);
wvInstance->setFunctor((Functor*) functor);
- WebCore::IntRect webViewRect;
- if (jviewrect == NULL) {
- webViewRect = WebCore::IntRect();
- } else {
- webViewRect = jrect_to_webrect(env, jviewrect);
- }
+ WebCore::IntRect webViewRect = jrect_to_webrect(env, jviewrect);
functor->updateViewRect(webViewRect);
return (jint)functor;
}
-static void nativeUpdateDrawGLFunction(JNIEnv *env, jobject obj, jobject jrect, jobject jviewrect) {
+static void nativeUpdateDrawGLFunction(JNIEnv *env, jobject obj, jobject jrect,
+ jobject jviewrect, jobject jvisiblerect) {
WebView *wvInstance = GET_NATIVE_VIEW(env, obj);
- if (wvInstance != NULL) {
+ if (wvInstance) {
GLDrawFunctor* functor = (GLDrawFunctor*) wvInstance->getFunctor();
- if (functor != NULL) {
- WebCore::IntRect viewRect;
- if (jrect == NULL) {
- viewRect = WebCore::IntRect();
- } else {
- viewRect = jrect_to_webrect(env, jrect);
- }
+ if (functor) {
+ WebCore::IntRect viewRect = jrect_to_webrect(env, jrect);
functor->updateRect(viewRect);
- WebCore::IntRect webViewRect;
- if (jviewrect == NULL) {
- webViewRect = WebCore::IntRect();
- } else {
- webViewRect = jrect_to_webrect(env, jviewrect);
- }
+ SkRect visibleRect = jrectf_to_rect(env, jvisiblerect);
+ wvInstance->setVisibleRect(visibleRect);
+
+ WebCore::IntRect webViewRect = jrect_to_webrect(env, jviewrect);
functor->updateViewRect(webViewRect);
}
}
}
-static bool nativeEvaluateLayersAnimations(JNIEnv *env, jobject obj)
+static bool nativeEvaluateLayersAnimations(JNIEnv *env, jobject obj, jint nativeView)
{
#if USE(ACCELERATED_COMPOSITING)
- LayerAndroid* root = GET_NATIVE_VIEW(env, obj)->compositeRoot();
+ LayerAndroid* root = ((WebView*)nativeView)->compositeRoot();
if (root)
return root->evaluateAnimations();
#endif
registerPageSwapCallback);
}
-static void nativeGetTextSelectionRegion(JNIEnv *env, jobject obj, jobject region)
+static void nativeGetTextSelectionRegion(JNIEnv *env, jobject obj, jint view,
+ jobject region)
{
if (!region)
return;
SkRegion* nregion = GraphicsJNI::getNativeRegion(env, region);
- GET_NATIVE_VIEW(env, obj)->getTextSelectionRegion(nregion);
+ ((WebView*)view)->getTextSelectionRegion(nregion);
+}
+
+static void nativeGetSelectionHandles(JNIEnv *env, jobject obj, jint view,
+ jintArray arr)
+{
+ int handles[4];
+ ((WebView*)view)->getTextSelectionHandles(handles);
+ env->SetIntArrayRegion(arr, 0, 4, handles);
+ checkException(env);
}
static BaseLayerAndroid* nativeGetBaseLayer(JNIEnv *env, jobject obj)
{
const CachedFrame* frame;
const CachedNode* node = getFocusCandidate(env, obj, &frame);
- WebCore::IntRect bounds = node ? node->bounds(frame)
+ WebCore::IntRect bounds = node ? node->originalAbsoluteBounds()
: WebCore::IntRect(0, 0, 0, 0);
// Inset the rect by 1 unit, so that the focus candidate's border can still
// be seen behind it.
- return createJavaRect(env, bounds.x() + 1, bounds.y() + 1,
- bounds.maxX() - 1, bounds.maxY() - 1);
+ return createJavaRect(env, bounds.x(), bounds.y(),
+ bounds.maxX(), bounds.maxY());
}
static jobject nativeFocusCandidatePaddingRect(JNIEnv *env, jobject obj)
return view->moveCursor(key, count, ignoreScroll);
}
-static void nativeRecordButtons(JNIEnv* env, jobject obj, bool hasFocus,
- bool pressed, bool invalidate)
-{
- WebView* view = GET_NATIVE_VIEW(env, obj);
- LOG_ASSERT(view, "view not set in %s", __FUNCTION__);
- view->nativeRecordButtons(hasFocus, pressed, invalidate);
-}
-
static void nativeSetFindIsUp(JNIEnv *env, jobject obj, jboolean isUp)
{
WebView* view = GET_NATIVE_VIEW(env, obj);
return GET_NATIVE_VIEW(env, obj)->selectionY();
}
-static void nativeSetSelectionPointer(JNIEnv *env, jobject obj, jboolean set,
- jfloat scale, jint x, jint y)
+static void nativeSetSelectionPointer(JNIEnv *env, jobject obj, jint nativeView,
+ jboolean set, jfloat scale, jint x, jint y)
{
- GET_NATIVE_VIEW(env, obj)->setSelectionPointer(set, scale, x, y);
+ ((WebView*)nativeView)->setSelectionPointer(set, scale, x, y);
}
static void nativeRegisterPageSwapCallback(JNIEnv *env, jobject obj)
TilesManager::instance()->setInvertedScreen(false);
return true;
}
- if (key == "inverted_contrast") {
+ else if (key == "inverted_contrast") {
float contrast = value.toFloat();
TilesManager::instance()->setInvertedScreenContrast(contrast);
return true;
}
- if (key == "enable_cpu_upload_path") {
+ else if (key == "enable_cpu_upload_path") {
TilesManager::instance()->transferQueue()->setTextureUploadType(
value == "true" ? CpuUpload : GpuUpload);
return true;
}
+ else if (key == "use_minimal_memory") {
+ TilesManager::instance()->setUseMinimalMemory(value == "true");
+ return true;
+ }
return false;
}
return SK_ColorWHITE;
}
+static void nativeSetPauseDrawing(JNIEnv *env, jobject obj, jint nativeView,
+ jboolean pause)
+{
+ ((WebView*)nativeView)->m_isDrawingPaused = pause;
+}
+
/*
* JNI registration
*/
(void*) nativeCacheHitNodePointer },
{ "nativeClearCursor", "()V",
(void*) nativeClearCursor },
- { "nativeCreate", "(ILjava/lang/String;)V",
+ { "nativeCreate", "(ILjava/lang/String;Z)V",
(void*) nativeCreate },
{ "nativeCursorFramePointer", "()I",
(void*) nativeCursorFramePointer },
(void*) nativeDebugDump },
{ "nativeDestroy", "()V",
(void*) nativeDestroy },
- { "nativeDraw", "(Landroid/graphics/Canvas;IIZ)I",
+ { "nativeDraw", "(Landroid/graphics/Canvas;Landroid/graphics/RectF;IIZ)I",
(void*) nativeDraw },
- { "nativeGetDrawGLFunction", "(Landroid/graphics/Rect;Landroid/graphics/Rect;FI)I",
+ { "nativeGetDrawGLFunction", "(ILandroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/RectF;FI)I",
(void*) nativeGetDrawGLFunction },
- { "nativeUpdateDrawGLFunction", "(Landroid/graphics/Rect;Landroid/graphics/Rect;)V",
+ { "nativeUpdateDrawGLFunction", "(Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/RectF;)V",
(void*) nativeUpdateDrawGLFunction },
{ "nativeDumpDisplayTree", "(Ljava/lang/String;)V",
(void*) nativeDumpDisplayTree },
- { "nativeEvaluateLayersAnimations", "()Z",
+ { "nativeEvaluateLayersAnimations", "(I)Z",
(void*) nativeEvaluateLayersAnimations },
{ "nativeExtendSelection", "(II)V",
(void*) nativeExtendSelection },
(void*) nativeMoveSelection },
{ "nativePointInNavCache", "(III)Z",
(void*) nativePointInNavCache },
- { "nativeRecordButtons", "(ZZZ)V",
- (void*) nativeRecordButtons },
{ "nativeResetSelection", "()V",
(void*) nativeResetSelection },
{ "nativeSelectableText", "()Landroid/graphics/Point;",
(void*) nativeSetHeightCanMeasure },
{ "nativeSetBaseLayer", "(ILandroid/graphics/Region;ZZZ)V",
(void*) nativeSetBaseLayer },
- { "nativeGetTextSelectionRegion", "(Landroid/graphics/Region;)V",
+ { "nativeGetTextSelectionRegion", "(ILandroid/graphics/Region;)V",
(void*) nativeGetTextSelectionRegion },
+ { "nativeGetSelectionHandles", "(I[I)V",
+ (void*) nativeGetSelectionHandles },
{ "nativeGetBaseLayer", "()I",
(void*) nativeGetBaseLayer },
{ "nativeReplaceBaseContent", "(I)V",
(void*) nativeCopyBaseContentToPicture },
{ "nativeHasContent", "()Z",
(void*) nativeHasContent },
- { "nativeSetSelectionPointer", "(ZFII)V",
+ { "nativeSetSelectionPointer", "(IZFII)V",
(void*) nativeSetSelectionPointer },
{ "nativeShowCursorTimed", "()V",
(void*) nativeShowCursorTimed },
(void*) nativeGetProperty },
{ "nativeOnTrimMemory", "(I)V",
(void*) nativeOnTrimMemory },
+ { "nativeSetPauseDrawing", "(IZ)V",
+ (void*) nativeSetPauseDrawing },
};
int registerWebView(JNIEnv* env)