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

Side by Side Diff: gm/aaa.cpp

Issue 2477373002: Combine analytic edges with tolerance (Closed)
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/core/SkEdgeBuilder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "gm.h" 8 #include "gm.h"
9 #include "SkPath.h" 9 #include "SkPath.h"
10 #include "SkScan.h" 10 #include "SkScan.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 canvas->restore(); 43 canvas->restore();
44 44
45 y += 200; 45 y += 200;
46 46
47 canvas->translate(0, y); 47 canvas->translate(0, y);
48 canvas->rotate(1); 48 canvas->rotate(1);
49 canvas->drawRectCoords(20, 20, 20.2f, 200, p); 49 canvas->drawRectCoords(20, 20, 20.2f, 200, p);
50 canvas->drawRectCoords(20, 200, 200, 200.1f, p); 50 canvas->drawRectCoords(20, 200, 200, 200.1f, p);
51 canvas->drawCircle(100, 100, 30, p); 51 canvas->drawCircle(100, 100, 30, p);
52 canvas->restore(); 52 canvas->restore();
53
54 // The following path is empty but it'll reveal bug chrome:662914
55 SkPath path;
56 path.moveTo(SkBits2Float(0x429b9d5c), SkBits2Float(0x4367a041)); // 77. 8073f, 231.626f
57 // 77.8075f, 231.626f, 77.8074f, 231.625f, 77.8073f, 231.625f
58 path.cubicTo(SkBits2Float(0x429b9d71), SkBits2Float(0x4367a022),
59 SkBits2Float(0x429b9d64), SkBits2Float(0x4367a009),
60 SkBits2Float(0x429b9d50), SkBits2Float(0x43679ff2));
61 path.lineTo(SkBits2Float(0x429b9d5c), SkBits2Float(0x4367a041)); // 77. 8073f, 231.626f
62 path.close();
63 canvas->drawPath(path, p);
53 } 64 }
54 65
55 private: 66 private:
56 typedef skiagm::GM INHERITED; 67 typedef skiagm::GM INHERITED;
57 }; 68 };
58 69
59 DEF_GM( return new AnalyticAntiAliasConvexGM; ) 70 DEF_GM( return new AnalyticAntiAliasConvexGM; )
OLDNEW
« no previous file with comments | « no previous file | src/core/SkEdgeBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698