19 Commits

Author SHA1 Message Date
Romain Guy
d679b57ef2 Pre-multiply color components for 2-stop gradients
Bug #7033344

Change-Id: Ia168501f1dc56ba7a1bb0c55078320432309a66a
2012-08-29 21:56:18 -07:00
Romain Guy
42e1e0d482 Improve gradients
Avoid using textures for common gradients (two stops from 0.0 to 1.0)

Change-Id: Iff55d21b126c8cfc4cfb701669f2339c8f6b131a
2012-07-31 18:55:16 -07:00
Romain Guy
7953745dd5 Reduce the size of libhwui by 50%
This change removes unnessary symbols. All symbols are hidden by
default, public APIs with exported symbols are explicitly marked
with ANDROID_API.

Change-Id: I692fde432a86c12108de1cfd1f6504919a7d5f3f
2011-10-12 13:48:51 -07:00
Romain Guy
43ccf4663c Don't crash Launcher on config change.
Change-Id: Ibbbd7146c5ff69e9639b433f39041053654d808c
2011-01-14 18:51:01 -08:00
Romain Guy
24c0021668 Copy shaders when recording them in display lists.
Change-Id: I3f22dd35f1e31c9e5102955d76548098b7b0cd8d
2011-01-14 15:31:00 -08:00
Romain Guy
01d0657957 Reduce number of GL calls when drawing with shaders.
Change-Id: I27aca9f6d381d5c7e363d90a93225d185f2ff4e3
2010-11-11 12:06:27 -08:00
Romain Guy
5b3b35296e Optimize FBO drawing with regions.
This optimization is currently disabled until Launcher is
modified to take advantage of it. The optimization can be
enabled by turning on RENDER_LAYERS_AS_REGIONS in the
OpenGLRenderer.h file.

Change-Id: I2fdf59d0f4dc690a3d7f712173ab8db3848b27b1
2010-11-02 16:17:23 -07:00
Romain Guy
8164c2d338 Don't change textures wrap modes on every draw.
Change-Id: If6d3f313778cc7f3e803a063338539c8b3e165e3
2010-10-25 18:03:28 -07:00
Chet Haase
5c13d89c13 Optimizing display lists by referencing pointers to resources instead of copying them
Change-Id: I81ad3551d74aa1e5bb64d69e33d2eb29a6c1eb6a
2010-10-21 12:02:42 -07:00
Romain Guy
14830948d0 Add 3D transforms support to all gradients.
Change-Id: I61409edd00dab3a11684a3f5e4f7df0afc734758
2010-10-07 15:07:45 -07:00
Romain Guy
e3095e0c1e Apply 3D transformations to gradient shaders.
This fixes only linear gradients. Sweep and radial gradients, as well as
bitmap shaders, will be fixed in a future commit.

Change-Id: I4eee4ff62e9bbf3b9339fc111a780167449ecfef
2010-10-06 16:57:29 -07:00
Romain Guy
29d8997bd4 Fix OpenGL errors in various places.
Change-Id: I3a4e115d8fb13b6c443e65460d92987b16f2524c
2010-09-22 16:44:49 -07:00
Romain Guy
ddb80bebb0 Add support for circular gradients to the GL renderer.
This change also adds full support for local transformation matrices on
sweep and radial gradients.

Change-Id: Id8773bc0766575190e3f3d51984fc5e57b266c3f
2010-09-21 16:48:50 -07:00
Romain Guy
ee916f14cb Add support for SweepGradient in the GL renderer.
Change-Id: I7aa397ed4e34655ead9ba1f5b4ce087665e0f022
2010-09-20 17:54:17 -07:00
Romain Guy
759ea80dca Add support for drawLines(), with anti-aliasing
Change-Id: I16c0593c5671490909dec13a85df601e1428a1a6
2010-09-16 20:49:46 -07:00
Romain Guy
9cccc2b9bd Enforce maximum texture size.
When an app tries to render a bitmap or path larger than the GPU's maximum
texture size, the drawing command is ignored and a warning is logged. This
change also makes texture drawing more robust by catching potential errors
during texture creation.

This change also fixes a crash in the FontRenderer. The destructor would
sometimes try to free an uninitialized array.

Change-Id: I95ae0939c52192d97b340aa02417bf6d0c962c57
2010-08-07 23:48:29 -07:00
Romain Guy
6c07daf86c Fix native crash in SkiaShader.
Bug #2893733

Change-Id: I7feb9ab113fe0012cf9eb271f2b044f12a5c9c4e
2010-08-04 15:35:18 -07:00
Romain Guy
db1938e0e6 Add support for ColorFilters.
Color filters are fully supported and can be used with shaders.

Change-Id: Id90ccf1c81cb462f2431f366f3f8f710d7971e04
2010-08-02 18:50:56 -07:00
Romain Guy
06f96e2652 Refactor Skia shaders handling.
With this change, Skia shaders can easily be applied to any mesh. This change also
supports ComposeShader. For instance, this can be used to blend a gradient and a
bitmap togehter and paint a string of text with the result.

Change-Id: I701c2f9cf7f89b2ff58005e8a1d0d80ccf4a4aea
2010-07-30 19:18:16 -07:00