cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Grieve <agri...@chromium.org>
Subject Re: Android WebView
Date Thu, 22 Nov 2012 23:32:42 GMT
Yeah, a lot of those changes seem risky. The invalidate for sure, but also
making every div in your app hw-accelerated will work only for extremely
small DOMs, and in the average case cause more harm than good. That said,
carefully selecting which elements to apply that to goes a long way.

Upping the priority of the renderer thread seems like something we could
try out.


On Thu, Nov 22, 2012 at 5:54 PM, Joe Bowser <bowserj@gmail.com> wrote:

> I don't think that's necessarily right.  Calling invalidate forces the
> re-render of the canvas with whatever data is sent to it in mPicture
> as well as whatever the WebView overlays.  The fact that you have to
> call invalidate() after the draw() just to get the up-to-date mPicture
> is a bug.  It would be better to see if mPicture was updated after the
> draw and to only issue a redraw at that time, but even then there
> might be issues.
>
> I wonder how other browser implementations handle this.
>
> On Thu, Nov 22, 2012 at 2:30 PM, Jonathan Bond-Caron <jbondc@openmv.com>
> wrote:
> > Ya calling invalidate() right after onDraw() is wrong.
> >
> > My experience is only with ICS on JB, but invalidate() will only affect
> > native/java (e.g. an android rectangle EditText on top of an HTML input).
> > It has no impact on the HTML/CSS webkit engine.
> >
> > It's actually the other way around, the webkit engine (c++) calls
> > viewInvalidate() in c++ when in the DOM  cursor/scrolling etc.. events
> > happen, this calls invalidate() in java.
> > The purpose of invalidate() is to force the re-render of *java*
> components
> > painted on the canvas.
> >
> >> -----Original Message-----
> >> From: Joe Bowser [mailto:bowserj@gmail.com]
> >> Sent: November 22, 2012 4:51 PM
> >> To: dev
> >> Subject: Re: Android WebView
> >>
> >> OK, so what's the downside of constantly forcing the view to be redrawn
> >> over and over again?  That's the thing that I would be most concerned
> >> about.
> >> >
> >> >
> >> > On Thu, Nov 22, 2012 at 3:55 PM, Simon MacDonald
> >> > <simon.macdonald@gmail.com>wrote:
> >> >
> >> >> Hey all,
> >> >>
> >> >> Anything we can use from this SO answer to make the webview faster?
> >> >>
> >> >>
> >> >> http://stackoverflow.com/questions/13500452/android-webview-renders-
> >> b
> >> >> lank-white-view-doesnt-update-on-css-changes-or-html
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message