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

Unified Diff: gm/strokes.cpp

Issue 1144883003: handle large conic strokes better (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix dm-driven very large curve case Created 5 years, 7 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 | samplecode/SampleQuadStroker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/strokes.cpp
diff --git a/gm/strokes.cpp b/gm/strokes.cpp
index a258dfe0059a1f562fcbef092a61a5cc528d64fc..32f687940d1f1766df0a012e0ab7c17beead4bf2 100644
--- a/gm/strokes.cpp
+++ b/gm/strokes.cpp
@@ -241,12 +241,42 @@ private:
typedef skiagm::GM INHERITED;
};
+class Strokes4GM : public skiagm::GM {
+public:
+ Strokes4GM() {}
+
+protected:
+
+ SkString onShortName() override {
+ return SkString("strokes_zoomed");
+ }
+
+ SkISize onISize() override {
+ return SkISize::Make(W, H*2);
+ }
+
+ void onDraw(SkCanvas* canvas) override {
+ SkPaint paint;
+ paint.setStyle(SkPaint::kStroke_Style);
+ paint.setStrokeWidth(0.055f);
+
+ canvas->scale(1000, 1000);
+ canvas->drawCircle(0, 2, 1.97f, paint);
+ }
+
+private:
+ typedef skiagm::GM INHERITED;
+};
+
+
//////////////////////////////////////////////////////////////////////////////
static skiagm::GM* F0(void*) { return new StrokesGM; }
static skiagm::GM* F1(void*) { return new Strokes2GM; }
static skiagm::GM* F2(void*) { return new Strokes3GM; }
+static skiagm::GM* F3(void*) { return new Strokes4GM; }
static skiagm::GMRegistry R0(F0);
static skiagm::GMRegistry R1(F1);
static skiagm::GMRegistry R2(F2);
+static skiagm::GMRegistry R3(F3);
« no previous file with comments | « no previous file | samplecode/SampleQuadStroker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698