23 Commits

Author SHA1 Message Date
Romain Guy
a1d3c91afb Further reduce the number of GL commands sent to the driver
Change-Id: Id922b2a166ea4573b767c27d3195e11c70320b23
2011-12-13 14:58:14 -08:00
Romain Guy
d21b6e1fe3 Optimize away unnecessary state changes
Change-Id: I0f6816f9f6234853575ecee5033186ad19e76380
2011-11-30 20:21:23 -08:00
Romain Guy
6203f6c814 Reduce the amount of data cached by the gradients cache.
Change-Id: I8546f5a5ecf38031c9a40bdcc434d4c7f22da63d
2011-08-01 18:56:21 -07:00
Romain Guy
b50149825f Correctly apply linear filter to drawBitmap(Rect, Rect)
Change-Id: I1049282e1996b1020c92cb7bec46e9f28e94e967
2011-07-28 15:40:47 -07:00
Romain Guy
e3c26851dc Improve rendering performance on some GPUs
This change sets textures filtering to GL_NEAREST by default. GL_LINEAR
filtering is only used when textures are transformed with a scale or
a rotation. This helps save a couple of fps on some GPUs.

Change-Id: I1efaa452c2c79905f00238e54d886a37203a2ac1
2011-07-25 16:36:01 -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
8164c2d338 Don't change textures wrap modes on every draw.
Change-Id: If6d3f313778cc7f3e803a063338539c8b3e165e3
2010-10-25 18:03:28 -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
8aef54fa17 Add support for Canvas flags on save.
This is required for the rewrite of layers support.

Change-Id: I5c0867dcf5aeb0392c8d0fbab05febb0eaff70d9
2010-09-01 15:49:25 -07:00
Romain Guy
0ba681bce1 Fix GC issue, fix local shader transformations.
Change-Id: I208bdf89815dcd18dcadd43df932a77362918435
2010-08-12 15:37:00 -07:00
Romain Guy
a48a1a87ba Fast text selection drawing.
Change-Id: I93fb1312b47bc05345defa9b6cfe47c0658bb329
2010-08-10 14:59:15 -07:00
Romain Guy
61c8c9c5b2 Fix tons of bugs and add new text rendering support.
Change-Id: I326c66b10784006f6df2f12d38e120cef94cd0d7
2010-08-10 12:22:01 -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
25ee037fee Fix incorrect memory cleanup in SkiaShader.
Bug #2895037

Change-Id: Id233c2a8a5b709dc9f26ff60aad989e9583a2382
2010-08-06 10:57:58 -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
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