In order to use VectorDrawable's in this code we need to use AppCompatDrawableManager, which
is in the v7 appcompat support library. GeckoView cannot access that library, hence
we should move getDrawable() into the main Fennec jar in order to let us use
VectorDrawable's.
Similarly we need to move DrawableUtil for the same reasons.
(This commit only takes care of moving the code, the following code adds VectorDrawable support.)
MozReview-Commit-ID: CE2yTMLgBlJ
This patch includes a small memory optimization of using ArrayList and
`volatile int` for storing the pending thumbnails list and pending
width, instead of using LinkedList and AtomicInteger, respectively.
The patch also fixes a possible race condition due to calling
processNextThumbnail outside of a lock. Now it must be called inside a
lock and its name is changed to reflect that.
Move the "thumbnail:" handler out of BitmapUtils and into
ThumbnailHelper and PromptListItem.
The patch adds two overloads of the getAndProcessThumbnailFor method in
ThumbnailHelper, which handle the tasks of getting a thumbnail for a
specific tab and calling a given BitmapLoader.
Because only PromptListItem makes use of the "thumbnail:" convention,
the actual handling of "thumbnail:" is moved to PromptListItem, which
calls ThumbnailHelper to get the thumbnail.
Replace old flags in WrapForJNI usages with new flags. The calledFrom
and dispatchTo flags are set based on whether the method is native or
non-native, and how the method is used.
Also fix testEventDipatcher to respect NativeJSObject's calledFrom =
"gekco" flag, by moving a test to Gecko thread.