@@ -38,12 +38,6 @@ class ParentData {
38
38
String toString () => '<none>' ;
39
39
}
40
40
41
- /// Obsolete class that will be removed eventually
42
- class PaintingCanvas extends Canvas {
43
- PaintingCanvas (ui.PictureRecorder recorder, Rect bounds) : super (recorder, bounds);
44
- // TODO(ianh): Just use ui.Canvas everywhere instead
45
- }
46
-
47
41
typedef void PaintingContextCallback (PaintingContext context, Offset offset);
48
42
49
43
/// A place to paint.
@@ -145,14 +139,14 @@ class PaintingContext {
145
139
// Recording state
146
140
PictureLayer _currentLayer;
147
141
ui.PictureRecorder _recorder;
148
- PaintingCanvas _canvas;
142
+ Canvas _canvas;
149
143
150
144
/// The canvas on which to paint.
151
145
///
152
146
/// The current canvas can change whenever you paint a child using this
153
147
/// context, which means it's fragile to hold a reference to the canvas
154
148
/// returned by this getter.
155
- PaintingCanvas get canvas {
149
+ Canvas get canvas {
156
150
if (_canvas == null )
157
151
_startRecording ();
158
152
return _canvas;
@@ -162,7 +156,7 @@ class PaintingContext {
162
156
assert (! _isRecording);
163
157
_currentLayer = new PictureLayer (paintBounds: _paintBounds);
164
158
_recorder = new ui.PictureRecorder ();
165
- _canvas = new PaintingCanvas (_recorder, _paintBounds);
159
+ _canvas = new Canvas (_recorder, _paintBounds);
166
160
_containerLayer.append (_currentLayer);
167
161
}
168
162
0 commit comments