Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: sky/sdk/lib/widgets/ink_well.dart

Issue 1223063005: Remove createNewDisplayList from RenderTransform and RenderInkWell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/sdk/lib/rendering/box.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import 'dart:math' as math; 5 import 'dart:math' as math;
6 import 'dart:sky' as sky; 6 import 'dart:sky' as sky;
7 7
8 import 'package:sky/animation/animation_performance.dart'; 8 import 'package:sky/animation/animation_performance.dart';
9 import 'package:sky/animation/curves.dart'; 9 import 'package:sky/animation/curves.dart';
10 import 'package:sky/rendering/box.dart'; 10 import 'package:sky/rendering/box.dart';
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 void paint(PaintingCanvas canvas) { 70 void paint(PaintingCanvas canvas) {
71 int opacity = (_kSplashInitialOpacity * (1.0 - (_radius.value / _targetRadiu s))).floor(); 71 int opacity = (_kSplashInitialOpacity * (1.0 - (_radius.value / _targetRadiu s))).floor();
72 sky.Paint paint = new sky.Paint()..color = new sky.Color(opacity << 24); 72 sky.Paint paint = new sky.Paint()..color = new sky.Color(opacity << 24);
73 double radius = _pinnedRadius == null ? _radius.value : _pinnedRadius; 73 double radius = _pinnedRadius == null ? _radius.value : _pinnedRadius;
74 canvas.drawCircle(position, radius, paint); 74 canvas.drawCircle(position, radius, paint);
75 } 75 }
76 } 76 }
77 77
78 class RenderInkWell extends RenderProxyBox { 78 class RenderInkWell extends RenderProxyBox {
79 bool get createNewDisplayList => true;
80
81 RenderInkWell({ RenderBox child }) : super(child); 79 RenderInkWell({ RenderBox child }) : super(child);
82 80
83 final List<InkSplash> _splashes = new List<InkSplash>(); 81 final List<InkSplash> _splashes = new List<InkSplash>();
84 82
85 void handleEvent(sky.Event event, BoxHitTestEntry entry) { 83 void handleEvent(sky.Event event, BoxHitTestEntry entry) {
86 if (event is sky.GestureEvent) { 84 if (event is sky.GestureEvent) {
87 switch (event.type) { 85 switch (event.type) {
88 case 'gesturetapdown': 86 case 'gesturetapdown':
89 _startSplash(event.primaryPointer, entry.localPosition); 87 _startSplash(event.primaryPointer, entry.localPosition);
90 break; 88 break;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 121 }
124 } 122 }
125 123
126 class InkWell extends OneChildRenderObjectWrapper { 124 class InkWell extends OneChildRenderObjectWrapper {
127 InkWell({ String key, Widget child }) 125 InkWell({ String key, Widget child })
128 : super(key: key, child: child); 126 : super(key: key, child: child);
129 127
130 RenderInkWell get root => super.root; 128 RenderInkWell get root => super.root;
131 RenderInkWell createNode() => new RenderInkWell(); 129 RenderInkWell createNode() => new RenderInkWell();
132 } 130 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/rendering/box.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698