Remove unused examples targets. (flutter/engine#6882)

These target are no longer built or referenced in either the Flutter or
Fuchsia buildroots. Similar examples are present in the examples/ directory
in the framework.
This commit is contained in:
Chinmay Garde 2018-11-16 12:31:25 -08:00 committed by GitHub
parent 473db1a2d1
commit a623fddf8f
5 changed files with 0 additions and 127 deletions

View File

@ -1,11 +0,0 @@
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
group("examples") {
deps = [
"hello_flutter",
"hello_flutter:hello_flutter_aot",
"spinning_square",
]
}

View File

@ -1,50 +0,0 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This example shows how to show the text 'Hello, world.' using the raw
// interface to the engine.
import 'dart:ui' as ui;
void beginFrame(Duration timeStamp) {
final double devicePixelRatio = ui.window.devicePixelRatio;
final ui.Size physicalSize = ui.window.physicalSize;
final ui.Size logicalSize = physicalSize / devicePixelRatio;
final ui.ParagraphBuilder paragraphBuilder = new ui.ParagraphBuilder(new ui.ParagraphStyle())
..addText('Hello, world.');
final ui.Paragraph paragraph = paragraphBuilder.build()
..layout(new ui.ParagraphConstraints(width: logicalSize.width));
final ui.Rect physicalBounds = ui.Offset.zero & physicalSize;
final ui.PictureRecorder recorder = new ui.PictureRecorder();
final ui.Canvas canvas = new ui.Canvas(recorder, physicalBounds);
canvas.scale(devicePixelRatio, devicePixelRatio);
canvas.drawRect(ui.Offset.zero & logicalSize, new ui.Paint()..color = const ui.Color(0xFF0000FF));
canvas.drawParagraph(paragraph, new ui.Offset(
(logicalSize.width - paragraph.maxIntrinsicWidth) / 2.0,
(logicalSize.height - paragraph.height) / 2.0
));
final ui.Picture picture = recorder.endRecording();
final ui.SceneBuilder sceneBuilder = new ui.SceneBuilder()
// TODO(abarth): We should be able to add a picture without pushing a
// container layer first.
..pushClipRect(physicalBounds)
..addPicture(ui.Offset.zero, picture)
..pop();
ui.window.render(sceneBuilder.build());
}
// This function is the primary entry point to your application. The engine
// calls main() as soon as it has loaded your code.
void main() {
// The engine calls onBeginFrame whenever it wants us to produce a frame.
ui.window.onBeginFrame = beginFrame;
// Here we kick off the whole process by asking the engine to schedule a new
// frame. The engine will eventually call onBeginFrame when it is time for us
// to actually produce the frame.
ui.window.scheduleFrame();
}

View File

@ -1,3 +0,0 @@
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

View File

@ -1,60 +0,0 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This example shows how to perform a simple animation using the raw interface
// to the engine.
import 'dart:math' as math;
import 'dart:typed_data';
import 'dart:ui' as ui;
void beginFrame(Duration timeStamp) {
// The timeStamp argument to beginFrame indicates the timing information we
// should use to clock our animations. It's important to use timeStamp rather
// than reading the system time because we want all the parts of the system to
// coordinate the timings of their animations. If each component read the
// system clock independently, the animations that we processed later would be
// slightly ahead of the animations we processed earlier.
final double devicePixelRatio = ui.window.devicePixelRatio;
// PAINT
final ui.Size logicalSize = ui.window.physicalSize / devicePixelRatio;
final ui.Rect paintBounds = ui.Offset.zero & logicalSize;
final ui.PictureRecorder recorder = new ui.PictureRecorder();
final ui.Canvas canvas = new ui.Canvas(recorder, paintBounds);
canvas.translate(paintBounds.width / 2.0, paintBounds.height / 2.0);
// Here we determine the rotation according to the timeStamp given to us by
// the engine.
final double t = timeStamp.inMicroseconds / Duration.MICROSECONDS_PER_MILLISECOND / 1800.0;
canvas.rotate(math.PI * (t % 1.0));
canvas.drawRect(new ui.Rect.fromLTRB(-100.0, -100.0, 100.0, 100.0),
new ui.Paint()..color = const ui.Color.fromARGB(255, 0, 255, 0));
final ui.Picture picture = recorder.endRecording();
// COMPOSITE
final Float64List deviceTransform = new Float64List(16)
..[0] = devicePixelRatio
..[5] = devicePixelRatio
..[10] = 1.0
..[15] = 1.0;
final ui.SceneBuilder sceneBuilder = new ui.SceneBuilder()
..pushTransform(deviceTransform)
..addPicture(ui.Offset.zero, picture)
..pop();
ui.window.render(sceneBuilder.build());
// After rendering the current frame of the animation, we ask the engine to
// schedule another frame. The engine will call beginFrame again when its time
// to produce the next frame.
ui.window.scheduleFrame();
}
void main() {
ui.window.onBeginFrame = beginFrame;
ui.window.scheduleFrame();
}

View File

@ -1,3 +0,0 @@
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.