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

Unified Diff: sky/examples/style/hex-layout.sky

Issue 744843003: Specs: Simplify the paint model. Now you are not responsible for (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sky/examples/style/toolbar-layout.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/style/hex-layout.sky
diff --git a/sky/examples/style/hex-layout.sky b/sky/examples/style/hex-layout.sky
index 2633c0f38c8c9a75c9c4bb8db76c9bd5d428312c..3f223c39558c9e441bd0968b727c7adbfcce5145 100644
--- a/sky/examples/style/hex-layout.sky
+++ b/sky/examples/style/hex-layout.sky
@@ -69,22 +69,20 @@
let loop = children.next();
while (!loop.done) {
let child = loop.value;
- if (child.needsPaint || child.descendantNeedsPaint) {
- canvas.save();
- try {
- canvas.beginPath();
- canvas.moveTo(child.x, child.y + cellDim/4);
- canvas.lineTo(child.x + cellDim/2, child.y);
- canvas.lineTo(child.x + cellDim, child.y + cellDim/4);
- canvas.lineTo(child.x + cellDim, child.y + 3*cellDim/4);
- canvas.lineTo(child.x + cellDim/2, child.y + cellDim);
- canvas.moveTo(child.x, child.y + 3*cellDim/4);
- canvas.closePath();
- canvas.clip();
- this.paintChild(child);
- } finally {
- canvas.restore();
- }
+ canvas.save();
+ try {
+ canvas.beginPath();
+ canvas.moveTo(child.x, child.y + cellDim/4);
+ canvas.lineTo(child.x + cellDim/2, child.y);
+ canvas.lineTo(child.x + cellDim, child.y + cellDim/4);
+ canvas.lineTo(child.x + cellDim, child.y + 3*cellDim/4);
+ canvas.lineTo(child.x + cellDim/2, child.y + cellDim);
+ canvas.moveTo(child.x, child.y + 3*cellDim/4);
+ canvas.closePath();
+ canvas.clip();
+ canvas.paintChild(child);
+ } finally {
+ canvas.restore();
}
loop = children.next();
}
« no previous file with comments | « no previous file | sky/examples/style/toolbar-layout.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698