58 Commits

Author SHA1 Message Date
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
Adam Barth
56898f39ac SkyShell DCHECKs on startup sometimes
Sometimes we try to draw a 0x0 picture. We shouldn't bother trying to turn a
0x0 picture into actual pixels.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/984153004
2015-03-09 16:19:33 -07:00
Adam Barth
11f482978c Stocks app shouldn't show black when resuming from recents list
Previously, we weren't scheduling a visual update when our surface was created,
so we'd just continue to show black until the author requested a new animation
frame. After this CL, we schedule a visual update as soon as our surface is
created.

As part of this change, I've removed knowledge of the GPU delegate from
PlatformView. Now, all the calls from PlatformView to the GPU system bounce
through the UI delegate, which serializes the commands with other commands from
the UI engine to the GPU rasterizer.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/974483004
2015-03-02 16:25:24 -08:00
Adam Barth
4e1056c43f Make it possible for SkyShell embedders to register services
We now register the sensor service from SkyDemo, which shows that embedders of
SkyShell can register their own Java services.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/969753003
2015-03-02 13:33:56 -08:00
Eric Seidel
d842eb9500 Add support for pressure on pointer events
The touch demo needs some basic smoothing, right now
it looks rather jittery after this change.  But the pressure
code is definitely working!

R=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/970493003
2015-03-02 12:38:29 -08:00
Eric Seidel
c8912dd14c Add support for scroll and fling gestures to SkyShell.
This is not complete gesture support by far, but it's a start.
MojoShell and Chrome use a C++ GestureDetector, this code attempts
to use the Android (Java) GestureDetector instead.

We probably should not be sending gesturetap until we've decided
it's not a scroll, etc, but this implementation does not go that far.

I had to fix a bug whereby we were assuming the InputEvent.time_stamp
was in TimeDelta's internal format, which was wrong.  When we get
time_stamp from Android its in ms since boot.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/969493002
2015-02-27 16:46:19 -08:00
Adam Barth
29e3ba99e9 Make shake-to-reload actually work
We need to create a new service provider when we navigate to a new page
otherwise the new page is sad that the old page took its service provider.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/962383003
2015-02-27 16:38:40 -08:00
Adam Barth
e8b988e226 Expose Android sensors to via Mojo services
This CL adds a sensor_service to sky/services and wires it into SkyShell
The plan is to eventually use this data to implement shake-to-refresh.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/962043002
2015-02-27 14:37:50 -08:00
Eric Seidel
a3eeb2263c Fix multi-touch to work in SkyShell.
Before this patch it crashed.

Also updated the touch-demo to support multi-touch.

R=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/961483004
2015-02-26 12:23:18 -08:00
Adam Barth
4c771530c4 Introduce Stocks.apk
This CL renames SkyShell.apk to SkyDemo.apk and adds a Stocks.apk which
defaults to the stocks demo app. Sky Shell is now a library that can be
packaged by different APKs.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/965493002
2015-02-26 12:05:17 -08:00
Benjamin Lerman
30cd9363cd Fix sky shell.
This add the missing RequestNavigateHistory method on sky::Engine.

It is currently not implemented.

TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/957973003
2015-02-26 10:46:25 +01:00
Adam Barth
95a2e77844 Add missing dependency from Eric's last commit
TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/952213005
2015-02-25 15:36:24 -08:00
Eric Seidel
3d09314b22 Make WebView::close not crash and start to fix navigation in SkyShell
However WebView::close() no longer crashes.  close() is never called
in MojoShell since mojo can't shutdown yet.

I tried closing the existing WebView and replacing it
but somehow that caused it to only draw red.  After a while
of looking at this with abarth we decided to just load into
the same WebView for now.

Eventually we should do something smarter where we start the
provisional load and only replace the webview once the new one is
ready, but that's a later CL.

R=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/952273003
2015-02-25 15:25:17 -08:00
Adam Barth
e55e0605e6 Share sky::PlatformImpl bettween sky_viewer and SkyShell
This should let SkyShell load images.

R=eseidel@chromium.org
BUG=https://github.com/domokit/mojo/issues/52

Review URL: https://codereview.chromium.org/959773005
2015-02-25 14:26:53 -08:00
Eric Seidel
2cbd4ebb91 Fix display of fonts in SkyShell
Originally reviewed for the branch on:
https://codereview.chromium.org/945083002

TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/953933004
2015-02-24 17:43:54 -08:00
Eric Seidel
be91f16293 Add support for VIEW intents to SkyShell.
This was landed on the skyshell branch and I forgot to pull it over:
https://codereview.chromium.org/946583003

TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/954893002
2015-02-24 17:39:36 -08:00
Etienne Membrives
3ec2270eb2 Update from https://crrev.com/316786
List of manually-modified files:
gpu/command_buffer/service/in_process_command_buffer.cc
examples/sample_app/BUILD.gn
examples/sample_app/spinning_cube.cc
mojo/android/javatests/src/org/chromium/mojo/MojoTestCase.java
mojo/cc/context_provider_mojo.cc
mojo/cc/context_provider_mojo.h
mojo/common/trace_controller_impl.cc
mojo/gles2/command_buffer_client_impl.cc
mojo/gles2/command_buffer_client_impl.h
services/gles2/gpu_impl.cc
shell/android/apk/src/org/chromium/mojo/shell/MojoShellApplication.java
sky/engine/core/dom/Node.cpp
sky/shell/apk/src/org/domokit/sky/shell/SkyShellApplication.java
ui/events/latency_info.cc
ui/gfx/transform.cc
ui/gfx/transform.h
ui/gfx/transform_util.cc
ui/gfx/transform_util.h

Review URL: https://codereview.chromium.org/935333002
2015-02-19 17:27:12 +01:00