MediaResource::ReadAt() requires to loop several times to ensure that all data has been read as it may return less data than requested.
This will allow to remove the handling of this particular shortcoming in MediaResources' users.
This functionality is now replaced with a dedicated new MediaResourceIndex class.
This allows for concurrent Read/Seek use of the MediaResource without having side effects.
First we need to set the Gecko thread JNIEnv* in nsAndroidStartup, but
after that we can initialize and deinitialize the rest of JNI, including
AndroidBridge, in GeckoAppShell. This makes nsAppShell control the
AndroidBridge lifetime. Over time, parts of the AndroidBridge
functionality will be migrated to nsAppShell.
Merge all the init code into AndroidBridge constructor and
AndroidBridge::ConstructBridge; merge all the deinit code into
AndroidBridge destructor and AndroidBridge::DeconstructBridge.
In particular, the SetMainThread call is obsolete and removed.
To reduce verbosity of the generated code, this patch makes the code
generator use unqualified names when possible, e.g. use State::Ref
instead of GeckoThread::State::Ref. To accomplish that, function
prototypes now use the C++11 -> syntax for return types.
Currently, when we generate JNI wrapper for an inner class, the
resulting C++ class will not actually be a nested class of the enclosing
class. As a result, the class can be confusing to use. For example,
wrapping Java class GeckoThread.State results in two unrelated C++
classes, GeckoThread and State, and it'd be confusing to use State by
itself.
This patch adds support for inner classes. We start by scanning only for
top-level classes, and when processing each top-level class, we
recursively scan for inner classes through
JarClassIterator.getInnerClasses() and CodeGenerator.generateClasses().
For each Java inner classes, the resulting C++ class will be a nested
class. For example, wrapping GeckoThread.State will produce
widget::GeckoThread and widget::GeckoThread::State.
GeckoAppShell.runGecko really should be in GeckoThread because
GeckoThread already takes care of most of the preparation when running
Gecko. This patch merges runGecko into GeckoThread.run, but split the
argument-building code into its own method.
We cannot call native methods until Gecko is loaded. This patch adds a
mechanism in GeckoThread so that other code can queue up native method
calls and have those calls automatically delivered when Gecko is ready.
GeckoThread.LaunchState now covers the entire GeckoThread lifetime and
not just launch, so it's renamed to GeckoThread.State. More utility
methods are added to check for the current state.
Because we switched annoations from gecko-mozglue.jar to constants.jar,
we should update the corresponding classpaths when processing
annotations during code autogeneration.
gecko-mozglue.jar is still needed during the javah step because
gecko-browser.jar has a dependency on
org.mozilla.gecko.mozglue.JNIObject.
This gives zero when jemalloc is enabled and non-zero when jemalloc is disabled
(e.g. I got 83 MiB at start-up, which sounds plausible).
--HG--
extra : rebase_source : f39a15472d48643f57a77f1df03e4a29543d0867
- Several of skia's functions are marked as deprecated, but when
compiling Gecko, we don't really care about Skia's internal use of
deprecated functions.
- clang warns about unused private fields, which is a valuable warning
for Skia developers, but not a useful warning to see during Gecko
compilations.
- Various macros in Skia are redefined as a result of using unified
compilation. clang has a -Wno switch for turning this off; gcc also
warns about it, but does not have a separate switch, so we can't do
anything about it.