74 Commits

Author SHA1 Message Date
Adam Barth
570cfb6299 Support snapshots in sky_shell (again)
Unbreak support for snapshots now that we have our offline Dart loader. Also,
wire up support for snapshots in sky_shell on Linux.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1212623002.
2015-06-25 17:10:35 -07:00
Adam Barth
1a1ef489ee Make it possible to run Sky apps offline
This CL makes it possible to run Sky apps offline by introducing new
DartLibraryProvider subclasses, specifically one that can load directly from
the file system. A future CL will expand this functionality to work with asset
bundles as well.

Currently, the only platform that uses this functionality is Linux, which can
now load a simple Sky app without even loading a network stack. Making this
work on other platforms is work for future CLs.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1203143004.
2015-06-25 13:59:22 -07:00
Viet-Trung Luu
29ae65d27f Don't use base::WorkerPool in the asset_bundle app.
WorkerPools can't be shut down, which means that the app's .so can't be
unloaded (which is bad for single process mode, and which is probably
why the asset bundle tests are flakily crashing on the try bots).

So use a SequencedWorkerPool instead (even though we don't care about
sequencing).

R=eseidel@chromium.org, kulakowski@chromium.org, abarth@chromium.org
BUG=Fixes #268

Review URL: https://codereview.chromium.org/1206673006.
2015-06-24 15:24:01 -07:00
Adam Barth
d8d7db82a0 Really remove config.h
This CL generated by |sed -i '/sky\/engine\/config.h/d'| and a manual sweep to
catch some oddballs.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1206763002.
2015-06-23 23:15:28 -07:00
Adam Barth
31cf589ba7 Port sky_shell to Linux for testing
This CL makes it possible to build sky_shell on Linux. It doesn't do much, but
it doesn't crash on startup. The goal is to evetually be able to test sky_shell
on the bots and to be able to run the test_sky on Mac.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1202323002.
2015-06-23 14:17:02 -07:00
Adam Barth
5d2da22836 SkyShell should implement the rest of dart:sky.internals
R=ianh@google.com

Review URL: https://codereview.chromium.org/1199243003.
2015-06-23 09:49:03 -07:00
Adam Barth
d0f60bc3f5 Move internals.dart out of Sky SDK
This file doesn't belong in the SDK because it is an implementation detail of
the Sky engine. Instead, this CL moves the code for dart:sky.internals into the
snapshot. This CL is a step towards merging dart:sky.internals with dart:sky,
which also resides in the snapshot.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1200953007.
2015-06-23 07:44:28 -07:00
Adam Barth
1a5da3ebe5 Expose the asset_bundle service in SkyShell
The plan is to use this service for game assets and offline assets.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1193763004.
2015-06-22 21:32:48 -07:00
Chinmay Garde
fd3aa9f29f Add temporary workaround for boringssl attempting to access the auxillary vector
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1185813005.
2015-06-16 17:16:04 -07:00
Chinmay Garde
9b74ec026c iOS: Wire up all gesture types in input_event.mojom
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1183833004.
2015-06-16 13:17:17 -07:00
Chinmay Garde
78754cd6a1 Fix offscreen rendering on iOS by not assuming that the default window bound framebuffer is 0
BUG=
R=iansf@google.com

Review URL: https://codereview.chromium.org/1183213007.
2015-06-16 09:51:34 -07:00
Chinmay Garde
2ccb9b778f Fix iOS builds after ShellView refactor on Android
BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1188633002.
2015-06-15 15:10:48 -07:00
Adam Barth
d59f88b826 Port sky_home to the new SkyView world
R=ianh@google.com, eseidel@chromium.org

Review URL: https://codereview.chromium.org/1178293004.
2015-06-12 16:53:29 -07:00
Adam Barth
ede4797da8 Add the ability for Sky content to trigger Android intents
We can use these intents to move the demo launcher to the new world.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1187583002.
2015-06-12 13:43:01 -07:00
Adam Barth
c8e5668ddb Refactor SkyShell to allow multiple SkyViews
This CL separates the view-specific state from the process-global state. The
view-specific state now lives on Instance rather than Shell.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1187503003.
2015-06-12 13:29:53 -07:00
Adam Barth
2795216f6a Wire up Android back button in SkyShell
The back button now triggers an event of type |back|.

R=eseidel@chromium.org, jackson@chromium.org

Review URL: https://codereview.chromium.org/1176373004.
2015-06-11 14:33:01 -07:00
Viet-Trung Luu
3c2e575fac Update from https://crrev.com/333737
* Cherrypick crrev.com/333293 (freetype -> freetype-android).
* Update mojo/go/go.py to use android-16 (NDK API level 16), which is
  4.1 (first Jelly Bean). Chromium dropped support for 14.
* TODO (separately): also update tools/go/upload.py and upload new
  binaries?
* Roll android_tools (to match Chromium).
* Small fixes to match //base changes: base::ObserverList, TraceConfig,
  ThreadTicks, etc.
* Restore build/ls.py (and add it to the list of files to not roll).
* Remove the dependency on third_party/instrumented_libraries.
* Add "enable_topchrome_md = false" to build/config/ui.gni.
* Add build/config/ui.gni to files_not_to_roll in
  update_from_chromium.py. (We should probably get rid of the use_glib
  variable/argument, and others as well.)
* Remove mojo/tools/roll/{roll_network_service.py,
  roll_network_service_patches/network_service.patch}. These are for
  rolling from Chromium, whereas we now have/use monet.
* Roll buildtools (to match Chromium).
* Modify sanitizer gn/gni files to make it work (patch included).
  (Maybe the patch even works -- I haven't checked.)

TBR=rockot@chromium.org,jamesr@chromium.org,rogulenko@google.com

Review URL: https://codereview.chromium.org/1180693002.
2015-06-11 10:01:25 -07:00
Adam Barth
6cbea9ce7e Stop SkyShell from crashing on startup
R=chinmaygarde@google.com

Review URL: https://codereview.chromium.org/1178773002.
2015-06-10 17:17:39 -07:00
Chinmay Garde
c230cc0adb sky/shell updates for Android and iOS
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1169983005.
2015-06-10 16:19:49 -07:00
Chinmay Garde
1f0c506d77 Basic Sky shell for iOS targets
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1171573002.
2015-06-10 16:14:39 -07:00
Eric Seidel
a816e9fc5d Fix Sky not to crash when clicking the Home button.
Fixes https://github.com/domokit/mojo/issues/212

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1173153002.
2015-06-10 13:20:41 -07:00
Ian Fischer
4b8590c14a Update the native_viewport interface to allow specification of the surface configuration, currently only needed for and used by EGL on Android.
This also fixes an issue where eglChooseConfig was
only being called in InitializeOneOff, which is
only called once per process.  This CL makes
choosing the config happen once per GLSurface
instead, which will ultimately permit apps to
create multiple native_viewports with different
surface configurations on the same display.  The
eglDisplay object is still a global, though.

R=abarth@chromium.org, viettrungluu@chromium.org, jamesr@chromium.org

Review URL: https://codereview.chromium.org/1168993002.
2015-06-09 16:50:28 -07:00
Eric Seidel
3a5fd0e53e Make it possible to navigate from a SkyView to a WebView.
This would occur when bringing SkyDemo to the front after
having viewed a SkyView based demo and then paused
the SkyActivity (by going to the Android Launcher, etc.)

I also fixed deploy_domokit_site.py to ignore .gitignore files
found in packages.  We should actually probably ignore these
when creating the packages in the first place, but
this check seems valid regardless.  The .gitignore for
sky/lib/assets was causing the assets not to get pushed
to the demo site.

R=abarth@chromium.org, johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1163323007.
2015-06-09 15:10:14 -07:00
Eric Seidel
0cbb319590 Stop leaking the TracingController's BroadcastReciever
https://github.com/domokit/sky_sdk/issues/23

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1150263003
2015-06-05 14:09:30 -07:00
Eric Seidel
a2ae29cb40 Various fixes in preparation for deploying
Fixed the mojo deploy script to no longer deploy mojo.
mojo now uses a more sophisticated CDN, etc.

Fixed old fn.dart to work again. :)  Looks like it was
victim of a mass rename.

Fixed engine.cc to be able to handle navigating from
WebView content to SkyView content.  We can't handle
the other direction yet, but we don't need to.
/sky_home is written in the .sky system but all of our
new examples are .dart (and thus SkyView).

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1165003006
2015-06-04 16:48:09 -07:00
John McCutchan
f0c5ab0b82 Roll Dart forward
BUG=
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1159443002
2015-05-28 07:45:06 -07:00
Hixie
63d5c73dd1 [Effen] port fn and stock to RenderNode, part 1 of many
This gets things off the ground barely enough to show some pixels.
These are not pixels that are actually part of the stock app, but
it's a start.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1157033006
2015-05-27 13:36:01 -07:00
Eric Seidel
2f3c23ed01 Fix dart:sky.internals to work in SkyView
R=ianh@google.com
TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/1156203003
2015-05-26 16:01:25 -07:00
Eric Seidel
19bb5cb574 Fix android build
TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1147153005
2015-05-22 13:11:39 -07:00
Eric Seidel
8aa3caf350 Make SkyView vs. WebView controlable via url path
We're currently in a transition between using main.sky and main.dart
files as our main() entry point for Sky applications.

This CL makes this runtime controlable by path name.  If it finds
a .dart in the path name it will use SkyView, otherwise it will
fall back to the existing WebView codepath.

SkyView does not expose a window object and much of the existing
Sky Engine is not initialized when main() is run.  Clients should
be transitioning away from main.sky towards main.dart in the near
future, however main.dart is probably not ready for general
consumption at this point.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1152313002
2015-05-22 12:59:21 -07:00
Adam Barth
b7c3f545f0 Make hit testing work in layout2.dart
This CL makes simple_render_tree.dart interactive by making the hit testing
system work. I've also added a mechanism for requesting an animation frame.

R=eseidel@chromium.org, ianh@google.com

Review URL: https://codereview.chromium.org/1153543002
2015-05-21 11:22:17 -07:00
Adam Barth
67109ce3e1 Plumb input events into SkyView
Clients can now register a callback that gets called whenever we have an event
for the view. We'll need to update the Event class at some point, but this is a
start.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1129333005
2015-05-19 16:50:28 -07:00
Adam Barth
0906da7f0f Plumb display metrics into SkyView
This CL teaches SkyView the width, height, and device pixel ratio of the
display. In the future, we'll want some sort of notification system for when
these values change.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1139823010
2015-05-19 14:54:08 -07:00
Adam Barth
9f8b9bb96d Teach SkyView path to draw a circle
This CL adds a global view object that can receive a Picture and be signaled to
draw. When using SkyView, this Picture shows up on screen.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1134913003
2015-05-19 14:20:04 -07:00
Adam Barth
1b45682ba9 Teach SkyView code path to print hello, world
This CL makes the SkyView codepath smart enough to print "hello, world" to the
console. The code path is off by default but can be enabled by changing one
line of code.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1131673011
2015-05-19 13:51:12 -07:00
Adam Barth
67b59fadb9 Make android directory for Android-specific bits of SkyShell
This CL prepares us to create an iOS version of SkyShell by moving the
Android-specific bits into an android directory.

R=chinmaygarde@google.com

Review URL: https://codereview.chromium.org/1139873004
2015-05-19 09:41:44 -07:00
Adam Barth
dd74567382 public org.domokit.sky.shell.SkyMain.ensureInitialized()
It's useful to be able to call org.domokit.sky.shell.SkyMain.ensureInitialized() when implementing custom Android Activities. This commit makes ensureInitialized() public for this purpose.

Unrelated changes:
Added curly braces to pass PRESUBMIT check.
Add Lex Berezhny <lex@damoti.com> to AUTHORS file in order to be able to commit fixes (and pass PRESUBMIT check).

Patch by Lex Berezhny <lex@damoti.com>.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1135953004
2015-05-16 13:57:23 -07:00
James Robinson
3507c90d4b Update from https://crrev.com/327068
This rolls in //base, //build and //sandbox/linux and updates other
things to match, in particular:

*) Update build_v8.patch
*) Add junit, mockito and roboelectric to DEPS for android test rules
*) Update DEPS for grit
*) Fix up various GN files for os->target_os rename
*) Fix up a few places that were using //base/float_util to use std::isnan
*) Fix up a few places using ApiCompatibilityUtil to use Android SDK directly

as well as a few miscellaneous fixes.

Many portions based on ncbray's work in
https://codereview.chromium.org/1108173002/

R=ncbray@chromium.org
TBR=ncbray@chromium.org

Review URL: https://codereview.chromium.org/1124763003
2015-05-05 16:31:51 -07:00
yzshen
e3fe2a2fcc Remove some InterfacePtr<> methods which directly deal with message pipe handles.
Users should use the corresponding methods dealing with
InterfacePtrInfo<>.

BUG=None
TEST=None
R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/1118843003
2015-05-04 14:47:01 -07:00
James Robinson
1c5cac4efa Expose sky KeyboardService in android mojo_shell
R=eseidel@chromium.org, qsr@chromium.org

Review URL: https://codereview.chromium.org/1088793003
2015-04-16 17:11:15 -07:00
Eric Seidel
d8ad81df8e Fix SkyDemo.apk on KitKat
LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS doesn't exist on K
so guard its usage.

R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/1058943004
2015-04-02 14:14:38 -07:00
Adam Barth
e26810b1de Add more tracing to Sky
This CL adds trace events:

1) Between requesting a frame and begin frame.
2) In the DartLoader see network latency.
3) While executing |main| and |_init|.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1025073003
2015-03-20 16:11:39 -07:00
Adam Barth
43ebba749b Add more trace events to Sky
These will help us better understand what's happening.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1027913002
2015-03-20 15:07:24 -07:00
Adam Barth
6d1228a2f3 Enable tracing in SkyShell
This CL teaches shelldb how to trace SkyShell.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1027903002
2015-03-20 14:16:43 -07:00
Eric Seidel
65f13ec5e7 Attempt to make us not crash on KitKat.
https://github.com/domokit/mojo/issues/68

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1026873002
2015-03-20 12:45:25 -07:00
Adam Barth
97abc0dadd Improve Material ink effects
1) Factors InkWell out of Material so that components can use an ink well
   without needing the shadow/level machinery.

2) Makes the ink effect move at a different velocity once the tap has actually
   occurred, converging with the spec. We don't have the right speeds yet, but
   at least we're approaching the right shape.

3) To support (2), added a primaryPointer attribute to GestureEvents to let
   authors coorelate gesturetapdown events with later gesturetap events.

4) To support (2), modernized SplashAnimation to used AnimatedValue and friends.

5) Added more constants to view-configuration.dart that match Android.

I've also removed the cancelling of the ink effect on scroll. The proper way to
do that is to notice that someone in the event chain is listening for
scrollstart and delay the beginning of the ink effect for some period of time.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1019023003
2015-03-19 11:17:48 -07:00
Adam Barth
be7eb7fbfa Make the status bar translucent
This CL lets Sky apps draw behind the Android status bar, better matching the
material design spec.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1010493007
2015-03-16 11:14:04 -07:00
Adam Barth
19d7fa3919 SkyShell DCHECKs on startup
We need to update how we initialize JNI to make sure we get an AtExitManager.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1003813004
2015-03-13 10:48:41 -07:00
Adam Barth
969df19479 Wire up gesturetap in SkyShell
R=rafaelw@chromium.org

Review URL: https://codereview.chromium.org/997073003
2015-03-11 12:54:47 -07:00
Adam Barth
a01babc042 Implement a basic IME-aware input element
This CL introduces a new keyboard service that understands Android IME and
starts work on a Input component that interacts with this service to provide an
editing control.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/995613002
2015-03-09 16:19:56 -07:00