244 Commits

Author SHA1 Message Date
Adam Barth
656c44bafb Make tracing work on Android
Previously, the trace coordinator would try to write a trace to the file
system, but it is awkward to write to the file system on Android. Instead, we
now stream the trace data to a data pipe. The Sky debugger consumes that data
pipe and sends it to the host via the command HTTP server.

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

Review URL: https://codereview.chromium.org/853943005
2015-01-15 16:32:16 -08:00
Adam Barth
de266a6ba7 Fix fips-counter in touch-demo.sky
TBR=ojan@chromium.org

Review URL: https://codereview.chromium.org/813133010
2015-01-15 11:11:38 -08:00
Adam Barth
2219ef50b9 The Sky compositor should recycle textures
Previously, we were creating a new texture for every frame. Using tracing on a
Nexus 5, that appears to cost about 6ms per frame on the GPU thread. After this
CL, we keep a cache of recently used textures and only allocate a new one when
either (1) we don't have one free or (2) our size requirements have changed.

If our size requirements change, we dump the whole texture cache. In the
future, we'll probably need something fancier if we ever need more than one
size texture per frame.

R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/845963006
2015-01-15 11:09:56 -08:00
Eric Seidel
44bf8e332d Make skydb stop actually clear the pid file
TBR=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/849053006
2015-01-14 16:29:09 -08:00
Adam Barth
c83b4591b6 Add a fps-counter widget to some Sky demos
This CL makes some Sky demos more interesting and adds an fps-widget to see how
fast they run.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/803283006
2015-01-14 15:50:59 -08:00
Ojan Vafai
1f0ea173f3 Unprefix -webkit-filter and add a pixel test for it.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/850103003
2015-01-14 15:14:46 -08:00
James Robinson
6179aceb5e Pass ServiceProvider and ServiceProvider& params in Connect
In preperation for removing the Client annotation from ServiceProvider
this passes a second parameter of type ServiceProvider in the shell and
application Connect calls. In this patch the type signatures are updated
but the second parameter is basically unused. The intention is that the
first parameter |services| will be used for the connecting application to
request services from the connected application (as it does currently)
and the second parameter |exported_services| be used for the connecting
application to provide services to the connected application. We have
very few services exported in the second direction today - I'll update
them to use the second parameter in a follow-up patch.

R=darin@chromium.org

Review URL: https://codereview.chromium.org/845593003
2015-01-14 14:33:07 -08:00
James Robinson
3ab6eab14c Use local ids for Surfaces APIs that can only apply to local surfaces
Surfaces identifiers have a local and a namespace component. The
namespace is particular to a connection. The local component is up to
the endpoint of the connection to manage. In contexts where a surface
that may be from anywhere is referenced, a fully qualified ID with both
the local and namespace component is needed in order to be unambiguous.
In contexts that can only apply to local surfaces only the local id is
needed.

This updates the mojo.Surface APIs that can only refer to local IDs to
only take the local component. In particular creating, destroying, or
submitting a frame can only refer to surfaces created on that connection.
References to surfaces within a frame may refer to local or foreign
surfaces so they use fully qualified IDs.

This also skips the SurfacesService indirection since many applications
can perform useful operations on a mojo.Surface interface such as create
surfaces and submit frames without knowing their ID namespace. The
namespace component is needed only to pass fully qualified IDs to other
actors that may wish to reference the produced frame.

R=sky@chromium.org

Review URL: https://codereview.chromium.org/826423008
2015-01-14 10:25:31 -08:00
Tony Gentilcore
f77fe8f15b Fix running skydb under chromoting.
Looks like a variable rename was missed.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/815143004
2015-01-13 18:50:52 -08:00
Adam Barth
8abd40ead9 Remove outdated hack from flights-app
We don't need this hack anymore.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/853593002
2015-01-13 16:41:20 -08:00
Eric Seidel
807f8e63c1 Fix tools/android_stack_parser/stack and use it in skydb
This adds a skydb print_crash command which will dump the
symbolicated stack trace of all crashes found in adb logcat
output from the android device.

R=qsr@chromium.org

Review URL: https://codereview.chromium.org/787803006
2015-01-13 15:03:49 -08:00
Eric Seidel
e5bbca1533 Make skydb start url error out nicely
Both erg and abarth hit this lack-of-help this morning.

R=abarth@chromium.org, erg@chromium.org

Review URL: https://codereview.chromium.org/790793011
2015-01-13 13:18:10 -08:00
Eric Seidel
1142b76f60 Teach 'stop' command how to kill the running Android process
Also fixed --use-osmesa to be desktop only.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/849923002
2015-01-13 13:16:30 -08:00
Eric Seidel
f1316f75db Make --gdb work again by using gdbserver
--gdb now starts gdbserver and I've added a new
command gdb_attach which knows how to launch gdb
and connect to the launched gdbserver

This doesn't quite work on android yet, but it's very close.

R=abarth@chromium.org, qsr@chromium.org
BUG=

Review URL: https://codereview.chromium.org/808053006
2015-01-13 12:16:30 -08:00
Hixie
17b2c04204 Examples: move markAsLaidOut() to just before the return, so the asserts work
Specs: introduce layoutDescendants() to avoid work when a layout
manager is unaffected by its childrens' intrinsic dimensions
Examples: update for layoutDescendants() change
Specs: add "lifetime" to resolver settings so that a transition can
avoid having to dirty every consumer of the property every frame when
it only needs to update the objects that are changing that frame
Specs: expose the parents on AbstractStyleDeclarationList subclasses
Specs: fix documentation around autoreap
Specs: fix definition of setProperty()
Specs: clean up the dimension-related logic of layout managers

Review URL: https://codereview.chromium.org/850593003
2015-01-13 11:25:24 -08:00
Elliott Sprehn
45232ab3bb Remove tracking of pending sheets.
I was going to remove all this anyway since we don't need it in sky, all sheets
are local and there's no concept of a pending sheet now.

I also removed the dirty bit I added to StyleSheetCollection. The bit
is not correct and is preventing us from correctly processing sheets and
invalidating style. I'll add it back later when I understand how to add
the dirty bit correctly.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/846183002
2015-01-12 18:15:23 -08:00
Hans Muller
518bc8e0ed Mojo JS Bindings: add show_image example
Add a simple example based on the window and view managers.

The skydb app can now handle apps that want to embed another view.

Corrected a problem in unique module name generation. An otherwise unique module name could be shadowed by a parameter name (service_provider in ViewManagerService Embed). Appended a "$" suffix to module names to avoid the collision.

BUG=
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/845103004
2015-01-12 16:35:35 -08:00
Adam Barth
6cf47e4afa Add support for touch events to sky_viewer
This CL adds conversion routines for touch events to sky_viewer so that Mojo
touch events actually show up in the platform.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/847873003
2015-01-12 15:18:16 -08:00
Eric Seidel
fbc76accc1 Make --gdb explain that it doesn't work right now
I'm not quite sure how to solve this especially considering
android.  I likely should use 'gdbserve' but I was not able
to get that to work reliably.

At least this makes it less confusing that --gdb doesn't
just silently fail.

R=abarth@chromium.org, hansmuller@chromium.org, ojan@chromium.org
BUG=

Review URL: https://codereview.chromium.org/850533004
2015-01-12 15:17:40 -08:00
Eric Seidel
99b4a2f8db Add skydb logcat command and make relative build_dir work
This fixes 3 little bugs in skydb:
1.  Adds a logcat command to make it easy to see android logs
2.  Fixes using relative build dirs in skydb start
3.  Stops sending /quit to debugger.cc since mojo shutdown
doesn't actually work (crashes).

--gdb is still broken, but I'll fix that in a second change.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/852483002
2015-01-12 15:12:07 -08:00
Eric Seidel
874aabe98b Fix skydb to work for android
I changed skydb start to take a build directory
and read the configuration out of gn args instead
of --release, --debug, etc.  This should be more
flexable and handle all the crazy asan cases
mopy/config.py tries to.  Once we merge sky/tools
into mojo/tools we should make mopy/config use this
method too.

This follows similar patterns to what
mojo/tools/android_mojo_shell.py does, but doesn't
use as much of the (old) android_commands and forwarder
logic.  We could even remove all of that
build/android/pylib code by calling the (new)
adb reverse instead of using Forwarder (in a later patch).

This still only supports a single skydb running
at once, but it should be trivial to move the
skydb.pids file into the build directory or to have
it support more than one instance.  The big question
there is what the command-line usage should look like
when supporting more than one running instance.  See
the mojo-dev thread on the subject.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/816693006
2015-01-12 11:16:20 -08:00
Hixie
aaef6b64d8 Specs and Docs: minor updates to fix mistakes I found when proof-reading
Review URL: https://codereview.chromium.org/845053002
2015-01-09 13:46:58 -08:00
Adam Barth
2716907465 Update mochajs documentation link.
Happened to notice this while reading docs.

BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/796893004
2015-01-09 08:54:33 -08:00
Ojan Vafai
e5e8909c1b Fix crash in continuations.
Style sharing didn't play nicely with elements getting
their display adjusted based off the parent's display.
We style share without doing adjusting, so we need to
avoid style sharing if adjusting would result in
a different style. Particularly, we need to make sure
that the display coercion would happen in the same way.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/839153002
2015-01-08 17:20:00 -08:00
Ojan Vafai
e185d614cc Fix renderName on RenderBlock and RenderParagraph.
RenderBlock should indicate when something is an inline-block.
RenderParagraph should not print out RenderBlock.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/828433004
2015-01-08 17:14:17 -08:00
Adam Barth
89ec5d9f84 Add the #!mojo to spinning-square.sky
TBR=jamesr@chromium.org

Review URL: https://codereview.chromium.org/840133002
2015-01-08 16:47:32 -08:00
Eric Seidel
2e1a5d6819 Rewrite how skydb starts prompt.cc
This makes skydb pass a command_port to prompt.cc
as a commandline argument.  I removed passing of the
url and instead pass the url via a separate /load command.

This has the nice side effect of guarenteeing that
the sky instance is up and ready to respond to commands
when skydb exits.  It also prepares us for running
more than one copy of prompt.cc as jamesr requested
for both Release and Debug or for on both your android
device as well as your local machine.

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

Review URL: https://codereview.chromium.org/841113003
2015-01-08 15:50:09 -08:00
Eric Seidel
0a8886de3b Exit with less stacktrace dump if we can't bind to the port
R=jamesr@chromium.org
BUG=

Review URL: https://codereview.chromium.org/843843003
2015-01-08 14:02:36 -08:00
Adam Barth
2d28e8cbbd Implement <sky-input>
This CL contains a basic input element.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/831353003
2015-01-08 13:22:00 -08:00
Eric Seidel
5f587b2878 Make skydb just a ctl-style helper (e.g. apachectl)
This makes it much easier to work with a device where we
don't expect a persistent commandline session.  Prompt no longer
actually makes a prompt but rather just runs an http server.

This is just a v1 patch.  It doesn't work with android yet
and it isn't smart enough to allow you to run more than one
copy of prompt.cc at the same time (since you can't control
the port it listens on).  If you have a second copy of
prompt runnning (or anything else bound to port 7777) it will
just crash.

We could make this a lot better, including splitting out the
pid-file tracking for sky_server into sky_server instead of
having skydb manage it.

R=ojan@chromium.org, abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/840973002
2015-01-08 13:01:15 -08:00
Scott Violet
6d658c8c95 Changes magic sequence to '!#mojo ' and strips 'mojo ' when building url
Prior to this change the magic sequence was '#!mojo:' and the url of the content handler app included mojo:. This works only for mojo: urls, but we want
other schemes. So, the magic sequence is now '#!mojo ' and 'mojo ' is not part of the resulting url.

R=aa@chromium.org

Review URL: https://codereview.chromium.org/821403003
2015-01-08 10:19:52 -08:00
Hans Muller
5233793bd5 Mojo JS Bindings: merge Application, Shell, ServiceProvider with Sky
Enable Sky applications to be written in terms of the Application,
Shell, ServiceProvider classes.

Add a shellProxyHandle() method to the Sky Internals class. It returns
a message pipe handle that the JS Shell class will assume ownership of.

BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/837283002
2015-01-08 09:24:30 -08:00
Hixie
619808fe2f Specs: custom element constructor argument shouldn't clash with the module-global 'module' identifier
Review URL: https://codereview.chromium.org/829133003
2015-01-07 14:39:58 -08:00
Ojan Vafai
6b61c0ba79 Make a reftest for the flights app.
This way we get some broad pixel test coverage.
Do this by dumping the png from the flights app,
uploading it to google storage and then having
the reference file load the uploaded file.

This isn't a good long-term solution. Long-term
we should dump paint commands (or some other
textual representation) and/or make more targetted
reftests that don't need pngs. As such, the process
for doing this is painful and manual. If we decide
we want to have pixel tests properly, we'll want
to do something more automated obviously.

Also, turn on the discard_transparency bool when
encoding the pngs. Otherwise, the png is lossy
and none of this works.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/836363003
2015-01-07 11:40:27 -08:00
Elliott Sprehn
7687065b76 Remove the remaining parts of ignorePendingStylesheets and placeholder styles.
This patch is largely just a rename since updateLayoutIgnorePendingStylesheets()
didn't really do anything except call updateLayout() now as nothing was reading
the ignorePendingStyleSheets state, and no callers used the synchronous post
layout task option which was meant for plugins (which Sky doesn't have).

Placeholder styles were related and just add confusion since things pretend to
be display: none while <import>'s are loading. We should expose a real API for
avoiding FOUC instead of pumping frames with display: none elements when
imports are loading.

I had to skip the layout/continuations.sky test since it always crashes now
with an ASSERT failure about a bad cast (filed as bug 446739). The bug already
existed, this patch just makes that one test hit it.

BUG=446739
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/834693007
2015-01-07 10:54:41 -08:00
Eric Seidel
822fd270d1 Make Sky not crash when run in MojoShell.apk
We'll fix both of these issues, but these hacks
unblock more important functionality fixes to
Sky run on Android.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/826063003
2015-01-06 17:38:34 -08:00
Eric Seidel
2deafeddc3 Fix home.sky's #! to modern style
TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/844443004
2015-01-06 17:05:30 -08:00
Ojan Vafai
276d94fb56 Minor improvements to reftests.
1. If notifyTestComplete is called before the first paint,
give a clear assert instead of a confusing crash.

2. Add runAfterDisplay. This is a copy of the equivalent
file in Blink. Avoids the incorrect 100ms setTimeout. I had
thought there was a deeper bug here, but it appears to just
be the issue from #1 now that we properly pump frames
in testing mode by using a face Surfaces application.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/826343003
2015-01-06 15:41:14 -08:00
Eric Seidel
5096b17cc6 Move wm_flow off of views and onto Sky
This is a proof of concept for replacing ui/views
code with Sky instead. erg says this will allow him
to delete 10s of thousands of LOC from mojo.

Mojo does not yet expose the current binary's URL:
https://docs.google.com/a/chromium.org/document/d/1AQ2y6ekzvbdaMF5WrUQmneyXJnke-MnYYL4Gz1AKDos
So I've worked around that by passing the url
of the binary via the helper script.

I discovered several bugs in the wm_flow code
including that it doesn't handle view resizes
(during embiggen).  Related, I discovered that
every time a new window is made it drops the
connections to the embedded.cc app from the
previous window, since the ViewManagerDelegate
is incorrectly implemented as part of the
ApplicationDelegate on both app.cc and embedded.cc.
We'd need to split out a separate per-view object
in both of those apps to handle the
ViewManagerDelegate calls.

There are some changes to logging during loading
as well as the CopyToFile helper to have better
error reporting.  I hit several issues early on trying
to get mojo to load the http: urls correctly, including
eventually running out of disk space on my /tmp
and mojo then silently failing to launch the app
(due to mojo never clearing its caches crbug.com/446302).

I had to re-write the mojo_demo.sh script in python
as well as split the sky_server handling code out of
skydb into a separate python module in order to cleanly
launch sky_server.  We could use a separate server
if we wanted to but the primary benefit of sky_server
is that it sets up the proper url->disk mappings into
the generated file directories, etc.

BUG=443439
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/817573003
2015-01-06 14:40:41 -08:00
Hixie
7ce7206df7 Specs: registerElement(registerElement(...)) failed to work as expected
Review URL: https://codereview.chromium.org/836153005
2015-01-06 13:23:04 -08:00
Elliott Sprehn
6db9083bfb Add SkyBinder benchmarks.
This adds two benchmarks, one for flights-app which doesn't use data binding
and one for city-list which uses lots of it.

1st runs in each benchmark contain the cost of collecting all the metadata
about bindings and templates in addition to creating instances. Later runs
only contain the cost of creating instances.

Overall it looks like SkyBinder is 24.4% - 35.5% faster depending on if
you're using data binding (the performance improvement is larger if you are).
It also appears to put less pressure on the GC.

== flights-app.sky benchmark ==

TemplateBinding:
flights-app.sky => [103.0, 27.0, 26.0, 26.0, 27.0, 26.0, 39.0, 29.0, 29.0, 72.0]
flights-app.sky => [101.0, 27.0, 27.0, 27.0, 27.0, 26.0, 37.0, 33.0, 26.0, 69.0]
flights-app.sky => [103.0, 27.0, 26.0, 26.0, 27.0, 26.0, 37.0, 27.0, 28.0, 71.0]

1st run avg = 102.33333333333333
avg = 33.148148148148145

SkyBinder:
flights-app.sky => [78.0, 25.0, 25.0, 25.0, 25.0, 30.0, 34.0, 26.0, 25.0, 32.0]
flights-app.sky => [77.0, 28.0, 25.0, 26.0, 26.0, 28.0, 31.0, 23.0, 26.0, 26.0]
flights-app.sky => [77.0, 25.0, 25.0, 24.0, 25.0, 28.0, 31.0, 23.0, 25.0, 24.0]

1st run avg = 77.33333333333333
avg = 26.51851851851852

24.4% reduction for 1st run, 20% reduction for normal runs. Normal runs
actually seem maybe only 5% faster, but it looks like pre SkyBinder there
were occasional runs that took 250% longer than normal from GC pauses. If I
increase the iteration count for SkyBinder I can see those long pauses
again, but they're much less frequent presumably because SkyBinder creates
less garbage.

== city-list.sky benchmark ==

TemplateBinding:
city-list.sky => [820.0, 609.0, 600.0, 529.0, 430.0, 437.0, 387.0, 462.0, 541.0, 415.0]
city-list.sky => [827.0, 599.0, 551.0, 481.0, 436.0, 425.0, 363.0, 366.0, 427.0, 364.0]
city-list.sky => [823.0, 574.0, 467.0, 483.0, 444.0, 429.0, 364.0, 363.0, 433.0, 367.0]

1st run avg = 823.3333333333334
avg = 457.25925925925924

SkyBinder:
city-list.sky => [521.0, 369.0, 320.0, 285.0, 319.0, 273.0, 267.0, 262.0, 272.0, 331.0]
city-list.sky => [553.0, 362.0, 314.0, 284.0, 327.0, 278.0, 263.0, 264.0, 249.0, 290.0]
city-list.sky => [556.0, 355.0, 317.0, 289.0, 333.0, 277.0, 269.0, 266.0, 264.0, 263.0]

1st run avg = 543.3333333333334
avg = 294.8888888888889

34% reduction for 1st run, 35.5% reduction for subsequent runs. This also
shows less variance in the later runs than pre SkyBinder which I think might
again be less GC pressure.

TBR=ojan@chromium.org
BUG=

Review URL: https://codereview.chromium.org/834983002
2015-01-03 14:30:15 -08:00
James Robinson
dfb7b5f42e Update from https://crrev.com/309717
Includes changes for CommandLine moving into the base:: namespace, some
PickleIterator updates, and some animation API changes.

Review URL: https://codereview.chromium.org/817653003
2014-12-29 14:41:55 -08:00
Scott Violet
ac55b1ae9c Moves Create() off of View and onto ViewManager
This makes more sense given the ViewManager is used to create the
view.

R=ben@chromium.org

Review URL: https://codereview.chromium.org/818583002
2014-12-19 07:45:16 -08:00
Scott Violet
23cd16cb59 Nukes ViewManager arg from ViewManagerDelegate::OnEmbed
It can be obtained from the supplied view, so no reason to include in
the arguments.

R=ben@chromium.org, esprehn@chromium.org

Review URL: https://codereview.chromium.org/815003002
2014-12-18 14:35:42 -08:00
Elliott Sprehn
798ee80480 Implement Node.ownerScope
The ownerScope property is equivalent to walking up the parentNode
pointers until you hit the top and returning that node if it's a
Document or ShadowRoot.

This means that the ownerScope of ShadowRoot and Document is always
itself, and the ownerScope of an Element that is not the descendant
of a ShadowRoot, and is not in the document is null.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/810793005
2014-12-17 16:05:15 -08:00
Elliott Sprehn
e90cdb9130 Improve custom-elements/generated-constructor.sky test.
We should inherit from HTMLElement, Sky (and blink) don't currently
enforce this but they probably should. We should also explicitly
check that the prototype is what we expect.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/809183002
2014-12-17 15:01:17 -08:00
Elliott Sprehn
b486b63a64 Custom elements should have class side inheritance.
We were not setting the __proto__ property of the generated constructor
so the generated class didn't inherit from the passed class which meant
that statics were not available.

This patch adds the missing call to setPrototype (which sets __proto__).

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/814683002
2014-12-17 14:24:34 -08:00
Elliott Sprehn
90bd22adc9 Fix attribute selectors.
There was a return missing in SelectorChecker, we were also making
the attribute names lowercase which is not neccesary in Sky.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/815613002
2014-12-17 14:00:17 -08:00
Elliott Sprehn
0524fc39e4 Make SkyElement more classy.
The syntax for implementing a SkyElement is now:

<sky-element name="element-name">
<template>
  <!-- template here -->
</template>
<script>
module.exports = class extends SkyElement {
  attached() {
     // ...
  }
  // .. methods here ..
}.register();
</script>
</sky-element>

The register() static method on SkyElement subclasses calls
document.registerElement() and returns the generated constructor.
It uses the parent <sky-element>'s name attribute to set the name
of the element.

R=rafaelw@chromium.org

Review URL: https://codereview.chromium.org/788943003
2014-12-16 16:28:28 -08:00
James Robinson
6d53b01c8d Split surface id and simplify connecting to surfaces service
Surface IDs are composed of a namespace component and a local
identifier component. This splits up the two pieces in the mojom to make
it clearer.

This also simplifies the path for connecting to the surfaces service. In
order to perform any operations with surfaces, each client must know
what its id namespace value is. This was done by first connecting to a
SurfacesService interface and then calling CreateSurfaceConnection which
returned a Surface pointer and the namespace. Having to connect to this
extra interface and receive the Surface impl asynchronously complicated
startup code for applications by adding extra states in startup.

Instead of that, this allows connecting to the Surface interface
directly and promises that the ID namespace will be provided as the
first message in the pipe directed at the SurfaceClient. Callers can
then either block on startup or handle setting the ID namespace
asynchronously depending on what other things that thread could be doing
at the time.

In a follow-up, I plan to define the id namespace value 0 as meaning "the
namespace of this connection" which will allow creating surfaces and
submitting frames before learning the connection's namespace. The only
thing the namespace will be passing surface IDs to other clients for them
to embed.

This also removes the Size parameter from CreateSurface, which wasn't
used by anything. The size of submitted frames is part of the embedder /
embedee contract.

R=esprehn@chromium.org, sky@chromium.org

Review URL: https://codereview.chromium.org/807733002
2014-12-16 15:15:22 -08:00