From e35e700cc476f74238b6ac9e515f945c113a9fb5 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Thu, 3 Sep 2015 09:39:45 -0700 Subject: [PATCH] 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. --- examples/raw/baseline.dart | 4 +++- examples/raw/hello_world.dart | 4 +++- examples/raw/mutating-dom.dart | 5 ++++- examples/raw/painting.dart | 4 +++- examples/raw/shadow.dart | 4 +++- examples/raw/spinning_arabic.dart | 6 +++++- examples/raw/spinning_image.dart | 5 ++++- examples/raw/spinning_square.dart | 5 ++++- 8 files changed, 29 insertions(+), 8 deletions(-) diff --git a/examples/raw/baseline.dart b/examples/raw/baseline.dart index 8e0eb10717a..3022024a041 100644 --- a/examples/raw/baseline.dart +++ b/examples/raw/baseline.dart @@ -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); Float32List deviceTransform = new Float32List(16) ..[0] = devicePixelRatio - ..[5] = devicePixelRatio; + ..[5] = devicePixelRatio + ..[10] = 1.0 + ..[15] = 1.0; sky.SceneBuilder sceneBuilder = new sky.SceneBuilder(sceneBounds) ..pushTransform(deviceTransform) ..addPicture(sky.Offset.zero, picture, paintBounds) diff --git a/examples/raw/hello_world.dart b/examples/raw/hello_world.dart index 87810f87140..2128de7fc4f 100644 --- a/examples/raw/hello_world.dart +++ b/examples/raw/hello_world.dart @@ -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); Float32List deviceTransform = new Float32List(16) ..[0] = devicePixelRatio - ..[5] = devicePixelRatio; + ..[5] = devicePixelRatio + ..[10] = 1.0 + ..[15] = 1.0; sky.SceneBuilder sceneBuilder = new sky.SceneBuilder(sceneBounds) ..pushTransform(deviceTransform) ..addPicture(sky.Offset.zero, picture, paintBounds) diff --git a/examples/raw/mutating-dom.dart b/examples/raw/mutating-dom.dart index 18fe4c663bd..ec199dacafe 100644 --- a/examples/raw/mutating-dom.dart +++ b/examples/raw/mutating-dom.dart @@ -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); Float32List deviceTransform = new Float32List(16) ..[0] = devicePixelRatio - ..[5] = devicePixelRatio; + ..[5] = devicePixelRatio + ..[10] = 1.0 + ..[15] = 1.0; sky.SceneBuilder sceneBuilder = new sky.SceneBuilder(sceneBounds) ..pushTransform(deviceTransform) ..addPicture(sky.Offset.zero, picture, paintBounds) @@ -233,6 +235,7 @@ void beginFrame(double timeStamp) { sky.Picture picture = paint(paintBounds); sky.Scene scene = composite(picture, paintBounds); sky.view.scene = scene; + sky.view.scheduleFrame(); } void main() { diff --git a/examples/raw/painting.dart b/examples/raw/painting.dart index 7ffa87e272e..19ed9abb70c 100644 --- a/examples/raw/painting.dart +++ b/examples/raw/painting.dart @@ -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); Float32List deviceTransform = new Float32List(16) ..[0] = devicePixelRatio - ..[5] = devicePixelRatio; + ..[5] = devicePixelRatio + ..[10] = 1.0 + ..[15] = 1.0; sky.SceneBuilder sceneBuilder = new sky.SceneBuilder(sceneBounds) ..pushTransform(deviceTransform) ..addPicture(sky.Offset.zero, picture, paintBounds) diff --git a/examples/raw/shadow.dart b/examples/raw/shadow.dart index 9da0b150bfb..3e076d56874 100644 --- a/examples/raw/shadow.dart +++ b/examples/raw/shadow.dart @@ -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); Float32List deviceTransform = new Float32List(16) ..[0] = devicePixelRatio - ..[5] = devicePixelRatio; + ..[5] = devicePixelRatio + ..[10] = 1.0 + ..[15] = 1.0; sky.SceneBuilder sceneBuilder = new sky.SceneBuilder(sceneBounds) ..pushTransform(deviceTransform) ..addPicture(sky.Offset.zero, picture, paintBounds) diff --git a/examples/raw/spinning_arabic.dart b/examples/raw/spinning_arabic.dart index 66562b226ed..8d8294e5a26 100644 --- a/examples/raw/spinning_arabic.dart +++ b/examples/raw/spinning_arabic.dart @@ -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); Float32List deviceTransform = new Float32List(16) ..[0] = devicePixelRatio - ..[5] = devicePixelRatio; + ..[5] = devicePixelRatio + ..[10] = 1.0 + ..[15] = 1.0; sky.SceneBuilder sceneBuilder = new sky.SceneBuilder(sceneBounds) ..pushTransform(deviceTransform) ..addPicture(sky.Offset.zero, picture, paintBounds) @@ -49,6 +51,7 @@ void beginFrame(double timeStamp) { sky.Picture picture = paint(paintBounds, delta); sky.Scene scene = composite(picture, paintBounds); sky.view.scene = scene; + sky.view.scheduleFrame(); } void main() { @@ -59,6 +62,7 @@ void main() { block.style['display'] = 'paragraph'; block.style['direction'] = 'rtl'; block.style['unicode-bidi'] = 'plaintext'; + block.style['color'] = 'black'; block.appendChild(arabic); block.appendChild(more); diff --git a/examples/raw/spinning_image.dart b/examples/raw/spinning_image.dart index 0c3a6fa9cf0..d75b0a03373 100644 --- a/examples/raw/spinning_image.dart +++ b/examples/raw/spinning_image.dart @@ -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); Float32List deviceTransform = new Float32List(16) ..[0] = devicePixelRatio - ..[5] = devicePixelRatio; + ..[5] = devicePixelRatio + ..[10] = 1.0 + ..[15] = 1.0; sky.SceneBuilder sceneBuilder = new sky.SceneBuilder(sceneBounds) ..pushTransform(deviceTransform) ..addPicture(sky.Offset.zero, picture, paintBounds) @@ -62,6 +64,7 @@ void beginFrame(double timeStamp) { sky.Picture picture = paint(paintBounds, delta); sky.Scene scene = composite(picture, paintBounds); sky.view.scene = scene; + sky.view.scheduleFrame(); } diff --git a/examples/raw/spinning_square.dart b/examples/raw/spinning_square.dart index cc6d1687c10..426abc7ed9f 100644 --- a/examples/raw/spinning_square.dart +++ b/examples/raw/spinning_square.dart @@ -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); Float32List deviceTransform = new Float32List(16) ..[0] = devicePixelRatio - ..[5] = devicePixelRatio; + ..[5] = devicePixelRatio + ..[10] = 1.0 + ..[15] = 1.0; sky.SceneBuilder sceneBuilder = new sky.SceneBuilder(sceneBounds) ..pushTransform(deviceTransform) ..addPicture(sky.Offset.zero, picture, paintBounds) @@ -37,6 +39,7 @@ void beginFrame(double timeStamp) { sky.view.scene = sceneBuilder.build(); sky.tracing.end('beginFrame'); + sky.view.scheduleFrame(); } void main() {