mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Merge branch 'master' of github.com:domokit/sky_engine
This commit is contained in:
commit
6216bc2ee0
@ -9,6 +9,7 @@ dart_pkg("sky") {
|
||||
"CHANGELOG.md",
|
||||
"bin/init.dart",
|
||||
"lib/animation/animated_simulation.dart",
|
||||
"lib/animation/animated_value.dart",
|
||||
"lib/animation/animation_performance.dart",
|
||||
"lib/animation/curves.dart",
|
||||
"lib/animation/forces.dart",
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
## 0.0.20
|
||||
|
||||
- 167 changes: https://github.com/domokit/mojo/compare/f2830c7...603f589
|
||||
|
||||
## 0.0.19
|
||||
|
||||
- 49 changes: https://github.com/domokit/mojo/compare/a64559a...1b8968c
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
Use of this source code is governed by a BSD-style license that can be
|
||||
found in the LICENSE file.
|
||||
-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.domokit.sky.demo" android:versionCode="19" android:versionName="0.0.19">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.domokit.sky.demo" android:versionCode="20" android:versionName="0.0.20">
|
||||
|
||||
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
@ -0,0 +1 @@
|
||||
Fixes crash on Nexus 6
|
||||
@ -14,7 +14,6 @@ import 'package:sky/widgets/drawer_item.dart';
|
||||
import 'package:sky/widgets/floating_action_button.dart';
|
||||
import 'package:sky/widgets/icon_button.dart';
|
||||
import 'package:sky/widgets/icon.dart';
|
||||
import 'package:sky/widgets/ink_well.dart';
|
||||
import 'package:sky/widgets/material.dart';
|
||||
import 'package:sky/widgets/navigator.dart';
|
||||
import 'package:sky/widgets/scaffold.dart';
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
|
||||
import 'package:sky/editing/input.dart';
|
||||
import 'package:sky/widgets/basic.dart';
|
||||
import 'package:sky/widgets/flat_button.dart';
|
||||
import 'package:sky/widgets/icon_button.dart';
|
||||
import 'package:sky/widgets/ink_well.dart';
|
||||
import 'package:sky/widgets/material.dart';
|
||||
|
||||
@ -148,26 +148,27 @@ void doFrame(double timeStamp) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
assert(node is sky.Text); //
|
||||
assert(node is sky.Text); //
|
||||
final sky.Text text = node;
|
||||
if (pickThis(0.1)) {
|
||||
report("appending a new text node (ASCII)");
|
||||
node.appendData(generateCharacter(0x20, 0x7F));
|
||||
text.appendData(generateCharacter(0x20, 0x7F));
|
||||
break;
|
||||
} else if (pickThis(0.05)) {
|
||||
report("appending a new text node (Latin1)");
|
||||
node.appendData(generateCharacter(0x20, 0xFF));
|
||||
text.appendData(generateCharacter(0x20, 0xFF));
|
||||
break;
|
||||
} else if (pickThis(0.025)) {
|
||||
report("appending a new text node (BMP)");
|
||||
node.appendData(generateCharacter(0x20, 0xFFFF));
|
||||
text.appendData(generateCharacter(0x20, 0xFFFF));
|
||||
break;
|
||||
} else if (pickThis(0.0125)) {
|
||||
report("appending a new text node (Unicode)");
|
||||
node.appendData(generateCharacter(0x20, 0x10FFFF));
|
||||
text.appendData(generateCharacter(0x20, 0x10FFFF));
|
||||
break;
|
||||
} else if (node.length > 1 && pickThis(0.1)) {
|
||||
} else if (text.length > 1 && pickThis(0.1)) {
|
||||
report("deleting character from Text node");
|
||||
node.deleteData(random.nextInt(node.length), 1);
|
||||
text.deleteData(random.nextInt(text.length), 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -178,7 +179,7 @@ void doFrame(double timeStamp) {
|
||||
int count = 1;
|
||||
while (node != null) {
|
||||
if (node is sky.Element && node.firstChild != null) {
|
||||
node = node.firstChild;
|
||||
node = (node as sky.Element).firstChild;
|
||||
count += 1;
|
||||
} else {
|
||||
while (node != null && node.nextSibling == null)
|
||||
|
||||
@ -20,7 +20,7 @@ void main() {
|
||||
TextStyle style = const TextStyle(color: const Color(0xFF000000));
|
||||
RenderParagraph paragraph = new RenderParagraph(new InlineStyle(style, [new InlineText("${alignItems}")]));
|
||||
table.add(new RenderPadding(child: paragraph, padding: new EdgeDims.only(top: 20.0)));
|
||||
var row = new RenderFlex(alignItems: alignItems, baseline: TextBaseline.alphabetic);
|
||||
var row = new RenderFlex(alignItems: alignItems, textBaseline: TextBaseline.alphabetic);
|
||||
|
||||
style = new TextStyle(fontSize: 15.0, color: const Color(0xFF000000));
|
||||
row.add(new RenderDecoratedBox(
|
||||
@ -32,7 +32,7 @@ void main() {
|
||||
decoration: new BoxDecoration(backgroundColor: const Color(0x7FCCFFCC)),
|
||||
child: new RenderParagraph(new InlineStyle(style, [new InlineText('foo foo foo')]))
|
||||
));
|
||||
var subrow = new RenderFlex(alignItems: alignItems, baseline: TextBaseline.alphabetic);
|
||||
var subrow = new RenderFlex(alignItems: alignItems, textBaseline: TextBaseline.alphabetic);
|
||||
style = new TextStyle(fontSize: 25.0, color: const Color(0xFF000000));
|
||||
subrow.add(new RenderDecoratedBox(
|
||||
decoration: new BoxDecoration(backgroundColor: const Color(0x7FCCCCFF)),
|
||||
|
||||
@ -25,15 +25,15 @@ class Touch {
|
||||
class RenderImageGrow extends RenderImage {
|
||||
final Size _startingSize;
|
||||
|
||||
RenderImageGrow(Image image, Size size) : _startingSize = size, super(image, size);
|
||||
RenderImageGrow(Image image, Size size)
|
||||
: _startingSize = size, super(image: image, width: size.width, height: size.height);
|
||||
|
||||
double _growth = 0.0;
|
||||
double get growth => _growth;
|
||||
void set growth(double value) {
|
||||
_growth = value;
|
||||
double newWidth = _startingSize.width == null ? null : _startingSize.width + growth;
|
||||
double newHeight = _startingSize.height == null ? null : _startingSize.height + growth;
|
||||
requestedSize = new Size(newWidth, newHeight);
|
||||
width = _startingSize.width == null ? null : _startingSize.width + growth;
|
||||
height = _startingSize.height == null ? null : _startingSize.height + growth;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:sky/editing/input.dart';
|
||||
import 'package:sky/animation/animation_performance.dart';
|
||||
import 'package:sky/animation/animated_value.dart';
|
||||
import 'package:sky/widgets/animated_component.dart';
|
||||
import 'package:sky/widgets/animation_builder.dart';
|
||||
import 'package:sky/theme/colors.dart' as colors;
|
||||
@ -69,7 +69,8 @@ class StockHome extends AnimatedComponent {
|
||||
}
|
||||
|
||||
void _handleSearchEnd() {
|
||||
assert(navigator.currentRoute.key == this);
|
||||
assert(navigator.currentRoute is RouteState);
|
||||
assert((navigator.currentRoute as RouteState).owner == this); // TODO(ianh): remove cast once analyzer is cleverer
|
||||
navigator.pop();
|
||||
setState(() {
|
||||
_isSearching = false;
|
||||
@ -280,10 +281,10 @@ class StockHome extends AnimatedComponent {
|
||||
void _handleStockPurchased() {
|
||||
setState(() {
|
||||
_snackbarTransform = new AnimationBuilder()
|
||||
..position = new AnimatedType<Point>(const Point(0.0, 45.0), end: Point.origin);
|
||||
..position = new AnimatedValue<Point>(const Point(0.0, 45.0), end: Point.origin);
|
||||
var performance = _snackbarTransform.createPerformance(
|
||||
[_snackbarTransform.position], duration: _kSnackbarSlideDuration);
|
||||
watch(performance);
|
||||
watch(performance); // TODO(mpcomplete): need to unwatch
|
||||
performance.play();
|
||||
});
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ class StockSettings extends StatefulComponent {
|
||||
break;
|
||||
case StockMode.pessimistic:
|
||||
showModeDialog = true;
|
||||
navigator.pushState("/settings/confirm", (_) {
|
||||
navigator.pushState(this, (_) {
|
||||
showModeDialog = false;
|
||||
});
|
||||
break;
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:sky/animation/animated_value.dart';
|
||||
import 'package:sky/animation/animation_performance.dart';
|
||||
import 'package:sky/animation/curves.dart';
|
||||
import 'package:sky/base/lerp.dart';
|
||||
@ -27,8 +28,6 @@ class CardModel {
|
||||
AnimationPerformance performance;
|
||||
String get label => "Item $value";
|
||||
String get key => value.toString();
|
||||
bool operator ==(other) => other is CardModel && other.value == value;
|
||||
int get hashCode => 373 * 37 * value.hashCode;
|
||||
}
|
||||
|
||||
class ShrinkingCard extends AnimatedComponent {
|
||||
@ -44,7 +43,7 @@ class ShrinkingCard extends AnimatedComponent {
|
||||
Function onUpdated;
|
||||
Function onCompleted;
|
||||
|
||||
double get currentHeight => card.performance.variable.value;
|
||||
double get currentHeight => (card.performance.variable as AnimatedValue).value;
|
||||
|
||||
void initState() {
|
||||
assert(card.performance != null);
|
||||
@ -100,7 +99,7 @@ class CardCollectionApp extends App {
|
||||
assert(card.performance == null);
|
||||
card.performance = new AnimationPerformance()
|
||||
..duration = const Duration(milliseconds: 300)
|
||||
..variable = new AnimatedType<double>(
|
||||
..variable = new AnimatedValue<double>(
|
||||
card.height + kCardMargins.top + kCardMargins.bottom,
|
||||
end: 0.0,
|
||||
curve: ease,
|
||||
|
||||
@ -16,7 +16,8 @@ class ContainerApp extends App {
|
||||
decoration: new BoxDecoration(backgroundColor: const Color(0xFFCCCCCC)),
|
||||
child: new NetworkImage(
|
||||
src: "https://www.dartlang.org/logos/dart-logo.png",
|
||||
size: new Size(300.0, 300.0)
|
||||
width: 300.0,
|
||||
height: 300.0
|
||||
)
|
||||
),
|
||||
new Container(
|
||||
|
||||
79
sky/sdk/lib/animation/animated_value.dart
Normal file
79
sky/sdk/lib/animation/animated_value.dart
Normal file
@ -0,0 +1,79 @@
|
||||
// Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import "dart:sky";
|
||||
|
||||
import 'package:sky/animation/curves.dart';
|
||||
import 'package:sky/base/lerp.dart';
|
||||
|
||||
abstract class AnimatedVariable {
|
||||
void setProgress(double t);
|
||||
String toString();
|
||||
}
|
||||
|
||||
class Interval {
|
||||
final double start;
|
||||
final double end;
|
||||
|
||||
double adjustTime(double t) {
|
||||
return ((t - start) / (end - start)).clamp(0.0, 1.0);
|
||||
}
|
||||
|
||||
Interval(this.start, this.end) {
|
||||
assert(start >= 0.0);
|
||||
assert(start <= 1.0);
|
||||
assert(end >= 0.0);
|
||||
assert(end <= 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
class AnimatedValue<T extends dynamic> extends AnimatedVariable {
|
||||
AnimatedValue(this.begin, { this.end, this.interval, this.curve: linear }) {
|
||||
value = begin;
|
||||
}
|
||||
|
||||
T value;
|
||||
T begin;
|
||||
T end;
|
||||
Interval interval;
|
||||
Curve curve;
|
||||
|
||||
void setProgress(double t) {
|
||||
if (end != null) {
|
||||
double adjustedTime = interval == null ? t : interval.adjustTime(t);
|
||||
if (adjustedTime == 1.0) {
|
||||
value = end;
|
||||
} else {
|
||||
// TODO(mpcomplete): Reverse the timeline and curve.
|
||||
value = begin + (end - begin) * curve.transform(adjustedTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String toString() => 'AnimatedValue(begin=$begin, end=$end, value=$value)';
|
||||
}
|
||||
|
||||
class AnimatedList extends AnimatedVariable {
|
||||
List<AnimatedVariable> variables;
|
||||
Interval interval;
|
||||
|
||||
AnimatedList(this.variables, { this.interval });
|
||||
|
||||
void setProgress(double t) {
|
||||
double adjustedTime = interval == null ? t : interval.adjustTime(t);
|
||||
for (AnimatedVariable variable in variables)
|
||||
variable.setProgress(adjustedTime);
|
||||
}
|
||||
|
||||
String toString() => 'AnimatedList([$variables])';
|
||||
}
|
||||
|
||||
class AnimatedColor extends AnimatedValue<Color> {
|
||||
AnimatedColor(Color begin, { Color end, Curve curve: linear })
|
||||
: super(begin, end: end, curve: curve);
|
||||
|
||||
void setProgress(double t) {
|
||||
value = lerpColor(begin, end, t);
|
||||
}
|
||||
}
|
||||
@ -4,71 +4,9 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:sky/animation/timeline.dart';
|
||||
import 'package:sky/animation/curves.dart';
|
||||
import 'package:sky/animation/animated_value.dart';
|
||||
import 'package:sky/animation/forces.dart';
|
||||
|
||||
abstract class AnimatedVariable {
|
||||
void setFraction(double t);
|
||||
String toString();
|
||||
}
|
||||
|
||||
class Interval {
|
||||
final double start;
|
||||
final double end;
|
||||
|
||||
double adjustTime(double t) {
|
||||
return ((t - start) / (end - start)).clamp(0.0, 1.0);
|
||||
}
|
||||
|
||||
Interval(this.start, this.end) {
|
||||
assert(start >= 0.0);
|
||||
assert(start <= 1.0);
|
||||
assert(end >= 0.0);
|
||||
assert(end <= 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
class AnimatedType<T extends dynamic> extends AnimatedVariable {
|
||||
AnimatedType(this.begin, { this.end, this.interval, this.curve: linear }) {
|
||||
value = begin;
|
||||
}
|
||||
|
||||
T value;
|
||||
T begin;
|
||||
T end;
|
||||
Interval interval;
|
||||
Curve curve;
|
||||
|
||||
void setFraction(double t) {
|
||||
if (end != null) {
|
||||
double adjustedTime = interval == null ? t : interval.adjustTime(t);
|
||||
if (adjustedTime == 1.0) {
|
||||
value = end;
|
||||
} else {
|
||||
// TODO(mpcomplete): Reverse the timeline and curve.
|
||||
value = begin + (end - begin) * curve.transform(adjustedTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String toString() => 'AnimatedType(begin=$begin, end=$end, value=$value)';
|
||||
}
|
||||
|
||||
class AnimatedList extends AnimatedVariable {
|
||||
List<AnimatedVariable> variables;
|
||||
Interval interval;
|
||||
|
||||
AnimatedList(this.variables, { this.interval });
|
||||
|
||||
void setFraction(double t) {
|
||||
double adjustedTime = interval == null ? t : interval.adjustTime(t);
|
||||
for (AnimatedVariable variable in variables)
|
||||
variable.setFraction(adjustedTime);
|
||||
}
|
||||
|
||||
String toString() => 'AnimatedList([$variables])';
|
||||
}
|
||||
import 'package:sky/animation/timeline.dart';
|
||||
|
||||
// This class manages a "performance" - a collection of values that change
|
||||
// based on a timeline. For example, a performance may handle an animation
|
||||
@ -82,7 +20,6 @@ class AnimationPerformance {
|
||||
_timeline = new Timeline(_tick);
|
||||
}
|
||||
|
||||
// TODO(mpcomplete): make this a list, or composable somehow.
|
||||
AnimatedVariable variable;
|
||||
// TODO(mpcomplete): duration should be on a director.
|
||||
Duration duration;
|
||||
@ -142,7 +79,7 @@ class AnimationPerformance {
|
||||
}
|
||||
|
||||
void _tick(double t) {
|
||||
variable.setFraction(t);
|
||||
variable.setProgress(t);
|
||||
_notifyListeners();
|
||||
}
|
||||
}
|
||||
|
||||
@ -54,11 +54,12 @@ class Timeline {
|
||||
double end: 1.0
|
||||
}) {
|
||||
assert(!_animation.isAnimating);
|
||||
|
||||
assert(duration > Duration.ZERO);
|
||||
return _animation.start(new TweenSimulation(duration, begin, end));
|
||||
}
|
||||
|
||||
Future animateTo(double target, { Duration duration }) {
|
||||
assert(duration > Duration.ZERO);
|
||||
return _start(duration: duration, begin: value, end: target);
|
||||
}
|
||||
|
||||
|
||||
@ -1249,9 +1249,10 @@ class RenderViewport extends RenderBox with RenderObjectWithChildMixin<RenderBox
|
||||
|
||||
class RenderImage extends RenderBox {
|
||||
|
||||
RenderImage(sky.Image image, Size requestedSize, { sky.ColorFilter colorFilter })
|
||||
RenderImage({ sky.Image image, double width, double height, sky.ColorFilter colorFilter })
|
||||
: _image = image,
|
||||
_requestedSize = requestedSize,
|
||||
_width = width,
|
||||
_height = height,
|
||||
_colorFilter = colorFilter;
|
||||
|
||||
sky.Image _image;
|
||||
@ -1261,18 +1262,25 @@ class RenderImage extends RenderBox {
|
||||
return;
|
||||
_image = value;
|
||||
markNeedsPaint();
|
||||
if (_requestedSize.width == null || _requestedSize.height == null)
|
||||
if (_width == null || _height == null)
|
||||
markNeedsLayout();
|
||||
}
|
||||
|
||||
Size _requestedSize;
|
||||
Size get requestedSize => _requestedSize;
|
||||
void set requestedSize (Size value) {
|
||||
if (value == null)
|
||||
value = const Size(null, null);
|
||||
if (value == _requestedSize)
|
||||
double _width;
|
||||
double get width => _width;
|
||||
void set width (double value) {
|
||||
if (value == _width)
|
||||
return;
|
||||
_requestedSize = value;
|
||||
_width = value;
|
||||
markNeedsLayout();
|
||||
}
|
||||
|
||||
double _height;
|
||||
double get height => _height;
|
||||
void set height (double value) {
|
||||
if (value == _height)
|
||||
return;
|
||||
_height = value;
|
||||
markNeedsLayout();
|
||||
}
|
||||
|
||||
@ -1299,8 +1307,8 @@ class RenderImage extends RenderBox {
|
||||
Size _sizeForConstraints(BoxConstraints constraints) {
|
||||
// If there's no image, we can't size ourselves automatically
|
||||
if (_image == null) {
|
||||
double width = requestedSize.width == null ? 0.0 : requestedSize.width;
|
||||
double height = requestedSize.height == null ? 0.0 : requestedSize.height;
|
||||
double width = _width == null ? 0.0 : _width;
|
||||
double height = _height == null ? 0.0 : _height;
|
||||
return constraints.constrain(new Size(width, height));
|
||||
}
|
||||
|
||||
@ -1310,8 +1318,8 @@ class RenderImage extends RenderBox {
|
||||
// other dimension to maintain the aspect ratio. In both cases,
|
||||
// constrain dimensions first, otherwise we end up losing the
|
||||
// ratio after constraining.
|
||||
if (requestedSize.width == null) {
|
||||
if (requestedSize.height == null) {
|
||||
if (_width == null) {
|
||||
if (_height == null) {
|
||||
// autosize
|
||||
double width = constraints.constrainWidth(_image.width.toDouble());
|
||||
double maxHeight = constraints.constrainHeight(_image.height.toDouble());
|
||||
@ -1323,21 +1331,21 @@ class RenderImage extends RenderBox {
|
||||
}
|
||||
return constraints.constrain(new Size(width, height));
|
||||
}
|
||||
// determine width from height
|
||||
double width = requestedSize.height * _image.width / _image.height;
|
||||
return constraints.constrain(new Size(width, requestedSize.height));
|
||||
// Determine width from height
|
||||
double width = _height * _image.width / _image.height;
|
||||
return constraints.constrain(new Size(width, height));
|
||||
}
|
||||
if (requestedSize.height == null) {
|
||||
// determine height from width
|
||||
double height = requestedSize.width * _image.height / _image.width;
|
||||
return constraints.constrain(new Size(requestedSize.width, height));
|
||||
if (_height == null) {
|
||||
// Determine height from width
|
||||
double height = _width * _image.height / _image.width;
|
||||
return constraints.constrain(new Size(width, height));
|
||||
}
|
||||
}
|
||||
return constraints.constrain(requestedSize);
|
||||
return constraints.constrain(new Size(width, height));
|
||||
}
|
||||
|
||||
double getMinIntrinsicWidth(BoxConstraints constraints) {
|
||||
if (requestedSize.width == null && requestedSize.height == null)
|
||||
if (_width == null && _height == null)
|
||||
return constraints.constrainWidth(0.0);
|
||||
return _sizeForConstraints(constraints).width;
|
||||
}
|
||||
@ -1347,7 +1355,7 @@ class RenderImage extends RenderBox {
|
||||
}
|
||||
|
||||
double getMinIntrinsicHeight(BoxConstraints constraints) {
|
||||
if (requestedSize.width == null && requestedSize.height == null)
|
||||
if (_width == null && _height == null)
|
||||
return constraints.constrainHeight(0.0);
|
||||
return _sizeForConstraints(constraints).height;
|
||||
}
|
||||
@ -1377,7 +1385,7 @@ class RenderImage extends RenderBox {
|
||||
canvas.restore();
|
||||
}
|
||||
|
||||
String debugDescribeSettings(String prefix) => '${super.debugDescribeSettings(prefix)}${prefix}dimensions: ${requestedSize}\n';
|
||||
String debugDescribeSettings(String prefix) => '${super.debugDescribeSettings(prefix)}${prefix}width: ${width}\n${prefix}height: ${height}\n';
|
||||
}
|
||||
|
||||
class RenderDecoratedBox extends RenderProxyBox {
|
||||
|
||||
@ -83,6 +83,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
|
||||
}
|
||||
}
|
||||
|
||||
// Set during layout if overflow occurred on the main axis
|
||||
TextBaseline _textBaseline;
|
||||
TextBaseline get textBaseline => _textBaseline;
|
||||
void set textBaseline (TextBaseline value) {
|
||||
@ -92,7 +93,6 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
|
||||
}
|
||||
}
|
||||
|
||||
// Set during layout if overflow occurred on the main axis
|
||||
double _overflow;
|
||||
|
||||
void setupParentData(RenderBox child) {
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
|
||||
import 'package:vector_math/vector_math.dart';
|
||||
|
||||
import 'package:sky/animation/animated_value.dart';
|
||||
import 'package:sky/animation/animation_performance.dart';
|
||||
import 'package:sky/animation/curves.dart';
|
||||
import 'package:sky/base/lerp.dart';
|
||||
@ -11,21 +12,21 @@ import 'package:sky/painting/box_painter.dart';
|
||||
import 'package:sky/widgets/basic.dart';
|
||||
import 'package:sky/widgets/animated_component.dart';
|
||||
|
||||
class AnimatedBoxConstraintsValue extends AnimatedType<BoxConstraints> {
|
||||
class AnimatedBoxConstraintsValue extends AnimatedValue<BoxConstraints> {
|
||||
AnimatedBoxConstraintsValue(BoxConstraints begin, { BoxConstraints end, Curve curve: linear })
|
||||
: super(begin, end: end, curve: curve);
|
||||
|
||||
void setFraction(double t) {
|
||||
void setProgress(double t) {
|
||||
// TODO(abarth): We should lerp the BoxConstraints.
|
||||
value = end;
|
||||
}
|
||||
}
|
||||
|
||||
class AnimatedBoxDecorationValue extends AnimatedType<BoxDecoration> {
|
||||
class AnimatedBoxDecorationValue extends AnimatedValue<BoxDecoration> {
|
||||
AnimatedBoxDecorationValue(BoxDecoration begin, { BoxDecoration end, Curve curve: linear })
|
||||
: super(begin, end: end, curve: curve);
|
||||
|
||||
void setFraction(double t) {
|
||||
void setProgress(double t) {
|
||||
if (t == 1.0) {
|
||||
value = end;
|
||||
return;
|
||||
@ -34,11 +35,11 @@ class AnimatedBoxDecorationValue extends AnimatedType<BoxDecoration> {
|
||||
}
|
||||
}
|
||||
|
||||
class AnimatedEdgeDimsValue extends AnimatedType<EdgeDims> {
|
||||
class AnimatedEdgeDimsValue extends AnimatedValue<EdgeDims> {
|
||||
AnimatedEdgeDimsValue(EdgeDims begin, { EdgeDims end, Curve curve: linear })
|
||||
: super(begin, end: end, curve: curve);
|
||||
|
||||
void setFraction(double t) {
|
||||
void setProgress(double t) {
|
||||
if (t == 1.0) {
|
||||
value = end;
|
||||
return;
|
||||
@ -54,7 +55,7 @@ class AnimatedEdgeDimsValue extends AnimatedType<EdgeDims> {
|
||||
|
||||
class ImplicitlyAnimatedValue<T> {
|
||||
final AnimationPerformance performance = new AnimationPerformance();
|
||||
final AnimatedType<T> _variable;
|
||||
final AnimatedValue<T> _variable;
|
||||
|
||||
ImplicitlyAnimatedValue(this._variable, Duration duration) {
|
||||
performance
|
||||
@ -168,21 +169,21 @@ class AnimatedContainer extends AnimatedComponent {
|
||||
|
||||
void _updateTransform() {
|
||||
_updateField(transform, _transform, () {
|
||||
_transform = new ImplicitlyAnimatedValue<Matrix4>(new AnimatedType<Matrix4>(transform), duration);
|
||||
_transform = new ImplicitlyAnimatedValue<Matrix4>(new AnimatedValue<Matrix4>(transform), duration);
|
||||
watch(_transform.performance);
|
||||
});
|
||||
}
|
||||
|
||||
void _updateWidth() {
|
||||
_updateField(width, _width, () {
|
||||
_width = new ImplicitlyAnimatedValue<double>(new AnimatedType<double>(width), duration);
|
||||
_width = new ImplicitlyAnimatedValue<double>(new AnimatedValue<double>(width), duration);
|
||||
watch(_width.performance);
|
||||
});
|
||||
}
|
||||
|
||||
void _updateHeight() {
|
||||
_updateField(height, _height, () {
|
||||
_height = new ImplicitlyAnimatedValue<double>( new AnimatedType<double>(height), duration);
|
||||
_height = new ImplicitlyAnimatedValue<double>( new AnimatedValue<double>(height), duration);
|
||||
watch(_height.performance);
|
||||
});
|
||||
}
|
||||
|
||||
@ -4,9 +4,8 @@
|
||||
|
||||
import 'package:vector_math/vector_math.dart';
|
||||
|
||||
import 'package:sky/animation/animated_value.dart';
|
||||
import 'package:sky/animation/animation_performance.dart';
|
||||
import 'package:sky/animation/curves.dart';
|
||||
import 'package:sky/base/lerp.dart';
|
||||
import 'package:sky/painting/box_painter.dart';
|
||||
import 'package:sky/theme/shadows.dart';
|
||||
import 'package:sky/widgets/basic.dart';
|
||||
@ -18,9 +17,9 @@ class AnimationBuilder {
|
||||
|
||||
AnimationBuilder();
|
||||
|
||||
AnimatedType<double> opacity;
|
||||
AnimatedType<Point> position;
|
||||
AnimatedType<double> shadow;
|
||||
AnimatedValue<double> opacity;
|
||||
AnimatedValue<Point> position;
|
||||
AnimatedValue<double> shadow;
|
||||
AnimatedColor backgroundColor;
|
||||
|
||||
// These don't animate, but are used to build the AnimationBuilder anyway.
|
||||
@ -30,7 +29,7 @@ class AnimationBuilder {
|
||||
Map<AnimatedVariable, AnimationPerformance> _variableToPerformance =
|
||||
new Map<AnimatedVariable, AnimationPerformance>();
|
||||
|
||||
AnimationPerformance createPerformance(List<AnimatedType> variables,
|
||||
AnimationPerformance createPerformance(List<AnimatedValue> variables,
|
||||
{ Duration duration }) {
|
||||
AnimationPerformance performance = new AnimationPerformance()
|
||||
..duration = duration
|
||||
@ -67,7 +66,7 @@ class AnimationBuilder {
|
||||
}
|
||||
|
||||
void updateFields({
|
||||
AnimatedType<double> shadow,
|
||||
AnimatedValue<double> shadow,
|
||||
AnimatedColor backgroundColor,
|
||||
double borderRadius,
|
||||
Shape shape
|
||||
@ -78,7 +77,7 @@ class AnimationBuilder {
|
||||
this.shape = shape;
|
||||
}
|
||||
|
||||
void _updateField(AnimatedType variable, AnimatedType sourceVariable) {
|
||||
void _updateField(AnimatedValue variable, AnimatedValue sourceVariable) {
|
||||
if (variable == null)
|
||||
return; // TODO(mpcomplete): Should we handle transition from null?
|
||||
|
||||
@ -101,15 +100,6 @@ class AnimationBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
class AnimatedColor extends AnimatedType<Color> {
|
||||
AnimatedColor(Color begin, { Color end, Curve curve: linear })
|
||||
: super(begin, end: end, curve: curve);
|
||||
|
||||
void setFraction(double t) {
|
||||
value = lerpColor(begin, end, t);
|
||||
}
|
||||
}
|
||||
|
||||
List<BoxShadow> _computeShadow(double level) {
|
||||
if (level < 1.0) // shadows[1] is the first shadow
|
||||
return null;
|
||||
|
||||
@ -488,31 +488,34 @@ class Text extends Component {
|
||||
}
|
||||
|
||||
class Image extends LeafRenderObjectWrapper {
|
||||
Image({ sky.Image image, this.size, this.colorFilter })
|
||||
Image({ sky.Image image, this.width, this.height, this.colorFilter })
|
||||
: image = image,
|
||||
super(key: image.hashCode.toString()); // TODO(ianh): Find a way to uniquely identify the sky.Image rather than using hashCode, which could collide
|
||||
|
||||
final sky.Image image;
|
||||
final Size size;
|
||||
final double width;
|
||||
final double height;
|
||||
final sky.ColorFilter colorFilter;
|
||||
|
||||
RenderImage createNode() => new RenderImage(image, size, colorFilter: colorFilter);
|
||||
RenderImage createNode() => new RenderImage(image: image, width: width, height: height, colorFilter: colorFilter);
|
||||
RenderImage get root => super.root;
|
||||
|
||||
void syncRenderObject(Widget old) {
|
||||
super.syncRenderObject(old);
|
||||
root.image = image;
|
||||
root.requestedSize = size;
|
||||
root.width = width;
|
||||
root.height = height;
|
||||
root.colorFilter = colorFilter;
|
||||
}
|
||||
}
|
||||
|
||||
class FutureImage extends StatefulComponent {
|
||||
FutureImage({ String key, this.image, this.size, this.colorFilter })
|
||||
FutureImage({ String key, this.image, this.width, this.height, this.colorFilter })
|
||||
: super(key: key);
|
||||
|
||||
Future<sky.Image> image;
|
||||
Size size;
|
||||
double width;
|
||||
double height;
|
||||
sky.ColorFilter colorFilter;
|
||||
|
||||
sky.Image _resolvedImage;
|
||||
@ -535,48 +538,57 @@ class FutureImage extends StatefulComponent {
|
||||
void syncFields(FutureImage source) {
|
||||
bool needToResolveImage = (image != source.image);
|
||||
image = source.image;
|
||||
size = source.size;
|
||||
width = source.width;
|
||||
height = source.height;
|
||||
if (needToResolveImage)
|
||||
_resolveImage();
|
||||
}
|
||||
|
||||
Widget build() {
|
||||
return new Image(image: _resolvedImage, size: size, colorFilter: colorFilter);
|
||||
return new Image(
|
||||
image: _resolvedImage,
|
||||
width: width,
|
||||
height: height,
|
||||
colorFilter: colorFilter
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class NetworkImage extends Component {
|
||||
NetworkImage({ String src, this.size, this.colorFilter })
|
||||
: src = src,
|
||||
super(key: src);
|
||||
NetworkImage({ String src, this.width, this.height, this.colorFilter })
|
||||
: src = src, super(key: src);
|
||||
|
||||
final String src;
|
||||
final Size size;
|
||||
final double width;
|
||||
final double height;
|
||||
final sky.ColorFilter colorFilter;
|
||||
|
||||
Widget build() {
|
||||
return new FutureImage(
|
||||
image: image_cache.load(src),
|
||||
size: size,
|
||||
width: width,
|
||||
height: height,
|
||||
colorFilter: colorFilter
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class AssetImage extends Component {
|
||||
AssetImage({ String name, this.bundle, this.size, this.colorFilter })
|
||||
AssetImage({ String name, this.bundle, this.width, this.height, this.colorFilter })
|
||||
: name = name,
|
||||
super(key: name);
|
||||
|
||||
final String name;
|
||||
final AssetBundle bundle;
|
||||
final Size size;
|
||||
final double width;
|
||||
final double height;
|
||||
final sky.ColorFilter colorFilter;
|
||||
|
||||
Widget build() {
|
||||
return new FutureImage(
|
||||
image: bundle.loadImage(name),
|
||||
size: size,
|
||||
width: width,
|
||||
height: height,
|
||||
colorFilter: colorFilter
|
||||
);
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
|
||||
import 'dart:sky' as sky;
|
||||
|
||||
import 'package:sky/animation/animated_value.dart';
|
||||
import 'package:sky/animation/animation_performance.dart';
|
||||
import 'package:sky/widgets/animated_component.dart';
|
||||
import 'package:sky/widgets/basic.dart';
|
||||
@ -13,7 +14,7 @@ import 'package:vector_math/vector_math.dart';
|
||||
const Duration _kCardDismissFadeout = const Duration(milliseconds: 200);
|
||||
const double _kMinFlingVelocity = 700.0;
|
||||
const double _kMinFlingVelocityDelta = 400.0;
|
||||
const double _kFlingVelocityScale = 1.0/300.0;
|
||||
const double _kFlingVelocityScale = 1.0 / 300.0;
|
||||
const double _kDismissCardThreshold = 0.6;
|
||||
|
||||
typedef void DismissedCallback();
|
||||
@ -30,8 +31,8 @@ class Dismissable extends AnimatedComponent {
|
||||
Widget child;
|
||||
DismissedCallback onDismissed;
|
||||
|
||||
AnimatedType<Point> _position;
|
||||
AnimatedType<double> _opacity;
|
||||
AnimatedValue<Point> _position;
|
||||
AnimatedValue<double> _opacity;
|
||||
AnimationPerformance _performance;
|
||||
|
||||
double _width;
|
||||
@ -39,8 +40,8 @@ class Dismissable extends AnimatedComponent {
|
||||
bool _dragUnderway = false;
|
||||
|
||||
void initState() {
|
||||
_position = new AnimatedType<Point>(Point.origin);
|
||||
_opacity = new AnimatedType<double>(1.0, end: 0.0);
|
||||
_position = new AnimatedValue<Point>(Point.origin);
|
||||
_opacity = new AnimatedValue<double>(1.0, end: 0.0);
|
||||
_performance = new AnimationPerformance()
|
||||
..duration = _kCardDismissFadeout
|
||||
..variable = new AnimatedList([_position, _opacity])
|
||||
|
||||
@ -4,11 +4,11 @@
|
||||
|
||||
import 'dart:sky' as sky;
|
||||
|
||||
import 'package:sky/animation/animated_value.dart';
|
||||
import 'package:sky/animation/animation_performance.dart';
|
||||
import 'package:sky/theme/shadows.dart';
|
||||
import 'package:sky/theme/colors.dart' as colors;
|
||||
import 'package:sky/widgets/animated_component.dart';
|
||||
import 'package:sky/widgets/animation_builder.dart';
|
||||
import 'package:sky/widgets/basic.dart';
|
||||
import 'package:sky/widgets/navigator.dart';
|
||||
import 'package:sky/widgets/scrollable_viewport.dart';
|
||||
@ -30,7 +30,7 @@ import 'package:vector_math/vector_math.dart';
|
||||
|
||||
const double _kWidth = 304.0;
|
||||
const double _kMinFlingVelocity = 365.0;
|
||||
const double _kFlingVelocityScale = 1.0/300.0;
|
||||
const double _kFlingVelocityScale = 1.0 / 300.0;
|
||||
const Duration _kBaseSettleDuration = const Duration(milliseconds: 246);
|
||||
const Point _kOpenPosition = Point.origin;
|
||||
const Point _kClosedPosition = const Point(-_kWidth, 0.0);
|
||||
@ -60,12 +60,12 @@ class Drawer extends AnimatedComponent {
|
||||
DrawerStatusChangedCallback onStatusChanged;
|
||||
Navigator navigator;
|
||||
|
||||
AnimatedType<Point> _position;
|
||||
AnimatedValue<Point> _position;
|
||||
AnimatedColor _maskColor;
|
||||
AnimationPerformance _performance;
|
||||
|
||||
void initState() {
|
||||
_position = new AnimatedType<Point>(_kClosedPosition, end: _kOpenPosition);
|
||||
_position = new AnimatedValue<Point>(_kClosedPosition, end: _kOpenPosition);
|
||||
_maskColor = new AnimatedColor(colors.transparent, end: const Color(0x7F000000));
|
||||
_performance = new AnimationPerformance()
|
||||
..duration = _kBaseSettleDuration
|
||||
@ -143,7 +143,8 @@ class Drawer extends AnimatedComponent {
|
||||
if (_lastStatus != null && status != _lastStatus) {
|
||||
if (status == DrawerStatus.inactive &&
|
||||
navigator != null &&
|
||||
navigator.currentRoute.key == this)
|
||||
navigator.currentRoute is RouteState &&
|
||||
(navigator.currentRoute as RouteState).owner == this) // TODO(ianh): remove cast once analyzer is cleverer
|
||||
navigator.pop();
|
||||
if (onStatusChanged != null)
|
||||
onStatusChanged(status);
|
||||
|
||||
@ -93,7 +93,8 @@ class Icon extends Component {
|
||||
return new AssetImage(
|
||||
bundle: _iconBundle,
|
||||
name: '${category}/${density}/ic_${subtype}_${colorSuffix}_${size}dp.png',
|
||||
size: new Size(size.toDouble(), size.toDouble()),
|
||||
width: size.toDouble(),
|
||||
height: size.toDouble(),
|
||||
colorFilter: colorFilter
|
||||
);
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
import 'dart:math' as math;
|
||||
import 'dart:sky' as sky;
|
||||
|
||||
import 'package:sky/animation/animated_value.dart';
|
||||
import 'package:sky/animation/animation_performance.dart';
|
||||
import 'package:sky/animation/curves.dart';
|
||||
import 'package:sky/rendering/box.dart';
|
||||
@ -29,7 +30,7 @@ double _getSplashTargetSize(Size bounds, Point position) {
|
||||
class InkSplash {
|
||||
InkSplash(this.pointer, this.position, this.well) {
|
||||
_targetRadius = _getSplashTargetSize(well.size, position);
|
||||
_radius = new AnimatedType<double>(
|
||||
_radius = new AnimatedValue<double>(
|
||||
_kSplashInitialSize, end: _targetRadius, curve: easeOut);
|
||||
|
||||
_performance = new AnimationPerformance()
|
||||
@ -45,7 +46,7 @@ class InkSplash {
|
||||
|
||||
double _targetRadius;
|
||||
double _pinnedRadius;
|
||||
AnimatedType<double> _radius;
|
||||
AnimatedValue<double> _radius;
|
||||
AnimationPerformance _performance;
|
||||
|
||||
void _updateVelocity(double velocity) {
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:sky/animation/animated_value.dart';
|
||||
import 'package:sky/animation/animation_performance.dart';
|
||||
import 'package:sky/animation/curves.dart';
|
||||
import 'package:sky/widgets/animated_component.dart';
|
||||
@ -11,25 +12,24 @@ import 'package:vector_math/vector_math.dart';
|
||||
typedef Widget Builder(Navigator navigator, RouteBase route);
|
||||
|
||||
abstract class RouteBase {
|
||||
RouteBase({ this.key });
|
||||
final Object key;
|
||||
Widget build(Navigator navigator, RouteBase route);
|
||||
void popState() { }
|
||||
}
|
||||
|
||||
class Route extends RouteBase {
|
||||
Route({ String name, this.builder }) : super(key: name);
|
||||
String get name => key;
|
||||
Route({ this.name, this.builder });
|
||||
final String name;
|
||||
final Builder builder;
|
||||
Widget build(Navigator navigator, RouteBase route) => builder(navigator, route);
|
||||
}
|
||||
|
||||
class RouteState extends RouteBase {
|
||||
|
||||
RouteState({ this.callback, this.route, Object key }) : super(key: key);
|
||||
RouteState({ this.callback, this.route, this.owner });
|
||||
|
||||
RouteBase route;
|
||||
Function callback;
|
||||
RouteBase route;
|
||||
StatefulComponent owner;
|
||||
|
||||
Widget build(Navigator navigator, RouteBase route) => null;
|
||||
|
||||
@ -59,17 +59,17 @@ class Transition extends AnimatedComponent {
|
||||
Function onDismissed;
|
||||
Function onCompleted;
|
||||
|
||||
AnimatedType<Point> _position;
|
||||
AnimatedType<double> _opacity;
|
||||
AnimatedValue<Point> _position;
|
||||
AnimatedValue<double> _opacity;
|
||||
AnimationPerformance _performance;
|
||||
|
||||
void initState() {
|
||||
_position = new AnimatedType<Point>(
|
||||
_position = new AnimatedValue<Point>(
|
||||
_kTransitionStartPoint,
|
||||
end: Point.origin,
|
||||
curve: easeOut
|
||||
);
|
||||
_opacity = new AnimatedType<double>(0.0, end: 1.0)
|
||||
_opacity = new AnimatedValue<double>(0.0, end: 1.0)
|
||||
..curve = easeOut;
|
||||
_performance = new AnimationPerformance()
|
||||
..duration = _kTransitionDuration
|
||||
@ -143,9 +143,8 @@ class Transition extends AnimatedComponent {
|
||||
}
|
||||
|
||||
class HistoryEntry {
|
||||
HistoryEntry({ this.route, this.key });
|
||||
HistoryEntry({ this.route });
|
||||
final RouteBase route;
|
||||
final int key;
|
||||
bool transitionFinished = false;
|
||||
// TODO(jackson): Keep track of the requested transition
|
||||
}
|
||||
@ -157,12 +156,11 @@ class NavigationState {
|
||||
if (route.name != null)
|
||||
namedRoutes[route.name] = route;
|
||||
}
|
||||
history.add(new HistoryEntry(route: routes[0], key: _lastKey++));
|
||||
history.add(new HistoryEntry(route: routes[0]));
|
||||
}
|
||||
|
||||
List<HistoryEntry> history = new List<HistoryEntry>();
|
||||
int historyIndex = 0;
|
||||
int _lastKey = 0;
|
||||
Map<String, RouteBase> namedRoutes = new Map<String, RouteBase>();
|
||||
|
||||
RouteBase get currentRoute => history[historyIndex].route;
|
||||
@ -175,7 +173,7 @@ class NavigationState {
|
||||
}
|
||||
|
||||
void push(RouteBase route) {
|
||||
HistoryEntry historyEntry = new HistoryEntry(route: route, key: _lastKey++);
|
||||
HistoryEntry historyEntry = new HistoryEntry(route: route);
|
||||
history.insert(historyIndex + 1, historyEntry);
|
||||
historyIndex++;
|
||||
}
|
||||
@ -202,9 +200,9 @@ class Navigator extends StatefulComponent {
|
||||
|
||||
RouteBase get currentRoute => state.currentRoute;
|
||||
|
||||
void pushState(Object key, Function callback) {
|
||||
void pushState(StatefulComponent owner, Function callback) {
|
||||
RouteBase route = new RouteState(
|
||||
key: key,
|
||||
owner: owner,
|
||||
callback: callback,
|
||||
route: state.currentRoute
|
||||
);
|
||||
@ -244,7 +242,7 @@ class Navigator extends StatefulComponent {
|
||||
if (content == null)
|
||||
continue;
|
||||
Transition transition = new Transition(
|
||||
key: historyEntry.key.toString(),
|
||||
key: historyEntry.hashCode.toString(), // TODO(ianh): make it not collide
|
||||
content: content,
|
||||
direction: (i <= state.historyIndex) ? TransitionDirection.forward : TransitionDirection.reverse,
|
||||
interactive: (i == state.historyIndex),
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
import 'dart:math' as math;
|
||||
import 'dart:sky' as sky;
|
||||
|
||||
import 'package:sky/animation/animated_value.dart';
|
||||
import 'package:sky/animation/animation_performance.dart';
|
||||
import 'package:sky/painting/box_painter.dart';
|
||||
import 'package:sky/theme/colors.dart';
|
||||
@ -48,10 +49,10 @@ class PopupMenu extends AnimatedComponent {
|
||||
int level;
|
||||
Navigator navigator;
|
||||
|
||||
AnimatedType<double> _opacity;
|
||||
AnimatedType<double> _width;
|
||||
AnimatedType<double> _height;
|
||||
List<AnimatedType<double>> _itemOpacities;
|
||||
AnimatedValue<double> _opacity;
|
||||
AnimatedValue<double> _width;
|
||||
AnimatedValue<double> _height;
|
||||
List<AnimatedValue<double>> _itemOpacities;
|
||||
AnimatedList _animationList;
|
||||
AnimationPerformance _performance;
|
||||
|
||||
@ -88,14 +89,14 @@ class PopupMenu extends AnimatedComponent {
|
||||
|
||||
void _updateAnimationVariables() {
|
||||
double unit = 1.0 / (items.length + 1.5); // 1.0 for the width and 0.5 for the last item's fade.
|
||||
_opacity = new AnimatedType<double>(0.0, end: 1.0);
|
||||
_width = new AnimatedType<double>(0.0, end: 1.0, interval: new Interval(0.0, unit));
|
||||
_height = new AnimatedType<double>(0.0, end: 1.0, interval: new Interval(0.0, unit * items.length));
|
||||
_itemOpacities = new List<AnimatedType<double>>();
|
||||
_opacity = new AnimatedValue<double>(0.0, end: 1.0);
|
||||
_width = new AnimatedValue<double>(0.0, end: 1.0, interval: new Interval(0.0, unit));
|
||||
_height = new AnimatedValue<double>(0.0, end: 1.0, interval: new Interval(0.0, unit * items.length));
|
||||
_itemOpacities = new List<AnimatedValue<double>>();
|
||||
for (int i = 0; i < items.length; ++i) {
|
||||
double start = (i + 1) * unit;
|
||||
double end = (start + 1.5 * unit).clamp(0.0, 1.0);
|
||||
_itemOpacities.add(new AnimatedType<double>(
|
||||
_itemOpacities.add(new AnimatedValue<double>(
|
||||
0.0, end: 1.0, interval: new Interval(start, end)));
|
||||
}
|
||||
List<AnimatedVariable> variables = new List<AnimatedVariable>()
|
||||
@ -122,7 +123,8 @@ class PopupMenu extends AnimatedComponent {
|
||||
if (_lastStatus != null && status != _lastStatus) {
|
||||
if (status == PopupMenuStatus.inactive &&
|
||||
navigator != null &&
|
||||
navigator.currentRoute.key == this)
|
||||
navigator.currentRoute is RouteState &&
|
||||
(navigator.currentRoute as RouteState).owner == this) // TODO(ianh): remove cast once analyzer is cleverer
|
||||
navigator.pop();
|
||||
if (onStatusChanged != null)
|
||||
onStatusChanged(status);
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
|
||||
import 'dart:sky' as sky;
|
||||
|
||||
import 'package:sky/animation/animated_value.dart';
|
||||
import 'package:sky/animation/animation_performance.dart';
|
||||
import 'package:sky/animation/curves.dart';
|
||||
import 'package:sky/widgets/animated_component.dart';
|
||||
@ -24,14 +25,14 @@ abstract class Toggleable extends AnimatedComponent {
|
||||
bool value;
|
||||
ValueChanged onChanged;
|
||||
|
||||
AnimatedType<double> _position;
|
||||
AnimatedType<double> get position => _position;
|
||||
AnimatedValue<double> _position;
|
||||
AnimatedValue<double> get position => _position;
|
||||
|
||||
AnimationPerformance _performance;
|
||||
AnimationPerformance get performance => _performance;
|
||||
|
||||
void initState() {
|
||||
_position = new AnimatedType<double>(0.0, end: 1.0);
|
||||
_position = new AnimatedValue<double>(0.0, end: 1.0);
|
||||
_performance = new AnimationPerformance()
|
||||
..variable = position
|
||||
..duration = _kCheckDuration
|
||||
|
||||
@ -8,6 +8,8 @@ import 'package:sky/widgets/block_viewport.dart';
|
||||
import 'package:sky/widgets/scrollable.dart';
|
||||
import 'package:sky/widgets/widget.dart';
|
||||
|
||||
export 'package:sky/widgets/block_viewport.dart' show BlockViewportLayoutState;
|
||||
|
||||
class VariableHeightScrollable extends Scrollable {
|
||||
VariableHeightScrollable({
|
||||
String key,
|
||||
|
||||
@ -6,7 +6,6 @@ import 'dart:async';
|
||||
import 'dart:collection';
|
||||
import 'dart:sky' as sky;
|
||||
|
||||
import 'package:sky/base/debug.dart';
|
||||
import 'package:sky/base/hit_test.dart';
|
||||
import 'package:sky/mojo/activity.dart' as activity;
|
||||
import 'package:sky/rendering/box.dart';
|
||||
@ -600,17 +599,20 @@ int _inLayoutCallbackBuilder = 0;
|
||||
|
||||
class LayoutCallbackBuilderHandle { bool _active = true; }
|
||||
LayoutCallbackBuilderHandle enterLayoutCallbackBuilder() {
|
||||
if (!inDebugBuild)
|
||||
return null;
|
||||
_inLayoutCallbackBuilder += 1;
|
||||
assert(() {
|
||||
_inLayoutCallbackBuilder += 1;
|
||||
return true;
|
||||
});
|
||||
return new LayoutCallbackBuilderHandle();
|
||||
}
|
||||
void exitLayoutCallbackBuilder(LayoutCallbackBuilderHandle handle) {
|
||||
if (!inDebugBuild)
|
||||
return;
|
||||
assert(handle._active);
|
||||
handle._active = false;
|
||||
_inLayoutCallbackBuilder -= 1;
|
||||
assert(() {
|
||||
assert(handle._active);
|
||||
handle._active = false;
|
||||
_inLayoutCallbackBuilder -= 1;
|
||||
return true;
|
||||
});
|
||||
Widget._notifyMountStatusChanged();
|
||||
}
|
||||
|
||||
List<int> _debugFrameTimes = <int>[];
|
||||
|
||||
@ -11,4 +11,4 @@ environment:
|
||||
sdk: '>=1.8.0 <2.0.0'
|
||||
homepage: https://github.com/domokit/mojo/tree/master/sky
|
||||
name: sky
|
||||
version: 0.0.19
|
||||
version: 0.0.20
|
||||
|
||||
@ -158,9 +158,6 @@ if (is_android) {
|
||||
source_set(scaffolding_target) {
|
||||
sources = [
|
||||
"ios/main_ios.mm",
|
||||
"ios/platform_service_provider_ios.cc",
|
||||
"ios/platform_view_ios.h",
|
||||
"ios/platform_view_ios.mm",
|
||||
"ios/sky_app_delegate.h",
|
||||
"ios/sky_app_delegate.mm",
|
||||
"ios/sky_surface.h",
|
||||
@ -169,10 +166,20 @@ if (is_android) {
|
||||
"ios/sky_view_controller.mm",
|
||||
]
|
||||
|
||||
set_sources_assignment_filter([])
|
||||
sources += [
|
||||
"mac/platform_mac.h",
|
||||
"mac/platform_mac.mm",
|
||||
"mac/platform_service_provider_mac.cc",
|
||||
"mac/platform_view_mac.h",
|
||||
"mac/platform_view_mac.mm",
|
||||
]
|
||||
set_sources_assignment_filter(sources_assignment_filter)
|
||||
|
||||
deps = common_deps + [
|
||||
":common",
|
||||
"//sky/services/ns_net",
|
||||
]
|
||||
":common",
|
||||
"//sky/services/ns_net",
|
||||
]
|
||||
}
|
||||
|
||||
deps = [
|
||||
@ -193,9 +200,57 @@ if (is_android) {
|
||||
]
|
||||
|
||||
deps = common_deps + [
|
||||
":common",
|
||||
"//sky/services/testing:interfaces",
|
||||
]
|
||||
":common",
|
||||
"//sky/services/testing:interfaces",
|
||||
]
|
||||
}
|
||||
} else if (is_mac) {
|
||||
import("//build/config/mac/rules.gni")
|
||||
|
||||
mac_app("shell") {
|
||||
app_name = "Sky"
|
||||
info_plist = "mac/Info.plist"
|
||||
scaffolding_target = "mac_scaffolding"
|
||||
|
||||
# entitlements_path = ""
|
||||
# code_signing_identity = ""
|
||||
|
||||
xibs = [
|
||||
"mac/sky_mac.xib"
|
||||
]
|
||||
|
||||
resource_copy_mac("sky_resources") {
|
||||
resources = [ "//third_party/icu/android/icudtl.dat" ]
|
||||
bundle_directory = "."
|
||||
}
|
||||
|
||||
source_set(scaffolding_target) {
|
||||
sources = [
|
||||
"mac/main_mac.mm",
|
||||
"mac/platform_mac.h",
|
||||
"mac/platform_mac.mm",
|
||||
"mac/platform_service_provider_mac.cc",
|
||||
"mac/platform_view_mac.h",
|
||||
"mac/platform_view_mac.mm",
|
||||
"mac/sky_app_delegate.h",
|
||||
"mac/sky_app_delegate.m",
|
||||
"mac/sky_window.h",
|
||||
"mac/sky_window.mm",
|
||||
"testing/test_runner.cc",
|
||||
"testing/test_runner.h",
|
||||
]
|
||||
|
||||
deps = common_deps + [
|
||||
":common",
|
||||
"//sky/services/ns_net",
|
||||
"//sky/services/testing:interfaces",
|
||||
]
|
||||
}
|
||||
|
||||
deps = [
|
||||
":$scaffolding_target",
|
||||
":sky_resources",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
assert(false, "Unsupported platform")
|
||||
|
||||
@ -3,14 +3,9 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#include <asl.h>
|
||||
#import "sky_app_delegate.h"
|
||||
#include "base/at_exit.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/i18n/icu_util.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/mac/scoped_nsautorelease_pool.h"
|
||||
#include "ui/gl/gl_surface.h"
|
||||
#import "sky/shell/ios/sky_app_delegate.h"
|
||||
|
||||
#include "sky/shell/mac/platform_mac.h"
|
||||
|
||||
extern "C" {
|
||||
// TODO(csg): HACK! boringssl accesses this on Android using a weak symbol
|
||||
@ -22,49 +17,9 @@ unsigned long getauxval(unsigned long type) {
|
||||
}
|
||||
}
|
||||
|
||||
static void InitializeLogging() {
|
||||
logging::LoggingSettings settings;
|
||||
settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
|
||||
logging::InitLogging(settings);
|
||||
logging::SetLogItems(false, // Process ID
|
||||
false, // Thread ID
|
||||
false, // Timestamp
|
||||
false); // Tick count
|
||||
}
|
||||
|
||||
static void RedirectIOConnectionsToSyslog() {
|
||||
asl_log_descriptor(NULL, NULL, ASL_LEVEL_INFO, STDOUT_FILENO,
|
||||
ASL_LOG_DESCRIPTOR_WRITE);
|
||||
asl_log_descriptor(NULL, NULL, ASL_LEVEL_NOTICE, STDERR_FILENO,
|
||||
ASL_LOG_DESCRIPTOR_WRITE);
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
||||
static void SkyDebuggerHookMain(void) {
|
||||
// By default, LLDB breaks way too early. This is before libraries have been
|
||||
// loaded and __attribute__((constructor)) methods have been called. In most
|
||||
// situations, this is unnecessary. Also, breakpoint resolution is not
|
||||
// immediate. So we provide this hook to break on.
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
#ifndef NDEBUG
|
||||
SkyDebuggerHookMain();
|
||||
#endif
|
||||
base::mac::ScopedNSAutoreleasePool pool;
|
||||
base::AtExitManager exit_manager;
|
||||
RedirectIOConnectionsToSyslog();
|
||||
auto result = false;
|
||||
result = base::CommandLine::Init(0, nullptr);
|
||||
DLOG_ASSERT(result);
|
||||
InitializeLogging();
|
||||
result = base::i18n::InitializeICU();
|
||||
DLOG_ASSERT(result);
|
||||
result = gfx::GLSurface::InitializeOneOff();
|
||||
DLOG_ASSERT(result);
|
||||
return UIApplicationMain(argc, argv, nil,
|
||||
NSStringFromClass([SkyAppDelegate class]));
|
||||
int main(int argc, const char * argv[]) {
|
||||
return PlatformMacMain(argc, argv, ^(){
|
||||
return UIApplicationMain(argc, (char **)argv, nil,
|
||||
NSStringFromClass([SkyAppDelegate class]));
|
||||
});
|
||||
}
|
||||
|
||||
@ -5,41 +5,11 @@
|
||||
#import "sky_app_delegate.h"
|
||||
#import "sky_view_controller.h"
|
||||
|
||||
#include "sky/shell/shell.h"
|
||||
#include "sky/shell/service_provider.h"
|
||||
#include "sky/shell/ui_delegate.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/message_loop/message_loop.h"
|
||||
|
||||
@implementation SkyAppDelegate {
|
||||
base::LazyInstance<scoped_ptr<base::MessageLoop>> _main_message_loop;
|
||||
}
|
||||
@implementation SkyAppDelegate
|
||||
|
||||
- (BOOL)application:(UIApplication*)application
|
||||
didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
|
||||
[self setupSkyShell];
|
||||
[self setupViewport];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)setupSkyShell {
|
||||
[self adoptPlatformRunLoop];
|
||||
|
||||
auto service_provider_context =
|
||||
make_scoped_ptr(new sky::shell::ServiceProviderContext(
|
||||
_main_message_loop.Get()->task_runner()));
|
||||
sky::shell::Shell::Init(service_provider_context.Pass());
|
||||
}
|
||||
|
||||
- (void)adoptPlatformRunLoop {
|
||||
_main_message_loop.Get().reset(new base::MessageLoopForUI);
|
||||
// One cannot start the message loop on the platform main thread. Instead,
|
||||
// we attach to the CFRunLoop
|
||||
base::MessageLoopForUI::current()->Attach();
|
||||
}
|
||||
|
||||
- (void)setupViewport {
|
||||
CGRect frame = [UIScreen mainScreen].bounds;
|
||||
UIWindow* window = [[UIWindow alloc] initWithFrame:frame];
|
||||
SkyViewController* viewController = [[SkyViewController alloc] init];
|
||||
@ -48,6 +18,8 @@
|
||||
self.window = window;
|
||||
[window release];
|
||||
[self.window makeKeyAndVisible];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
#include "base/time/time.h"
|
||||
#include "mojo/public/cpp/bindings/interface_request.h"
|
||||
#include "sky/services/engine/input_event.mojom.h"
|
||||
#include "sky/shell/ios/platform_view_ios.h"
|
||||
#include "sky/shell/mac/platform_view_mac.h"
|
||||
#include "sky/shell/shell_view.h"
|
||||
#include "sky/shell/shell.h"
|
||||
#include "sky/shell/ui_delegate.h"
|
||||
@ -114,8 +114,8 @@ static sky::InputEventPtr BasicInputEventFromRecognizer(
|
||||
[self connectToEngineAndLoad];
|
||||
}
|
||||
|
||||
- (sky::shell::PlatformViewIOS*)platformView {
|
||||
auto view = static_cast<sky::shell::PlatformViewIOS*>(_shell_view->view());
|
||||
- (sky::shell::PlatformViewMac*)platformView {
|
||||
auto view = static_cast<sky::shell::PlatformViewMac*>(_shell_view->view());
|
||||
DCHECK(view);
|
||||
return view;
|
||||
}
|
||||
|
||||
26
sky/shell/mac/.gitignore
vendored
Normal file
26
sky/shell/mac/.gitignore
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
.idea/
|
||||
.sconsign.dblite
|
||||
.svn/
|
||||
|
||||
.DS_Store
|
||||
*.swp
|
||||
*.lock
|
||||
profile
|
||||
|
||||
DerivedData/
|
||||
build/
|
||||
|
||||
*.pbxuser
|
||||
*.mode1v3
|
||||
*.mode2v3
|
||||
*.perspectivev3
|
||||
|
||||
!default.pbxuser
|
||||
!default.mode1v3
|
||||
!default.mode2v3
|
||||
!default.perspectivev3
|
||||
|
||||
xcuserdata
|
||||
|
||||
*.moved-aside
|
||||
Sky.xcodeproj/
|
||||
34
sky/shell/mac/Info.plist
Normal file
34
sky/shell/mac/Info.plist
Normal file
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Sky</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.domokit.sky</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Sky</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.6</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2015 The Chromium Authors. All rights reserved.</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>sky_mac</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
||||
83
sky/shell/mac/main_mac.mm
Normal file
83
sky/shell/mac/main_mac.mm
Normal file
@ -0,0 +1,83 @@
|
||||
// Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#include <iostream>
|
||||
#include "base/bind.h"
|
||||
#include "base/message_loop/message_loop.h"
|
||||
#include "sky/engine/public/web/WebRuntimeFeatures.h"
|
||||
#include "sky/shell/mac/platform_mac.h"
|
||||
#include "base/command_line.h"
|
||||
#include "sky/shell/switches.h"
|
||||
#include "sky/shell/testing/test_runner.h"
|
||||
|
||||
namespace sky {
|
||||
namespace shell {
|
||||
namespace {
|
||||
|
||||
bool FlagsValid() {
|
||||
base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess();
|
||||
|
||||
if (command_line.HasSwitch(sky::shell::switches::kHelp) ||
|
||||
(!command_line.HasSwitch(sky::shell::switches::kPackageRoot) &&
|
||||
!command_line.HasSwitch(sky::shell::switches::kSnapshot))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Usage() {
|
||||
std::cerr << "(For Test Shell) Usage: sky_shell"
|
||||
<< " --" << switches::kNonInteractive
|
||||
<< " --" << switches::kPackageRoot << "=PACKAGE_ROOT"
|
||||
<< " --" << switches::kSnapshot << "=SNAPSHOT"
|
||||
<< " [ MAIN_DART ]" << std::endl;
|
||||
}
|
||||
|
||||
void Init() {
|
||||
base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess();
|
||||
blink::WebRuntimeFeatures::enableObservatory(
|
||||
!command_line.HasSwitch(switches::kNonInteractive));
|
||||
|
||||
// Explicitly boot the shared test runner.
|
||||
TestRunner& runner = TestRunner::Shared();
|
||||
|
||||
std::string package_root =
|
||||
command_line.GetSwitchValueASCII(switches::kPackageRoot);
|
||||
runner.set_package_root(package_root);
|
||||
|
||||
scoped_ptr<TestRunner::SingleTest> single_test;
|
||||
if (command_line.HasSwitch(switches::kSnapshot)) {
|
||||
single_test.reset(new TestRunner::SingleTest);
|
||||
single_test->path = command_line.GetSwitchValueASCII(switches::kSnapshot);
|
||||
single_test->is_snapshot = true;
|
||||
} else {
|
||||
auto args = command_line.GetArgs();
|
||||
if (!args.empty()) {
|
||||
single_test.reset(new TestRunner::SingleTest);
|
||||
single_test->path = args[0];
|
||||
}
|
||||
}
|
||||
|
||||
runner.Start(single_test.Pass());
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace shell
|
||||
} // namespace sky
|
||||
|
||||
int main(int argc, const char * argv[]) {
|
||||
return PlatformMacMain(argc, argv, ^(){
|
||||
if (!sky::shell::FlagsValid()) {
|
||||
sky::shell::Usage();
|
||||
return NSApplicationMain(argc, argv);
|
||||
} else {
|
||||
auto loop = base::MessageLoop::current();
|
||||
loop->PostTask(FROM_HERE, base::Bind(&sky::shell::Init));
|
||||
loop->Run();
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
});
|
||||
}
|
||||
21
sky/shell/mac/platform_mac.h
Normal file
21
sky/shell/mac/platform_mac.h
Normal file
@ -0,0 +1,21 @@
|
||||
// Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SKY_SHELL_MAC_PLATFORM_MAC_H_
|
||||
#define SKY_SHELL_MAC_PLATFORM_MAC_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef int(^PlatformMacMainCallback)(void);
|
||||
|
||||
int PlatformMacMain(int argc, const char *argv[],
|
||||
PlatformMacMainCallback callback);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // SKY_SHELL_MAC_PLATFORM_MAC_H_
|
||||
85
sky/shell/mac/platform_mac.mm
Normal file
85
sky/shell/mac/platform_mac.mm
Normal file
@ -0,0 +1,85 @@
|
||||
// Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "sky/shell/mac/platform_mac.h"
|
||||
|
||||
#include <asl.h>
|
||||
#include "base/at_exit.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/i18n/icu_util.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/mac/scoped_nsautorelease_pool.h"
|
||||
#include "ui/gl/gl_surface.h"
|
||||
#include "sky/shell/shell.h"
|
||||
#include "sky/shell/service_provider.h"
|
||||
#include "sky/shell/ui_delegate.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/message_loop/message_loop.h"
|
||||
|
||||
static void InitializeLogging() {
|
||||
logging::LoggingSettings settings;
|
||||
settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
|
||||
logging::InitLogging(settings);
|
||||
logging::SetLogItems(false, // Process ID
|
||||
false, // Thread ID
|
||||
false, // Timestamp
|
||||
false); // Tick count
|
||||
}
|
||||
|
||||
static void RedirectIOConnectionsToSyslog() {
|
||||
#if TARGET_OS_IPHONE
|
||||
asl_log_descriptor(NULL, NULL, ASL_LEVEL_INFO, STDOUT_FILENO,
|
||||
ASL_LOG_DESCRIPTOR_WRITE);
|
||||
asl_log_descriptor(NULL, NULL, ASL_LEVEL_NOTICE, STDERR_FILENO,
|
||||
ASL_LOG_DESCRIPTOR_WRITE);
|
||||
#endif
|
||||
}
|
||||
|
||||
int PlatformMacMain(int argc, const char *argv[],
|
||||
PlatformMacMainCallback callback) {
|
||||
|
||||
base::mac::ScopedNSAutoreleasePool pool;
|
||||
|
||||
base::AtExitManager exit_manager;
|
||||
|
||||
RedirectIOConnectionsToSyslog();
|
||||
|
||||
auto result = false;
|
||||
|
||||
result = base::CommandLine::Init(argc, argv);
|
||||
DLOG_ASSERT(result);
|
||||
|
||||
InitializeLogging();
|
||||
|
||||
result = base::i18n::InitializeICU();
|
||||
DLOG_ASSERT(result);
|
||||
|
||||
result = gfx::GLSurface::InitializeOneOff();
|
||||
DLOG_ASSERT(result);
|
||||
|
||||
scoped_ptr<base::MessageLoopForUI> main_message_loop(
|
||||
new base::MessageLoopForUI());
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
// One cannot start the message loop on the platform main thread. Instead,
|
||||
// we attach to the CFRunLoop
|
||||
main_message_loop->Attach();
|
||||
#endif
|
||||
|
||||
auto service_provider_context =
|
||||
make_scoped_ptr(new sky::shell::ServiceProviderContext(
|
||||
main_message_loop->task_runner()));
|
||||
|
||||
sky::shell::Shell::Init(service_provider_context.Pass());
|
||||
|
||||
result = callback();
|
||||
|
||||
#if !TARGET_OS_IPHONE
|
||||
if (result == EXIT_SUCCESS) {
|
||||
main_message_loop->QuitNow();
|
||||
}
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -2,26 +2,26 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SKY_SHELL_PLATFORM_VIEW_IOS_H_
|
||||
#define SKY_SHELL_PLATFORM_VIEW_IOS_H_
|
||||
#ifndef SKY_SHELL_PLATFORM_VIEW_MAC_H_
|
||||
#define SKY_SHELL_PLATFORM_VIEW_MAC_H_
|
||||
|
||||
#include "sky/shell/platform_view.h"
|
||||
|
||||
namespace sky {
|
||||
namespace shell {
|
||||
|
||||
class PlatformViewIOS : public PlatformView {
|
||||
class PlatformViewMac : public PlatformView {
|
||||
public:
|
||||
explicit PlatformViewIOS(const Config& config);
|
||||
~PlatformViewIOS() override;
|
||||
explicit PlatformViewMac(const Config& config);
|
||||
~PlatformViewMac() override;
|
||||
void SurfaceCreated(gfx::AcceleratedWidget widget);
|
||||
void SurfaceDestroyed(void);
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(PlatformViewIOS);
|
||||
DISALLOW_COPY_AND_ASSIGN(PlatformViewMac);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace sky
|
||||
|
||||
#endif // SKY_SHELL_PLATFORM_VIEW_IOS_H_
|
||||
#endif // SKY_SHELL_PLATFORM_VIEW_MAC_H_
|
||||
@ -2,29 +2,29 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "platform_view_ios.h"
|
||||
#include "sky/shell/mac/platform_view_mac.h"
|
||||
|
||||
namespace sky {
|
||||
namespace shell {
|
||||
|
||||
PlatformView* PlatformView::Create(const Config& config) {
|
||||
return new PlatformViewIOS(config);
|
||||
return new PlatformViewMac(config);
|
||||
}
|
||||
|
||||
PlatformViewIOS::PlatformViewIOS(const Config& config)
|
||||
PlatformViewMac::PlatformViewMac(const Config& config)
|
||||
: PlatformView(config) {
|
||||
}
|
||||
|
||||
PlatformViewIOS::~PlatformViewIOS() {
|
||||
PlatformViewMac::~PlatformViewMac() {
|
||||
}
|
||||
|
||||
void PlatformViewIOS::SurfaceCreated(gfx::AcceleratedWidget widget) {
|
||||
void PlatformViewMac::SurfaceCreated(gfx::AcceleratedWidget widget) {
|
||||
DCHECK(window_ == 0);
|
||||
window_ = widget;
|
||||
SurfaceWasCreated();
|
||||
}
|
||||
|
||||
void PlatformViewIOS::SurfaceDestroyed() {
|
||||
void PlatformViewMac::SurfaceDestroyed() {
|
||||
DCHECK(window_);
|
||||
window_ = 0;
|
||||
SurfaceWasDestroyed();
|
||||
10
sky/shell/mac/sky_app_delegate.h
Normal file
10
sky/shell/mac/sky_app_delegate.h
Normal file
@ -0,0 +1,10 @@
|
||||
// Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface SkyAppDelegate : NSObject <NSApplicationDelegate>
|
||||
|
||||
@end
|
||||
|
||||
15
sky/shell/mac/sky_app_delegate.m
Normal file
15
sky/shell/mac/sky_app_delegate.m
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import "sky_app_delegate.h"
|
||||
|
||||
@interface SkyAppDelegate ()
|
||||
|
||||
@property (assign) IBOutlet NSWindow *window;
|
||||
|
||||
@end
|
||||
|
||||
@implementation SkyAppDelegate
|
||||
|
||||
@end
|
||||
695
sky/shell/mac/sky_mac.xib
Normal file
695
sky/shell/mac/sky_mac.xib
Normal file
@ -0,0 +1,695 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="7702" systemVersion="14E46" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7702"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
|
||||
<connections>
|
||||
<outlet property="delegate" destination="Voe-Tx-rLC" id="GzC-gU-4Uq"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<customObject id="Voe-Tx-rLC" customClass="SkyAppDelegate">
|
||||
<connections>
|
||||
<outlet property="window" destination="QvC-M9-y7g" id="gIp-Ho-8D9"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="YLy-65-1bz" customClass="NSFontManager"/>
|
||||
<menu title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
|
||||
<items>
|
||||
<menuItem title="Sky" id="1Xt-HY-uBw">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Sky" systemMenu="apple" id="uQy-DD-JDr">
|
||||
<items>
|
||||
<menuItem title="About Sky" id="5kV-Vb-QxS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="orderFrontStandardAboutPanel:" target="-1" id="Exp-CZ-Vem"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
|
||||
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
|
||||
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
|
||||
<menuItem title="Services" id="NMo-om-nkz">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
|
||||
<menuItem title="Hide Sky" keyEquivalent="h" id="Olw-nP-bQN">
|
||||
<connections>
|
||||
<action selector="hide:" target="-1" id="PnN-Uc-m68"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="hideOtherApplications:" target="-1" id="VT4-aY-XCT"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Show All" id="Kd2-mp-pUS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="unhideAllApplications:" target="-1" id="Dhg-Le-xox"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
|
||||
<menuItem title="Quit Sky" keyEquivalent="q" id="4sb-4s-VLi">
|
||||
<connections>
|
||||
<action selector="terminate:" target="-1" id="Te7-pn-YzF"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="File" id="dMs-cI-mzQ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="File" id="bib-Uj-vzu">
|
||||
<items>
|
||||
<menuItem title="New" keyEquivalent="n" id="Was-JA-tGl">
|
||||
<connections>
|
||||
<action selector="newDocument:" target="-1" id="4Si-XN-c54"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Open…" keyEquivalent="o" id="IAo-SY-fd9">
|
||||
<connections>
|
||||
<action selector="openDocument:" target="-1" id="bVn-NM-KNZ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Open Recent" id="tXI-mr-wws">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="oas-Oc-fiZ">
|
||||
<items>
|
||||
<menuItem title="Clear Menu" id="vNY-rz-j42">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="clearRecentDocuments:" target="-1" id="Daa-9d-B3U"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="m54-Is-iLE"/>
|
||||
<menuItem title="Close" keyEquivalent="w" id="DVo-aG-piG">
|
||||
<connections>
|
||||
<action selector="performClose:" target="-1" id="HmO-Ls-i7Q"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Save…" keyEquivalent="s" id="pxx-59-PXV">
|
||||
<connections>
|
||||
<action selector="saveDocument:" target="-1" id="teZ-XB-qJY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Save As…" keyEquivalent="S" id="Bw7-FT-i3A">
|
||||
<connections>
|
||||
<action selector="saveDocumentAs:" target="-1" id="mDf-zr-I0C"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Revert to Saved" id="KaW-ft-85H">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="revertDocumentToSaved:" target="-1" id="iJ3-Pv-kwq"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="aJh-i4-bef"/>
|
||||
<menuItem title="Page Setup…" keyEquivalent="P" id="qIS-W8-SiK">
|
||||
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="runPageLayout:" target="-1" id="Din-rz-gC5"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Print…" keyEquivalent="p" id="aTl-1u-JFS">
|
||||
<connections>
|
||||
<action selector="print:" target="-1" id="qaZ-4w-aoO"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Edit" id="5QF-Oa-p0T">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Edit" id="W48-6f-4Dl">
|
||||
<items>
|
||||
<menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg">
|
||||
<connections>
|
||||
<action selector="undo:" target="-1" id="M6e-cu-g7V"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam">
|
||||
<connections>
|
||||
<action selector="redo:" target="-1" id="oIA-Rs-6OD"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/>
|
||||
<menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG">
|
||||
<connections>
|
||||
<action selector="cut:" target="-1" id="YJe-68-I9s"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU">
|
||||
<connections>
|
||||
<action selector="copy:" target="-1" id="G1f-GL-Joy"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL">
|
||||
<connections>
|
||||
<action selector="paste:" target="-1" id="UvS-8e-Qdg"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="pasteAsPlainText:" target="-1" id="cEh-KX-wJQ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Delete" id="pa3-QI-u2k">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="delete:" target="-1" id="0Mk-Ml-PaM"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m">
|
||||
<connections>
|
||||
<action selector="selectAll:" target="-1" id="VNm-Mi-diN"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/>
|
||||
<menuItem title="Find" id="4EN-yA-p0u">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Find" id="1b7-l0-nxx">
|
||||
<items>
|
||||
<menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="-1" id="cD7-Qs-BN4"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="-1" id="WD3-Gg-5AJ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="-1" id="NDo-RZ-v9R"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="-1" id="HOh-sY-3ay"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="-1" id="U76-nv-p5D"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd">
|
||||
<connections>
|
||||
<action selector="centerSelectionInVisibleArea:" target="-1" id="IOG-6D-g5B"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Spelling and Grammar" id="Dv1-io-Yv7">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Spelling" id="3IN-sU-3Bg">
|
||||
<items>
|
||||
<menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI">
|
||||
<connections>
|
||||
<action selector="showGuessPanel:" target="-1" id="vFj-Ks-hy3"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7">
|
||||
<connections>
|
||||
<action selector="checkSpelling:" target="-1" id="fz7-VC-reM"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="bNw-od-mp5"/>
|
||||
<menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleContinuousSpellChecking:" target="-1" id="7w6-Qz-0kB"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleGrammarChecking:" target="-1" id="muD-Qn-j4w"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Correct Spelling Automatically" id="78Y-hA-62v">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticSpellingCorrection:" target="-1" id="2lM-Qi-WAP"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Substitutions" id="9ic-FL-obx">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Substitutions" id="FeM-D8-WVr">
|
||||
<items>
|
||||
<menuItem title="Show Substitutions" id="z6F-FW-3nz">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="orderFrontSubstitutionsPanel:" target="-1" id="oku-mr-iSq"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/>
|
||||
<menuItem title="Smart Copy/Paste" id="9yt-4B-nSM">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleSmartInsertDelete:" target="-1" id="3IJ-Se-DZD"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smart Quotes" id="hQb-2v-fYv">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticQuoteSubstitution:" target="-1" id="ptq-xd-QOA"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smart Dashes" id="rgM-f4-ycn">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticDashSubstitution:" target="-1" id="oCt-pO-9gS"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smart Links" id="cwL-P1-jid">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticLinkDetection:" target="-1" id="Gip-E3-Fov"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Data Detectors" id="tRr-pd-1PS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticDataDetection:" target="-1" id="R1I-Nq-Kbl"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Text Replacement" id="HFQ-gK-NFA">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticTextReplacement:" target="-1" id="DvP-Fe-Py6"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Transformations" id="2oI-Rn-ZJC">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Transformations" id="c8a-y6-VQd">
|
||||
<items>
|
||||
<menuItem title="Make Upper Case" id="vmV-6d-7jI">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="uppercaseWord:" target="-1" id="sPh-Tk-edu"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Make Lower Case" id="d9M-CD-aMd">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="lowercaseWord:" target="-1" id="iUZ-b5-hil"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Capitalize" id="UEZ-Bs-lqG">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="capitalizeWord:" target="-1" id="26H-TL-nsh"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Speech" id="xrE-MZ-jX0">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Speech" id="3rS-ZA-NoH">
|
||||
<items>
|
||||
<menuItem title="Start Speaking" id="Ynk-f8-cLZ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="startSpeaking:" target="-1" id="654-Ng-kyl"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Stop Speaking" id="Oyz-dy-DGm">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="stopSpeaking:" target="-1" id="dX8-6p-jy9"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Format" id="jxT-CU-nIS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Format" id="GEO-Iw-cKr">
|
||||
<items>
|
||||
<menuItem title="Font" id="Gi5-1S-RQB">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Font" systemMenu="font" id="aXa-aM-Jaq">
|
||||
<items>
|
||||
<menuItem title="Show Fonts" keyEquivalent="t" id="Q5e-8K-NDq">
|
||||
<connections>
|
||||
<action selector="orderFrontFontPanel:" target="YLy-65-1bz" id="WHr-nq-2xA"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Bold" tag="2" keyEquivalent="b" id="GB9-OM-e27">
|
||||
<connections>
|
||||
<action selector="addFontTrait:" target="YLy-65-1bz" id="hqk-hr-sYV"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Italic" tag="1" keyEquivalent="i" id="Vjx-xi-njq">
|
||||
<connections>
|
||||
<action selector="addFontTrait:" target="YLy-65-1bz" id="IHV-OB-c03"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Underline" keyEquivalent="u" id="WRG-CD-K1S">
|
||||
<connections>
|
||||
<action selector="underline:" target="-1" id="FYS-2b-JAY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="5gT-KC-WSO"/>
|
||||
<menuItem title="Bigger" tag="3" keyEquivalent="+" id="Ptp-SP-VEL">
|
||||
<connections>
|
||||
<action selector="modifyFont:" target="YLy-65-1bz" id="Uc7-di-UnL"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smaller" tag="4" keyEquivalent="-" id="i1d-Er-qST">
|
||||
<connections>
|
||||
<action selector="modifyFont:" target="YLy-65-1bz" id="HcX-Lf-eNd"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="kx3-Dk-x3B"/>
|
||||
<menuItem title="Kern" id="jBQ-r6-VK2">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Kern" id="tlD-Oa-oAM">
|
||||
<items>
|
||||
<menuItem title="Use Default" id="GUa-eO-cwY">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useStandardKerning:" target="-1" id="6dk-9l-Ckg"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use None" id="cDB-IK-hbR">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="turnOffKerning:" target="-1" id="U8a-gz-Maa"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Tighten" id="46P-cB-AYj">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="tightenKerning:" target="-1" id="hr7-Nz-8ro"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Loosen" id="ogc-rX-tC1">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="loosenKerning:" target="-1" id="8i4-f9-FKE"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Ligatures" id="o6e-r0-MWq">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Ligatures" id="w0m-vy-SC9">
|
||||
<items>
|
||||
<menuItem title="Use Default" id="agt-UL-0e3">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useStandardLigatures:" target="-1" id="7uR-wd-Dx6"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use None" id="J7y-lM-qPV">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="turnOffLigatures:" target="-1" id="iX2-gA-Ilz"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use All" id="xQD-1f-W4t">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useAllLigatures:" target="-1" id="KcB-kA-TuK"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Baseline" id="OaQ-X3-Vso">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Baseline" id="ijk-EB-dga">
|
||||
<items>
|
||||
<menuItem title="Use Default" id="3Om-Ey-2VK">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="unscript:" target="-1" id="0vZ-95-Ywn"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Superscript" id="Rqc-34-cIF">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="superscript:" target="-1" id="3qV-fo-wpU"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Subscript" id="I0S-gh-46l">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="subscript:" target="-1" id="Q6W-4W-IGz"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Raise" id="2h7-ER-AoG">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="raiseBaseline:" target="-1" id="4sk-31-7Q9"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Lower" id="1tx-W0-xDw">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="lowerBaseline:" target="-1" id="OF1-bc-KW4"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="Ndw-q3-faq"/>
|
||||
<menuItem title="Show Colors" keyEquivalent="C" id="bgn-CT-cEk">
|
||||
<connections>
|
||||
<action selector="orderFrontColorPanel:" target="-1" id="mSX-Xz-DV3"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="iMs-zA-UFJ"/>
|
||||
<menuItem title="Copy Style" keyEquivalent="c" id="5Vv-lz-BsD">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="copyFont:" target="-1" id="GJO-xA-L4q"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste Style" keyEquivalent="v" id="vKC-jM-MkH">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="pasteFont:" target="-1" id="JfD-CL-leO"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Text" id="Fal-I4-PZk">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Text" id="d9c-me-L2H">
|
||||
<items>
|
||||
<menuItem title="Align Left" keyEquivalent="{" id="ZM1-6Q-yy1">
|
||||
<connections>
|
||||
<action selector="alignLeft:" target="-1" id="zUv-R1-uAa"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Center" keyEquivalent="|" id="VIY-Ag-zcb">
|
||||
<connections>
|
||||
<action selector="alignCenter:" target="-1" id="spX-mk-kcS"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Justify" id="J5U-5w-g23">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="alignJustified:" target="-1" id="ljL-7U-jND"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Align Right" keyEquivalent="}" id="wb2-vD-lq4">
|
||||
<connections>
|
||||
<action selector="alignRight:" target="-1" id="r48-bG-YeY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="4s2-GY-VfK"/>
|
||||
<menuItem title="Writing Direction" id="H1b-Si-o9J">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Writing Direction" id="8mr-sm-Yjd">
|
||||
<items>
|
||||
<menuItem title="Paragraph" enabled="NO" id="ZvO-Gk-QUH">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem id="YGs-j5-SAR">
|
||||
<string key="title"> Default</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeBaseWritingDirectionNatural:" target="-1" id="qtV-5e-UBP"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="Lbh-J2-qVU">
|
||||
<string key="title"> Left to Right</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeBaseWritingDirectionLeftToRight:" target="-1" id="S0X-9S-QSf"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="jFq-tB-4Kx">
|
||||
<string key="title"> Right to Left</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeBaseWritingDirectionRightToLeft:" target="-1" id="5fk-qB-AqJ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="swp-gr-a21"/>
|
||||
<menuItem title="Selection" enabled="NO" id="cqv-fj-IhA">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem id="Nop-cj-93Q">
|
||||
<string key="title"> Default</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeTextWritingDirectionNatural:" target="-1" id="lPI-Se-ZHp"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="BgM-ve-c93">
|
||||
<string key="title"> Left to Right</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeTextWritingDirectionLeftToRight:" target="-1" id="caW-Bv-w94"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="RB4-Sm-HuC">
|
||||
<string key="title"> Right to Left</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeTextWritingDirectionRightToLeft:" target="-1" id="EXD-6r-ZUu"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="fKy-g9-1gm"/>
|
||||
<menuItem title="Show Ruler" id="vLm-3I-IUL">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleRuler:" target="-1" id="FOx-HJ-KwY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Copy Ruler" keyEquivalent="c" id="MkV-Pr-PK5">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="copyRuler:" target="-1" id="71i-fW-3W2"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste Ruler" keyEquivalent="v" id="LVM-kO-fVI">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="pasteRuler:" target="-1" id="cSh-wd-qM2"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="View" id="H8h-7b-M4v">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="View" id="HyV-fh-RgO">
|
||||
<items>
|
||||
<menuItem title="Show Toolbar" keyEquivalent="t" id="snW-S8-Cw5">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleToolbarShown:" target="-1" id="BXY-wc-z0C"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Customize Toolbar…" id="1UK-8n-QPP">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="runToolbarCustomizationPalette:" target="-1" id="pQI-g3-MTW"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Window" id="aUF-d1-5bR">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
|
||||
<items>
|
||||
<menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
|
||||
<connections>
|
||||
<action selector="performMiniaturize:" target="-1" id="VwT-WD-YPe"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Zoom" id="R4o-n2-Eq4">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="performZoom:" target="-1" id="DIl-cC-cCs"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
|
||||
<menuItem title="Bring All to Front" id="LE2-aR-0XJ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="arrangeInFront:" target="-1" id="DRN-fu-gQh"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Help" id="wpr-3q-Mcd">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
|
||||
<items>
|
||||
<menuItem title="Sky Help" keyEquivalent="?" id="FKE-Sm-Kum">
|
||||
<connections>
|
||||
<action selector="showHelp:" target="-1" id="y7X-2Q-9no"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
<window title="Sky" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g" customClass="SkyWindow">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||
<rect key="contentRect" x="335" y="390" width="480" height="360"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1177"/>
|
||||
<view key="contentView" id="EiT-Mj-1SZ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="360"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<openGLView autoresizesSubviews="NO" useAuxiliaryDepthBufferStencil="NO" allowOffline="YES" translatesAutoresizingMaskIntoConstraints="NO" id="AUD-Hu-um3">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="360"/>
|
||||
</openGLView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="AUD-Hu-um3" secondAttribute="trailing" id="9W1-4Z-nsQ"/>
|
||||
<constraint firstItem="AUD-Hu-um3" firstAttribute="top" secondItem="EiT-Mj-1SZ" secondAttribute="top" id="KpO-qK-Zhv"/>
|
||||
<constraint firstAttribute="bottom" secondItem="AUD-Hu-um3" secondAttribute="bottom" id="Myy-UN-4eQ"/>
|
||||
<constraint firstItem="AUD-Hu-um3" firstAttribute="leading" secondItem="EiT-Mj-1SZ" secondAttribute="leading" id="gf3-3r-c0N"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="renderSurface" destination="AUD-Hu-um3" id="0jv-sx-91g"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="128" y="455"/>
|
||||
</window>
|
||||
</objects>
|
||||
</document>
|
||||
9
sky/shell/mac/sky_window.h
Normal file
9
sky/shell/mac/sky_window.h
Normal file
@ -0,0 +1,9 @@
|
||||
// Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface SkyWindow : NSWindow
|
||||
|
||||
@end
|
||||
113
sky/shell/mac/sky_window.mm
Normal file
113
sky/shell/mac/sky_window.mm
Normal file
@ -0,0 +1,113 @@
|
||||
// Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import "sky_window.h"
|
||||
#include "base/time/time.h"
|
||||
#include "mojo/public/cpp/bindings/interface_request.h"
|
||||
#include "sky/services/engine/input_event.mojom.h"
|
||||
#include "sky/shell/mac/platform_view_mac.h"
|
||||
#include "sky/shell/shell_view.h"
|
||||
#include "sky/shell/shell.h"
|
||||
#include "sky/shell/ui_delegate.h"
|
||||
|
||||
@interface SkyWindow () <NSWindowDelegate>
|
||||
|
||||
@property (assign) IBOutlet NSOpenGLView *renderSurface;
|
||||
@property (getter=isSurfaceSetup) BOOL surfaceSetup;
|
||||
|
||||
@end
|
||||
|
||||
@implementation SkyWindow {
|
||||
sky::SkyEnginePtr _sky_engine;
|
||||
scoped_ptr<sky::shell::ShellView> _shell_view;
|
||||
}
|
||||
|
||||
@synthesize renderSurface=_renderSurface;
|
||||
@synthesize surfaceSetup=_surfaceSetup;
|
||||
|
||||
-(void) awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
|
||||
self.delegate = self;
|
||||
|
||||
[self windowDidResize:nil];
|
||||
}
|
||||
|
||||
-(void) setupShell {
|
||||
NSAssert(_shell_view == nullptr, @"The shell view must not already be set");
|
||||
auto shell_view = new sky::shell::ShellView(sky::shell::Shell::Shared());
|
||||
_shell_view.reset(shell_view);
|
||||
|
||||
auto widget = reinterpret_cast<gfx::AcceleratedWidget>(self.renderSurface);
|
||||
self.platformView->SurfaceCreated(widget);
|
||||
}
|
||||
|
||||
-(NSString *) skyInitialLoadURL {
|
||||
return @"http://localhost:8080/sky/sdk/example/rendering/simple_autolayout.dart";
|
||||
}
|
||||
|
||||
-(void) setupAndLoadDart {
|
||||
auto interface_request = mojo::GetProxy(&_sky_engine);
|
||||
self.platformView->ConnectToEngine(interface_request.Pass());
|
||||
|
||||
mojo::String string(self.skyInitialLoadURL.UTF8String);
|
||||
_sky_engine->RunFromNetwork(string);
|
||||
}
|
||||
|
||||
-(void) windowDidResize:(NSNotification *)notification {
|
||||
[self setupSurfaceIfNecessary];
|
||||
|
||||
// Resize
|
||||
|
||||
// sky::ViewportMetricsPtr metrics = sky::ViewportMetrics::New();
|
||||
// metrics->physical_width = size.width * scale;
|
||||
// metrics->physical_height = size.height * scale;
|
||||
// metrics->device_pixel_ratio = scale;
|
||||
// _sky_engine->OnViewportMetricsChanged(metrics.Pass());
|
||||
}
|
||||
|
||||
-(void) setupSurfaceIfNecessary {
|
||||
if (self.isSurfaceSetup) {
|
||||
return;
|
||||
}
|
||||
|
||||
self.surfaceSetup = YES;
|
||||
|
||||
[self setupShell];
|
||||
[self setupAndLoadDart];
|
||||
}
|
||||
|
||||
- (sky::shell::PlatformViewMac*)platformView {
|
||||
auto view = static_cast<sky::shell::PlatformViewMac*>(_shell_view->view());
|
||||
DCHECK(view);
|
||||
return view;
|
||||
}
|
||||
|
||||
#pragma mark - Responder overrides
|
||||
|
||||
- (void)dispatchEvent:(NSEvent *)event phase:(NSEventPhase) phase {
|
||||
NSPoint location = [_renderSurface convertPoint:event.locationInWindow
|
||||
fromView:nil];
|
||||
|
||||
location.y = _renderSurface.frame.size.height - location.y;
|
||||
}
|
||||
|
||||
- (void)mouseDown:(NSEvent *)event {
|
||||
[self dispatchEvent:event phase:NSEventPhaseBegan];
|
||||
}
|
||||
|
||||
- (void)mouseDragged:(NSEvent *)event {
|
||||
[self dispatchEvent:event phase:NSEventPhaseChanged];
|
||||
}
|
||||
|
||||
- (void)mouseUp:(NSEvent *)event {
|
||||
[self dispatchEvent:event phase:NSEventPhaseEnded];
|
||||
}
|
||||
|
||||
- (void) dealloc {
|
||||
self.platformView->SurfaceDestroyed();
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@end
|
||||
@ -3,14 +3,7 @@
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# Prepare release script.
|
||||
#
|
||||
# 1) Bump versions using sky/tools/roll_versions.py
|
||||
# 2) Add any additional information to touched CHANGELOG.md files.
|
||||
# 3) Add any release_notes/version.txt files for updated apks.
|
||||
# 4) Make a commit, upload it, land it.
|
||||
# 5) Run this script.
|
||||
# 6) Publish updated apks using sky/tools/publish_apk.py
|
||||
# See https://github.com/domokit/sky_engine/wiki/Release-process
|
||||
|
||||
import argparse
|
||||
import os
|
||||
@ -19,9 +12,6 @@ import sys
|
||||
import distutils.util
|
||||
|
||||
|
||||
DEFAULT_SKY_ENGINE_ROOT = '/src/sky_engine/src'
|
||||
DEFAULT_SKY_SDK_ROOT = '/src/sky_sdk'
|
||||
DEFAULT_DEMO_SITE_ROOT = '/src/domokit.github.io'
|
||||
CONFIRM_MESSAGE = """This tool is destructive and will revert your current branch to
|
||||
origin/master among other things. Are you sure you wish to continue?"""
|
||||
DRY_RUN = False
|
||||
@ -44,12 +34,9 @@ def confirm(prompt):
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description='Deploy!')
|
||||
parser.add_argument('--sky-engine-root', help='Path to sky_engine/src',
|
||||
default=DEFAULT_SKY_ENGINE_ROOT)
|
||||
parser.add_argument('--sky-sdk-root', help='Path to sky_sdk',
|
||||
default=DEFAULT_SKY_SDK_ROOT)
|
||||
parser.add_argument('--demo-site-root', help='Path to domokit.github.io',
|
||||
default=DEFAULT_DEMO_SITE_ROOT)
|
||||
parser.add_argument('sky_engine_root', help='Path to sky_engine/src')
|
||||
parser.add_argument('sky_sdk_root', help='Path to sky_sdk')
|
||||
parser.add_argument('demo_site_root', help='Path to domokit.github.io')
|
||||
parser.add_argument('--dry-run', action='store_true', default=False,
|
||||
help='Just print commands w/o executing.')
|
||||
parser.add_argument('--no-pub-publish', dest='publish',
|
||||
@ -80,7 +67,7 @@ def main():
|
||||
# Run tests?
|
||||
|
||||
run(sky_sdk_root, ['git', 'fetch'])
|
||||
run(sky_sdk_root, ['git', 'reset', '--hard', 'origin/master'])
|
||||
run(sky_sdk_root, ['git', 'reset', '--hard', 'upstream/master'])
|
||||
run(sky_engine_root, [
|
||||
'sky/tools/deploy_sdk.py',
|
||||
'--non-interactive',
|
||||
@ -89,7 +76,7 @@ def main():
|
||||
# tag for version?
|
||||
|
||||
run(demo_site_root, ['git', 'fetch'])
|
||||
run(demo_site_root, ['git', 'reset', '--hard', 'origin/master'])
|
||||
run(demo_site_root, ['git', 'reset', '--hard', 'upstream/master'])
|
||||
# TODO(eseidel): We should move this script back into sky/tools.
|
||||
run(sky_engine_root, ['mojo/tools/deploy_domokit_site.py', demo_site_root])
|
||||
# tag for version?
|
||||
|
||||
@ -243,6 +243,20 @@ GL_FUNCTIONS = [
|
||||
{ 'return_type': 'void',
|
||||
'names': ['glCullFace'],
|
||||
'arguments': 'GLenum mode', },
|
||||
{ 'return_type': 'void',
|
||||
'versions': [{ 'name': 'glDebugMessageCallbackKHR',
|
||||
'extensions': ['GL_KHR_debug'] }],
|
||||
'arguments': 'GLDEBUGPROCKHR callback, const void* userparam' },
|
||||
{ 'return_type': 'void',
|
||||
'versions': [{ 'name': 'glDebugMessageControlKHR',
|
||||
'extensions': ['GL_KHR_debug'] }],
|
||||
'arguments': 'GLenum source, GLenum type, GLenum severity, GLsizei count, '
|
||||
'const GLuint* ids, GLboolean enabled' },
|
||||
{ 'return_type': 'void',
|
||||
'versions': [{ 'name': 'glDebugMessageInsertKHR',
|
||||
'extensions': ['GL_KHR_debug'] }],
|
||||
'arguments': 'GLenum source, GLenum type, GLuint id, GLenum severity, '
|
||||
'GLsizei length, const GLchar* buf' },
|
||||
{ 'return_type': 'void',
|
||||
'names': ['glDeleteBuffers'],
|
||||
'known_as': 'glDeleteBuffersARB',
|
||||
@ -498,6 +512,12 @@ GL_FUNCTIONS = [
|
||||
{ 'return_type': 'void',
|
||||
'names': ['glGetBufferParameteriv'],
|
||||
'arguments': 'GLenum target, GLenum pname, GLint* params', },
|
||||
{ 'return_type': 'GLuint',
|
||||
'versions': [{ 'name': 'glGetDebugMessageLogKHR',
|
||||
'extensions': ['GL_KHR_debug'] }],
|
||||
'arguments': 'GLuint count, GLsizei bufSize, GLenum* sources, GLenum* types, '
|
||||
'GLuint* ids, GLenum* severities, GLsizei* lengths, '
|
||||
'GLchar* messageLog' },
|
||||
{ 'return_type': 'GLenum',
|
||||
'names': ['glGetError'],
|
||||
'arguments': 'void',
|
||||
@ -763,6 +783,11 @@ GL_FUNCTIONS = [
|
||||
'extensions': ['GL_EXT_direct_state_access',
|
||||
'GL_NV_path_rendering'] },],
|
||||
'arguments': 'GLenum matrixMode' },
|
||||
{ 'return_type': 'void',
|
||||
'versions': [{ 'name': 'glObjectLabelKHR',
|
||||
'extensions': ['GL_KHR_debug'] }],
|
||||
'arguments': 'GLenum identifier, GLuint name, GLsizei length, '
|
||||
'const GLchar* label' },
|
||||
{ 'return_type': 'void',
|
||||
'versions': [{ 'name': 'glPauseTransformFeedback' }],
|
||||
'arguments': 'void', },
|
||||
@ -775,6 +800,10 @@ GL_FUNCTIONS = [
|
||||
{ 'return_type': 'void',
|
||||
'names': ['glPolygonOffset'],
|
||||
'arguments': 'GLfloat factor, GLfloat units', },
|
||||
{ 'return_type': 'void',
|
||||
'versions': [{ 'name': 'glPopDebugGroupKHR',
|
||||
'extensions': ['GL_KHR_debug'] }],
|
||||
'arguments': 'void' },
|
||||
{ 'return_type': 'void',
|
||||
'names': ['glPopGroupMarkerEXT'],
|
||||
'arguments': 'void', },
|
||||
@ -789,6 +818,11 @@ GL_FUNCTIONS = [
|
||||
'versions': [{ 'name': 'glProgramParameteri',
|
||||
'extensions': ['GL_ARB_get_program_binary'] }],
|
||||
'arguments': 'GLuint program, GLenum pname, GLint value' },
|
||||
{ 'return_type': 'void',
|
||||
'versions': [{ 'name': 'glPushDebugGroupKHR',
|
||||
'extensions': ['GL_KHR_debug'] }],
|
||||
'arguments': 'GLenum source, GLuint id, GLsizei length, '
|
||||
'const GLchar* message' },
|
||||
{ 'return_type': 'void',
|
||||
'names': ['glPushGroupMarkerEXT'],
|
||||
'arguments': 'GLsizei length, const char* marker', },
|
||||
|
||||
@ -300,6 +300,10 @@ typedef void (*OSMESAproc)();
|
||||
// Forward declare EGL types.
|
||||
typedef uint64 EGLuint64CHROMIUM;
|
||||
|
||||
typedef void (*GLDEBUGPROCKHR)(GLenum source, GLenum type, GLuint id,
|
||||
GLenum severity, GLsizei length,
|
||||
const GLchar *message, void *userParam);
|
||||
|
||||
#include "gl_bindings_autogen_gl.h"
|
||||
#include "gl_bindings_autogen_osmesa.h"
|
||||
|
||||
|
||||
@ -174,6 +174,20 @@ void glCopyTexSubImage3DFn(GLenum target,
|
||||
GLuint glCreateProgramFn(void) override;
|
||||
GLuint glCreateShaderFn(GLenum type) override;
|
||||
void glCullFaceFn(GLenum mode) override;
|
||||
void glDebugMessageCallbackKHRFn(GLDEBUGPROCKHR callback,
|
||||
const void* userparam) override;
|
||||
void glDebugMessageControlKHRFn(GLenum source,
|
||||
GLenum type,
|
||||
GLenum severity,
|
||||
GLsizei count,
|
||||
const GLuint* ids,
|
||||
GLboolean enabled) override;
|
||||
void glDebugMessageInsertKHRFn(GLenum source,
|
||||
GLenum type,
|
||||
GLuint id,
|
||||
GLenum severity,
|
||||
GLsizei length,
|
||||
const GLchar* buf) override;
|
||||
void glDeleteBuffersARBFn(GLsizei n, const GLuint* buffers) override;
|
||||
void glDeleteFencesAPPLEFn(GLsizei n, const GLuint* fences) override;
|
||||
void glDeleteFencesNVFn(GLsizei n, const GLuint* fences) override;
|
||||
@ -311,6 +325,14 @@ void glGetBooleanvFn(GLenum pname, GLboolean* params) override;
|
||||
void glGetBufferParameterivFn(GLenum target,
|
||||
GLenum pname,
|
||||
GLint* params) override;
|
||||
GLuint glGetDebugMessageLogKHRFn(GLuint count,
|
||||
GLsizei bufSize,
|
||||
GLenum* sources,
|
||||
GLenum* types,
|
||||
GLuint* ids,
|
||||
GLenum* severities,
|
||||
GLsizei* lengths,
|
||||
GLchar* messageLog) override;
|
||||
GLenum glGetErrorFn(void) override;
|
||||
void glGetFenceivNVFn(GLuint fence, GLenum pname, GLint* params) override;
|
||||
void glGetFloatvFn(GLenum pname, GLfloat* params) override;
|
||||
@ -452,16 +474,25 @@ void* glMapBufferRangeFn(GLenum target,
|
||||
GLbitfield access) override;
|
||||
void glMatrixLoadfEXTFn(GLenum matrixMode, const GLfloat* m) override;
|
||||
void glMatrixLoadIdentityEXTFn(GLenum matrixMode) override;
|
||||
void glObjectLabelKHRFn(GLenum identifier,
|
||||
GLuint name,
|
||||
GLsizei length,
|
||||
const GLchar* label) override;
|
||||
void glPauseTransformFeedbackFn(void) override;
|
||||
void glPixelStoreiFn(GLenum pname, GLint param) override;
|
||||
void glPointParameteriFn(GLenum pname, GLint param) override;
|
||||
void glPolygonOffsetFn(GLfloat factor, GLfloat units) override;
|
||||
void glPopDebugGroupKHRFn(void) override;
|
||||
void glPopGroupMarkerEXTFn(void) override;
|
||||
void glProgramBinaryFn(GLuint program,
|
||||
GLenum binaryFormat,
|
||||
const GLvoid* binary,
|
||||
GLsizei length) override;
|
||||
void glProgramParameteriFn(GLuint program, GLenum pname, GLint value) override;
|
||||
void glPushDebugGroupKHRFn(GLenum source,
|
||||
GLuint id,
|
||||
GLsizei length,
|
||||
const GLchar* message) override;
|
||||
void glPushGroupMarkerEXTFn(GLsizei length, const char* marker) override;
|
||||
void glQueryCounterFn(GLuint id, GLenum target) override;
|
||||
void glReadBufferFn(GLenum src) override;
|
||||
|
||||
@ -229,8 +229,9 @@ static EGLBoolean GL_BINDING_CALL Debug_eglBindAPI(EGLenum api) {
|
||||
return result;
|
||||
}
|
||||
|
||||
static EGLBoolean GL_BINDING_CALL
|
||||
Debug_eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) {
|
||||
static EGLBoolean GL_BINDING_CALL Debug_eglBindTexImage(EGLDisplay dpy,
|
||||
EGLSurface surface,
|
||||
EGLint buffer) {
|
||||
GL_SERVICE_LOG("eglBindTexImage"
|
||||
<< "(" << dpy << ", " << surface << ", " << buffer << ")");
|
||||
EGLBoolean result =
|
||||
@ -381,8 +382,8 @@ Debug_eglCreateWindowSurface(EGLDisplay dpy,
|
||||
return result;
|
||||
}
|
||||
|
||||
static EGLBoolean GL_BINDING_CALL
|
||||
Debug_eglDestroyContext(EGLDisplay dpy, EGLContext ctx) {
|
||||
static EGLBoolean GL_BINDING_CALL Debug_eglDestroyContext(EGLDisplay dpy,
|
||||
EGLContext ctx) {
|
||||
GL_SERVICE_LOG("eglDestroyContext"
|
||||
<< "(" << dpy << ", " << ctx << ")");
|
||||
EGLBoolean result = g_driver_egl.debug_fn.eglDestroyContextFn(dpy, ctx);
|
||||
@ -390,8 +391,8 @@ Debug_eglDestroyContext(EGLDisplay dpy, EGLContext ctx) {
|
||||
return result;
|
||||
}
|
||||
|
||||
static EGLBoolean GL_BINDING_CALL
|
||||
Debug_eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image) {
|
||||
static EGLBoolean GL_BINDING_CALL Debug_eglDestroyImageKHR(EGLDisplay dpy,
|
||||
EGLImageKHR image) {
|
||||
GL_SERVICE_LOG("eglDestroyImageKHR"
|
||||
<< "(" << dpy << ", " << image << ")");
|
||||
EGLBoolean result = g_driver_egl.debug_fn.eglDestroyImageKHRFn(dpy, image);
|
||||
@ -399,8 +400,8 @@ Debug_eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image) {
|
||||
return result;
|
||||
}
|
||||
|
||||
static EGLBoolean GL_BINDING_CALL
|
||||
Debug_eglDestroySurface(EGLDisplay dpy, EGLSurface surface) {
|
||||
static EGLBoolean GL_BINDING_CALL Debug_eglDestroySurface(EGLDisplay dpy,
|
||||
EGLSurface surface) {
|
||||
GL_SERVICE_LOG("eglDestroySurface"
|
||||
<< "(" << dpy << ", " << surface << ")");
|
||||
EGLBoolean result = g_driver_egl.debug_fn.eglDestroySurfaceFn(dpy, surface);
|
||||
@ -408,8 +409,8 @@ Debug_eglDestroySurface(EGLDisplay dpy, EGLSurface surface) {
|
||||
return result;
|
||||
}
|
||||
|
||||
static EGLBoolean GL_BINDING_CALL
|
||||
Debug_eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync) {
|
||||
static EGLBoolean GL_BINDING_CALL Debug_eglDestroySyncKHR(EGLDisplay dpy,
|
||||
EGLSyncKHR sync) {
|
||||
GL_SERVICE_LOG("eglDestroySyncKHR"
|
||||
<< "(" << dpy << ", " << sync << ")");
|
||||
EGLBoolean result = g_driver_egl.debug_fn.eglDestroySyncKHRFn(dpy, sync);
|
||||
@ -542,8 +543,9 @@ Debug_eglGetSyncValuesCHROMIUM(EGLDisplay dpy,
|
||||
return result;
|
||||
}
|
||||
|
||||
static EGLBoolean GL_BINDING_CALL
|
||||
Debug_eglInitialize(EGLDisplay dpy, EGLint* major, EGLint* minor) {
|
||||
static EGLBoolean GL_BINDING_CALL Debug_eglInitialize(EGLDisplay dpy,
|
||||
EGLint* major,
|
||||
EGLint* minor) {
|
||||
GL_SERVICE_LOG("eglInitialize"
|
||||
<< "(" << dpy << ", " << static_cast<const void*>(major)
|
||||
<< ", " << static_cast<const void*>(minor) << ")");
|
||||
@ -602,8 +604,8 @@ static EGLBoolean GL_BINDING_CALL Debug_eglQueryContext(EGLDisplay dpy,
|
||||
return result;
|
||||
}
|
||||
|
||||
static const char* GL_BINDING_CALL
|
||||
Debug_eglQueryString(EGLDisplay dpy, EGLint name) {
|
||||
static const char* GL_BINDING_CALL Debug_eglQueryString(EGLDisplay dpy,
|
||||
EGLint name) {
|
||||
GL_SERVICE_LOG("eglQueryString"
|
||||
<< "(" << dpy << ", " << name << ")");
|
||||
const char* result = g_driver_egl.debug_fn.eglQueryStringFn(dpy, name);
|
||||
@ -638,8 +640,9 @@ Debug_eglQuerySurfacePointerANGLE(EGLDisplay dpy,
|
||||
return result;
|
||||
}
|
||||
|
||||
static EGLBoolean GL_BINDING_CALL
|
||||
Debug_eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) {
|
||||
static EGLBoolean GL_BINDING_CALL Debug_eglReleaseTexImage(EGLDisplay dpy,
|
||||
EGLSurface surface,
|
||||
EGLint buffer) {
|
||||
GL_SERVICE_LOG("eglReleaseTexImage"
|
||||
<< "(" << dpy << ", " << surface << ", " << buffer << ")");
|
||||
EGLBoolean result =
|
||||
@ -670,8 +673,8 @@ static EGLBoolean GL_BINDING_CALL Debug_eglSurfaceAttrib(EGLDisplay dpy,
|
||||
return result;
|
||||
}
|
||||
|
||||
static EGLBoolean GL_BINDING_CALL
|
||||
Debug_eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) {
|
||||
static EGLBoolean GL_BINDING_CALL Debug_eglSwapBuffers(EGLDisplay dpy,
|
||||
EGLSurface surface) {
|
||||
GL_SERVICE_LOG("eglSwapBuffers"
|
||||
<< "(" << dpy << ", " << surface << ")");
|
||||
EGLBoolean result = g_driver_egl.debug_fn.eglSwapBuffersFn(dpy, surface);
|
||||
@ -679,8 +682,8 @@ Debug_eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) {
|
||||
return result;
|
||||
}
|
||||
|
||||
static EGLBoolean GL_BINDING_CALL
|
||||
Debug_eglSwapInterval(EGLDisplay dpy, EGLint interval) {
|
||||
static EGLBoolean GL_BINDING_CALL Debug_eglSwapInterval(EGLDisplay dpy,
|
||||
EGLint interval) {
|
||||
GL_SERVICE_LOG("eglSwapInterval"
|
||||
<< "(" << dpy << ", " << interval << ")");
|
||||
EGLBoolean result = g_driver_egl.debug_fn.eglSwapIntervalFn(dpy, interval);
|
||||
@ -722,8 +725,9 @@ static EGLBoolean GL_BINDING_CALL Debug_eglWaitNative(EGLint engine) {
|
||||
return result;
|
||||
}
|
||||
|
||||
static EGLint GL_BINDING_CALL
|
||||
Debug_eglWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags) {
|
||||
static EGLint GL_BINDING_CALL Debug_eglWaitSyncKHR(EGLDisplay dpy,
|
||||
EGLSyncKHR sync,
|
||||
EGLint flags) {
|
||||
GL_SERVICE_LOG("eglWaitSyncKHR"
|
||||
<< "(" << dpy << ", " << sync << ", " << flags << ")");
|
||||
EGLint result = g_driver_egl.debug_fn.eglWaitSyncKHRFn(dpy, sync, flags);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -190,6 +190,21 @@ typedef void(GL_BINDING_CALL* glCopyTexSubImage3DProc)(GLenum target,
|
||||
typedef GLuint(GL_BINDING_CALL* glCreateProgramProc)(void);
|
||||
typedef GLuint(GL_BINDING_CALL* glCreateShaderProc)(GLenum type);
|
||||
typedef void(GL_BINDING_CALL* glCullFaceProc)(GLenum mode);
|
||||
typedef void(GL_BINDING_CALL* glDebugMessageCallbackKHRProc)(
|
||||
GLDEBUGPROCKHR callback,
|
||||
const void* userparam);
|
||||
typedef void(GL_BINDING_CALL* glDebugMessageControlKHRProc)(GLenum source,
|
||||
GLenum type,
|
||||
GLenum severity,
|
||||
GLsizei count,
|
||||
const GLuint* ids,
|
||||
GLboolean enabled);
|
||||
typedef void(GL_BINDING_CALL* glDebugMessageInsertKHRProc)(GLenum source,
|
||||
GLenum type,
|
||||
GLuint id,
|
||||
GLenum severity,
|
||||
GLsizei length,
|
||||
const GLchar* buf);
|
||||
typedef void(GL_BINDING_CALL* glDeleteBuffersARBProc)(GLsizei n,
|
||||
const GLuint* buffers);
|
||||
typedef void(GL_BINDING_CALL* glDeleteFencesAPPLEProc)(GLsizei n,
|
||||
@ -362,6 +377,15 @@ typedef void(GL_BINDING_CALL* glGetBooleanvProc)(GLenum pname,
|
||||
typedef void(GL_BINDING_CALL* glGetBufferParameterivProc)(GLenum target,
|
||||
GLenum pname,
|
||||
GLint* params);
|
||||
typedef GLuint(GL_BINDING_CALL* glGetDebugMessageLogKHRProc)(
|
||||
GLuint count,
|
||||
GLsizei bufSize,
|
||||
GLenum* sources,
|
||||
GLenum* types,
|
||||
GLuint* ids,
|
||||
GLenum* severities,
|
||||
GLsizei* lengths,
|
||||
GLchar* messageLog);
|
||||
typedef GLenum(GL_BINDING_CALL* glGetErrorProc)(void);
|
||||
typedef void(GL_BINDING_CALL* glGetFenceivNVProc)(GLuint fence,
|
||||
GLenum pname,
|
||||
@ -546,11 +570,16 @@ typedef void*(GL_BINDING_CALL* glMapBufferRangeProc)(GLenum target,
|
||||
typedef void(GL_BINDING_CALL* glMatrixLoadfEXTProc)(GLenum matrixMode,
|
||||
const GLfloat* m);
|
||||
typedef void(GL_BINDING_CALL* glMatrixLoadIdentityEXTProc)(GLenum matrixMode);
|
||||
typedef void(GL_BINDING_CALL* glObjectLabelKHRProc)(GLenum identifier,
|
||||
GLuint name,
|
||||
GLsizei length,
|
||||
const GLchar* label);
|
||||
typedef void(GL_BINDING_CALL* glPauseTransformFeedbackProc)(void);
|
||||
typedef void(GL_BINDING_CALL* glPixelStoreiProc)(GLenum pname, GLint param);
|
||||
typedef void(GL_BINDING_CALL* glPointParameteriProc)(GLenum pname, GLint param);
|
||||
typedef void(GL_BINDING_CALL* glPolygonOffsetProc)(GLfloat factor,
|
||||
GLfloat units);
|
||||
typedef void(GL_BINDING_CALL* glPopDebugGroupKHRProc)(void);
|
||||
typedef void(GL_BINDING_CALL* glPopGroupMarkerEXTProc)(void);
|
||||
typedef void(GL_BINDING_CALL* glProgramBinaryProc)(GLuint program,
|
||||
GLenum binaryFormat,
|
||||
@ -559,6 +588,10 @@ typedef void(GL_BINDING_CALL* glProgramBinaryProc)(GLuint program,
|
||||
typedef void(GL_BINDING_CALL* glProgramParameteriProc)(GLuint program,
|
||||
GLenum pname,
|
||||
GLint value);
|
||||
typedef void(GL_BINDING_CALL* glPushDebugGroupKHRProc)(GLenum source,
|
||||
GLuint id,
|
||||
GLsizei length,
|
||||
const GLchar* message);
|
||||
typedef void(GL_BINDING_CALL* glPushGroupMarkerEXTProc)(GLsizei length,
|
||||
const char* marker);
|
||||
typedef void(GL_BINDING_CALL* glQueryCounterProc)(GLuint id, GLenum target);
|
||||
@ -922,6 +955,7 @@ struct ExtensionsGL {
|
||||
bool b_GL_EXT_timer_query;
|
||||
bool b_GL_IMG_multisampled_render_to_texture;
|
||||
bool b_GL_KHR_blend_equation_advanced;
|
||||
bool b_GL_KHR_debug;
|
||||
bool b_GL_KHR_robustness;
|
||||
bool b_GL_NV_blend_equation_advanced;
|
||||
bool b_GL_NV_fence;
|
||||
@ -983,6 +1017,9 @@ struct ProcsGL {
|
||||
glCreateProgramProc glCreateProgramFn;
|
||||
glCreateShaderProc glCreateShaderFn;
|
||||
glCullFaceProc glCullFaceFn;
|
||||
glDebugMessageCallbackKHRProc glDebugMessageCallbackKHRFn;
|
||||
glDebugMessageControlKHRProc glDebugMessageControlKHRFn;
|
||||
glDebugMessageInsertKHRProc glDebugMessageInsertKHRFn;
|
||||
glDeleteBuffersARBProc glDeleteBuffersARBFn;
|
||||
glDeleteFencesAPPLEProc glDeleteFencesAPPLEFn;
|
||||
glDeleteFencesNVProc glDeleteFencesNVFn;
|
||||
@ -1052,6 +1089,7 @@ struct ProcsGL {
|
||||
glGetAttribLocationProc glGetAttribLocationFn;
|
||||
glGetBooleanvProc glGetBooleanvFn;
|
||||
glGetBufferParameterivProc glGetBufferParameterivFn;
|
||||
glGetDebugMessageLogKHRProc glGetDebugMessageLogKHRFn;
|
||||
glGetErrorProc glGetErrorFn;
|
||||
glGetFenceivNVProc glGetFenceivNVFn;
|
||||
glGetFloatvProc glGetFloatvFn;
|
||||
@ -1121,13 +1159,16 @@ struct ProcsGL {
|
||||
glMapBufferRangeProc glMapBufferRangeFn;
|
||||
glMatrixLoadfEXTProc glMatrixLoadfEXTFn;
|
||||
glMatrixLoadIdentityEXTProc glMatrixLoadIdentityEXTFn;
|
||||
glObjectLabelKHRProc glObjectLabelKHRFn;
|
||||
glPauseTransformFeedbackProc glPauseTransformFeedbackFn;
|
||||
glPixelStoreiProc glPixelStoreiFn;
|
||||
glPointParameteriProc glPointParameteriFn;
|
||||
glPolygonOffsetProc glPolygonOffsetFn;
|
||||
glPopDebugGroupKHRProc glPopDebugGroupKHRFn;
|
||||
glPopGroupMarkerEXTProc glPopGroupMarkerEXTFn;
|
||||
glProgramBinaryProc glProgramBinaryFn;
|
||||
glProgramParameteriProc glProgramParameteriFn;
|
||||
glPushDebugGroupKHRProc glPushDebugGroupKHRFn;
|
||||
glPushGroupMarkerEXTProc glPushGroupMarkerEXTFn;
|
||||
glQueryCounterProc glQueryCounterFn;
|
||||
glReadBufferProc glReadBufferFn;
|
||||
@ -1401,6 +1442,20 @@ class GL_EXPORT GLApi {
|
||||
virtual GLuint glCreateProgramFn(void) = 0;
|
||||
virtual GLuint glCreateShaderFn(GLenum type) = 0;
|
||||
virtual void glCullFaceFn(GLenum mode) = 0;
|
||||
virtual void glDebugMessageCallbackKHRFn(GLDEBUGPROCKHR callback,
|
||||
const void* userparam) = 0;
|
||||
virtual void glDebugMessageControlKHRFn(GLenum source,
|
||||
GLenum type,
|
||||
GLenum severity,
|
||||
GLsizei count,
|
||||
const GLuint* ids,
|
||||
GLboolean enabled) = 0;
|
||||
virtual void glDebugMessageInsertKHRFn(GLenum source,
|
||||
GLenum type,
|
||||
GLuint id,
|
||||
GLenum severity,
|
||||
GLsizei length,
|
||||
const GLchar* buf) = 0;
|
||||
virtual void glDeleteBuffersARBFn(GLsizei n, const GLuint* buffers) = 0;
|
||||
virtual void glDeleteFencesAPPLEFn(GLsizei n, const GLuint* fences) = 0;
|
||||
virtual void glDeleteFencesNVFn(GLsizei n, const GLuint* fences) = 0;
|
||||
@ -1540,6 +1595,14 @@ class GL_EXPORT GLApi {
|
||||
virtual void glGetBufferParameterivFn(GLenum target,
|
||||
GLenum pname,
|
||||
GLint* params) = 0;
|
||||
virtual GLuint glGetDebugMessageLogKHRFn(GLuint count,
|
||||
GLsizei bufSize,
|
||||
GLenum* sources,
|
||||
GLenum* types,
|
||||
GLuint* ids,
|
||||
GLenum* severities,
|
||||
GLsizei* lengths,
|
||||
GLchar* messageLog) = 0;
|
||||
virtual GLenum glGetErrorFn(void) = 0;
|
||||
virtual void glGetFenceivNVFn(GLuint fence, GLenum pname, GLint* params) = 0;
|
||||
virtual void glGetFloatvFn(GLenum pname, GLfloat* params) = 0;
|
||||
@ -1697,10 +1760,15 @@ class GL_EXPORT GLApi {
|
||||
GLbitfield access) = 0;
|
||||
virtual void glMatrixLoadfEXTFn(GLenum matrixMode, const GLfloat* m) = 0;
|
||||
virtual void glMatrixLoadIdentityEXTFn(GLenum matrixMode) = 0;
|
||||
virtual void glObjectLabelKHRFn(GLenum identifier,
|
||||
GLuint name,
|
||||
GLsizei length,
|
||||
const GLchar* label) = 0;
|
||||
virtual void glPauseTransformFeedbackFn(void) = 0;
|
||||
virtual void glPixelStoreiFn(GLenum pname, GLint param) = 0;
|
||||
virtual void glPointParameteriFn(GLenum pname, GLint param) = 0;
|
||||
virtual void glPolygonOffsetFn(GLfloat factor, GLfloat units) = 0;
|
||||
virtual void glPopDebugGroupKHRFn(void) = 0;
|
||||
virtual void glPopGroupMarkerEXTFn(void) = 0;
|
||||
virtual void glProgramBinaryFn(GLuint program,
|
||||
GLenum binaryFormat,
|
||||
@ -1709,6 +1777,10 @@ class GL_EXPORT GLApi {
|
||||
virtual void glProgramParameteriFn(GLuint program,
|
||||
GLenum pname,
|
||||
GLint value) = 0;
|
||||
virtual void glPushDebugGroupKHRFn(GLenum source,
|
||||
GLuint id,
|
||||
GLsizei length,
|
||||
const GLchar* message) = 0;
|
||||
virtual void glPushGroupMarkerEXTFn(GLsizei length, const char* marker) = 0;
|
||||
virtual void glQueryCounterFn(GLuint id, GLenum target) = 0;
|
||||
virtual void glReadBufferFn(GLenum src) = 0;
|
||||
@ -2062,6 +2134,12 @@ class GL_EXPORT GLApi {
|
||||
#define glCreateProgram ::gfx::g_current_gl_context->glCreateProgramFn
|
||||
#define glCreateShader ::gfx::g_current_gl_context->glCreateShaderFn
|
||||
#define glCullFace ::gfx::g_current_gl_context->glCullFaceFn
|
||||
#define glDebugMessageCallbackKHR \
|
||||
::gfx::g_current_gl_context->glDebugMessageCallbackKHRFn
|
||||
#define glDebugMessageControlKHR \
|
||||
::gfx::g_current_gl_context->glDebugMessageControlKHRFn
|
||||
#define glDebugMessageInsertKHR \
|
||||
::gfx::g_current_gl_context->glDebugMessageInsertKHRFn
|
||||
#define glDeleteBuffersARB ::gfx::g_current_gl_context->glDeleteBuffersARBFn
|
||||
#define glDeleteFencesAPPLE ::gfx::g_current_gl_context->glDeleteFencesAPPLEFn
|
||||
#define glDeleteFencesNV ::gfx::g_current_gl_context->glDeleteFencesNVFn
|
||||
@ -2152,6 +2230,8 @@ class GL_EXPORT GLApi {
|
||||
#define glGetBooleanv ::gfx::g_current_gl_context->glGetBooleanvFn
|
||||
#define glGetBufferParameteriv \
|
||||
::gfx::g_current_gl_context->glGetBufferParameterivFn
|
||||
#define glGetDebugMessageLogKHR \
|
||||
::gfx::g_current_gl_context->glGetDebugMessageLogKHRFn
|
||||
#define glGetError ::gfx::g_current_gl_context->glGetErrorFn
|
||||
#define glGetFenceivNV ::gfx::g_current_gl_context->glGetFenceivNVFn
|
||||
#define glGetFloatv ::gfx::g_current_gl_context->glGetFloatvFn
|
||||
@ -2241,14 +2321,17 @@ class GL_EXPORT GLApi {
|
||||
#define glMatrixLoadfEXT ::gfx::g_current_gl_context->glMatrixLoadfEXTFn
|
||||
#define glMatrixLoadIdentityEXT \
|
||||
::gfx::g_current_gl_context->glMatrixLoadIdentityEXTFn
|
||||
#define glObjectLabelKHR ::gfx::g_current_gl_context->glObjectLabelKHRFn
|
||||
#define glPauseTransformFeedback \
|
||||
::gfx::g_current_gl_context->glPauseTransformFeedbackFn
|
||||
#define glPixelStorei ::gfx::g_current_gl_context->glPixelStoreiFn
|
||||
#define glPointParameteri ::gfx::g_current_gl_context->glPointParameteriFn
|
||||
#define glPolygonOffset ::gfx::g_current_gl_context->glPolygonOffsetFn
|
||||
#define glPopDebugGroupKHR ::gfx::g_current_gl_context->glPopDebugGroupKHRFn
|
||||
#define glPopGroupMarkerEXT ::gfx::g_current_gl_context->glPopGroupMarkerEXTFn
|
||||
#define glProgramBinary ::gfx::g_current_gl_context->glProgramBinaryFn
|
||||
#define glProgramParameteri ::gfx::g_current_gl_context->glProgramParameteriFn
|
||||
#define glPushDebugGroupKHR ::gfx::g_current_gl_context->glPushDebugGroupKHRFn
|
||||
#define glPushGroupMarkerEXT ::gfx::g_current_gl_context->glPushGroupMarkerEXTFn
|
||||
#define glQueryCounter ::gfx::g_current_gl_context->glQueryCounterFn
|
||||
#define glReadBuffer ::gfx::g_current_gl_context->glReadBufferFn
|
||||
|
||||
@ -237,8 +237,9 @@ Debug_glXChooseFBConfig(Display* dpy,
|
||||
return result;
|
||||
}
|
||||
|
||||
static XVisualInfo* GL_BINDING_CALL
|
||||
Debug_glXChooseVisual(Display* dpy, int screen, int* attribList) {
|
||||
static XVisualInfo* GL_BINDING_CALL Debug_glXChooseVisual(Display* dpy,
|
||||
int screen,
|
||||
int* attribList) {
|
||||
GL_SERVICE_LOG("glXChooseVisual"
|
||||
<< "(" << static_cast<const void*>(dpy) << ", " << screen
|
||||
<< ", " << static_cast<const void*>(attribList) << ")");
|
||||
@ -302,8 +303,9 @@ Debug_glXCreateContextAttribsARB(Display* dpy,
|
||||
return result;
|
||||
}
|
||||
|
||||
static GLXPixmap GL_BINDING_CALL
|
||||
Debug_glXCreateGLXPixmap(Display* dpy, XVisualInfo* visual, Pixmap pixmap) {
|
||||
static GLXPixmap GL_BINDING_CALL Debug_glXCreateGLXPixmap(Display* dpy,
|
||||
XVisualInfo* visual,
|
||||
Pixmap pixmap) {
|
||||
GL_SERVICE_LOG("glXCreateGLXPixmap"
|
||||
<< "(" << static_cast<const void*>(dpy) << ", "
|
||||
<< static_cast<const void*>(visual) << ", " << pixmap << ")");
|
||||
@ -370,47 +372,47 @@ static GLXWindow GL_BINDING_CALL Debug_glXCreateWindow(Display* dpy,
|
||||
return result;
|
||||
}
|
||||
|
||||
static void GL_BINDING_CALL
|
||||
Debug_glXDestroyContext(Display* dpy, GLXContext ctx) {
|
||||
static void GL_BINDING_CALL Debug_glXDestroyContext(Display* dpy,
|
||||
GLXContext ctx) {
|
||||
GL_SERVICE_LOG("glXDestroyContext"
|
||||
<< "(" << static_cast<const void*>(dpy) << ", " << ctx << ")");
|
||||
g_driver_glx.debug_fn.glXDestroyContextFn(dpy, ctx);
|
||||
}
|
||||
|
||||
static void GL_BINDING_CALL
|
||||
Debug_glXDestroyGLXPixmap(Display* dpy, GLXPixmap pixmap) {
|
||||
static void GL_BINDING_CALL Debug_glXDestroyGLXPixmap(Display* dpy,
|
||||
GLXPixmap pixmap) {
|
||||
GL_SERVICE_LOG("glXDestroyGLXPixmap"
|
||||
<< "(" << static_cast<const void*>(dpy) << ", " << pixmap
|
||||
<< ")");
|
||||
g_driver_glx.debug_fn.glXDestroyGLXPixmapFn(dpy, pixmap);
|
||||
}
|
||||
|
||||
static void GL_BINDING_CALL
|
||||
Debug_glXDestroyPbuffer(Display* dpy, GLXPbuffer pbuf) {
|
||||
static void GL_BINDING_CALL Debug_glXDestroyPbuffer(Display* dpy,
|
||||
GLXPbuffer pbuf) {
|
||||
GL_SERVICE_LOG("glXDestroyPbuffer"
|
||||
<< "(" << static_cast<const void*>(dpy) << ", " << pbuf
|
||||
<< ")");
|
||||
g_driver_glx.debug_fn.glXDestroyPbufferFn(dpy, pbuf);
|
||||
}
|
||||
|
||||
static void GL_BINDING_CALL
|
||||
Debug_glXDestroyPixmap(Display* dpy, GLXPixmap pixmap) {
|
||||
static void GL_BINDING_CALL Debug_glXDestroyPixmap(Display* dpy,
|
||||
GLXPixmap pixmap) {
|
||||
GL_SERVICE_LOG("glXDestroyPixmap"
|
||||
<< "(" << static_cast<const void*>(dpy) << ", " << pixmap
|
||||
<< ")");
|
||||
g_driver_glx.debug_fn.glXDestroyPixmapFn(dpy, pixmap);
|
||||
}
|
||||
|
||||
static void GL_BINDING_CALL
|
||||
Debug_glXDestroyWindow(Display* dpy, GLXWindow window) {
|
||||
static void GL_BINDING_CALL Debug_glXDestroyWindow(Display* dpy,
|
||||
GLXWindow window) {
|
||||
GL_SERVICE_LOG("glXDestroyWindow"
|
||||
<< "(" << static_cast<const void*>(dpy) << ", " << window
|
||||
<< ")");
|
||||
g_driver_glx.debug_fn.glXDestroyWindowFn(dpy, window);
|
||||
}
|
||||
|
||||
static const char* GL_BINDING_CALL
|
||||
Debug_glXGetClientString(Display* dpy, int name) {
|
||||
static const char* GL_BINDING_CALL Debug_glXGetClientString(Display* dpy,
|
||||
int name) {
|
||||
GL_SERVICE_LOG("glXGetClientString"
|
||||
<< "(" << static_cast<const void*>(dpy) << ", " << name
|
||||
<< ")");
|
||||
@ -419,8 +421,10 @@ Debug_glXGetClientString(Display* dpy, int name) {
|
||||
return result;
|
||||
}
|
||||
|
||||
static int GL_BINDING_CALL
|
||||
Debug_glXGetConfig(Display* dpy, XVisualInfo* visual, int attrib, int* value) {
|
||||
static int GL_BINDING_CALL Debug_glXGetConfig(Display* dpy,
|
||||
XVisualInfo* visual,
|
||||
int attrib,
|
||||
int* value) {
|
||||
GL_SERVICE_LOG("glXGetConfig"
|
||||
<< "(" << static_cast<const void*>(dpy) << ", "
|
||||
<< static_cast<const void*>(visual) << ", " << attrib << ", "
|
||||
@ -491,8 +495,9 @@ Debug_glXGetFBConfigFromVisualSGIX(Display* dpy, XVisualInfo* visualInfo) {
|
||||
return result;
|
||||
}
|
||||
|
||||
static GLXFBConfig* GL_BINDING_CALL
|
||||
Debug_glXGetFBConfigs(Display* dpy, int screen, int* nelements) {
|
||||
static GLXFBConfig* GL_BINDING_CALL Debug_glXGetFBConfigs(Display* dpy,
|
||||
int screen,
|
||||
int* nelements) {
|
||||
GL_SERVICE_LOG("glXGetFBConfigs"
|
||||
<< "(" << static_cast<const void*>(dpy) << ", " << screen
|
||||
<< ", " << static_cast<const void*>(nelements) << ")");
|
||||
@ -573,8 +578,9 @@ static int GL_BINDING_CALL Debug_glXMakeContextCurrent(Display* dpy,
|
||||
return result;
|
||||
}
|
||||
|
||||
static int GL_BINDING_CALL
|
||||
Debug_glXMakeCurrent(Display* dpy, GLXDrawable drawable, GLXContext ctx) {
|
||||
static int GL_BINDING_CALL Debug_glXMakeCurrent(Display* dpy,
|
||||
GLXDrawable drawable,
|
||||
GLXContext ctx) {
|
||||
GL_SERVICE_LOG("glXMakeCurrent"
|
||||
<< "(" << static_cast<const void*>(dpy) << ", " << drawable
|
||||
<< ", " << ctx << ")");
|
||||
@ -583,8 +589,10 @@ Debug_glXMakeCurrent(Display* dpy, GLXDrawable drawable, GLXContext ctx) {
|
||||
return result;
|
||||
}
|
||||
|
||||
static int GL_BINDING_CALL
|
||||
Debug_glXQueryContext(Display* dpy, GLXContext ctx, int attribute, int* value) {
|
||||
static int GL_BINDING_CALL Debug_glXQueryContext(Display* dpy,
|
||||
GLXContext ctx,
|
||||
int attribute,
|
||||
int* value) {
|
||||
GL_SERVICE_LOG("glXQueryContext"
|
||||
<< "(" << static_cast<const void*>(dpy) << ", " << ctx << ", "
|
||||
<< attribute << ", " << static_cast<const void*>(value)
|
||||
@ -606,8 +614,9 @@ static void GL_BINDING_CALL Debug_glXQueryDrawable(Display* dpy,
|
||||
g_driver_glx.debug_fn.glXQueryDrawableFn(dpy, draw, attribute, value);
|
||||
}
|
||||
|
||||
static int GL_BINDING_CALL
|
||||
Debug_glXQueryExtension(Display* dpy, int* errorb, int* event) {
|
||||
static int GL_BINDING_CALL Debug_glXQueryExtension(Display* dpy,
|
||||
int* errorb,
|
||||
int* event) {
|
||||
GL_SERVICE_LOG("glXQueryExtension"
|
||||
<< "(" << static_cast<const void*>(dpy) << ", "
|
||||
<< static_cast<const void*>(errorb) << ", "
|
||||
@ -617,8 +626,8 @@ Debug_glXQueryExtension(Display* dpy, int* errorb, int* event) {
|
||||
return result;
|
||||
}
|
||||
|
||||
static const char* GL_BINDING_CALL
|
||||
Debug_glXQueryExtensionsString(Display* dpy, int screen) {
|
||||
static const char* GL_BINDING_CALL Debug_glXQueryExtensionsString(Display* dpy,
|
||||
int screen) {
|
||||
GL_SERVICE_LOG("glXQueryExtensionsString"
|
||||
<< "(" << static_cast<const void*>(dpy) << ", " << screen
|
||||
<< ")");
|
||||
@ -628,8 +637,9 @@ Debug_glXQueryExtensionsString(Display* dpy, int screen) {
|
||||
return result;
|
||||
}
|
||||
|
||||
static const char* GL_BINDING_CALL
|
||||
Debug_glXQueryServerString(Display* dpy, int screen, int name) {
|
||||
static const char* GL_BINDING_CALL Debug_glXQueryServerString(Display* dpy,
|
||||
int screen,
|
||||
int name) {
|
||||
GL_SERVICE_LOG("glXQueryServerString"
|
||||
<< "(" << static_cast<const void*>(dpy) << ", " << screen
|
||||
<< ", " << name << ")");
|
||||
@ -639,8 +649,9 @@ Debug_glXQueryServerString(Display* dpy, int screen, int name) {
|
||||
return result;
|
||||
}
|
||||
|
||||
static int GL_BINDING_CALL
|
||||
Debug_glXQueryVersion(Display* dpy, int* maj, int* min) {
|
||||
static int GL_BINDING_CALL Debug_glXQueryVersion(Display* dpy,
|
||||
int* maj,
|
||||
int* min) {
|
||||
GL_SERVICE_LOG("glXQueryVersion"
|
||||
<< "(" << static_cast<const void*>(dpy) << ", "
|
||||
<< static_cast<const void*>(maj) << ", "
|
||||
@ -650,32 +661,35 @@ Debug_glXQueryVersion(Display* dpy, int* maj, int* min) {
|
||||
return result;
|
||||
}
|
||||
|
||||
static void GL_BINDING_CALL
|
||||
Debug_glXReleaseTexImageEXT(Display* dpy, GLXDrawable drawable, int buffer) {
|
||||
static void GL_BINDING_CALL Debug_glXReleaseTexImageEXT(Display* dpy,
|
||||
GLXDrawable drawable,
|
||||
int buffer) {
|
||||
GL_SERVICE_LOG("glXReleaseTexImageEXT"
|
||||
<< "(" << static_cast<const void*>(dpy) << ", " << drawable
|
||||
<< ", " << buffer << ")");
|
||||
g_driver_glx.debug_fn.glXReleaseTexImageEXTFn(dpy, drawable, buffer);
|
||||
}
|
||||
|
||||
static void GL_BINDING_CALL
|
||||
Debug_glXSelectEvent(Display* dpy, GLXDrawable drawable, unsigned long mask) {
|
||||
static void GL_BINDING_CALL Debug_glXSelectEvent(Display* dpy,
|
||||
GLXDrawable drawable,
|
||||
unsigned long mask) {
|
||||
GL_SERVICE_LOG("glXSelectEvent"
|
||||
<< "(" << static_cast<const void*>(dpy) << ", " << drawable
|
||||
<< ", " << mask << ")");
|
||||
g_driver_glx.debug_fn.glXSelectEventFn(dpy, drawable, mask);
|
||||
}
|
||||
|
||||
static void GL_BINDING_CALL
|
||||
Debug_glXSwapBuffers(Display* dpy, GLXDrawable drawable) {
|
||||
static void GL_BINDING_CALL Debug_glXSwapBuffers(Display* dpy,
|
||||
GLXDrawable drawable) {
|
||||
GL_SERVICE_LOG("glXSwapBuffers"
|
||||
<< "(" << static_cast<const void*>(dpy) << ", " << drawable
|
||||
<< ")");
|
||||
g_driver_glx.debug_fn.glXSwapBuffersFn(dpy, drawable);
|
||||
}
|
||||
|
||||
static void GL_BINDING_CALL
|
||||
Debug_glXSwapIntervalEXT(Display* dpy, GLXDrawable drawable, int interval) {
|
||||
static void GL_BINDING_CALL Debug_glXSwapIntervalEXT(Display* dpy,
|
||||
GLXDrawable drawable,
|
||||
int interval) {
|
||||
GL_SERVICE_LOG("glXSwapIntervalEXT"
|
||||
<< "(" << static_cast<const void*>(dpy) << ", " << drawable
|
||||
<< ", " << interval << ")");
|
||||
@ -688,8 +702,10 @@ static void GL_BINDING_CALL Debug_glXSwapIntervalMESA(unsigned int interval) {
|
||||
g_driver_glx.debug_fn.glXSwapIntervalMESAFn(interval);
|
||||
}
|
||||
|
||||
static void GL_BINDING_CALL
|
||||
Debug_glXUseXFont(Font font, int first, int count, int list) {
|
||||
static void GL_BINDING_CALL Debug_glXUseXFont(Font font,
|
||||
int first,
|
||||
int count,
|
||||
int list) {
|
||||
GL_SERVICE_LOG("glXUseXFont"
|
||||
<< "(" << font << ", " << first << ", " << count << ", "
|
||||
<< list << ")");
|
||||
@ -703,8 +719,9 @@ static void GL_BINDING_CALL Debug_glXWaitGL(void) {
|
||||
g_driver_glx.debug_fn.glXWaitGLFn();
|
||||
}
|
||||
|
||||
static int GL_BINDING_CALL
|
||||
Debug_glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int* count) {
|
||||
static int GL_BINDING_CALL Debug_glXWaitVideoSyncSGI(int divisor,
|
||||
int remainder,
|
||||
unsigned int* count) {
|
||||
GL_SERVICE_LOG("glXWaitVideoSyncSGI"
|
||||
<< "(" << divisor << ", " << remainder << ", "
|
||||
<< static_cast<const void*>(count) << ")");
|
||||
|
||||
@ -26,26 +26,26 @@ void GL_BINDING_CALL MockGLInterface::Mock_glActiveTexture(GLenum texture) {
|
||||
interface_->ActiveTexture(texture);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glAttachShader(GLuint program, GLuint shader) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glAttachShader(GLuint program,
|
||||
GLuint shader) {
|
||||
MakeFunctionUnique("glAttachShader");
|
||||
interface_->AttachShader(program, shader);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glBeginQuery(GLenum target, GLuint id) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glBeginQuery(GLenum target,
|
||||
GLuint id) {
|
||||
MakeFunctionUnique("glBeginQuery");
|
||||
interface_->BeginQuery(target, id);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glBeginQueryARB(GLenum target, GLuint id) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glBeginQueryARB(GLenum target,
|
||||
GLuint id) {
|
||||
MakeFunctionUnique("glBeginQueryARB");
|
||||
interface_->BeginQuery(target, id);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glBeginQueryEXT(GLenum target, GLuint id) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glBeginQueryEXT(GLenum target,
|
||||
GLuint id) {
|
||||
MakeFunctionUnique("glBeginQueryEXT");
|
||||
interface_->BeginQuery(target, id);
|
||||
}
|
||||
@ -64,8 +64,8 @@ MockGLInterface::Mock_glBindAttribLocation(GLuint program,
|
||||
interface_->BindAttribLocation(program, index, name);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glBindBuffer(GLenum target, GLuint buffer) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glBindBuffer(GLenum target,
|
||||
GLuint buffer) {
|
||||
MakeFunctionUnique("glBindBuffer");
|
||||
interface_->BindBuffer(target, buffer);
|
||||
}
|
||||
@ -128,14 +128,14 @@ MockGLInterface::Mock_glBindRenderbufferEXT(GLenum target,
|
||||
interface_->BindRenderbufferEXT(target, renderbuffer);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glBindSampler(GLuint unit, GLuint sampler) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glBindSampler(GLuint unit,
|
||||
GLuint sampler) {
|
||||
MakeFunctionUnique("glBindSampler");
|
||||
interface_->BindSampler(unit, sampler);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glBindTexture(GLenum target, GLuint texture) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glBindTexture(GLenum target,
|
||||
GLuint texture) {
|
||||
MakeFunctionUnique("glBindTexture");
|
||||
interface_->BindTexture(target, texture);
|
||||
}
|
||||
@ -192,8 +192,8 @@ MockGLInterface::Mock_glBlendEquationSeparate(GLenum modeRGB,
|
||||
interface_->BlendEquationSeparate(modeRGB, modeAlpha);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glBlendFunc(GLenum sfactor, GLenum dfactor) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glBlendFunc(GLenum sfactor,
|
||||
GLenum dfactor) {
|
||||
MakeFunctionUnique("glBlendFunc");
|
||||
interface_->BlendFunc(sfactor, dfactor);
|
||||
}
|
||||
@ -472,6 +472,36 @@ void GL_BINDING_CALL MockGLInterface::Mock_glCullFace(GLenum mode) {
|
||||
interface_->CullFace(mode);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glDebugMessageCallbackKHR(GLDEBUGPROCKHR callback,
|
||||
const void* userparam) {
|
||||
MakeFunctionUnique("glDebugMessageCallbackKHR");
|
||||
interface_->DebugMessageCallbackKHR(callback, userparam);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glDebugMessageControlKHR(GLenum source,
|
||||
GLenum type,
|
||||
GLenum severity,
|
||||
GLsizei count,
|
||||
const GLuint* ids,
|
||||
GLboolean enabled) {
|
||||
MakeFunctionUnique("glDebugMessageControlKHR");
|
||||
interface_->DebugMessageControlKHR(source, type, severity, count, ids,
|
||||
enabled);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glDebugMessageInsertKHR(GLenum source,
|
||||
GLenum type,
|
||||
GLuint id,
|
||||
GLenum severity,
|
||||
GLsizei length,
|
||||
const GLchar* buf) {
|
||||
MakeFunctionUnique("glDebugMessageInsertKHR");
|
||||
interface_->DebugMessageInsertKHR(source, type, id, severity, length, buf);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glDeleteBuffers(GLsizei n, const GLuint* buffers) {
|
||||
MakeFunctionUnique("glDeleteBuffers");
|
||||
@ -509,8 +539,8 @@ void GL_BINDING_CALL MockGLInterface::Mock_glDeleteProgram(GLuint program) {
|
||||
interface_->DeleteProgram(program);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glDeleteQueries(GLsizei n, const GLuint* ids) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glDeleteQueries(GLsizei n,
|
||||
const GLuint* ids) {
|
||||
MakeFunctionUnique("glDeleteQueries");
|
||||
interface_->DeleteQueries(n, ids);
|
||||
}
|
||||
@ -598,20 +628,20 @@ void GL_BINDING_CALL MockGLInterface::Mock_glDepthMask(GLboolean flag) {
|
||||
interface_->DepthMask(flag);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glDepthRange(GLclampd zNear, GLclampd zFar) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glDepthRange(GLclampd zNear,
|
||||
GLclampd zFar) {
|
||||
MakeFunctionUnique("glDepthRange");
|
||||
interface_->DepthRange(zNear, zFar);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glDepthRangef(GLclampf zNear, GLclampf zFar) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glDepthRangef(GLclampf zNear,
|
||||
GLclampf zFar) {
|
||||
MakeFunctionUnique("glDepthRangef");
|
||||
interface_->DepthRangef(zNear, zFar);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glDetachShader(GLuint program, GLuint shader) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glDetachShader(GLuint program,
|
||||
GLuint shader) {
|
||||
MakeFunctionUnique("glDetachShader");
|
||||
interface_->DetachShader(program, shader);
|
||||
}
|
||||
@ -635,8 +665,9 @@ MockGLInterface::Mock_glDiscardFramebufferEXT(GLenum target,
|
||||
interface_->DiscardFramebufferEXT(target, numAttachments, attachments);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glDrawArrays(GLenum mode, GLint first, GLsizei count) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glDrawArrays(GLenum mode,
|
||||
GLint first,
|
||||
GLsizei count) {
|
||||
MakeFunctionUnique("glDrawArrays");
|
||||
interface_->DrawArrays(mode, first, count);
|
||||
}
|
||||
@ -673,8 +704,8 @@ void GL_BINDING_CALL MockGLInterface::Mock_glDrawBuffer(GLenum mode) {
|
||||
interface_->DrawBuffer(mode);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glDrawBuffers(GLsizei n, const GLenum* bufs) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glDrawBuffers(GLsizei n,
|
||||
const GLenum* bufs) {
|
||||
MakeFunctionUnique("glDrawBuffers");
|
||||
interface_->DrawBuffersARB(n, bufs);
|
||||
}
|
||||
@ -786,8 +817,8 @@ void GL_BINDING_CALL MockGLInterface::Mock_glEndTransformFeedback(void) {
|
||||
interface_->EndTransformFeedback();
|
||||
}
|
||||
|
||||
GLsync GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glFenceSync(GLenum condition, GLbitfield flags) {
|
||||
GLsync GL_BINDING_CALL MockGLInterface::Mock_glFenceSync(GLenum condition,
|
||||
GLbitfield flags) {
|
||||
MakeFunctionUnique("glFenceSync");
|
||||
return interface_->FenceSync(condition, flags);
|
||||
}
|
||||
@ -902,20 +933,20 @@ void GL_BINDING_CALL MockGLInterface::Mock_glFrontFace(GLenum mode) {
|
||||
interface_->FrontFace(mode);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glGenBuffers(GLsizei n, GLuint* buffers) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glGenBuffers(GLsizei n,
|
||||
GLuint* buffers) {
|
||||
MakeFunctionUnique("glGenBuffers");
|
||||
interface_->GenBuffersARB(n, buffers);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glGenFencesAPPLE(GLsizei n, GLuint* fences) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glGenFencesAPPLE(GLsizei n,
|
||||
GLuint* fences) {
|
||||
MakeFunctionUnique("glGenFencesAPPLE");
|
||||
interface_->GenFencesAPPLE(n, fences);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glGenFencesNV(GLsizei n, GLuint* fences) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glGenFencesNV(GLsizei n,
|
||||
GLuint* fences) {
|
||||
MakeFunctionUnique("glGenFencesNV");
|
||||
interface_->GenFencesNV(n, fences);
|
||||
}
|
||||
@ -932,20 +963,20 @@ MockGLInterface::Mock_glGenFramebuffersEXT(GLsizei n, GLuint* framebuffers) {
|
||||
interface_->GenFramebuffersEXT(n, framebuffers);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glGenQueries(GLsizei n, GLuint* ids) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glGenQueries(GLsizei n,
|
||||
GLuint* ids) {
|
||||
MakeFunctionUnique("glGenQueries");
|
||||
interface_->GenQueries(n, ids);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glGenQueriesARB(GLsizei n, GLuint* ids) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glGenQueriesARB(GLsizei n,
|
||||
GLuint* ids) {
|
||||
MakeFunctionUnique("glGenQueriesARB");
|
||||
interface_->GenQueries(n, ids);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glGenQueriesEXT(GLsizei n, GLuint* ids) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glGenQueriesEXT(GLsizei n,
|
||||
GLuint* ids) {
|
||||
MakeFunctionUnique("glGenQueriesEXT");
|
||||
interface_->GenQueries(n, ids);
|
||||
}
|
||||
@ -962,14 +993,14 @@ MockGLInterface::Mock_glGenRenderbuffersEXT(GLsizei n, GLuint* renderbuffers) {
|
||||
interface_->GenRenderbuffersEXT(n, renderbuffers);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glGenSamplers(GLsizei n, GLuint* samplers) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glGenSamplers(GLsizei n,
|
||||
GLuint* samplers) {
|
||||
MakeFunctionUnique("glGenSamplers");
|
||||
interface_->GenSamplers(n, samplers);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glGenTextures(GLsizei n, GLuint* textures) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glGenTextures(GLsizei n,
|
||||
GLuint* textures) {
|
||||
MakeFunctionUnique("glGenTextures");
|
||||
interface_->GenTextures(n, textures);
|
||||
}
|
||||
@ -980,8 +1011,8 @@ MockGLInterface::Mock_glGenTransformFeedbacks(GLsizei n, GLuint* ids) {
|
||||
interface_->GenTransformFeedbacks(n, ids);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glGenVertexArrays(GLsizei n, GLuint* arrays) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glGenVertexArrays(GLsizei n,
|
||||
GLuint* arrays) {
|
||||
MakeFunctionUnique("glGenVertexArrays");
|
||||
interface_->GenVertexArraysOES(n, arrays);
|
||||
}
|
||||
@ -1079,8 +1110,8 @@ MockGLInterface::Mock_glGetAttribLocation(GLuint program, const char* name) {
|
||||
return interface_->GetAttribLocation(program, name);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glGetBooleanv(GLenum pname, GLboolean* params) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glGetBooleanv(GLenum pname,
|
||||
GLboolean* params) {
|
||||
MakeFunctionUnique("glGetBooleanv");
|
||||
interface_->GetBooleanv(pname, params);
|
||||
}
|
||||
@ -1093,6 +1124,20 @@ MockGLInterface::Mock_glGetBufferParameteriv(GLenum target,
|
||||
interface_->GetBufferParameteriv(target, pname, params);
|
||||
}
|
||||
|
||||
GLuint GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glGetDebugMessageLogKHR(GLuint count,
|
||||
GLsizei bufSize,
|
||||
GLenum* sources,
|
||||
GLenum* types,
|
||||
GLuint* ids,
|
||||
GLenum* severities,
|
||||
GLsizei* lengths,
|
||||
GLchar* messageLog) {
|
||||
MakeFunctionUnique("glGetDebugMessageLogKHR");
|
||||
return interface_->GetDebugMessageLogKHR(count, bufSize, sources, types, ids,
|
||||
severities, lengths, messageLog);
|
||||
}
|
||||
|
||||
GLenum GL_BINDING_CALL MockGLInterface::Mock_glGetError(void) {
|
||||
MakeFunctionUnique("glGetError");
|
||||
return interface_->GetError();
|
||||
@ -1105,8 +1150,8 @@ void GL_BINDING_CALL MockGLInterface::Mock_glGetFenceivNV(GLuint fence,
|
||||
interface_->GetFenceivNV(fence, pname, params);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glGetFloatv(GLenum pname, GLfloat* params) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glGetFloatv(GLenum pname,
|
||||
GLfloat* params) {
|
||||
MakeFunctionUnique("glGetFloatv");
|
||||
interface_->GetFloatv(pname, params);
|
||||
}
|
||||
@ -1165,8 +1210,8 @@ void GL_BINDING_CALL MockGLInterface::Mock_glGetInteger64i_v(GLenum target,
|
||||
interface_->GetInteger64i_v(target, index, data);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glGetInteger64v(GLenum pname, GLint64* params) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glGetInteger64v(GLenum pname,
|
||||
GLint64* params) {
|
||||
MakeFunctionUnique("glGetInteger64v");
|
||||
interface_->GetInteger64v(pname, params);
|
||||
}
|
||||
@ -1178,8 +1223,8 @@ void GL_BINDING_CALL MockGLInterface::Mock_glGetIntegeri_v(GLenum target,
|
||||
interface_->GetIntegeri_v(target, index, data);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glGetIntegerv(GLenum pname, GLint* params) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glGetIntegerv(GLenum pname,
|
||||
GLint* params) {
|
||||
MakeFunctionUnique("glGetIntegerv");
|
||||
interface_->GetIntegerv(pname, params);
|
||||
}
|
||||
@ -1317,8 +1362,9 @@ MockGLInterface::Mock_glGetQueryObjectuivEXT(GLuint id,
|
||||
interface_->GetQueryObjectuiv(id, pname, params);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glGetQueryiv(GLenum target, GLenum pname, GLint* params) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glGetQueryiv(GLenum target,
|
||||
GLenum pname,
|
||||
GLint* params) {
|
||||
MakeFunctionUnique("glGetQueryiv");
|
||||
interface_->GetQueryiv(target, pname, params);
|
||||
}
|
||||
@ -1687,14 +1733,14 @@ void GL_BINDING_CALL MockGLInterface::Mock_glLinkProgram(GLuint program) {
|
||||
interface_->LinkProgram(program);
|
||||
}
|
||||
|
||||
void* GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glMapBuffer(GLenum target, GLenum access) {
|
||||
void* GL_BINDING_CALL MockGLInterface::Mock_glMapBuffer(GLenum target,
|
||||
GLenum access) {
|
||||
MakeFunctionUnique("glMapBuffer");
|
||||
return interface_->MapBuffer(target, access);
|
||||
}
|
||||
|
||||
void* GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glMapBufferOES(GLenum target, GLenum access) {
|
||||
void* GL_BINDING_CALL MockGLInterface::Mock_glMapBufferOES(GLenum target,
|
||||
GLenum access) {
|
||||
MakeFunctionUnique("glMapBufferOES");
|
||||
return interface_->MapBuffer(target, access);
|
||||
}
|
||||
@ -1723,35 +1769,49 @@ MockGLInterface::Mock_glMatrixLoadIdentityEXT(GLenum matrixMode) {
|
||||
interface_->MatrixLoadIdentityEXT(matrixMode);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glMatrixLoadfEXT(GLenum matrixMode, const GLfloat* m) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glMatrixLoadfEXT(GLenum matrixMode,
|
||||
const GLfloat* m) {
|
||||
MakeFunctionUnique("glMatrixLoadfEXT");
|
||||
interface_->MatrixLoadfEXT(matrixMode, m);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glObjectLabelKHR(GLenum identifier,
|
||||
GLuint name,
|
||||
GLsizei length,
|
||||
const GLchar* label) {
|
||||
MakeFunctionUnique("glObjectLabelKHR");
|
||||
interface_->ObjectLabelKHR(identifier, name, length, label);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glPauseTransformFeedback(void) {
|
||||
MakeFunctionUnique("glPauseTransformFeedback");
|
||||
interface_->PauseTransformFeedback();
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glPixelStorei(GLenum pname, GLint param) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glPixelStorei(GLenum pname,
|
||||
GLint param) {
|
||||
MakeFunctionUnique("glPixelStorei");
|
||||
interface_->PixelStorei(pname, param);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glPointParameteri(GLenum pname, GLint param) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glPointParameteri(GLenum pname,
|
||||
GLint param) {
|
||||
MakeFunctionUnique("glPointParameteri");
|
||||
interface_->PointParameteri(pname, param);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glPolygonOffset(GLfloat factor, GLfloat units) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glPolygonOffset(GLfloat factor,
|
||||
GLfloat units) {
|
||||
MakeFunctionUnique("glPolygonOffset");
|
||||
interface_->PolygonOffset(factor, units);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glPopDebugGroupKHR(void) {
|
||||
MakeFunctionUnique("glPopDebugGroupKHR");
|
||||
interface_->PopDebugGroupKHR();
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glPopGroupMarkerEXT(void) {
|
||||
MakeFunctionUnique("glPopGroupMarkerEXT");
|
||||
interface_->PopGroupMarkerEXT();
|
||||
@ -1781,20 +1841,29 @@ void GL_BINDING_CALL MockGLInterface::Mock_glProgramParameteri(GLuint program,
|
||||
interface_->ProgramParameteri(program, pname, value);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glPushDebugGroupKHR(GLenum source,
|
||||
GLuint id,
|
||||
GLsizei length,
|
||||
const GLchar* message) {
|
||||
MakeFunctionUnique("glPushDebugGroupKHR");
|
||||
interface_->PushDebugGroupKHR(source, id, length, message);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glPushGroupMarkerEXT(GLsizei length, const char* marker) {
|
||||
MakeFunctionUnique("glPushGroupMarkerEXT");
|
||||
interface_->PushGroupMarkerEXT(length, marker);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glQueryCounter(GLuint id, GLenum target) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glQueryCounter(GLuint id,
|
||||
GLenum target) {
|
||||
MakeFunctionUnique("glQueryCounter");
|
||||
interface_->QueryCounter(id, target);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glQueryCounterEXT(GLuint id, GLenum target) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glQueryCounterEXT(GLuint id,
|
||||
GLenum target) {
|
||||
MakeFunctionUnique("glQueryCounterEXT");
|
||||
interface_->QueryCounter(id, target);
|
||||
}
|
||||
@ -1906,8 +1975,8 @@ void GL_BINDING_CALL MockGLInterface::Mock_glResumeTransformFeedback(void) {
|
||||
interface_->ResumeTransformFeedback();
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glSampleCoverage(GLclampf value, GLboolean invert) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glSampleCoverage(GLclampf value,
|
||||
GLboolean invert) {
|
||||
MakeFunctionUnique("glSampleCoverage");
|
||||
interface_->SampleCoverage(value, invert);
|
||||
}
|
||||
@ -1955,8 +2024,8 @@ void GL_BINDING_CALL MockGLInterface::Mock_glSetFenceAPPLE(GLuint fence) {
|
||||
interface_->SetFenceAPPLE(fence);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glSetFenceNV(GLuint fence, GLenum condition) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glSetFenceNV(GLuint fence,
|
||||
GLenum condition) {
|
||||
MakeFunctionUnique("glSetFenceNV");
|
||||
interface_->SetFenceNV(fence, condition);
|
||||
}
|
||||
@ -1979,8 +2048,9 @@ MockGLInterface::Mock_glShaderSource(GLuint shader,
|
||||
interface_->ShaderSource(shader, count, str, length);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glStencilFunc(GLenum func, GLint ref, GLuint mask) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glStencilFunc(GLenum func,
|
||||
GLint ref,
|
||||
GLuint mask) {
|
||||
MakeFunctionUnique("glStencilFunc");
|
||||
interface_->StencilFunc(func, ref, mask);
|
||||
}
|
||||
@ -1998,14 +2068,15 @@ void GL_BINDING_CALL MockGLInterface::Mock_glStencilMask(GLuint mask) {
|
||||
interface_->StencilMask(mask);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glStencilMaskSeparate(GLenum face, GLuint mask) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glStencilMaskSeparate(GLenum face,
|
||||
GLuint mask) {
|
||||
MakeFunctionUnique("glStencilMaskSeparate");
|
||||
interface_->StencilMaskSeparate(face, mask);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glStencilOp(GLenum fail,
|
||||
GLenum zfail,
|
||||
GLenum zpass) {
|
||||
MakeFunctionUnique("glStencilOp");
|
||||
interface_->StencilOp(fail, zfail, zpass);
|
||||
}
|
||||
@ -2140,8 +2211,8 @@ MockGLInterface::Mock_glTransformFeedbackVaryings(GLuint program,
|
||||
interface_->TransformFeedbackVaryings(program, count, varyings, bufferMode);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glUniform1f(GLint location, GLfloat x) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glUniform1f(GLint location,
|
||||
GLfloat x) {
|
||||
MakeFunctionUnique("glUniform1f");
|
||||
interface_->Uniform1f(location, x);
|
||||
}
|
||||
@ -2153,8 +2224,8 @@ void GL_BINDING_CALL MockGLInterface::Mock_glUniform1fv(GLint location,
|
||||
interface_->Uniform1fv(location, count, v);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glUniform1i(GLint location, GLint x) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glUniform1i(GLint location,
|
||||
GLint x) {
|
||||
MakeFunctionUnique("glUniform1i");
|
||||
interface_->Uniform1i(location, x);
|
||||
}
|
||||
@ -2166,8 +2237,8 @@ void GL_BINDING_CALL MockGLInterface::Mock_glUniform1iv(GLint location,
|
||||
interface_->Uniform1iv(location, count, v);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glUniform1ui(GLint location, GLuint v0) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glUniform1ui(GLint location,
|
||||
GLuint v0) {
|
||||
MakeFunctionUnique("glUniform1ui");
|
||||
interface_->Uniform1ui(location, v0);
|
||||
}
|
||||
@ -2179,8 +2250,9 @@ void GL_BINDING_CALL MockGLInterface::Mock_glUniform1uiv(GLint location,
|
||||
interface_->Uniform1uiv(location, count, v);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glUniform2f(GLint location, GLfloat x, GLfloat y) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glUniform2f(GLint location,
|
||||
GLfloat x,
|
||||
GLfloat y) {
|
||||
MakeFunctionUnique("glUniform2f");
|
||||
interface_->Uniform2f(location, x, y);
|
||||
}
|
||||
@ -2192,8 +2264,9 @@ void GL_BINDING_CALL MockGLInterface::Mock_glUniform2fv(GLint location,
|
||||
interface_->Uniform2fv(location, count, v);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glUniform2i(GLint location, GLint x, GLint y) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glUniform2i(GLint location,
|
||||
GLint x,
|
||||
GLint y) {
|
||||
MakeFunctionUnique("glUniform2i");
|
||||
interface_->Uniform2i(location, x, y);
|
||||
}
|
||||
@ -2205,8 +2278,9 @@ void GL_BINDING_CALL MockGLInterface::Mock_glUniform2iv(GLint location,
|
||||
interface_->Uniform2iv(location, count, v);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glUniform2ui(GLint location, GLuint v0, GLuint v1) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glUniform2ui(GLint location,
|
||||
GLuint v0,
|
||||
GLuint v1) {
|
||||
MakeFunctionUnique("glUniform2ui");
|
||||
interface_->Uniform2ui(location, v0, v1);
|
||||
}
|
||||
@ -2233,8 +2307,10 @@ void GL_BINDING_CALL MockGLInterface::Mock_glUniform3fv(GLint location,
|
||||
interface_->Uniform3fv(location, count, v);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glUniform3i(GLint location, GLint x, GLint y, GLint z) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glUniform3i(GLint location,
|
||||
GLint x,
|
||||
GLint y,
|
||||
GLint z) {
|
||||
MakeFunctionUnique("glUniform3i");
|
||||
interface_->Uniform3i(location, x, y, z);
|
||||
}
|
||||
@ -2420,8 +2496,8 @@ void GL_BINDING_CALL MockGLInterface::Mock_glValidateProgram(GLuint program) {
|
||||
interface_->ValidateProgram(program);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glVertexAttrib1f(GLuint indx, GLfloat x) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glVertexAttrib1f(GLuint indx,
|
||||
GLfloat x) {
|
||||
MakeFunctionUnique("glVertexAttrib1f");
|
||||
interface_->VertexAttrib1f(indx, x);
|
||||
}
|
||||
@ -2432,8 +2508,9 @@ MockGLInterface::Mock_glVertexAttrib1fv(GLuint indx, const GLfloat* values) {
|
||||
interface_->VertexAttrib1fv(indx, values);
|
||||
}
|
||||
|
||||
void GL_BINDING_CALL
|
||||
MockGLInterface::Mock_glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) {
|
||||
void GL_BINDING_CALL MockGLInterface::Mock_glVertexAttrib2f(GLuint indx,
|
||||
GLfloat x,
|
||||
GLfloat y) {
|
||||
MakeFunctionUnique("glVertexAttrib2f");
|
||||
interface_->VertexAttrib2f(indx, x, y);
|
||||
}
|
||||
@ -2678,6 +2755,12 @@ void* GL_BINDING_CALL MockGLInterface::GetGLProcAddress(const char* name) {
|
||||
return reinterpret_cast<void*>(Mock_glCreateShader);
|
||||
if (strcmp(name, "glCullFace") == 0)
|
||||
return reinterpret_cast<void*>(Mock_glCullFace);
|
||||
if (strcmp(name, "glDebugMessageCallbackKHR") == 0)
|
||||
return reinterpret_cast<void*>(Mock_glDebugMessageCallbackKHR);
|
||||
if (strcmp(name, "glDebugMessageControlKHR") == 0)
|
||||
return reinterpret_cast<void*>(Mock_glDebugMessageControlKHR);
|
||||
if (strcmp(name, "glDebugMessageInsertKHR") == 0)
|
||||
return reinterpret_cast<void*>(Mock_glDebugMessageInsertKHR);
|
||||
if (strcmp(name, "glDeleteBuffers") == 0)
|
||||
return reinterpret_cast<void*>(Mock_glDeleteBuffers);
|
||||
if (strcmp(name, "glDeleteFencesAPPLE") == 0)
|
||||
@ -2856,6 +2939,8 @@ void* GL_BINDING_CALL MockGLInterface::GetGLProcAddress(const char* name) {
|
||||
return reinterpret_cast<void*>(Mock_glGetBooleanv);
|
||||
if (strcmp(name, "glGetBufferParameteriv") == 0)
|
||||
return reinterpret_cast<void*>(Mock_glGetBufferParameteriv);
|
||||
if (strcmp(name, "glGetDebugMessageLogKHR") == 0)
|
||||
return reinterpret_cast<void*>(Mock_glGetDebugMessageLogKHR);
|
||||
if (strcmp(name, "glGetError") == 0)
|
||||
return reinterpret_cast<void*>(Mock_glGetError);
|
||||
if (strcmp(name, "glGetFenceivNV") == 0)
|
||||
@ -3037,6 +3122,8 @@ void* GL_BINDING_CALL MockGLInterface::GetGLProcAddress(const char* name) {
|
||||
return reinterpret_cast<void*>(Mock_glMatrixLoadIdentityEXT);
|
||||
if (strcmp(name, "glMatrixLoadfEXT") == 0)
|
||||
return reinterpret_cast<void*>(Mock_glMatrixLoadfEXT);
|
||||
if (strcmp(name, "glObjectLabelKHR") == 0)
|
||||
return reinterpret_cast<void*>(Mock_glObjectLabelKHR);
|
||||
if (strcmp(name, "glPauseTransformFeedback") == 0)
|
||||
return reinterpret_cast<void*>(Mock_glPauseTransformFeedback);
|
||||
if (strcmp(name, "glPixelStorei") == 0)
|
||||
@ -3045,6 +3132,8 @@ void* GL_BINDING_CALL MockGLInterface::GetGLProcAddress(const char* name) {
|
||||
return reinterpret_cast<void*>(Mock_glPointParameteri);
|
||||
if (strcmp(name, "glPolygonOffset") == 0)
|
||||
return reinterpret_cast<void*>(Mock_glPolygonOffset);
|
||||
if (strcmp(name, "glPopDebugGroupKHR") == 0)
|
||||
return reinterpret_cast<void*>(Mock_glPopDebugGroupKHR);
|
||||
if (strcmp(name, "glPopGroupMarkerEXT") == 0)
|
||||
return reinterpret_cast<void*>(Mock_glPopGroupMarkerEXT);
|
||||
if (strcmp(name, "glProgramBinary") == 0)
|
||||
@ -3053,6 +3142,8 @@ void* GL_BINDING_CALL MockGLInterface::GetGLProcAddress(const char* name) {
|
||||
return reinterpret_cast<void*>(Mock_glProgramBinaryOES);
|
||||
if (strcmp(name, "glProgramParameteri") == 0)
|
||||
return reinterpret_cast<void*>(Mock_glProgramParameteri);
|
||||
if (strcmp(name, "glPushDebugGroupKHR") == 0)
|
||||
return reinterpret_cast<void*>(Mock_glPushDebugGroupKHR);
|
||||
if (strcmp(name, "glPushGroupMarkerEXT") == 0)
|
||||
return reinterpret_cast<void*>(Mock_glPushGroupMarkerEXT);
|
||||
if (strcmp(name, "glQueryCounter") == 0)
|
||||
|
||||
@ -14,11 +14,13 @@ static void GL_BINDING_CALL Mock_glBeginQuery(GLenum target, GLuint id);
|
||||
static void GL_BINDING_CALL Mock_glBeginQueryARB(GLenum target, GLuint id);
|
||||
static void GL_BINDING_CALL Mock_glBeginQueryEXT(GLenum target, GLuint id);
|
||||
static void GL_BINDING_CALL Mock_glBeginTransformFeedback(GLenum primitiveMode);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glBindAttribLocation(GLuint program, GLuint index, const char* name);
|
||||
static void GL_BINDING_CALL Mock_glBindAttribLocation(GLuint program,
|
||||
GLuint index,
|
||||
const char* name);
|
||||
static void GL_BINDING_CALL Mock_glBindBuffer(GLenum target, GLuint buffer);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glBindBufferBase(GLenum target, GLuint index, GLuint buffer);
|
||||
static void GL_BINDING_CALL Mock_glBindBufferBase(GLenum target,
|
||||
GLuint index,
|
||||
GLuint buffer);
|
||||
static void GL_BINDING_CALL Mock_glBindBufferRange(GLenum target,
|
||||
GLuint index,
|
||||
GLuint buffer,
|
||||
@ -32,28 +34,30 @@ Mock_glBindFragDataLocationIndexed(GLuint program,
|
||||
GLuint colorNumber,
|
||||
GLuint index,
|
||||
const char* name);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glBindFramebuffer(GLenum target, GLuint framebuffer);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glBindFramebufferEXT(GLenum target, GLuint framebuffer);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glBindRenderbuffer(GLenum target, GLuint renderbuffer);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer);
|
||||
static void GL_BINDING_CALL Mock_glBindFramebuffer(GLenum target,
|
||||
GLuint framebuffer);
|
||||
static void GL_BINDING_CALL Mock_glBindFramebufferEXT(GLenum target,
|
||||
GLuint framebuffer);
|
||||
static void GL_BINDING_CALL Mock_glBindRenderbuffer(GLenum target,
|
||||
GLuint renderbuffer);
|
||||
static void GL_BINDING_CALL Mock_glBindRenderbufferEXT(GLenum target,
|
||||
GLuint renderbuffer);
|
||||
static void GL_BINDING_CALL Mock_glBindSampler(GLuint unit, GLuint sampler);
|
||||
static void GL_BINDING_CALL Mock_glBindTexture(GLenum target, GLuint texture);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glBindTransformFeedback(GLenum target, GLuint id);
|
||||
static void GL_BINDING_CALL Mock_glBindTransformFeedback(GLenum target,
|
||||
GLuint id);
|
||||
static void GL_BINDING_CALL Mock_glBindVertexArray(GLuint array);
|
||||
static void GL_BINDING_CALL Mock_glBindVertexArrayAPPLE(GLuint array);
|
||||
static void GL_BINDING_CALL Mock_glBindVertexArrayOES(GLuint array);
|
||||
static void GL_BINDING_CALL Mock_glBlendBarrierKHR(void);
|
||||
static void GL_BINDING_CALL Mock_glBlendBarrierNV(void);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
static void GL_BINDING_CALL Mock_glBlendColor(GLclampf red,
|
||||
GLclampf green,
|
||||
GLclampf blue,
|
||||
GLclampf alpha);
|
||||
static void GL_BINDING_CALL Mock_glBlendEquation(GLenum mode);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
|
||||
static void GL_BINDING_CALL Mock_glBlendEquationSeparate(GLenum modeRGB,
|
||||
GLenum modeAlpha);
|
||||
static void GL_BINDING_CALL Mock_glBlendFunc(GLenum sfactor, GLenum dfactor);
|
||||
static void GL_BINDING_CALL Mock_glBlendFuncSeparate(GLenum srcRGB,
|
||||
GLenum dstRGB,
|
||||
@ -104,19 +108,25 @@ static void GL_BINDING_CALL Mock_glClearBufferfi(GLenum buffer,
|
||||
GLint drawbuffer,
|
||||
const GLfloat depth,
|
||||
GLint stencil);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat* value);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint* value);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint* value);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
static void GL_BINDING_CALL Mock_glClearBufferfv(GLenum buffer,
|
||||
GLint drawbuffer,
|
||||
const GLfloat* value);
|
||||
static void GL_BINDING_CALL Mock_glClearBufferiv(GLenum buffer,
|
||||
GLint drawbuffer,
|
||||
const GLint* value);
|
||||
static void GL_BINDING_CALL Mock_glClearBufferuiv(GLenum buffer,
|
||||
GLint drawbuffer,
|
||||
const GLuint* value);
|
||||
static void GL_BINDING_CALL Mock_glClearColor(GLclampf red,
|
||||
GLclampf green,
|
||||
GLclampf blue,
|
||||
GLclampf alpha);
|
||||
static void GL_BINDING_CALL Mock_glClearDepth(GLclampd depth);
|
||||
static void GL_BINDING_CALL Mock_glClearDepthf(GLclampf depth);
|
||||
static void GL_BINDING_CALL Mock_glClearStencil(GLint s);
|
||||
static GLenum GL_BINDING_CALL
|
||||
Mock_glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
|
||||
static GLenum GL_BINDING_CALL Mock_glClientWaitSync(GLsync sync,
|
||||
GLbitfield flags,
|
||||
GLuint64 timeout);
|
||||
static void GL_BINDING_CALL Mock_glColorMask(GLboolean red,
|
||||
GLboolean green,
|
||||
GLboolean blue,
|
||||
@ -182,39 +192,53 @@ static GLuint GL_BINDING_CALL Mock_glCreateProgram(void);
|
||||
static GLuint GL_BINDING_CALL Mock_glCreateShader(GLenum type);
|
||||
static void GL_BINDING_CALL Mock_glCullFace(GLenum mode);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glDeleteBuffers(GLsizei n, const GLuint* buffers);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glDeleteFencesAPPLE(GLsizei n, const GLuint* fences);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glDeleteFencesNV(GLsizei n, const GLuint* fences);
|
||||
Mock_glDebugMessageCallbackKHR(GLDEBUGPROCKHR callback, const void* userparam);
|
||||
static void GL_BINDING_CALL Mock_glDebugMessageControlKHR(GLenum source,
|
||||
GLenum type,
|
||||
GLenum severity,
|
||||
GLsizei count,
|
||||
const GLuint* ids,
|
||||
GLboolean enabled);
|
||||
static void GL_BINDING_CALL Mock_glDebugMessageInsertKHR(GLenum source,
|
||||
GLenum type,
|
||||
GLuint id,
|
||||
GLenum severity,
|
||||
GLsizei length,
|
||||
const GLchar* buf);
|
||||
static void GL_BINDING_CALL Mock_glDeleteBuffers(GLsizei n,
|
||||
const GLuint* buffers);
|
||||
static void GL_BINDING_CALL Mock_glDeleteFencesAPPLE(GLsizei n,
|
||||
const GLuint* fences);
|
||||
static void GL_BINDING_CALL Mock_glDeleteFencesNV(GLsizei n,
|
||||
const GLuint* fences);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glDeleteFramebuffersEXT(GLsizei n, const GLuint* framebuffers);
|
||||
static void GL_BINDING_CALL Mock_glDeleteProgram(GLuint program);
|
||||
static void GL_BINDING_CALL Mock_glDeleteQueries(GLsizei n, const GLuint* ids);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glDeleteQueriesARB(GLsizei n, const GLuint* ids);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glDeleteQueriesEXT(GLsizei n, const GLuint* ids);
|
||||
static void GL_BINDING_CALL Mock_glDeleteQueriesARB(GLsizei n,
|
||||
const GLuint* ids);
|
||||
static void GL_BINDING_CALL Mock_glDeleteQueriesEXT(GLsizei n,
|
||||
const GLuint* ids);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glDeleteRenderbuffersEXT(GLsizei n, const GLuint* renderbuffers);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glDeleteSamplers(GLsizei n, const GLuint* samplers);
|
||||
static void GL_BINDING_CALL Mock_glDeleteSamplers(GLsizei n,
|
||||
const GLuint* samplers);
|
||||
static void GL_BINDING_CALL Mock_glDeleteShader(GLuint shader);
|
||||
static void GL_BINDING_CALL Mock_glDeleteSync(GLsync sync);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glDeleteTextures(GLsizei n, const GLuint* textures);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glDeleteTransformFeedbacks(GLsizei n, const GLuint* ids);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glDeleteVertexArrays(GLsizei n, const GLuint* arrays);
|
||||
static void GL_BINDING_CALL Mock_glDeleteTextures(GLsizei n,
|
||||
const GLuint* textures);
|
||||
static void GL_BINDING_CALL Mock_glDeleteTransformFeedbacks(GLsizei n,
|
||||
const GLuint* ids);
|
||||
static void GL_BINDING_CALL Mock_glDeleteVertexArrays(GLsizei n,
|
||||
const GLuint* arrays);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glDeleteVertexArraysAPPLE(GLsizei n, const GLuint* arrays);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glDeleteVertexArraysOES(GLsizei n, const GLuint* arrays);
|
||||
static void GL_BINDING_CALL Mock_glDeleteVertexArraysOES(GLsizei n,
|
||||
const GLuint* arrays);
|
||||
static void GL_BINDING_CALL Mock_glDepthFunc(GLenum func);
|
||||
static void GL_BINDING_CALL Mock_glDepthMask(GLboolean flag);
|
||||
static void GL_BINDING_CALL Mock_glDepthRange(GLclampd zNear, GLclampd zFar);
|
||||
@ -226,8 +250,9 @@ static void GL_BINDING_CALL
|
||||
Mock_glDiscardFramebufferEXT(GLenum target,
|
||||
GLsizei numAttachments,
|
||||
const GLenum* attachments);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glDrawArrays(GLenum mode, GLint first, GLsizei count);
|
||||
static void GL_BINDING_CALL Mock_glDrawArrays(GLenum mode,
|
||||
GLint first,
|
||||
GLsizei count);
|
||||
static void GL_BINDING_CALL Mock_glDrawArraysInstanced(GLenum mode,
|
||||
GLint first,
|
||||
GLsizei count,
|
||||
@ -242,10 +267,10 @@ static void GL_BINDING_CALL Mock_glDrawArraysInstancedARB(GLenum mode,
|
||||
GLsizei primcount);
|
||||
static void GL_BINDING_CALL Mock_glDrawBuffer(GLenum mode);
|
||||
static void GL_BINDING_CALL Mock_glDrawBuffers(GLsizei n, const GLenum* bufs);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glDrawBuffersARB(GLsizei n, const GLenum* bufs);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glDrawBuffersEXT(GLsizei n, const GLenum* bufs);
|
||||
static void GL_BINDING_CALL Mock_glDrawBuffersARB(GLsizei n,
|
||||
const GLenum* bufs);
|
||||
static void GL_BINDING_CALL Mock_glDrawBuffersEXT(GLsizei n,
|
||||
const GLenum* bufs);
|
||||
static void GL_BINDING_CALL Mock_glDrawElements(GLenum mode,
|
||||
GLsizei count,
|
||||
GLenum type,
|
||||
@ -282,8 +307,8 @@ static void GL_BINDING_CALL Mock_glEndQuery(GLenum target);
|
||||
static void GL_BINDING_CALL Mock_glEndQueryARB(GLenum target);
|
||||
static void GL_BINDING_CALL Mock_glEndQueryEXT(GLenum target);
|
||||
static void GL_BINDING_CALL Mock_glEndTransformFeedback(void);
|
||||
static GLsync GL_BINDING_CALL
|
||||
Mock_glFenceSync(GLenum condition, GLbitfield flags);
|
||||
static GLsync GL_BINDING_CALL Mock_glFenceSync(GLenum condition,
|
||||
GLbitfield flags);
|
||||
static void GL_BINDING_CALL Mock_glFinish(void);
|
||||
static void GL_BINDING_CALL Mock_glFinishFenceAPPLE(GLuint fence);
|
||||
static void GL_BINDING_CALL Mock_glFinishFenceNV(GLuint fence);
|
||||
@ -334,26 +359,26 @@ static void GL_BINDING_CALL Mock_glFrontFace(GLenum mode);
|
||||
static void GL_BINDING_CALL Mock_glGenBuffers(GLsizei n, GLuint* buffers);
|
||||
static void GL_BINDING_CALL Mock_glGenFencesAPPLE(GLsizei n, GLuint* fences);
|
||||
static void GL_BINDING_CALL Mock_glGenFencesNV(GLsizei n, GLuint* fences);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGenFramebuffers(GLsizei n, GLuint* framebuffers);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGenFramebuffersEXT(GLsizei n, GLuint* framebuffers);
|
||||
static void GL_BINDING_CALL Mock_glGenFramebuffers(GLsizei n,
|
||||
GLuint* framebuffers);
|
||||
static void GL_BINDING_CALL Mock_glGenFramebuffersEXT(GLsizei n,
|
||||
GLuint* framebuffers);
|
||||
static void GL_BINDING_CALL Mock_glGenQueries(GLsizei n, GLuint* ids);
|
||||
static void GL_BINDING_CALL Mock_glGenQueriesARB(GLsizei n, GLuint* ids);
|
||||
static void GL_BINDING_CALL Mock_glGenQueriesEXT(GLsizei n, GLuint* ids);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGenRenderbuffers(GLsizei n, GLuint* renderbuffers);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGenRenderbuffersEXT(GLsizei n, GLuint* renderbuffers);
|
||||
static void GL_BINDING_CALL Mock_glGenRenderbuffers(GLsizei n,
|
||||
GLuint* renderbuffers);
|
||||
static void GL_BINDING_CALL Mock_glGenRenderbuffersEXT(GLsizei n,
|
||||
GLuint* renderbuffers);
|
||||
static void GL_BINDING_CALL Mock_glGenSamplers(GLsizei n, GLuint* samplers);
|
||||
static void GL_BINDING_CALL Mock_glGenTextures(GLsizei n, GLuint* textures);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGenTransformFeedbacks(GLsizei n, GLuint* ids);
|
||||
static void GL_BINDING_CALL Mock_glGenTransformFeedbacks(GLsizei n,
|
||||
GLuint* ids);
|
||||
static void GL_BINDING_CALL Mock_glGenVertexArrays(GLsizei n, GLuint* arrays);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGenVertexArraysAPPLE(GLsizei n, GLuint* arrays);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGenVertexArraysOES(GLsizei n, GLuint* arrays);
|
||||
static void GL_BINDING_CALL Mock_glGenVertexArraysAPPLE(GLsizei n,
|
||||
GLuint* arrays);
|
||||
static void GL_BINDING_CALL Mock_glGenVertexArraysOES(GLsizei n,
|
||||
GLuint* arrays);
|
||||
static void GL_BINDING_CALL Mock_glGenerateMipmap(GLenum target);
|
||||
static void GL_BINDING_CALL Mock_glGenerateMipmapEXT(GLenum target);
|
||||
static void GL_BINDING_CALL Mock_glGetActiveAttrib(GLuint program,
|
||||
@ -391,17 +416,27 @@ static void GL_BINDING_CALL Mock_glGetAttachedShaders(GLuint program,
|
||||
GLsizei maxcount,
|
||||
GLsizei* count,
|
||||
GLuint* shaders);
|
||||
static GLint GL_BINDING_CALL
|
||||
Mock_glGetAttribLocation(GLuint program, const char* name);
|
||||
static GLint GL_BINDING_CALL Mock_glGetAttribLocation(GLuint program,
|
||||
const char* name);
|
||||
static void GL_BINDING_CALL Mock_glGetBooleanv(GLenum pname, GLboolean* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params);
|
||||
static void GL_BINDING_CALL Mock_glGetBufferParameteriv(GLenum target,
|
||||
GLenum pname,
|
||||
GLint* params);
|
||||
static GLuint GL_BINDING_CALL Mock_glGetDebugMessageLogKHR(GLuint count,
|
||||
GLsizei bufSize,
|
||||
GLenum* sources,
|
||||
GLenum* types,
|
||||
GLuint* ids,
|
||||
GLenum* severities,
|
||||
GLsizei* lengths,
|
||||
GLchar* messageLog);
|
||||
static GLenum GL_BINDING_CALL Mock_glGetError(void);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetFenceivNV(GLuint fence, GLenum pname, GLint* params);
|
||||
static void GL_BINDING_CALL Mock_glGetFenceivNV(GLuint fence,
|
||||
GLenum pname,
|
||||
GLint* params);
|
||||
static void GL_BINDING_CALL Mock_glGetFloatv(GLenum pname, GLfloat* params);
|
||||
static GLint GL_BINDING_CALL
|
||||
Mock_glGetFragDataLocation(GLuint program, const char* name);
|
||||
static GLint GL_BINDING_CALL Mock_glGetFragDataLocation(GLuint program,
|
||||
const char* name);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetFramebufferAttachmentParameteriv(GLenum target,
|
||||
GLenum attachment,
|
||||
@ -416,11 +451,13 @@ static GLenum GL_BINDING_CALL Mock_glGetGraphicsResetStatus(void);
|
||||
static GLenum GL_BINDING_CALL Mock_glGetGraphicsResetStatusARB(void);
|
||||
static GLenum GL_BINDING_CALL Mock_glGetGraphicsResetStatusEXT(void);
|
||||
static GLenum GL_BINDING_CALL Mock_glGetGraphicsResetStatusKHR(void);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetInteger64i_v(GLenum target, GLuint index, GLint64* data);
|
||||
static void GL_BINDING_CALL Mock_glGetInteger64i_v(GLenum target,
|
||||
GLuint index,
|
||||
GLint64* data);
|
||||
static void GL_BINDING_CALL Mock_glGetInteger64v(GLenum pname, GLint64* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetIntegeri_v(GLenum target, GLuint index, GLint* data);
|
||||
static void GL_BINDING_CALL Mock_glGetIntegeri_v(GLenum target,
|
||||
GLuint index,
|
||||
GLint* data);
|
||||
static void GL_BINDING_CALL Mock_glGetIntegerv(GLenum pname, GLint* params);
|
||||
static void GL_BINDING_CALL Mock_glGetInternalformativ(GLenum target,
|
||||
GLenum internalformat,
|
||||
@ -445,43 +482,60 @@ static GLint GL_BINDING_CALL
|
||||
Mock_glGetProgramResourceLocation(GLuint program,
|
||||
GLenum programInterface,
|
||||
const char* name);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetProgramiv(GLuint program, GLenum pname, GLint* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetQueryObjecti64v(GLuint id, GLenum pname, GLint64* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetQueryObjectiv(GLuint id, GLenum pname, GLint* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetQueryObjectivARB(GLuint id, GLenum pname, GLint* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetQueryObjectivEXT(GLuint id, GLenum pname, GLint* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetQueryObjectuivARB(GLuint id, GLenum pname, GLuint* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetQueryiv(GLenum target, GLenum pname, GLint* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetQueryivARB(GLenum target, GLenum pname, GLint* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetQueryivEXT(GLenum target, GLenum pname, GLint* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params);
|
||||
static void GL_BINDING_CALL Mock_glGetProgramiv(GLuint program,
|
||||
GLenum pname,
|
||||
GLint* params);
|
||||
static void GL_BINDING_CALL Mock_glGetQueryObjecti64v(GLuint id,
|
||||
GLenum pname,
|
||||
GLint64* params);
|
||||
static void GL_BINDING_CALL Mock_glGetQueryObjecti64vEXT(GLuint id,
|
||||
GLenum pname,
|
||||
GLint64* params);
|
||||
static void GL_BINDING_CALL Mock_glGetQueryObjectiv(GLuint id,
|
||||
GLenum pname,
|
||||
GLint* params);
|
||||
static void GL_BINDING_CALL Mock_glGetQueryObjectivARB(GLuint id,
|
||||
GLenum pname,
|
||||
GLint* params);
|
||||
static void GL_BINDING_CALL Mock_glGetQueryObjectivEXT(GLuint id,
|
||||
GLenum pname,
|
||||
GLint* params);
|
||||
static void GL_BINDING_CALL Mock_glGetQueryObjectui64v(GLuint id,
|
||||
GLenum pname,
|
||||
GLuint64* params);
|
||||
static void GL_BINDING_CALL Mock_glGetQueryObjectui64vEXT(GLuint id,
|
||||
GLenum pname,
|
||||
GLuint64* params);
|
||||
static void GL_BINDING_CALL Mock_glGetQueryObjectuiv(GLuint id,
|
||||
GLenum pname,
|
||||
GLuint* params);
|
||||
static void GL_BINDING_CALL Mock_glGetQueryObjectuivARB(GLuint id,
|
||||
GLenum pname,
|
||||
GLuint* params);
|
||||
static void GL_BINDING_CALL Mock_glGetQueryObjectuivEXT(GLuint id,
|
||||
GLenum pname,
|
||||
GLuint* params);
|
||||
static void GL_BINDING_CALL Mock_glGetQueryiv(GLenum target,
|
||||
GLenum pname,
|
||||
GLint* params);
|
||||
static void GL_BINDING_CALL Mock_glGetQueryivARB(GLenum target,
|
||||
GLenum pname,
|
||||
GLint* params);
|
||||
static void GL_BINDING_CALL Mock_glGetQueryivEXT(GLenum target,
|
||||
GLenum pname,
|
||||
GLint* params);
|
||||
static void GL_BINDING_CALL Mock_glGetRenderbufferParameteriv(GLenum target,
|
||||
GLenum pname,
|
||||
GLint* params);
|
||||
static void GL_BINDING_CALL Mock_glGetRenderbufferParameterivEXT(GLenum target,
|
||||
GLenum pname,
|
||||
GLint* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params);
|
||||
static void GL_BINDING_CALL Mock_glGetSamplerParameterfv(GLuint sampler,
|
||||
GLenum pname,
|
||||
GLfloat* params);
|
||||
static void GL_BINDING_CALL Mock_glGetSamplerParameteriv(GLuint sampler,
|
||||
GLenum pname,
|
||||
GLint* params);
|
||||
static void GL_BINDING_CALL Mock_glGetShaderInfoLog(GLuint shader,
|
||||
GLsizei bufsize,
|
||||
GLsizei* length,
|
||||
@ -495,11 +549,12 @@ static void GL_BINDING_CALL Mock_glGetShaderSource(GLuint shader,
|
||||
GLsizei bufsize,
|
||||
GLsizei* length,
|
||||
char* source);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetShaderiv(GLuint shader, GLenum pname, GLint* params);
|
||||
static void GL_BINDING_CALL Mock_glGetShaderiv(GLuint shader,
|
||||
GLenum pname,
|
||||
GLint* params);
|
||||
static const GLubyte* GL_BINDING_CALL Mock_glGetString(GLenum name);
|
||||
static const GLubyte* GL_BINDING_CALL
|
||||
Mock_glGetStringi(GLenum name, GLuint index);
|
||||
static const GLubyte* GL_BINDING_CALL Mock_glGetStringi(GLenum name,
|
||||
GLuint index);
|
||||
static void GL_BINDING_CALL Mock_glGetSynciv(GLsync sync,
|
||||
GLenum pname,
|
||||
GLsizei bufSize,
|
||||
@ -513,10 +568,12 @@ static void GL_BINDING_CALL Mock_glGetTexLevelParameteriv(GLenum target,
|
||||
GLint level,
|
||||
GLenum pname,
|
||||
GLint* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetTexParameteriv(GLenum target, GLenum pname, GLint* params);
|
||||
static void GL_BINDING_CALL Mock_glGetTexParameterfv(GLenum target,
|
||||
GLenum pname,
|
||||
GLfloat* params);
|
||||
static void GL_BINDING_CALL Mock_glGetTexParameteriv(GLenum target,
|
||||
GLenum pname,
|
||||
GLint* params);
|
||||
static void GL_BINDING_CALL Mock_glGetTransformFeedbackVarying(GLuint program,
|
||||
GLuint index,
|
||||
GLsizei bufSize,
|
||||
@ -536,21 +593,26 @@ Mock_glGetUniformIndices(GLuint program,
|
||||
GLsizei uniformCount,
|
||||
const char* const* uniformNames,
|
||||
GLuint* uniformIndices);
|
||||
static GLint GL_BINDING_CALL
|
||||
Mock_glGetUniformLocation(GLuint program, const char* name);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetUniformfv(GLuint program, GLint location, GLfloat* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetUniformiv(GLuint program, GLint location, GLint* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params);
|
||||
static GLint GL_BINDING_CALL Mock_glGetUniformLocation(GLuint program,
|
||||
const char* name);
|
||||
static void GL_BINDING_CALL Mock_glGetUniformfv(GLuint program,
|
||||
GLint location,
|
||||
GLfloat* params);
|
||||
static void GL_BINDING_CALL Mock_glGetUniformiv(GLuint program,
|
||||
GLint location,
|
||||
GLint* params);
|
||||
static void GL_BINDING_CALL Mock_glGetVertexAttribPointerv(GLuint index,
|
||||
GLenum pname,
|
||||
void** pointer);
|
||||
static void GL_BINDING_CALL Mock_glGetVertexAttribfv(GLuint index,
|
||||
GLenum pname,
|
||||
GLfloat* params);
|
||||
static void GL_BINDING_CALL Mock_glGetVertexAttribiv(GLuint index,
|
||||
GLenum pname,
|
||||
GLint* params);
|
||||
static void GL_BINDING_CALL Mock_glHint(GLenum target, GLenum mode);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glInsertEventMarkerEXT(GLsizei length, const char* marker);
|
||||
static void GL_BINDING_CALL Mock_glInsertEventMarkerEXT(GLsizei length,
|
||||
const char* marker);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glInvalidateFramebuffer(GLenum target,
|
||||
GLsizei numAttachments,
|
||||
@ -596,12 +658,17 @@ static void* GL_BINDING_CALL Mock_glMapBufferRangeEXT(GLenum target,
|
||||
GLsizeiptr length,
|
||||
GLbitfield access);
|
||||
static void GL_BINDING_CALL Mock_glMatrixLoadIdentityEXT(GLenum matrixMode);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glMatrixLoadfEXT(GLenum matrixMode, const GLfloat* m);
|
||||
static void GL_BINDING_CALL Mock_glMatrixLoadfEXT(GLenum matrixMode,
|
||||
const GLfloat* m);
|
||||
static void GL_BINDING_CALL Mock_glObjectLabelKHR(GLenum identifier,
|
||||
GLuint name,
|
||||
GLsizei length,
|
||||
const GLchar* label);
|
||||
static void GL_BINDING_CALL Mock_glPauseTransformFeedback(void);
|
||||
static void GL_BINDING_CALL Mock_glPixelStorei(GLenum pname, GLint param);
|
||||
static void GL_BINDING_CALL Mock_glPointParameteri(GLenum pname, GLint param);
|
||||
static void GL_BINDING_CALL Mock_glPolygonOffset(GLfloat factor, GLfloat units);
|
||||
static void GL_BINDING_CALL Mock_glPopDebugGroupKHR(void);
|
||||
static void GL_BINDING_CALL Mock_glPopGroupMarkerEXT(void);
|
||||
static void GL_BINDING_CALL Mock_glProgramBinary(GLuint program,
|
||||
GLenum binaryFormat,
|
||||
@ -611,10 +678,15 @@ static void GL_BINDING_CALL Mock_glProgramBinaryOES(GLuint program,
|
||||
GLenum binaryFormat,
|
||||
const GLvoid* binary,
|
||||
GLsizei length);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glProgramParameteri(GLuint program, GLenum pname, GLint value);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glPushGroupMarkerEXT(GLsizei length, const char* marker);
|
||||
static void GL_BINDING_CALL Mock_glProgramParameteri(GLuint program,
|
||||
GLenum pname,
|
||||
GLint value);
|
||||
static void GL_BINDING_CALL Mock_glPushDebugGroupKHR(GLenum source,
|
||||
GLuint id,
|
||||
GLsizei length,
|
||||
const GLchar* message);
|
||||
static void GL_BINDING_CALL Mock_glPushGroupMarkerEXT(GLsizei length,
|
||||
const char* marker);
|
||||
static void GL_BINDING_CALL Mock_glQueryCounter(GLuint id, GLenum target);
|
||||
static void GL_BINDING_CALL Mock_glQueryCounterEXT(GLuint id, GLenum target);
|
||||
static void GL_BINDING_CALL Mock_glReadBuffer(GLenum src);
|
||||
@ -666,18 +738,24 @@ Mock_glRenderbufferStorageMultisampleIMG(GLenum target,
|
||||
GLsizei height);
|
||||
static void GL_BINDING_CALL Mock_glResolveMultisampleFramebufferAPPLE(void);
|
||||
static void GL_BINDING_CALL Mock_glResumeTransformFeedback(void);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glSampleCoverage(GLclampf value, GLboolean invert);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glSamplerParameteri(GLuint sampler, GLenum pname, GLint param);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glScissor(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
static void GL_BINDING_CALL Mock_glSampleCoverage(GLclampf value,
|
||||
GLboolean invert);
|
||||
static void GL_BINDING_CALL Mock_glSamplerParameterf(GLuint sampler,
|
||||
GLenum pname,
|
||||
GLfloat param);
|
||||
static void GL_BINDING_CALL Mock_glSamplerParameterfv(GLuint sampler,
|
||||
GLenum pname,
|
||||
const GLfloat* params);
|
||||
static void GL_BINDING_CALL Mock_glSamplerParameteri(GLuint sampler,
|
||||
GLenum pname,
|
||||
GLint param);
|
||||
static void GL_BINDING_CALL Mock_glSamplerParameteriv(GLuint sampler,
|
||||
GLenum pname,
|
||||
const GLint* params);
|
||||
static void GL_BINDING_CALL Mock_glScissor(GLint x,
|
||||
GLint y,
|
||||
GLsizei width,
|
||||
GLsizei height);
|
||||
static void GL_BINDING_CALL Mock_glSetFenceAPPLE(GLuint fence);
|
||||
static void GL_BINDING_CALL Mock_glSetFenceNV(GLuint fence, GLenum condition);
|
||||
static void GL_BINDING_CALL Mock_glShaderBinary(GLsizei n,
|
||||
@ -689,17 +767,23 @@ static void GL_BINDING_CALL Mock_glShaderSource(GLuint shader,
|
||||
GLsizei count,
|
||||
const char* const* str,
|
||||
const GLint* length);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glStencilFunc(GLenum func, GLint ref, GLuint mask);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
|
||||
static void GL_BINDING_CALL Mock_glStencilFunc(GLenum func,
|
||||
GLint ref,
|
||||
GLuint mask);
|
||||
static void GL_BINDING_CALL Mock_glStencilFuncSeparate(GLenum face,
|
||||
GLenum func,
|
||||
GLint ref,
|
||||
GLuint mask);
|
||||
static void GL_BINDING_CALL Mock_glStencilMask(GLuint mask);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glStencilMaskSeparate(GLenum face, GLuint mask);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
|
||||
static void GL_BINDING_CALL Mock_glStencilMaskSeparate(GLenum face,
|
||||
GLuint mask);
|
||||
static void GL_BINDING_CALL Mock_glStencilOp(GLenum fail,
|
||||
GLenum zfail,
|
||||
GLenum zpass);
|
||||
static void GL_BINDING_CALL Mock_glStencilOpSeparate(GLenum face,
|
||||
GLenum fail,
|
||||
GLenum zfail,
|
||||
GLenum zpass);
|
||||
static GLboolean GL_BINDING_CALL Mock_glTestFenceAPPLE(GLuint fence);
|
||||
static GLboolean GL_BINDING_CALL Mock_glTestFenceNV(GLuint fence);
|
||||
static void GL_BINDING_CALL Mock_glTexImage2D(GLenum target,
|
||||
@ -721,14 +805,18 @@ static void GL_BINDING_CALL Mock_glTexImage3D(GLenum target,
|
||||
GLenum format,
|
||||
GLenum type,
|
||||
const void* pixels);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glTexParameterf(GLenum target, GLenum pname, GLfloat param);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glTexParameteri(GLenum target, GLenum pname, GLint param);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glTexParameteriv(GLenum target, GLenum pname, const GLint* params);
|
||||
static void GL_BINDING_CALL Mock_glTexParameterf(GLenum target,
|
||||
GLenum pname,
|
||||
GLfloat param);
|
||||
static void GL_BINDING_CALL Mock_glTexParameterfv(GLenum target,
|
||||
GLenum pname,
|
||||
const GLfloat* params);
|
||||
static void GL_BINDING_CALL Mock_glTexParameteri(GLenum target,
|
||||
GLenum pname,
|
||||
GLint param);
|
||||
static void GL_BINDING_CALL Mock_glTexParameteriv(GLenum target,
|
||||
GLenum pname,
|
||||
const GLint* params);
|
||||
static void GL_BINDING_CALL Mock_glTexStorage2D(GLenum target,
|
||||
GLsizei levels,
|
||||
GLenum internalformat,
|
||||
@ -760,49 +848,69 @@ Mock_glTransformFeedbackVaryings(GLuint program,
|
||||
const char* const* varyings,
|
||||
GLenum bufferMode);
|
||||
static void GL_BINDING_CALL Mock_glUniform1f(GLint location, GLfloat x);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glUniform1fv(GLint location, GLsizei count, const GLfloat* v);
|
||||
static void GL_BINDING_CALL Mock_glUniform1fv(GLint location,
|
||||
GLsizei count,
|
||||
const GLfloat* v);
|
||||
static void GL_BINDING_CALL Mock_glUniform1i(GLint location, GLint x);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glUniform1iv(GLint location, GLsizei count, const GLint* v);
|
||||
static void GL_BINDING_CALL Mock_glUniform1iv(GLint location,
|
||||
GLsizei count,
|
||||
const GLint* v);
|
||||
static void GL_BINDING_CALL Mock_glUniform1ui(GLint location, GLuint v0);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glUniform1uiv(GLint location, GLsizei count, const GLuint* v);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glUniform2f(GLint location, GLfloat x, GLfloat y);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glUniform2fv(GLint location, GLsizei count, const GLfloat* v);
|
||||
static void GL_BINDING_CALL Mock_glUniform1uiv(GLint location,
|
||||
GLsizei count,
|
||||
const GLuint* v);
|
||||
static void GL_BINDING_CALL Mock_glUniform2f(GLint location,
|
||||
GLfloat x,
|
||||
GLfloat y);
|
||||
static void GL_BINDING_CALL Mock_glUniform2fv(GLint location,
|
||||
GLsizei count,
|
||||
const GLfloat* v);
|
||||
static void GL_BINDING_CALL Mock_glUniform2i(GLint location, GLint x, GLint y);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glUniform2iv(GLint location, GLsizei count, const GLint* v);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glUniform2ui(GLint location, GLuint v0, GLuint v1);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glUniform2uiv(GLint location, GLsizei count, const GLuint* v);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glUniform3fv(GLint location, GLsizei count, const GLfloat* v);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glUniform3i(GLint location, GLint x, GLint y, GLint z);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glUniform3iv(GLint location, GLsizei count, const GLint* v);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glUniform3uiv(GLint location, GLsizei count, const GLuint* v);
|
||||
static void GL_BINDING_CALL Mock_glUniform2iv(GLint location,
|
||||
GLsizei count,
|
||||
const GLint* v);
|
||||
static void GL_BINDING_CALL Mock_glUniform2ui(GLint location,
|
||||
GLuint v0,
|
||||
GLuint v1);
|
||||
static void GL_BINDING_CALL Mock_glUniform2uiv(GLint location,
|
||||
GLsizei count,
|
||||
const GLuint* v);
|
||||
static void GL_BINDING_CALL Mock_glUniform3f(GLint location,
|
||||
GLfloat x,
|
||||
GLfloat y,
|
||||
GLfloat z);
|
||||
static void GL_BINDING_CALL Mock_glUniform3fv(GLint location,
|
||||
GLsizei count,
|
||||
const GLfloat* v);
|
||||
static void GL_BINDING_CALL Mock_glUniform3i(GLint location,
|
||||
GLint x,
|
||||
GLint y,
|
||||
GLint z);
|
||||
static void GL_BINDING_CALL Mock_glUniform3iv(GLint location,
|
||||
GLsizei count,
|
||||
const GLint* v);
|
||||
static void GL_BINDING_CALL Mock_glUniform3ui(GLint location,
|
||||
GLuint v0,
|
||||
GLuint v1,
|
||||
GLuint v2);
|
||||
static void GL_BINDING_CALL Mock_glUniform3uiv(GLint location,
|
||||
GLsizei count,
|
||||
const GLuint* v);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glUniform4fv(GLint location, GLsizei count, const GLfloat* v);
|
||||
static void GL_BINDING_CALL Mock_glUniform4fv(GLint location,
|
||||
GLsizei count,
|
||||
const GLfloat* v);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glUniform4iv(GLint location, GLsizei count, const GLint* v);
|
||||
static void GL_BINDING_CALL Mock_glUniform4iv(GLint location,
|
||||
GLsizei count,
|
||||
const GLint* v);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glUniform4uiv(GLint location, GLsizei count, const GLuint* v);
|
||||
static void GL_BINDING_CALL Mock_glUniform4uiv(GLint location,
|
||||
GLsizei count,
|
||||
const GLuint* v);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glUniformBlockBinding(GLuint program,
|
||||
GLuint uniformBlockIndex,
|
||||
@ -848,34 +956,37 @@ static GLboolean GL_BINDING_CALL Mock_glUnmapBufferOES(GLenum target);
|
||||
static void GL_BINDING_CALL Mock_glUseProgram(GLuint program);
|
||||
static void GL_BINDING_CALL Mock_glValidateProgram(GLuint program);
|
||||
static void GL_BINDING_CALL Mock_glVertexAttrib1f(GLuint indx, GLfloat x);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glVertexAttrib1fv(GLuint indx, const GLfloat* values);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glVertexAttrib2fv(GLuint indx, const GLfloat* values);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glVertexAttrib3fv(GLuint indx, const GLfloat* values);
|
||||
static void GL_BINDING_CALL Mock_glVertexAttrib1fv(GLuint indx,
|
||||
const GLfloat* values);
|
||||
static void GL_BINDING_CALL Mock_glVertexAttrib2f(GLuint indx,
|
||||
GLfloat x,
|
||||
GLfloat y);
|
||||
static void GL_BINDING_CALL Mock_glVertexAttrib2fv(GLuint indx,
|
||||
const GLfloat* values);
|
||||
static void GL_BINDING_CALL Mock_glVertexAttrib3f(GLuint indx,
|
||||
GLfloat x,
|
||||
GLfloat y,
|
||||
GLfloat z);
|
||||
static void GL_BINDING_CALL Mock_glVertexAttrib3fv(GLuint indx,
|
||||
const GLfloat* values);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glVertexAttrib4fv(GLuint indx, const GLfloat* values);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glVertexAttribDivisor(GLuint index, GLuint divisor);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glVertexAttribDivisorANGLE(GLuint index, GLuint divisor);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glVertexAttribDivisorARB(GLuint index, GLuint divisor);
|
||||
static void GL_BINDING_CALL Mock_glVertexAttrib4fv(GLuint indx,
|
||||
const GLfloat* values);
|
||||
static void GL_BINDING_CALL Mock_glVertexAttribDivisor(GLuint index,
|
||||
GLuint divisor);
|
||||
static void GL_BINDING_CALL Mock_glVertexAttribDivisorANGLE(GLuint index,
|
||||
GLuint divisor);
|
||||
static void GL_BINDING_CALL Mock_glVertexAttribDivisorARB(GLuint index,
|
||||
GLuint divisor);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glVertexAttribI4i(GLuint indx, GLint x, GLint y, GLint z, GLint w);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glVertexAttribI4iv(GLuint indx, const GLint* values);
|
||||
static void GL_BINDING_CALL Mock_glVertexAttribI4iv(GLuint indx,
|
||||
const GLint* values);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glVertexAttribI4ui(GLuint indx, GLuint x, GLuint y, GLuint z, GLuint w);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glVertexAttribI4uiv(GLuint indx, const GLuint* values);
|
||||
static void GL_BINDING_CALL Mock_glVertexAttribI4uiv(GLuint indx,
|
||||
const GLuint* values);
|
||||
static void GL_BINDING_CALL Mock_glVertexAttribIPointer(GLuint indx,
|
||||
GLint size,
|
||||
GLenum type,
|
||||
@ -887,7 +998,10 @@ static void GL_BINDING_CALL Mock_glVertexAttribPointer(GLuint indx,
|
||||
GLboolean normalized,
|
||||
GLsizei stride,
|
||||
const void* ptr);
|
||||
static void GL_BINDING_CALL
|
||||
Mock_glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
static GLenum GL_BINDING_CALL
|
||||
Mock_glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
|
||||
static void GL_BINDING_CALL Mock_glViewport(GLint x,
|
||||
GLint y,
|
||||
GLsizei width,
|
||||
GLsizei height);
|
||||
static GLenum GL_BINDING_CALL Mock_glWaitSync(GLsync sync,
|
||||
GLbitfield flags,
|
||||
GLuint64 timeout);
|
||||
|
||||
@ -64,6 +64,10 @@ GLvoid StubGLBindVertexArray(GLuint array) {
|
||||
glBindVertexArrayOES(array);
|
||||
}
|
||||
|
||||
GLvoid StubGLBlendBarrier(void) {
|
||||
glBlendBarrierKHR();
|
||||
}
|
||||
|
||||
GLvoid StubGLBlendColor(GLclampf red, GLclampf green, GLclampf blue,
|
||||
GLclampf alpha) {
|
||||
glBlendColor(red, green, blue, alpha);
|
||||
@ -657,6 +661,44 @@ GLint StubGLGetProgramResourceLocation(GLuint program,
|
||||
return glGetProgramResourceLocation(program, programInterface, name);
|
||||
}
|
||||
|
||||
GLvoid StubGLDebugMessageControl(GLenum source, GLenum type, GLenum severity,
|
||||
GLsizei count, const GLuint *ids,
|
||||
GLboolean enabled) {
|
||||
glDebugMessageControlKHR(source, type, severity, count, ids, enabled);
|
||||
}
|
||||
|
||||
GLvoid StubGLDebugMessageInsert(GLenum source, GLenum type, GLuint id,
|
||||
GLenum severity, GLsizei length,
|
||||
const GLchar *buf) {
|
||||
glDebugMessageInsertKHR(source, type, id, severity, length, buf);
|
||||
}
|
||||
|
||||
GLvoid StubGLDebugMessageCallback(GLDEBUGPROCKHR callback,
|
||||
const void *userParam) {
|
||||
glDebugMessageCallbackKHR(callback, userParam);
|
||||
}
|
||||
|
||||
GLuint StubGLGetDebugMessageLog(GLuint count, GLsizei bufSize, GLenum *sources,
|
||||
GLenum *types, GLuint *ids, GLenum *severities,
|
||||
GLsizei *lengths, GLchar *messageLog) {
|
||||
return glGetDebugMessageLogKHR(count, bufSize, sources, types, ids,
|
||||
severities, lengths, messageLog);
|
||||
}
|
||||
|
||||
GLvoid StubGLPushDebugGroup(GLenum source, GLuint id, GLsizei length,
|
||||
const GLchar *message) {
|
||||
glPushDebugGroupKHR(source, id, length, message);
|
||||
}
|
||||
|
||||
GLvoid StubGLPopDebugGroup(void) {
|
||||
glPopDebugGroupKHR();
|
||||
}
|
||||
|
||||
GLvoid StubGLObjectLabel(GLenum identifier, GLuint name, GLsizei length,
|
||||
const GLchar *label) {
|
||||
glObjectLabelKHR(identifier, name, length, label);
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
} // namespace
|
||||
|
||||
@ -706,6 +748,7 @@ GrGLInterface* CreateInProcessSkiaGLBinding() {
|
||||
functions->fBindFragDataLocation = StubGLBindFragDataLocation;
|
||||
functions->fBindTexture = StubGLBindTexture;
|
||||
functions->fBindVertexArray = StubGLBindVertexArray;
|
||||
functions->fBlendBarrier = StubGLBlendBarrier;
|
||||
functions->fBlendColor = StubGLBlendColor;
|
||||
functions->fBlendEquation = StubGLBlendEquation;
|
||||
functions->fBlendFunc = StubGLBlendFunc;
|
||||
@ -847,6 +890,14 @@ GrGLInterface* CreateInProcessSkiaGLBinding() {
|
||||
functions->fBindFragDataLocationIndexed =
|
||||
StubGLBindFragDataLocationIndexed;
|
||||
functions->fGetProgramResourceLocation = StubGLGetProgramResourceLocation;
|
||||
functions->fDebugMessageControl = StubGLDebugMessageControl;
|
||||
functions->fDebugMessageInsert = StubGLDebugMessageInsert;
|
||||
functions->fDebugMessageCallback =
|
||||
reinterpret_cast<GrGLDebugMessageCallbackProc>(StubGLDebugMessageCallback);
|
||||
functions->fGetDebugMessageLog = StubGLGetDebugMessageLog;
|
||||
functions->fPushDebugGroup = StubGLPushDebugGroup;
|
||||
functions->fPopDebugGroup = StubGLPopDebugGroup;
|
||||
functions->fObjectLabel = StubGLObjectLabel;
|
||||
|
||||
return interface;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -169,6 +169,22 @@ MOCK_METHOD9(CopyTexSubImage3D,
|
||||
MOCK_METHOD0(CreateProgram, GLuint());
|
||||
MOCK_METHOD1(CreateShader, GLuint(GLenum type));
|
||||
MOCK_METHOD1(CullFace, void(GLenum mode));
|
||||
MOCK_METHOD2(DebugMessageCallbackKHR,
|
||||
void(GLDEBUGPROCKHR callback, const void* userparam));
|
||||
MOCK_METHOD6(DebugMessageControlKHR,
|
||||
void(GLenum source,
|
||||
GLenum type,
|
||||
GLenum severity,
|
||||
GLsizei count,
|
||||
const GLuint* ids,
|
||||
GLboolean enabled));
|
||||
MOCK_METHOD6(DebugMessageInsertKHR,
|
||||
void(GLenum source,
|
||||
GLenum type,
|
||||
GLuint id,
|
||||
GLenum severity,
|
||||
GLsizei length,
|
||||
const GLchar* buf));
|
||||
MOCK_METHOD2(DeleteBuffersARB, void(GLsizei n, const GLuint* buffers));
|
||||
MOCK_METHOD2(DeleteFencesAPPLE, void(GLsizei n, const GLuint* fences));
|
||||
MOCK_METHOD2(DeleteFencesNV, void(GLsizei n, const GLuint* fences));
|
||||
@ -314,6 +330,15 @@ MOCK_METHOD2(GetAttribLocation, GLint(GLuint program, const char* name));
|
||||
MOCK_METHOD2(GetBooleanv, void(GLenum pname, GLboolean* params));
|
||||
MOCK_METHOD3(GetBufferParameteriv,
|
||||
void(GLenum target, GLenum pname, GLint* params));
|
||||
MOCK_METHOD8(GetDebugMessageLogKHR,
|
||||
GLuint(GLuint count,
|
||||
GLsizei bufSize,
|
||||
GLenum* sources,
|
||||
GLenum* types,
|
||||
GLuint* ids,
|
||||
GLenum* severities,
|
||||
GLsizei* lengths,
|
||||
GLchar* messageLog));
|
||||
MOCK_METHOD0(GetError, GLenum());
|
||||
MOCK_METHOD3(GetFenceivNV, void(GLuint fence, GLenum pname, GLint* params));
|
||||
MOCK_METHOD2(GetFloatv, void(GLenum pname, GLfloat* params));
|
||||
@ -451,10 +476,14 @@ MOCK_METHOD4(MapBufferRange,
|
||||
GLbitfield access));
|
||||
MOCK_METHOD2(MatrixLoadfEXT, void(GLenum matrixMode, const GLfloat* m));
|
||||
MOCK_METHOD1(MatrixLoadIdentityEXT, void(GLenum matrixMode));
|
||||
MOCK_METHOD4(
|
||||
ObjectLabelKHR,
|
||||
void(GLenum identifier, GLuint name, GLsizei length, const GLchar* label));
|
||||
MOCK_METHOD0(PauseTransformFeedback, void());
|
||||
MOCK_METHOD2(PixelStorei, void(GLenum pname, GLint param));
|
||||
MOCK_METHOD2(PointParameteri, void(GLenum pname, GLint param));
|
||||
MOCK_METHOD2(PolygonOffset, void(GLfloat factor, GLfloat units));
|
||||
MOCK_METHOD0(PopDebugGroupKHR, void());
|
||||
MOCK_METHOD0(PopGroupMarkerEXT, void());
|
||||
MOCK_METHOD4(ProgramBinary,
|
||||
void(GLuint program,
|
||||
@ -463,6 +492,9 @@ MOCK_METHOD4(ProgramBinary,
|
||||
GLsizei length));
|
||||
MOCK_METHOD3(ProgramParameteri,
|
||||
void(GLuint program, GLenum pname, GLint value));
|
||||
MOCK_METHOD4(
|
||||
PushDebugGroupKHR,
|
||||
void(GLenum source, GLuint id, GLsizei length, const GLchar* message));
|
||||
MOCK_METHOD2(PushGroupMarkerEXT, void(GLsizei length, const char* marker));
|
||||
MOCK_METHOD2(QueryCounter, void(GLuint id, GLenum target));
|
||||
MOCK_METHOD1(ReadBuffer, void(GLenum src));
|
||||
|
||||
@ -1,160 +1,73 @@
|
||||
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||||
// Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "ui/gl/gl_surface.h"
|
||||
#include "ui/gl/gl_surface_mac.h"
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
#include "ui/gl/gl_bindings.h"
|
||||
#include "base/mac/scoped_nsautorelease_pool.h"
|
||||
#include "ui/gl/gl_context.h"
|
||||
#include "ui/gl/gl_implementation.h"
|
||||
#include "ui/gl/gl_surface_stub.h"
|
||||
#include "ui/gl/gpu_switching_manager.h"
|
||||
|
||||
#include <OpenGL/CGLRenderers.h>
|
||||
#include <OpenGL/CGLTypes.h>
|
||||
|
||||
extern "C" {
|
||||
// The header <OpenGL/OpenGL.h> may not be directly imported since it includes
|
||||
// gltypes.h which conflict with the types already included
|
||||
extern CGLError CGLChoosePixelFormat(const CGLPixelFormatAttribute *attribs,
|
||||
CGLPixelFormatObj *pix, GLint *npix);
|
||||
extern void CGLReleasePixelFormat(CGLPixelFormatObj pix);
|
||||
}
|
||||
#include "ui/gl/gl_enums.h"
|
||||
#include "base/logging.h"
|
||||
|
||||
namespace gfx {
|
||||
namespace {
|
||||
|
||||
// A "no-op" surface. It is not required that a CGLContextObj have an
|
||||
// associated drawable (pbuffer or fullscreen context) in order to be
|
||||
// made current. Everywhere this surface type is used, we allocate an
|
||||
// FBO at the user level as the drawable of the associated context.
|
||||
class GL_EXPORT NoOpGLSurface : public GLSurface {
|
||||
public:
|
||||
explicit NoOpGLSurface(const gfx::Size& size,
|
||||
const gfx::SurfaceConfiguration conf)
|
||||
: GLSurface(conf),
|
||||
size_(size) {}
|
||||
|
||||
// Implement GLSurface.
|
||||
bool Initialize() override { return true; }
|
||||
void Destroy() override {}
|
||||
bool IsOffscreen() override { return true; }
|
||||
bool SwapBuffers() override {
|
||||
NOTREACHED() << "Cannot call SwapBuffers on a NoOpGLSurface.";
|
||||
return false;
|
||||
}
|
||||
gfx::Size GetSize() override { return size_; }
|
||||
void* GetHandle() override { return NULL; }
|
||||
void* GetDisplay() override { return NULL; }
|
||||
bool IsSurfaceless() const override { return true; }
|
||||
|
||||
protected:
|
||||
~NoOpGLSurface() override {}
|
||||
|
||||
private:
|
||||
gfx::Size size_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(NoOpGLSurface);
|
||||
};
|
||||
|
||||
// static
|
||||
bool InitializeOneOffForSandbox() {
|
||||
static bool initialized = false;
|
||||
if (initialized)
|
||||
return true;
|
||||
|
||||
// This is called from the sandbox warmup code on Mac OS X.
|
||||
// GPU-related stuff is very slow without this, probably because
|
||||
// the sandbox prevents loading graphics drivers or some such.
|
||||
std::vector<CGLPixelFormatAttribute> attribs;
|
||||
if (ui::GpuSwitchingManager::GetInstance()->SupportsDualGpus()) {
|
||||
// Avoid switching to the discrete GPU just for this pixel
|
||||
// format selection.
|
||||
attribs.push_back(kCGLPFAAllowOfflineRenderers);
|
||||
}
|
||||
if (GetGLImplementation() == kGLImplementationAppleGL) {
|
||||
attribs.push_back(kCGLPFARendererID);
|
||||
attribs.push_back(static_cast<CGLPixelFormatAttribute>(
|
||||
kCGLRendererGenericFloatID));
|
||||
}
|
||||
attribs.push_back(static_cast<CGLPixelFormatAttribute>(0));
|
||||
|
||||
CGLPixelFormatObj format;
|
||||
GLint num_pixel_formats;
|
||||
if (CGLChoosePixelFormat(&attribs.front(),
|
||||
&format,
|
||||
&num_pixel_formats) != kCGLNoError) {
|
||||
LOG(ERROR) << "Error choosing pixel format.";
|
||||
return false;
|
||||
}
|
||||
if (!format) {
|
||||
LOG(ERROR) << "format == 0.";
|
||||
return false;
|
||||
}
|
||||
CGLReleasePixelFormat(format);
|
||||
DCHECK_NE(num_pixel_formats, 0);
|
||||
initialized = true;
|
||||
return true;
|
||||
GLSurfaceMac::GLSurfaceMac(gfx::AcceleratedWidget widget,
|
||||
const gfx::SurfaceConfiguration requested_configuration)
|
||||
: GLSurface(requested_configuration),
|
||||
widget_(widget) {
|
||||
}
|
||||
|
||||
} // namespace
|
||||
GLSurfaceMac::~GLSurfaceMac() {
|
||||
Destroy();
|
||||
}
|
||||
|
||||
bool GLSurfaceMac::OnMakeCurrent(GLContext* context) {
|
||||
DCHECK(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GLSurfaceMac::SwapBuffers() {
|
||||
DCHECK(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
void GLSurfaceMac::Destroy() {
|
||||
DCHECK(false);
|
||||
}
|
||||
|
||||
bool GLSurfaceMac::IsOffscreen() {
|
||||
DCHECK(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
gfx::Size GLSurfaceMac::GetSize() {
|
||||
DCHECK(false);
|
||||
return Size(0.0, 0.0);
|
||||
}
|
||||
|
||||
void* GLSurfaceMac::GetHandle() {
|
||||
return (void*)widget_;
|
||||
}
|
||||
|
||||
bool GLSurface::InitializeOneOffInternal() {
|
||||
switch (GetGLImplementation()) {
|
||||
case kGLImplementationDesktopGL:
|
||||
case kGLImplementationAppleGL:
|
||||
if (!InitializeOneOffForSandbox()) {
|
||||
LOG(ERROR) << "GLSurfaceCGL::InitializeOneOff failed.";
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// On EGL, this method is used to perfom one-time initialization tasks like
|
||||
// initializing the display, setting up config lists, etc. There is no such
|
||||
// setup on Mac.
|
||||
return true;
|
||||
}
|
||||
|
||||
// static
|
||||
scoped_refptr<GLSurface> GLSurface::CreateViewGLSurface(
|
||||
gfx::AcceleratedWidget window,
|
||||
const gfx::SurfaceConfiguration& conf) {
|
||||
TRACE_EVENT0("gpu", "GLSurface::CreateViewGLSurface");
|
||||
switch (GetGLImplementation()) {
|
||||
case kGLImplementationDesktopGL:
|
||||
case kGLImplementationAppleGL: {
|
||||
NOTIMPLEMENTED() << "No onscreen support on Mac.";
|
||||
return NULL;
|
||||
}
|
||||
case kGLImplementationMockGL:
|
||||
return new GLSurfaceStub(conf);
|
||||
default:
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
gfx::AcceleratedWidget window,
|
||||
const gfx::SurfaceConfiguration& requested_configuration) {
|
||||
DCHECK(window != kNullAcceleratedWidget);
|
||||
scoped_refptr<GLSurfaceMac> surface =
|
||||
new GLSurfaceMac(window, requested_configuration);
|
||||
|
||||
scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface(
|
||||
const gfx::Size& size,
|
||||
const gfx::SurfaceConfiguration& conf) {
|
||||
TRACE_EVENT0("gpu", "GLSurface::CreateOffscreenGLSurface");
|
||||
switch (GetGLImplementation()) {
|
||||
case kGLImplementationDesktopGL:
|
||||
case kGLImplementationAppleGL: {
|
||||
scoped_refptr<GLSurface> surface(new NoOpGLSurface(size, conf));
|
||||
if (!surface->Initialize())
|
||||
return NULL;
|
||||
if (!surface->Initialize())
|
||||
return NULL;
|
||||
|
||||
return surface;
|
||||
}
|
||||
case kGLImplementationMockGL:
|
||||
return new GLSurfaceStub(conf);
|
||||
default:
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
}
|
||||
return surface;
|
||||
}
|
||||
|
||||
} // namespace gfx
|
||||
|
||||
29
ui/gl/gl_surface_mac.h
Normal file
29
ui/gl/gl_surface_mac.h
Normal file
@ -0,0 +1,29 @@
|
||||
// Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "ui/gl/gl_surface.h"
|
||||
|
||||
namespace gfx {
|
||||
|
||||
class GL_EXPORT GLSurfaceMac : public GLSurface {
|
||||
public:
|
||||
GLSurfaceMac(gfx::AcceleratedWidget widget,
|
||||
const gfx::SurfaceConfiguration requested_configuration);
|
||||
|
||||
bool SwapBuffers() override;
|
||||
void Destroy() override;
|
||||
bool IsOffscreen() override;
|
||||
gfx::Size GetSize() override;
|
||||
void* GetHandle() override;
|
||||
bool OnMakeCurrent(GLContext* context) override;
|
||||
|
||||
private:
|
||||
~GLSurfaceMac() override;
|
||||
|
||||
gfx::AcceleratedWidget widget_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(GLSurfaceMac);
|
||||
};
|
||||
|
||||
} // namespace gfx
|
||||
Loading…
x
Reference in New Issue
Block a user