Commit e35e700c authored by Adam Barth's avatar Adam Barth

Actually make the raw examples work again

In my previous patch, I forgot to fill in the other diagonal entries in the
device transform matrix.
parent aa8942f4
...@@ -66,7 +66,9 @@ sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) { ...@@ -66,7 +66,9 @@ sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) {
sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio); sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio);
Float32List deviceTransform = new Float32List(16) Float32List deviceTransform = new Float32List(16)
..[0] = devicePixelRatio ..[0] = devicePixelRatio
..[5] = devicePixelRatio; ..[5] = devicePixelRatio
..[10] = 1.0
..[15] = 1.0;
sky.SceneBuilder sceneBuilder = new sky.SceneBuilder(sceneBounds) sky.SceneBuilder sceneBuilder = new sky.SceneBuilder(sceneBounds)
..pushTransform(deviceTransform) ..pushTransform(deviceTransform)
..addPicture(sky.Offset.zero, picture, paintBounds) ..addPicture(sky.Offset.zero, picture, paintBounds)
......
...@@ -25,7 +25,9 @@ sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) { ...@@ -25,7 +25,9 @@ sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) {
sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio); sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio);
Float32List deviceTransform = new Float32List(16) Float32List deviceTransform = new Float32List(16)
..[0] = devicePixelRatio ..[0] = devicePixelRatio
..[5] = devicePixelRatio; ..[5] = devicePixelRatio
..[10] = 1.0
..[15] = 1.0;
sky.SceneBuilder sceneBuilder = new sky.SceneBuilder(sceneBounds) sky.SceneBuilder sceneBuilder = new sky.SceneBuilder(sceneBounds)
..pushTransform(deviceTransform) ..pushTransform(deviceTransform)
..addPicture(sky.Offset.zero, picture, paintBounds) ..addPicture(sky.Offset.zero, picture, paintBounds)
......
...@@ -220,7 +220,9 @@ sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) { ...@@ -220,7 +220,9 @@ sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) {
sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio); sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio);
Float32List deviceTransform = new Float32List(16) Float32List deviceTransform = new Float32List(16)
..[0] = devicePixelRatio ..[0] = devicePixelRatio
..[5] = devicePixelRatio; ..[5] = devicePixelRatio
..[10] = 1.0
..[15] = 1.0;
sky.SceneBuilder sceneBuilder = new sky.SceneBuilder(sceneBounds) sky.SceneBuilder sceneBuilder = new sky.SceneBuilder(sceneBounds)
..pushTransform(deviceTransform) ..pushTransform(deviceTransform)
..addPicture(sky.Offset.zero, picture, paintBounds) ..addPicture(sky.Offset.zero, picture, paintBounds)
...@@ -233,6 +235,7 @@ void beginFrame(double timeStamp) { ...@@ -233,6 +235,7 @@ void beginFrame(double timeStamp) {
sky.Picture picture = paint(paintBounds); sky.Picture picture = paint(paintBounds);
sky.Scene scene = composite(picture, paintBounds); sky.Scene scene = composite(picture, paintBounds);
sky.view.scene = scene; sky.view.scene = scene;
sky.view.scheduleFrame();
} }
void main() { void main() {
......
...@@ -85,7 +85,9 @@ sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) { ...@@ -85,7 +85,9 @@ sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) {
sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio); sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio);
Float32List deviceTransform = new Float32List(16) Float32List deviceTransform = new Float32List(16)
..[0] = devicePixelRatio ..[0] = devicePixelRatio
..[5] = devicePixelRatio; ..[5] = devicePixelRatio
..[10] = 1.0
..[15] = 1.0;
sky.SceneBuilder sceneBuilder = new sky.SceneBuilder(sceneBounds) sky.SceneBuilder sceneBuilder = new sky.SceneBuilder(sceneBounds)
..pushTransform(deviceTransform) ..pushTransform(deviceTransform)
..addPicture(sky.Offset.zero, picture, paintBounds) ..addPicture(sky.Offset.zero, picture, paintBounds)
......
...@@ -42,7 +42,9 @@ sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) { ...@@ -42,7 +42,9 @@ sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) {
sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio); sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio);
Float32List deviceTransform = new Float32List(16) Float32List deviceTransform = new Float32List(16)
..[0] = devicePixelRatio ..[0] = devicePixelRatio
..[5] = devicePixelRatio; ..[5] = devicePixelRatio
..[10] = 1.0
..[15] = 1.0;
sky.SceneBuilder sceneBuilder = new sky.SceneBuilder(sceneBounds) sky.SceneBuilder sceneBuilder = new sky.SceneBuilder(sceneBounds)
..pushTransform(deviceTransform) ..pushTransform(deviceTransform)
..addPicture(sky.Offset.zero, picture, paintBounds) ..addPicture(sky.Offset.zero, picture, paintBounds)
......
...@@ -33,7 +33,9 @@ sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) { ...@@ -33,7 +33,9 @@ sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) {
sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio); sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio);
Float32List deviceTransform = new Float32List(16) Float32List deviceTransform = new Float32List(16)
..[0] = devicePixelRatio ..[0] = devicePixelRatio
..[5] = devicePixelRatio; ..[5] = devicePixelRatio
..[10] = 1.0
..[15] = 1.0;
sky.SceneBuilder sceneBuilder = new sky.SceneBuilder(sceneBounds) sky.SceneBuilder sceneBuilder = new sky.SceneBuilder(sceneBounds)
..pushTransform(deviceTransform) ..pushTransform(deviceTransform)
..addPicture(sky.Offset.zero, picture, paintBounds) ..addPicture(sky.Offset.zero, picture, paintBounds)
...@@ -49,6 +51,7 @@ void beginFrame(double timeStamp) { ...@@ -49,6 +51,7 @@ void beginFrame(double timeStamp) {
sky.Picture picture = paint(paintBounds, delta); sky.Picture picture = paint(paintBounds, delta);
sky.Scene scene = composite(picture, paintBounds); sky.Scene scene = composite(picture, paintBounds);
sky.view.scene = scene; sky.view.scene = scene;
sky.view.scheduleFrame();
} }
void main() { void main() {
...@@ -59,6 +62,7 @@ void main() { ...@@ -59,6 +62,7 @@ void main() {
block.style['display'] = 'paragraph'; block.style['display'] = 'paragraph';
block.style['direction'] = 'rtl'; block.style['direction'] = 'rtl';
block.style['unicode-bidi'] = 'plaintext'; block.style['unicode-bidi'] = 'plaintext';
block.style['color'] = 'black';
block.appendChild(arabic); block.appendChild(arabic);
block.appendChild(more); block.appendChild(more);
......
...@@ -46,7 +46,9 @@ sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) { ...@@ -46,7 +46,9 @@ sky.Scene composite(sky.Picture picture, sky.Rect paintBounds) {
sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio); sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio);
Float32List deviceTransform = new Float32List(16) Float32List deviceTransform = new Float32List(16)
..[0] = devicePixelRatio ..[0] = devicePixelRatio
..[5] = devicePixelRatio; ..[5] = devicePixelRatio
..[10] = 1.0
..[15] = 1.0;
sky.SceneBuilder sceneBuilder = new sky.SceneBuilder(sceneBounds) sky.SceneBuilder sceneBuilder = new sky.SceneBuilder(sceneBounds)
..pushTransform(deviceTransform) ..pushTransform(deviceTransform)
..addPicture(sky.Offset.zero, picture, paintBounds) ..addPicture(sky.Offset.zero, picture, paintBounds)
...@@ -62,6 +64,7 @@ void beginFrame(double timeStamp) { ...@@ -62,6 +64,7 @@ void beginFrame(double timeStamp) {
sky.Picture picture = paint(paintBounds, delta); sky.Picture picture = paint(paintBounds, delta);
sky.Scene scene = composite(picture, paintBounds); sky.Scene scene = composite(picture, paintBounds);
sky.view.scene = scene; sky.view.scene = scene;
sky.view.scheduleFrame();
} }
......
...@@ -29,7 +29,9 @@ void beginFrame(double timeStamp) { ...@@ -29,7 +29,9 @@ void beginFrame(double timeStamp) {
sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio); sky.Rect sceneBounds = new sky.Rect.fromLTWH(0.0, 0.0, sky.view.width * devicePixelRatio, sky.view.height * devicePixelRatio);
Float32List deviceTransform = new Float32List(16) Float32List deviceTransform = new Float32List(16)
..[0] = devicePixelRatio ..[0] = devicePixelRatio
..[5] = devicePixelRatio; ..[5] = devicePixelRatio
..[10] = 1.0
..[15] = 1.0;
sky.SceneBuilder sceneBuilder = new sky.SceneBuilder(sceneBounds) sky.SceneBuilder sceneBuilder = new sky.SceneBuilder(sceneBounds)
..pushTransform(deviceTransform) ..pushTransform(deviceTransform)
..addPicture(sky.Offset.zero, picture, paintBounds) ..addPicture(sky.Offset.zero, picture, paintBounds)
...@@ -37,6 +39,7 @@ void beginFrame(double timeStamp) { ...@@ -37,6 +39,7 @@ void beginFrame(double timeStamp) {
sky.view.scene = sceneBuilder.build(); sky.view.scene = sceneBuilder.build();
sky.tracing.end('beginFrame'); sky.tracing.end('beginFrame');
sky.view.scheduleFrame();
} }
void main() { void main() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment