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.
An incorrect cluster offset calculation was causing a lot of log
messages to appear. Separately, a confusion between #if and #ifdef was
causing unintended logging of line breaks. This patch fixes both.
Bug: 22178333
Change-Id: I2b3673ed66c784f5082fd127a8dc10bd3df6ed79
Actually the tests broke in 136e0d4da5
...but I had reset the results because I had changed all the coordinates, and didn't realise some of the changes were bad.
TBR=abarth
Review URL: https://codereview.chromium.org/1212803003.
A simple container for a TabBar. It is defined by a list of
TabNavigatorViews, each of which is just a TabLabel and
the tab's content.
The content of each tab is represented by a function
that produces a Widget called "content". I couldn't
bring myself to call it buildTabContentCallback or something
else more specific.
R=abarth@chromium.org, ianh@google.com
Review URL: https://codereview.chromium.org/1212993003.
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.
Added a OffsetBase class that Size now inherits from, and added a new
Offset class that also inherits from OffsetBase.
Offset has:
- dx and dy members
- zero and infinite static constants
- a method that returns a new Offset that's the existing one scaled
by a scalar
- a unary minus operator
- operators overloads such that subtracting or adding two Offsets
gives another Offset
- a toPoint() method
Added Offset and Size to the dart bindings, so they can be used from C++.
Changed the Canvas API to use Point, Size, and Offset where appropriate:
- drawLine uses Points now
- drawCircle uses a Point now
- drawImage uses a Paint now
- the constructor uses a Size
Changed Point as follows:
- added a unary minus
- Point difference now gives an Offset rather than a Size
- You can add an Offset to a Point to get a new Point
- toSize() has been replaced by toOffset()
Changed Rect as follows:
- renamed upperLeft and lowerRight to topLeft and bottomRight for
consistency with our other APIs
- added bottomLeft and topRight for completeness
Changed Size as follows:
- now inherits from OffsetBase
- added *, /, ~/, and % operators for scaling sizes
- subtracting a Size from a Size gives an Offset
- subtracting an Offset from a Size gives a Size
- changed the + operator to take an Offset instead of a Size
- added topLeft, bottomLeft, topRight, bottomRight to match Rect
- added center for the same reason
- added shortestSide getter since that was a common pattern
- removed toPoint()
Changed DrawLooperLayerInfo as follows:
- setOffset member takes an Offset instead of a Point
Changed BoxConstraints as follows:
- added biggest getter since it was a common pattern
- added smallest getter for symmetry
Changed BoxShadow as follows:
- offset member is an Offset rather than a Size
Changed ViewConstraints as follows:
- replaced height and width members by a single size member
I did some minor code cleanup in nearby files while I was there,
including sorting sky/engine/core/core.gni alphabetically, and fixing
some warnings in the examples.
BUG=
R=abarth@chromium.org, chinmaygarde@google.com
Review URL: https://codereview.chromium.org/1214833004.
The appearance of letterspacing with scripts with cursive connections
is poor, so we simply disable letterspacing for those scripts. There
may be some cases where some form of letterspacing is desirable, but
this gives the highest likelihood that the final result will be good
without requiring additional work from clients.
Bug: 21935803
Change-Id: Ie25266249ac3a2605aa89ef5132e8edbe3a06d35
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.
A recent change added a penalty for a hyphen at the last line break,
which is visually undesirable. However, the penalty was assessed to
"widthScore", which broke the assumption (used for another
optimization) that widthScore increases monotonically. This patch
separates the penalty into a different parameter, restoring the
validity of the monotonicity assumption.
Bug: 22066119
Change-Id: I6a47a350ef3ceee2f00ee430d6954d0c307227f0
This CL adds the ability to load Dart snapshot files created by sky_packager in
Sky. Using a snapshot lets us transmit all the code for an app in a single blob
and should improve startup time. Later CLs will make this codepath easier to
use and evaluate performance.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1197133004.
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.
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.
Update sky_server:
- update its help string to admit that it wants the package path as well.
- be quiet by default, since it makes the build chatty.
- have a -v for verbose mode, for people who like it chatty.
- have a default port of 8000, since that's what everyone used.
- have a -p option to set the port, for people who don't use the default.
- remove its mapping for gen/, since a TODO told me to.
- remove the dependency on the build configuration, since it's no longer used.
- teach it about .dart files.
- rename sky_server/README to README.md, for consistency with other READMEs.
Update shelldb to speak the new sky_server protocol.
Update tests/services/iframe-embed-vmc.sky since the sky_server change broke the hack it was using.
Update skyserver.py to speak the new sky_server protocol.
Make webkitpy use SkyServer instead of spawning sky_server itself, since a TODO told me to.
Teach webkitpy about dart files.
Teach test_perf about dart files. (untested)
Teach sky_tool about main.dart, main.sky is deprecated. (untested)
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1200993002.
tree of InlineStyle and InlineText elements.
StyledText builds an Inline that renders the tree.
For example this StyledText object:
new StyledText(["FOO", [boldLargerStyle, [greenStyle "BAR"], "BAZ"] BORF]);
Renders the same way the following HTML would,
assuming that TextStyles boldLargerStyle and
greenStyle were defined.
<style>
div {
display: inline;
}
</style>
<p>
<div>
FOO
<div style="font-weight:bold; font-size:larger">
<div style="color:green">
BAR
</div>
BAZ
</div>
BORF
</div>
</p>
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1194693002.