105 Commits

Author SHA1 Message Date
John McCutchan
eb2cef413d Port more String and HashMap usages
BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1237973004 .
2015-07-16 07:30:56 -07:00
Adam Barth
7ca2e4fb10 Improve drawer performance
- Instead of using a ColorFilter or an Opacity widget to colorize the Icons,
   add a ColorFilter parameter it the image classes. This avoids needing to
   call saveLayer for each DrawerItem.
 - Ask Android for unbuffered input events to avoid bad synchronization with
   vsync.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1236043004 .
2015-07-15 11:07:53 -07:00
Adam Barth
7249a7f0cc Remove last use of Platform::networkService()
I forgot to remove the virtual function in Platform.h and missed two clients of
this function. This CL switches those clients to keep their own network service.

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

Review URL: https://codereview.chromium.org/1230113006 .
2015-07-14 09:41:48 -07:00
Adam Barth
1a8304ec9a Delete //sky/services/platform
There's no longer any code to share in this library. Instead, inline the one
trival class into both //sky/shell and //services/sky.

TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1237043002 .
2015-07-14 00:21:34 -07:00
Adam Barth
1949505fc9 Remove //sky/engine/platform/network
This code is all dead. Instead, we use Mojo directly from Dart to access the
network.

TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1239633002 .
2015-07-13 23:39:48 -07:00
Adam Barth
a68126d95d Roll Skia to 7b971f0152299ae9a924252a9bfd220318497bdd
R=chinmaygarde@google.com

Review URL: https://codereview.chromium.org/1236953002 .
2015-07-13 12:54:08 -07:00
Adam Barth
29154f007a Add machinery for dumping SkPictures to disk
R=ianh@google.com

Review URL: https://codereview.chromium.org/1235813005 .
2015-07-13 12:36:12 -07:00
Eric Seidel
b4aa27685c Fix Asteroids game to paint again and give it an icon.
I also fixed dependencies on Activiy and Keyboard etc
which were incorrectly included only in SkyDemo despite
being depended on by the Sky Framework.

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

Review URL: https://codereview.chromium.org/1225103009 .
2015-07-10 13:42:03 -07:00
Eric Seidel
6f0c2d0983 Teach SkyShell.apk to stop posting frames when not visible
This listens to both surface destruction as well as activity
pause/unpause.

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

Review URL: https://codereview.chromium.org/1230073002 .
2015-07-10 10:26:54 -07:00
Chinmay Garde
961d0c428e [Sky] Fix iOS build breaks
R=abarth@chromium.org, eseidel@chromium.org

Review URL: https://codereview.chromium.org/1229093002 .
2015-07-09 11:10:43 -07:00
Adam Barth
566110a8f8 Stop leaking temp directories in SkyShell
At startup, we make a list of all the temp directories that already exist and
then nuke them on a background thread after a five second delay. The five
second delay isn't particularly satisfying, but I think it's wortwhile to get
this work off the critical path of startup.

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

Review URL: https://codereview.chromium.org/1228083003 .
2015-07-09 09:57:41 -07:00
Adam Barth
a40fd86bb3 Build skyx packages by default
Now that we have all the Dart packages we need in //third_party, we can build
skyx bundles by default.

As part of this change, I've made it possible to build skyx bundles on Linux
and I've made the gn target names of the mojoms in //sky/services consistent
with each other and with //mojo/services/public.

TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1227973002 .
2015-07-09 08:39:45 -07:00
Adam Barth
1bc13e1c63 Teach sky_shell.exe to run from a snapshot
Also, make stocks robust to failing network connections.

TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1229743002 .
2015-07-08 15:50:06 -07:00
Adam Barth
427f162519 mv //sky/services/intents //sky/services/activity
This interface is growing to expose many activity-related functions, more than
just intents.

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

Review URL: https://codereview.chromium.org/1223053002 .
2015-07-08 13:37:22 -07:00
Collin Jackson
ed92b54f18 Back button should be able to close apps (issue 155)
R=abarth@chromium.org, abarth@google.com

Review URL: https://codereview.chromium.org/1213623008.
2015-07-06 18:01:04 -07:00
Eric Seidel
63cefd8bc1 Use sky_shell instead of mojo_shell for testing.
This does way more than a single CL should do, sorry.
- Fixed a bunch of logging/error reporting during loads.
- Made it possible for --package-root to be absolute.
- Fixed (hypothetically) parts of iOS build to be clang-plugin-compliant.
- Made all tests pass in sky_shell
- Removed a bunch of layout_tests including windows support.

I'll remove all the mojo test harness stuff in a follow-up patch.

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

Review URL: https://codereview.chromium.org/1215953006.
2015-07-06 17:45:49 -07:00
Adam Barth
d94e1d6255 Move home.dart into example/demo_launcher
This CL makes home.dart less of a special snowflake and instead makes it a peer
to the other Sky examples. As a result, we can add a sky.yaml file and embed
the thumbnail assets it needs into demo_launcher.skyx.

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

Review URL: https://codereview.chromium.org/1215703010.
2015-07-06 14:49:03 -07:00
Adam Barth
8031ab6bd7 Add padding values to View.idl
Rather than hardcoding the size and presence of the notification area in Dart,
we now expose padding values on the view. These values are set to non-zero
values when there are UI elements that overlap the view. We currently respect
only the top padding, but this CL paves the way to respect padding in other
directions.

We still hardcode the size of the notification area in Java. A future CL will
retrieve this value from the Android framework.

Fixes #257

R=ianh@google.com

Review URL: https://codereview.chromium.org/1220353002.
2015-07-06 10:56:02 -07:00
Benjamin Lerman
7600714a6f Do not use android specific API in mojo/java.
R=abarth@chromium.org, eseidel@chromium.org

Review URL: https://codereview.chromium.org/1217573005.
2015-07-06 14:56:14 +02:00
Adam Barth
b4b5b8e638 Make it possible to load Sky demos from local bundles
This CL teaches SkyDemo how to load Sky applications from local bundles. It
also teaches home.dart how to request a load from a bundle.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1213203008.
2015-07-02 16:43:09 -07:00
Adam Barth
25fc061387 SkyDemo should use explicit intents
This CL switches SkyDemo over to using explicit intents for deciding which Sky
apps to run. This change lets us get rid of the hacky "sky" URI scheme.
Instead, we use normal URLs but we require the sender of the intent to be
explicit in directing the VIEW intent to us.

TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1221123003.
2015-07-02 15:41:45 -07:00
Adam Barth
ec1f327121 Stocks.apk should have icons when run offline
This CL adds the concept of a root asset bundle to Sky. If the Sky app was
launched from a bundle, the root bundle is that bundle.

This CL teaches icon.dart to default to loading icons out of the root bundle,
if a root bundle exists. The next result is that Stocks has icons when run
offline because the icons are present in stock's skyx bundle.

TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1208273003.
2015-07-02 13:47:13 -07:00
Adam Barth
9ab6d395f3 Teach Stocks.apk how to load a skyx bundle
This CL teaches Stocks.apk how to start from a skyx bundle name |app.skyx| in
the APK's asset collection.

Stocks.apk still actually starts from |snapshot_blob.bin| because we can't yet
produce skyx files as part of the build process.

TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1221033006.
2015-07-02 13:09:57 -07:00
Adam Barth
36930f7ab7 Remove two unused functions from dart:sky.internals
These functions used to support testing, but they're no longer used by any
tests now that we've deleted the DOM-based world.

Really we should merge dart:sky.internals into dart:sky, but that's a CL for
another day.

TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1221163002.
2015-07-02 13:09:41 -07:00
Adam Barth
ae892ea9c8 Switch SkyShell to its own ResourceExtractor
This CL prepares us to have more interesting resources than base's
ResourceExtractor understands.

TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1221153002.
2015-07-02 11:24:57 -07:00
Adam Barth
2c6908f279 Rename ViewportObserver to SkyEngine
The term ViewportObserver doesn't mean anything. This interface has evolved to
control the engine. This new name reflects that.

TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1222663003.
2015-07-02 09:56:24 -07:00
Eric Seidel
834fb17258 Add a sky media service to make it possible to play a sound.
I didn't exactly follow the android API, but pretty close.

Also started a java/common implementation for things like
DataPipeUtils. I only needed the ability to copy from a data
pipe to a file, so that's the only function we have so far.

Fixes https://github.com/domokit/mojo/issues/270

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

Review URL: https://codereview.chromium.org/1211913005.
2015-07-01 12:29:40 -07:00
Adam Barth
826956d14d Remove the ability to load ".sky" files
Please use ".dart" files instead.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1222483002.
2015-06-30 14:48:32 -07:00
Adam Barth
b38ae4abe8 Fix corrupted rendering of images
When navigating from one app to another, we create a new Android window and
destroy the old one. Previously, when we destroyed the old window after
creating the new window, we would destroy the Ganesh context after making the
GL context for the new window current, causing us to corrupt the GL state in
the new window. After this CL, we call MakeCurrent before destroying the Ganesh
context so that it interacts with the proper GL context.

R=jackson@google.com

Review URL: https://codereview.chromium.org/1214263002.
2015-06-29 16:40:09 -07:00
Adam Barth
9062c56136 Make it possible to run a test in sky_shell
This CL makes it possible to run sky/tests/raw/bogus_import.dart in sky_shell
on Linux. We'd eventually like to scale this up to running all the tests.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1218633003.
2015-06-29 10:39:44 -07:00
Adam Barth
0bc960761a Add MineDigger.apk that works offline
This CL builds an APK for MineDigger that works offline. We use |sky_packager|
to snapshot the Dart code, which we then extract from the APK during startup.
If we succeed in extracting a snapshot, we load it by default.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1211253004.
2015-06-26 23:18:13 -07:00
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