74 Commits

Author SHA1 Message Date
Adam Barth
795df1327b Plumb physical size along with SkPicture
Previously we were using the cull rect of the SkPicture to size the GPU buffer,
but Skia is too smart and shrinkwraps the cull rect, which meant we weren't
sizing the GPU buffer to the right size.

Fixes #814
2015-08-26 09:26:51 -07:00
Adam Barth
c7b8d482a8 Add missing dependency 2015-08-25 19:59:52 -07:00
James Robinson
c8eff5e44f Update to mojo d259eb58aa59e14a13d5e0dc3984b855b475ba09
This updates to mojo commit d259eb58aa59 and limits the roll script to
only pull in the parts of //mojo that are currently being used. More
stuff will be dropped in the future.
2015-08-25 14:56:25 -07:00
Chinmay Garde
65f2b0a8e7 Merge pull request #775 from chinmaygarde/master
Add media service implementation for iOS
2015-08-24 14:15:35 -07:00
Chinmay Garde
bd80be7e2f Add media service implementation for iOS 2015-08-24 12:36:15 -07:00
Adam Barth
61dcfbc0ed Add support for skyx to sky_viewer.mojo
Fixes #753
2015-08-24 09:34:17 -07:00
Ian Fischer
89e9f13af1 Merge pull request #719 from iansf/add_listen_command
Add listen command to sky_tool, and related changes.
2015-08-21 09:54:04 -07:00
Ian Fischer
94aa33c71b Make sky_tool install to ios devices and simulators if available, and add a ‘listen’ command that will listen to filesystem changes in the current directory and update running versions of the app.
Also refactors ios_sim.py to be part of sky_tool.

The current skyx file that ‘listen’ generates does not contain material design icons, so icons will be missing.
2015-08-21 09:53:35 -07:00
Adam Barth
7f0a28952a Uncaught exceptions get two stack traces
Now we print Dart_GetError only when we don't have a stack trace. Also, improve
the usability of the sky_shell command line tool by defaulting to "packages"
for the package-root and not crashing when we don't have a package-root until
we actually try to load a package. Finally, remove console spam when we fail to
bind the observatory port.

Fixes #689
2015-08-20 12:09:53 -07:00
Adam Barth
6b2a1ee6b0 Teach the DartLibraryProviderFiles about file URLs
We don't want to support file URLs in general, but having them in the "files"
version of the library provider makes it easier to integrate with package:test.
2015-08-19 23:46:36 -07:00
Adam Barth
33994d06f7 Don't corrupt drawing when rotating
Previously there was a race condition when updating the size of the GLSurface.
Now we explicitly update the size of the surface to match what we expect.

Fixes #610
2015-08-17 16:45:20 -07:00
Adam Barth
788e4731fe Fix Android build 2015-08-15 21:58:51 -07:00
Adam Barth
f7053c6bdf Make it easier to run SkyShell from the command line on Mac
Now you can use --snapshot to load snapshots from the command line and have
them appear visually on Mac. Also, remove code duplication with Linux by
factoring common testing code into //sky/shell/testing.
2015-08-15 12:45:08 -07:00
Adam Barth
77863132c6 Fix Mac build
Looks like the Keyboard service is only for iOS. We shouldn't try to build it
on Mac.
2015-08-14 21:31:06 -07:00
Chinmay Garde
4a6bd4a796 Keyboard service implementation for iOS 2015-08-14 17:35:45 -07:00
Adam Barth
011ce5d8e7 Clear the frame to black before drawing
We used to do this in the SkPicture, but it's simpler to do it in the
rasterizer now that we're using multiple SkPictures in Dart.
2015-08-14 10:45:14 -07:00
Chinmay Garde
281dc80f17 Merge pull request #578 from chinmaygarde/master
Make |TracingController| platform agnostic and enable collecting traces from base and the shell view dart isolate simultaneously
2015-08-13 12:58:54 -07:00
Chinmay Garde
cfec10d80d Make |TracingController| platform agnostic and enable collecting
traces from base and the shell view dart isolate simultaneously.
Trace files contain samples from multiple sources and must be merged
separately
2015-08-13 12:51:24 -07:00
Eric Seidel
4a79cc8cb0 Don't claim to be a text editor
http://developer.android.com/reference/android/view/View.html#onCheckIsTextEditor()
says that we should return true if the "primary purpose" of
the view is text editing.  The keyboard still seems to work
fine if we return false here (default implementation) so
I'm removing this for now.

Fixes https://github.com/domokit/sky_engine/issues/116

@abarth
2015-08-13 12:36:01 -07:00
Adam Barth
69c435eacc Simplify SkPicture
This patch simplifies the SkPicture we generate for Skia. Instead of drawing
everything into a nested SkPicture, we now draw everything into the top-level
picture, which requires us to apply the device scale factor in Dart.
2015-08-10 15:12:13 -07:00
Adam Barth
5f62ffe1f4 Swith from skia::RefPtr to RefPtr
Now that we can use WTF everywhere, we don't need to use skia::RefPtr.
2015-08-10 14:18:38 -07:00
Adam Barth
26863b0961 Add a --checked argument to sky_tool start
The --checked argument runs SkyShell in checked mode, which turns on type
checking and asserts.
2015-08-07 13:18:38 -07:00
Chinmay Garde
4d93b5eebe Merge pull request #488 from chinmaygarde/master
Add tracing controller for iOS
2015-08-07 10:45:59 -07:00
Eric Seidel
287de982d9 Merge pull request #489 from eseidelGoogle/roll_mojo
Roll mojo to 35de44e361
2015-08-06 16:22:15 -07:00
Eric Seidel
c053b31d0e Fix the build after the mojo roll
@abarth
2015-08-06 16:18:16 -07:00
Chinmay Garde
28b74401a4 Add tracing controller for iOS 2015-08-06 16:17:27 -07:00
Chinmay Garde
0be9de1483 Fix iOS device code signing issues 2015-08-06 16:14:11 -07:00
Ian Fischer
8ccc957f4a A couple of pieces of polish for iOS.
- Make space for the iOS status bar.
 - Set the iOS status bar to use white text.
2015-08-04 16:45:26 -07:00
Ian Fischer
4735fe0a19 Make Sky apps use the full screen on iOS. 2015-08-04 16:09:56 -07:00
Viktor Lidholt
8f4b77fbe1 Fixes path in SerializePicture call 2015-08-04 10:21:19 -07:00
Ian Fischer
a84528c10d Avoid crashing when building an app without an
app.skyx file in DEBUG mode.
2015-08-03 15:43:36 -07:00
Ian Fischer
057798813d Allow iOS apps to restart by copying the app.skyx to the Documents
directory on the device.

This work is to support a workflow where developers testing on an iOS
device will automatically see their app updates as they change their Sky
code. Currently this works by using the ios-deploy tool:
$ ios-deploy --bundle_id 'org.domokit.sky.game' --upload out/ios_Debug/game_app.app/app.skyx --to Documents/app.skyx
Upcoming commits will incorporate this into skytool.
2015-08-03 11:33:28 -07:00
Eric Seidel
b672f6bc5b Make it possible to pass a URL via command line to Mac SkyShell.app
@chinmaygarde
2015-07-30 17:26:53 -07:00
Adam Barth
2612c841ef Add --enable-checked-mode to sky_shell
We need a way for developers to use release builds in checked mode.

Progress on #400
2015-07-30 16:01:05 -07:00
Chinmay Garde
9b16addf3a Allow loading SkyX files on Mac desktop 2015-07-30 15:07:35 -07:00
Eric Seidel
4404535a9f Fix Mac/iOS builds
@abarth
2015-07-30 13:49:10 -07:00
Adam Barth
5f6523e66d Merge pull request #383 from abarth/discardable_memory
Call DiscardableMemoryAllocator::SetInstance()
2015-07-30 13:26:02 -07:00
Eric Seidel
c5d8cbc512 Fix two crashes when resuming apps
@abarth
2015-07-30 13:16:55 -07:00
Adam Barth
693dd4822f Call DiscardableMemoryAllocator::SetInstance()
Apparently this can cause a crash when when we try to render an emoji at a
different size than the emoji font's native bitmap size. I'm not sure how to
reproduce the issue. I'll ask Hixie when he gets back.

Currently we just use regular memory. In the future, we should actually use
discarable memory.

Fixes #203
2015-07-30 12:55:20 -07:00
Eric Seidel
a12b6827fe Fix the service providers to be able to be called more than once.
This was likely a race which caused occasional timeouts.

R=abarth@google.com
2015-07-30 12:27:36 -07:00
Adam Barth
f4e359f19d Refactor common startup code into shell.cc
Also, make the initialization order the same on every platform.
2015-07-30 10:53:23 -07:00
Eric Seidel
cc491e94b0 Fix CreatePlatformServiceProvider to allow calling more than once.
The previous implementation would (silently) delete any previous
ServiceProviderImpl which would close all open mojo pipes.
This would manfiest in the mojo:network_service never
responding to Dart's request for loads.

This mostly fixes issue #256, however there still appears to be
a separate display-only race, which may be related to issue #52.

R=abarth@google.com
2015-07-29 17:55:48 -07:00
Adam Barth
ec4eac4e4d Make SkyShell.app work
It was looking for the wrong executable name.
2015-07-29 15:47:26 -07:00
Chinmay Garde
2a829f9455 Pass correct recognizer data while panning on iOS 2015-07-29 15:05:01 -07:00
Adam Barth
752ff89710 Improve vsync provider
Now we actually use the vsync signal to trigger work. Previously, we'd hit the
pipeline depth limit too early and fall back to swap buffers-triggered
rendering.

Also, rename Vsync to VSync on recommendation from jamesr.
2015-07-29 14:25:51 -07:00
Adam Barth
f81d96e1dd Drive frames from the vsync provider on Android
Instead of using back pressure from swap buffers to drive the engine, this
patch using the vsync signal from the Android framework. We still respect
back pressure from swap buffers if we get too far ahead.
2015-07-28 22:32:36 -07:00
Chinmay Garde
0ca1c20fea Enable multiple touches on SkySurface on iOS 2015-07-28 18:08:41 -07:00
Chinmay Garde
9df6383b4d Avoid cancelling touches on views on gesture recognition on iOS 2015-07-28 17:05:09 -07:00
Adam Barth
d81858f0fc Merge pull request #338 from abarth/improve_pipeline
Improve pipeline accounting
2015-07-28 16:02:03 -07:00
Adam Barth
a836ce05bb Improve pipeline accounting
Previously, there was a race condition whereby we could end up with three
requests in the pipeline. Now we update the number of outstanding requests
synchronously, which avoids the race.
2015-07-28 15:28:27 -07:00