From 5b0200bd47e8a9a4dc8d2e6c3a110d522b30bf82 Mon Sep 17 00:00:00 2001 From: Chet Haase Date: Wed, 13 Apr 2011 17:58:08 -0700 Subject: Enable anti-aliasing for hw-accelerated lines Draw anti-aliased lines with OpenGL by constructing a quad with a border that fades out (to mimic fragment coverage). Change-Id: Ib81a3e62d663acdf1b46b401ac4aa7ee9855cc7e --- libs/hwui/ProgramCache.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libs/hwui/ProgramCache.h') diff --git a/libs/hwui/ProgramCache.h b/libs/hwui/ProgramCache.h index 737d91ba12f9..cead75bcae2c 100644 --- a/libs/hwui/ProgramCache.h +++ b/libs/hwui/ProgramCache.h @@ -57,6 +57,7 @@ namespace uirenderer { #define PROGRAM_KEY_COLOR_BLEND 0x80 #define PROGRAM_KEY_BITMAP_NPOT 0x100 #define PROGRAM_KEY_SWAP_SRC_DST 0x2000 +#define PROGRAM_KEY_VERTEX_WIDTH 0x4000 #define PROGRAM_KEY_BITMAP_WRAPS_MASK 0x600 #define PROGRAM_KEY_BITMAP_WRAPT_MASK 0x1800 @@ -119,6 +120,8 @@ struct ProgramDescription { bool hasBitmap; bool isBitmapNpot; + bool hasWidth; + bool hasGradient; Gradient gradientType; @@ -148,6 +151,8 @@ struct ProgramDescription { hasTexture = false; hasAlpha8Texture = false; + hasWidth = false; + modulate = false; hasBitmap = false; @@ -200,6 +205,7 @@ struct ProgramDescription { programid key() const { programid key = 0; if (hasTexture) key |= PROGRAM_KEY_TEXTURE; + if (hasWidth) key |= PROGRAM_KEY_VERTEX_WIDTH; if (hasAlpha8Texture) key |= PROGRAM_KEY_A8_TEXTURE; if (hasBitmap) { key |= PROGRAM_KEY_BITMAP; -- cgit v1.2.3-59-g8ed1b