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

Unified Diff: gm/aaclip.cpp

Issue 56453002: speed up A8 (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 | include/core/SkDraw.h » ('j') | include/core/SkDraw.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/aaclip.cpp
diff --git a/gm/aaclip.cpp b/gm/aaclip.cpp
index f57e57c400775a0b6796c1ee169475d7171f2987..18003b16b8b2afc940f2c0eaebf48adceeb4d069 100644
--- a/gm/aaclip.cpp
+++ b/gm/aaclip.cpp
@@ -9,6 +9,20 @@
#include "SkCanvas.h"
#include "SkPath.h"
+static void test_aamask(SkCanvas* canvas) {
+ canvas->drawColor(SK_ColorBLUE);
mtklein 2013/11/01 21:55:46 Can you add this as a bench too?
+
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ SkPath path;
+ path.moveTo(0, 0);
+ path.quadTo(500, 0, 500, 500);
+ path.quadTo(250, 0, 0, 500);
+
+ for (int i = 0; i < 100; ++i)
+ canvas->drawPath(path, paint);
mtklein 2013/11/01 21:55:46 {} ?
+}
+
static void test_quadstroke(SkCanvas* canvas) {
SkPath path;
path.moveTo(6, 0);
@@ -273,6 +287,7 @@ protected:
}
virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
+ if (true) { test_aamask(canvas); return; }
if (false) { test_quadstroke(canvas); return; }
if (false) { test_conic(canvas); return; }
if (false) {
« no previous file with comments | « no previous file | include/core/SkDraw.h » ('j') | include/core/SkDraw.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698