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

Unified Diff: experimental/SkV8Example/gears.js

Issue 141113002: Clear the canvas before drawing the gears. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/SkV8Example/gears.js
diff --git a/experimental/SkV8Example/gears.js b/experimental/SkV8Example/gears.js
index 7eb4c5b198e06eede15b5de1b8a31732455fdff3..5ba2f995c25782c70175adf65f296b02ff250420 100644
--- a/experimental/SkV8Example/gears.js
+++ b/experimental/SkV8Example/gears.js
@@ -97,6 +97,9 @@ var onDraw = function() {
function draw(ctx) {
ctx.resetTransform();
+ ctx.fillStyle = "#FFFFFF";
+ ctx.fillRect(0, 0, 499, 499);
+
rotation += DeltaTheta;
if (rotation >= Math.PI*2) {
rotation = 0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698