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

Unified Diff: src/gpu/GrContext.cpp

Issue 14854005: Add geometry-based rotated AA rect drawing path (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Updated to ToT Created 7 years, 8 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 | « src/gpu/GrAARectRenderer.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrContext.cpp
===================================================================
--- src/gpu/GrContext.cpp (revision 8960)
+++ src/gpu/GrContext.cpp (working copy)
@@ -723,7 +723,7 @@
return false;
}
-#ifdef SHADER_AA_FILL_RECT
+#if defined(SHADER_AA_FILL_RECT) || !defined(IGNORE_ROT_AA_RECT_OPT)
if (strokeWidth >= 0) {
#endif
if (!drawState.getViewMatrix().preservesAxisAlignment()) {
@@ -733,7 +733,7 @@
if (NULL != matrix && !matrix->preservesAxisAlignment()) {
return false;
}
-#ifdef SHADER_AA_FILL_RECT
+#if defined(SHADER_AA_FILL_RECT) || !defined(IGNORE_ROT_AA_RECT_OPT)
} else {
if (!drawState.getViewMatrix().preservesAxisAlignment() &&
!drawState.getViewMatrix().preservesRightAngles()) {
@@ -751,11 +751,11 @@
combinedMatrix->preConcat(*matrix);
#if GR_DEBUG
-#ifdef SHADER_AA_FILL_RECT
+#if defined(SHADER_AA_FILL_RECT) || !defined(IGNORE_ROT_AA_RECT_OPT)
if (strokeWidth >= 0) {
#endif
GrAssert(combinedMatrix->preservesAxisAlignment());
-#ifdef SHADER_AA_FILL_RECT
+#if defined(SHADER_AA_FILL_RECT) || !defined(IGNORE_ROT_AA_RECT_OPT)
} else {
GrAssert(combinedMatrix->preservesRightAngles());
}
@@ -765,7 +765,11 @@
combinedMatrix->mapRect(devRect, rect);
- if (strokeWidth < 0) {
+ if (strokeWidth < 0
+#if defined(SHADER_AA_FILL_RECT) || !defined(IGNORE_ROT_AA_RECT_OPT)
+ && drawState.getViewMatrix().preservesAxisAlignment()
+#endif
+ ) {
return !isIRect(*devRect);
} else {
return true;
« no previous file with comments | « src/gpu/GrAARectRenderer.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698