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

Unified Diff: gm/conicpaths.cpp

Issue 18258005: Add implicit hairline conic rendering to GPU (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gyp/gmslides.gypi » ('j') | include/core/SkGeometry.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/conicpaths.cpp
diff --git a/gm/conicpaths.cpp b/gm/conicpaths.cpp
index e7dbb31e8c1cd60c50dcdd14718afe93231d4215..8bfc6aba905c63adbe7857bcf848edf6490cacec 100644
--- a/gm/conicpaths.cpp
+++ b/gm/conicpaths.cpp
@@ -23,6 +23,7 @@ protected:
}
virtual void onOnceBeforeDraw() SK_OVERRIDE {
+/*
{
SkPath* conicCirlce = &fPaths.push_back();
conicCirlce->moveTo(0, -0);
@@ -40,6 +41,7 @@ protected:
SkScalarHalf(SkScalarSqrt(2)));
}
+*/
{
SkPath* hyperbola = &fPaths.push_back();
hyperbola->moveTo(0, -0);
@@ -47,6 +49,7 @@ protected:
SkIntToScalar(100), SkIntToScalar(100),
SkIntToScalar(2));
}
+
{
SkPath* thinHyperbola = &fPaths.push_back();
thinHyperbola->moveTo(0, -0);
@@ -62,6 +65,20 @@ protected:
SkIntToScalar(2));
}
{
+ SkPath* lopsidedHyperbola = &fPaths.push_back();
+ lopsidedHyperbola->moveTo(0, -0);
+ lopsidedHyperbola->conicTo(SkIntToScalar(100), SkIntToScalar(100),
+ SkIntToScalar(90), SkIntToScalar(110),
+ SkIntToScalar(2));
+ }
+ {
+ SkPath* lopsidedHyperbola = &fPaths.push_back();
+ lopsidedHyperbola->moveTo(0, -0);
+ lopsidedHyperbola->conicTo(SkIntToScalar(100), SkIntToScalar(100),
+ SkIntToScalar(70), SkIntToScalar(40),
+ SkIntToScalar(2));
+ }
+ {
SkPath* closedHyperbola = &fPaths.push_back();
closedHyperbola->moveTo(0, -0);
closedHyperbola->conicTo(SkIntToScalar(100), SkIntToScalar(100),
@@ -90,6 +107,7 @@ protected:
SkIntToScalar(1), SkIntToScalar(0),
SK_ScalarHalf);
}
+/*
{
SkPath* closedEllipse = &fPaths.push_back();
closedEllipse->moveTo(0, -0);
@@ -97,6 +115,7 @@ protected:
SkIntToScalar(0), SkIntToScalar(0),
SK_ScalarHalf);
}
+*/
}
virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
@@ -114,8 +133,8 @@ protected:
SkScalar x = SkIntToScalar(kMargin);
for (int p = 0; p < fPaths.count(); ++p) {
for (size_t a = 0; a < SK_ARRAY_COUNT(kAlphaValue); ++a) {
- for (int aa = 0; aa < 2; ++aa) {
- for (int fh = 0; fh < 2; ++fh) {
+ for (int aa = 1; aa < 2; ++aa) {
+ for (int fh = 1; fh < 2; ++fh) {
const SkRect& bounds = fPaths[p].getBounds();
« no previous file with comments | « no previous file | gyp/gmslides.gypi » ('j') | include/core/SkGeometry.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698