313 Commits

Author SHA1 Message Date
Chet Haase
9c1e23baf5 Add logging of graphics acceleration info to bugreports
Change-Id: I9fa4cda6ccf92df9d1c644ccdc0e7274a30106e0
2011-04-01 13:24:53 -07:00
Romain Guy
ad575f4dda Merge "When deleting a path, remove it from the path cache. Bug #4170585" 2011-03-24 16:05:13 -07:00
Chet Haase
8a40f6a632 Merge "Fix bug with accelerated translucent rendering" 2011-03-24 16:04:22 -07:00
Romain Guy
1af23a32d8 When deleting a path, remove it from the path cache.
Bug #4170585

Change-Id: I6be4d251ceb908c89afe49c2ff85c05f36c73b70
2011-03-24 16:03:55 -07:00
Chet Haase
f147340bd1 Fix bug with accelerated translucent rendering
There was a bug in the dirty region optimizations when
using alpha layers. This prevented translucent objects from
being drawn at all in many situations.

Change-Id: I23e9bce3595fbd6fe2bda15e8753a0f35baffb82
2011-03-24 15:55:05 -07:00
Romain Guy
aaceeb0c5b Use the correct API to query system properties.
Change-Id: Ie120dee0e24959d4db3fdb0100b6d8fe7fe46cdb
2011-03-23 19:56:13 -07:00
Romain Guy
5b7a3150a6 Don't crash when omitting paint to drawBitmap() with A8 configs.
Change-Id: I3d630554ad82fa846385274d12d0434e890ef45d
2011-03-23 17:18:44 -07:00
Romain Guy
80bbfb19ee Fix shaders generation on IMG GPUs.
Change-Id: Id15df2663e41e31f04c8d86b958312341da8101d
2011-03-23 16:56:28 -07:00
Romain Guy
c7b25be64f Take fake bold font property into account.
Bug #4159731

For real this time!

Change-Id: I9cb6d70e68d2b57eb9a6d9a6bca8176967192421
2011-03-23 14:59:20 -07:00
Romain Guy
ed6fcb034b Add support for drawPoint() and drawPoints().
Change-Id: I01bef50c08ec3160f8d40dc060b2cf6c2e4d7639
2011-03-21 13:11:49 -07:00
Romain Guy
67ac217a81 Fix hairline rendering.
Change-Id: Ib6129b446b53678b1b955d8516418370cbae4f10
2011-03-18 17:14:27 -07:00
Romain Guy
a168d73721 Correctly apply filters to Alpha8 bitmaps.
This change also removes unnecessary operations from display lists.

Change-Id: I627f85861982731f0ee7705b48b36d9c56f22f39
2011-03-18 16:50:13 -07:00
Romain Guy
b29cfbf768 Fix paths rendering issues.
See ApiDemos, PathEffect and PathFillTypes.

Change-Id: I9f9593c1da33d0d013b5b89c86bc5bd71128a192
2011-03-18 16:24:19 -07:00
Romain Guy
40667676e5 Optimize rect-shaped layers.
This brings back an optimization disabled in HC-MR1. This time the
correct geometry is generated to avoid unnecessary blending.

Change-Id: Id56404dc46bb84c75facc25c18488a690741b592
2011-03-18 14:36:44 -07:00
Romain Guy
08aa2cbd5e Send WebView the current transform and whether we're drawing a layer.
Bug #3275491

These can be used by WebView to correctly apply alpha and geometric
transforms.

Change-Id: I2ecd4376d68df886dead3c9240317de33f56828f
2011-03-17 12:04:04 -07:00
Romain Guy
a30f43624f am 72064c66: am b0204d0a: am c2b91a61: Merge "Modify the GL renderer\'s functor to pass the clip to WebView" into honeycomb-mr1
* commit '72064c66e20b9cc86900a9d833c228c345a2b2a4':
  Modify the GL renderer's functor to pass the clip to WebView
2011-03-16 17:31:30 -07:00
Romain Guy
80911b8517 Modify the GL renderer's functor to pass the clip to WebView
Change-Id: If5efe399ca58f3000b2883e24e9f3736a2025184
2011-03-16 15:31:33 -07:00
Romain Guy
89cc2b6422 am f8c4c128: am 0f7d2ec3: am 46fc2517: Merge "Fix performance issue in Launcher Bug #3515248" into honeycomb-mr1
* commit 'f8c4c12802b15da068d164fd44c9b9f12e7ed916':
  Fix performance issue in Launcher Bug #3515248
2011-03-15 23:50:43 -07:00
Romain Guy
6217a71cd2 Fix performance issue in Launcher
Bug #3515248

The problem is caused by the fast path when compositing layers on screen.
The fast path draws a single quad using glDrawArrays() whereas the general
path draws an arbitrary mesh using glDrawElements(). It looks like there's
an issue in the driver since glDrawArrays() is significantly slower than
glDrawElements() for a quad (6 vertices!)

This change just gets rid of the fast path.

Change-Id: Ib2361253ec67f44a988270f76c183422f12ce537
2011-03-15 16:32:28 -07:00
Romain Guy
8390c7cf68 am 5c84a134: am a1bd5a5f: Merge "Fix disappearing edges in lists/scrollviews/etc. Bug #4093871" into honeycomb-mr1
* commit '5c84a1341b05e96f2c76da7252ed823ec3121102':
  Fix disappearing edges in lists/scrollviews/etc. Bug #4093871
2011-03-15 13:01:24 -07:00
Romain Guy
ad37cd3b5d Fix disappearing edges in lists/scrollviews/etc.
Bug #4093871

This bug was introduced by a change that modified the way fade areas
are cleared. The previous change relied on Rect::intersect() to empty
the intersected rect when the two rects don't intersect. Unfortunately
this is not what intersect() does. The fix is rather simple and
sets the layer's bounds to empty when they don't intersect with the
clip or the viewport. This has the side effect of ignoring the layer
which is the expected result.

Change-Id: Icf0038b9a476c53f8eff7084136aba3033d093e6
2011-03-15 11:12:25 -07:00
Romain Guy
8329db39f2 am b245e31f: am ee7ace06: Merge "Fix rendering artifact in edge fades. Bug #4092053" into honeycomb-mr1
* commit 'b245e31fa8dd1ad6a59ccf858154f3c7b92e0eb8':
  Fix rendering artifact in edge fades. Bug #4092053
2011-03-14 18:21:21 -07:00
Romain Guy
7b5b6abf85 Fix rendering artifact in edge fades.
Bug #4092053

The problem always existed but was made visible by partial invalidation.
When saving a layer, the renderer would try to postpone glClear()
operations until the next drawing command. This however does not work
since the clip might have changed. The fix is rather simple and
simply gets rid of this "optimization" (that turned out to be
usless anyway given how View issues saveLayer() calls.)

This change also fixes an issue with gradients (color stops where
not properly computed when using a null stops array) and optimizes
display lists rendering (quickly rejects larger portions of the
tree to avoid executing unnecessary code.)

Change-Id: I0f5b5f6e1220d41a09cc2fa84c212b0b4afd9c46
2011-03-14 18:05:08 -07:00
Iliyan Malchev
3070af0882 frameworks/base: remove LOCAL_PRELINK_MODULE
Change-Id: I54dd62ebef47e7690afa5a858f3cad941b135481
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-03-14 14:25:59 -07:00
Romain Guy
f7098ce95d am d00353fe: am bc8a8e8c: Merge "Add support for partial invalidates in WebView Bug #3461349" into honeycomb-mr1
* commit 'd00353fe3191571a6773ef2d11921cfcff260bc4':
  Add support for partial invalidates in WebView Bug #3461349
2011-03-07 22:45:52 -08:00
Romain Guy
cabfcc1364 Add support for partial invalidates in WebView
Bug #3461349

This change also fixes two bugs that prevented partial invalidates
from working with other views. Both bugs were in our EGL implementation:
they were preventing the caller from comparing the current context/surface
with another context/surface. This was causing HardwareRenderer to always
redraw the entire screen.

Change-Id: I33e096b304d4a0b7e6c8f92930f71d2ece9bebf5
2011-03-07 18:09:03 -08:00
Fabrice Di Meglio
1eb1293732 Merge "Add TextLayout Cache" 2011-03-03 12:21:15 -08:00
Romain Guy
058f47e845 Merge "We need to go deeper. Bug #3431907" 2011-03-02 15:48:33 -08:00
Romain Guy
84962f2fe6 We need to go deeper.
Bug #3431907

When drawing layers inside a layer, the wrong target FBO would be used.
This would happen for instance with app widgets using a ViewFlipper
in Launcher. The ViewFlipper uses a fade animation that triggers a
call to saveLayerAlpha(), which in turns creates an FBO. If this happened
during a scroll, the ViewFlipper's FBO would be composited back directly
inside FBO 0, i.e. the screen. This properly initializes the snapshots
of hardware layers to use the layer's FBO as the default compositing
target instead of using 0.

This problem did not happen when drawing hardware layers inside
hardware layers because LayerRenderer already takes care of figuring
out the FBO it needs to composite into. The bug would occur only
with layers generated with saveLayer() and its saveLayerAlpha()
variation.

Layers inside hardware layers insider layers inside hardware layers
now work properly.

Change-Id: Ibe852301087f3d414ad8a18436eebc81f8ac66f5
2011-03-02 15:43:44 -08:00
Romain Guy
40a787f89a Properly initialize FBO textures for linear filtering.
Change-Id: I67fc4fd760483ef85809be8d6e608cf4f469650f
2011-03-02 15:15:42 -08:00
Romain Guy
a91320e364 Merge "Properly initialize FBO textures for linear filtering." 2011-03-02 15:14:52 -08:00
Romain Guy
4677c5118c Merge "Fix problem with glyph cache and textScaleX property" 2011-03-02 14:04:47 -08:00
Chet Haase
8668f8a633 Fix problem with glyph cache and textScaleX property
Glyphs drawn with paints that had different textScaleX values were not
being recognized as different, so the glyph cache was being used regardless
of different scaleX values. This change adds the scaleX attribute to the native
Font object to allow the cache to distinguish between this difference and cache
accordingly.

Change-Id: I5d8fc26d47460b27dc8e373a473d46b2f1b8dc30
2011-03-02 14:02:19 -08:00
Fabrice Di Meglio
d313c665e6 Add TextLayout Cache
- use GenerationCache for caching
- move GenerationCache.h from libs/hwui/utils to include/utils
- add #define for cache activation / deactivation

Change-Id: Ifaf519f0b5e33b087a453e4aa6430162d8438f20
2011-03-02 13:29:20 -08:00
Romain Guy
d643bb56fd Correctly mark layers dirty when drawing WebView.
Change-Id: I7ae0c3cfa0916d8fbeaf01e8da127c621a06a0f4
2011-03-01 14:55:21 -08:00
Romain Guy
321dce646d Avoid UTF-8 conversions and string copies whenever possible.
Change-Id: Ie4584417bbb7247e6c567fbfdb819529e548bb8f
2011-03-01 11:45:33 -08:00
David Li
4368c449d7 Merge "Fix mTexCoordsSlot > 0 check to mTexCoordsSlot >= 0" 2011-02-25 12:59:14 -08:00
David Li
cf28957c89 Fix mTexCoordsSlot > 0 check to mTexCoordsSlot >= 0
0 Is a valid attribute location.

Change-Id: Ib24335f48efd6cc59e2ab877569d7d0c95f8490a
Signed-off-by: David Li <davidxli@google.com>
2011-02-25 12:05:44 -08:00
Romain Guy
7b8b758924 Remove the right entries from the cache when a GC happens.
Change-Id: I4649b18c4721a5511a404299e771e675c843407b
2011-02-24 19:52:37 -08:00
Romain Guy
b37cbec6d0 Correctly blend translucent GIF bitmaps.
Change-Id: Ifeb2c1d97a4c6dfeb1a7b5b26f1a3153e9f8da7f
2011-02-24 17:21:29 -08:00
Derek Sollenberger
6062c5912d Skia Merge (revision 808)
This is a companion CL to the one found in /external/skia

Change-Id: If81748545435cab20a5d8479329ab333cb973e16
2011-02-22 16:07:36 -05:00
Alex Sakhartchouk
894df17eee Fixing font renderer attribute slot locations.
Change-Id: I6377bb641df7d8372d873c00790189f9a190afd6
2011-02-17 16:45:37 -08:00
Romain Guy
b18d2d0079 Dirty layers in the area covered by a drawBitmapMesh() call
Bug #3410827

Change-Id: Ic8b4f6201af94497bba86c75819588c78debddc2
2011-02-10 15:52:54 -08:00
Mike Cleron
851beae717 Merge "Properly handle dirty rectangles generated from 9-patches Bug #3409580" into honeycomb 2011-02-04 15:29:42 -08:00
Romain Guy
c78b5d50f9 Properly handle dirty rectangles generated from 9-patches
Bug #3409580

This bug affects anything that draws a 9patch inside a layer, this includes
launcher's workspace, all of the fade animations, etc.

Change-Id: Icbe8ecd158e3d5f44d07516462de68c5d1fb0a8f
2011-02-04 14:00:42 -08:00
Chet Haase
5a7e828842 Fix crash when Paths are GCd in hw accelerated apps
A recent change to optimize path rendering didn't account for
the destruction of native objects by the VM finalizer. We may be
done with the Java level version before we're done with the native
structure that's used by the display list. For example, a drawing
method on a View that creates a temporary path to render into the
canvas will implicitly create a native structure that is put onto
the GL display list. That temporary path may go away, but the native
version should stick around as long as the display list does.

The fix is to refcount the original native version of the path
and only delete it when the refcoutn reaches zero (which means that
it is no longer needed by any display list). This is a similar mechanism
used for bitmaps and shaders.

Change-Id: I4de1047415066d425d1c689aa60827f97729b470
2011-02-04 12:50:55 -08:00
Romain Guy
f28daffda5 Empty the clip rect when intersection is empty.
Bug #3410035

Change-Id: I5ceb80514d3b20c9ad230478549ad31ced403d53
2011-02-04 00:59:34 -08:00
Chet Haase
d63cbd1076 Fix leak in reused display lists
Change-Id: I32a9c41abf8f8cbcaaaa6fcc82d296800014a1b2
2011-02-03 16:33:26 -08:00
Romain Guy
2fc941e465 Fixes cache misses and extra allocations.
Bug #3421454

Change-Id: If4d5c960a7e4c581a9d213073e658284b4e1c497
2011-02-03 16:20:08 -08:00
Romain Guy
09b7c91de7 Allocate layers from the layers pool.
Bug #3413433

This change will be beneficial to Launcher to avoid hiccups when
swiping pages of icons. When a layer is discarded, it is kept
in the layers pool instead of being destroyed right away. This
favors memory reuse over allocations.

Change-Id: Ifb6944ba83d6ceb67c331527c0827b26ce648eb1
2011-02-02 20:28:09 -08:00