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
715a89ebbf
Merge "Fix Caches singleton to avoid resource leaks"
2010-10-24 12:35:07 -07:00
Chet Haase
dd78ccacff
Fix Caches singleton to avoid resource leaks
...
The declaration of Singleton objects must be in CPP files (not header
files) to avoid creating separate instances of what is supposedly a
single object.
Change-Id: Ie903384824a458b5572f3ce5b6cfb359c18a9c44
2010-10-24 12:27:22 -07:00
Romain Guy
ae88e5e8e9
Fix rendering issue with layers.
...
A change was made earlier in the renderer to not snap the current clip rect
on every clip operation. The clip rect must not be snapped to pixel boundaries
before being used for pixel precision operations. Some operations were doing
this correctly, others were not. For instance, a layer was always created by
rounding to the correct pixels, but composing a layer was done with a non
rounded clip, thus resulting in slightly odd behaviors.
Change-Id: I31c2cf0a343450470bcd449c3f13fe37648b9c7c
2010-10-22 17:49:18 -07:00
Romain Guy
58ae6db4ff
Don't use two different variables to refer to mSnapshot.
...
Change-Id: Ie4a0616d2fe0b040ac14b734a9ddf77bf1f35b0c
2010-10-22 11:16:37 -07:00
Romain Guy
ae517591d9
Don't perform glCopyTextImage with coordinates outside the buffer.
...
Bug #3122179
Change-Id: I91ed397e9e553a8eeb69d82d0c5b1e49a3cdd5ff
2010-10-22 10:40:27 -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
50c0f093d9
Solve rendering issue with embedded WebViews.
...
Bug #3094017
The blending mode was not appropriately set after WebView released the
context.
Change-Id: Ib36d48e82c12f6d131dd5a0bcde9106925b8da63
2010-10-19 11:42:22 -07:00
Romain Guy
2665b85b2b
Small cleanup.
...
Change-Id: I0e5b9154a2d93af793d62f462d68cb7c6c3f6d75
2010-10-18 15:11:50 -07:00
Romain Guy
03750a067e
Use VBOs to render most geometries.
...
Change-Id: I4360dc4fe5693ab425450c107282b2c22db4dca7
2010-10-18 14:49:19 -07:00
Romain Guy
054dc18409
Don't draw entirely transparent 9patch meshes.
...
Change-Id: If3e62e18b8e0dbde8a22f8ede2889b86500a4dc2
2010-10-15 17:55:25 -07:00
Romain Guy
9d13fe25f4
Fix text rendering artifact.
...
Change-Id: I50f47207846e4208d363dde4e8f5f1a0f23d2d75
2010-10-15 16:06:03 -07:00
Romain Guy
e5ebcb0107
Fix clipping issue in StackView.
...
Change-Id: I7ec28f25c3993a2bd7ef6399ba1923839d239905
2010-10-15 13:57:28 -07:00
Romain Guy
d2a1ff003b
Fix text rendering issue.
...
The local clip rect could be off by one pixel when a 3D transform
was applied to a text primitive. This would cause small rendering
glitches in Launcher in particular.
Change-Id: I1254f6a5838c26810cbe969b096679d40b8dd504
2010-10-14 14:49:34 -07:00
Romain Guy
4afdf666fd
Color filters were ignored by the program cache fast path.
...
Change-Id: I08f2f02d356234a674be778d088e0558fd49c849
2010-10-13 21:31:28 -07:00
Romain Guy
93d2361c6d
Fix layer rendering glitch.
...
Change-Id: If2f987fe5526fc88743ca3e91edde4f8232ff658
2010-10-13 18:26:36 -07:00
Romain Guy
909cbaf8f9
Don't draw TextView's alpha layers when not needed.
...
Change-Id: Iedf42cbc62d727f18500c78fcccf2d081a761fec
2010-10-13 18:19:48 -07:00
Romain Guy
5d794412e3
Small potential performance improvement for fonts rendering.
...
Change-Id: If59c1e7803b84340fbc8b31ce6171ef0e5dc6189
2010-10-13 17:24:41 -07:00
Romain Guy
99bcdc52dc
Return identity matrix when rendering in an FBO.
...
Change-Id: I57438e745b30c8cfe16c269f3cafcd719049d705
2010-10-13 17:24:41 -07:00
Romain Guy
41030da168
Add a getNativeMatrix() API.
...
This API can be used by WebView to apply the appropriate transform
on its rendering.
Change-Id: I79aa39a29805f462fb08226370328815e74bdc52
2010-10-13 13:40:37 -07:00
Romain Guy
eb07af6873
Optimize layer clears.
...
Don't clear the entire texture when we use textures that are bigger
than the layer itself. This will save time during the glClear() calls.
Change-Id: I06f3259ba62affb3708ba69ea41418832c7e1a65
2010-10-12 18:40:36 -07:00
Romain Guy
e91080581f
Tweak layers caching for better performance in Launcher.
...
Change-Id: Ia6e67699d98f69c8a93385b3ecbdd814c7b16921
2010-10-12 18:15:42 -07:00
Romain Guy
1f114a55b5
Remove logging.
...
Change-Id: Ibcb11d704653d8875e22629ea39e4ee2ebce3c22
2010-10-12 17:47:34 -07:00
Romain Guy
4bb942083a
Optimize 9patch rendering.
...
This change detects empty quads in 9patches and removes them from
the mesh to avoid unnecessary blending.
Change-Id: I4500566fb4cb6845d64dcb59b522c0be7a0ec704
2010-10-12 15:59:26 -07:00
Romain Guy
9db91243c5
Simplify black texture fragment shader.
...
Change-Id: If2d43f92f4c98ec128692761a670b0f31207a3c0
2010-10-12 13:13:09 -07:00
Romain Guy
c00972bb16
Don't recreate a new texture every time we draw a layer.
...
Change-Id: I3c28aff5acffc7c6f1ac74805869725426c62d28
2010-10-12 11:31:07 -07:00
Romain Guy
dbc26d2ba1
Don't draw fully transparent views/primitives.
...
Change-Id: Icd7d8ef1f57b51a24faf32f7004125e6300d4fdc
2010-10-11 17:58:29 -07:00
Romain Guy
707b2f78cc
Optimize GLSL shaders.
...
Change-Id: I9a5e01bced63d8da0c61330a543a2b805388a59d
2010-10-11 16:34:59 -07:00
Romain Guy
7537f856f9
Improve performance of linear gradients.
...
Change-Id: If1caee31fc045dea13a4c5c10f25f2ffd325c4f8
2010-10-11 14:38:28 -07:00
Romain Guy
21b028a44f
Move GenerationCache to the utils directory.
...
Change-Id: I210ffa8f1d76a102bb7d971c649c20a74d03fbe6
2010-10-08 18:44:56 -07:00
Romain Guy
2728f96161
Don't update 9patches on every frame.
...
Change-Id: I7ffb2365f83e0453e7d0a0cdcb3fc9308b305238
2010-10-08 18:36:57 -07:00
Romain Guy
8550c4c7b5
Better cache for layers, reduce memory usage and increase framerate.
...
Change-Id: I5ff864a361db4791bd5ff6be716f7ce692ef572d
2010-10-08 15:49:53 -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
6b7bd24659
Don't clear the framebuffer when not needed.
2010-10-06 19:49:23 -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
eb99356a05
Optimize saveLayer() when the clip flag is set.
...
This speeds up applications, especially Launcher.
2010-10-05 18:14:38 -07:00
Romain Guy
7adaf3d1aa
Add support for paletted textures.
...
Change-Id: I36e6069bd58f78c609cdd1f3e4560c98f128f48e
2010-10-05 14:58:09 -07:00
Romain Guy
bdb801ca99
Remove logs to reduce logcat spam.
...
Change-Id: I5fc295b05b5d82bb86827b88e94dd51e8bcdc7d3
2010-10-04 17:22:29 -07:00
Romain Guy
11fd654a90
Reorder logs.
...
Change-Id: I4adbd53662e1f509c860898c8ff9d19eaabd6d5b
2010-10-04 17:12:16 -07:00
Romain Guy
3b3e457c27
Snap the clip rectangle to pixel boundaries.
...
Change-Id: Iac2765303552f385995fe46e219af456e0501da7
2010-10-04 14:18:24 -07:00
Romain Guy
e8cb9c1430
Apply bilinear filtering on text only when necessary.
...
Change-Id: Ic903f4b5d30e9c92528c6291941896efe4729ee3
2010-10-04 14:14:11 -07:00
Romain Guy
1de1083e98
Initialize font texture cache.
...
Now that text is renderer using bilinear filtering, each character is surrounded by
a 1 pixel border. This border needs to be initialized to a transparent value.
Change-Id: I26d3195db4bd576ac1f2da4c8f8e4dd18768bf12
2010-10-03 14:39:09 -07:00
Romain Guy
7975fb6d12
Apply bilinear filtering to text.
...
Change-Id: I2c81ad657ee2a11a2139e0b11ae3749db54c0749
2010-10-01 16:36:14 -07:00
Romain Guy
0bb5667b4e
Fix INVALID_OPERATION error with layers rendering.
...
This change is a workaround for a driver bug that causes an INVALID_OPERATION
to be thrown on every glCopyTexSubImage() call. This change also adds a new
test for gradients local matrices.
Change-Id: I41b7437481026702d0a3a9677f099b4557c0a84e
2010-10-01 00:25:02 -07:00
Romain Guy
d799912770
Make simple paths made of lines work.
...
Bug #3041098
Change-Id: Ife9c3f01ded10e2bb35b1cdf1a54734d8347fee4
2010-09-30 16:57:13 -07:00
Romain Guy
b051e895cc
Add display lists caching.
...
Change-Id: Iac3a248a81ed8cb076a83ef9d186b8ebba685b4c
2010-09-29 13:29:04 -07:00
Romain Guy
4aa90573bb
Adding display lists to the GL renderer (checkpoint.)
...
Change-Id: Iaa49757600a53b39369dbb23f8c3feab282518e6
2010-09-26 18:40:37 -07:00
Romain Guy
e2d345ea67
Add debug mode to measure performance.
...
Change-Id: I9d4c84034dc200b99c8266165942a7cdbcb5c0c5
2010-09-24 18:39:22 -07:00
Romain Guy
38c85b907a
Correctly initialize/refresh layers.
...
Change-Id: Id8cdcf587b13098460f7d4aa1bd17708784d89bb
2010-09-22 22:51:12 -07:00
Romain Guy
e20ecbd12d
Draw text decorations with lines instead of rectangles.
...
Change-Id: Icd25c85c3a24da96a3d2f76f9477da6f87e0303c
2010-09-22 19:49:04 -07:00