• Home
  • History
  • Annotate
  • only in /frameworks/base/libs/hwui/
History log of /frameworks/base/libs/hwui/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
318ae7bb92869d99a05388c598ad105e7aa4cdbd 25-Sep-2013 Romain Guy <romainguy@google.com> Take SkBitmap's stride into account when uploading textures
Bug #10151807

Change-Id: I7ba4804fa3619088fea70eb55f10519fff0bf5f0
xtensions.h
extureCache.cpp
extureCache.h
ont/CacheTexture.cpp
ont/CacheTexture.h
d8a84a8609951826135a2e41a1cdd6b7cf680e27 21-Sep-2013 Chris Craik <ccraik@google.com> Merge "Correct bitmap merging logic" into klp-dev
996fe656340ede058a6f0e6b18f9ec525ddb4e27 21-Sep-2013 Chris Craik <ccraik@google.com> Correct bitmap merging logic

bug:10863163

This fixes two issues

The check for pure translation was incorrect. It was fixed and renamed
for clarity.

Certain matrix paths weren't setting kTypePositiveScale. For
simplicity (and because positive scale is simple to check) removed
flag in favor of dynamic checking.

Change-Id: Ic5ce235653ef49a68b8b242bd89fc2e95874ecc9
isplayListOp.h
atrix.cpp
atrix.h
penGLRenderer.cpp
penGLRenderer.h
16c84069a4cc0c0d3c35e798dc5e4b0130d4a26f 20-Sep-2013 Victoria Lease <violets@google.com> fix emoji clipping in hw draw path

I guess we don't want to overwrite the last line in every RGBA glyph
with our one-line texture atlas spacer?

Bug: 10841207
Change-Id: Ief85ca58650c731e9d21dbf90942b7b44670abcc
ontRenderer.cpp
ce9ee16d654a42f31d211c60708d7b23f17c1d8e 18-Sep-2013 Chris Craik <ccraik@google.com> Merge "Conservatively estimate geometry bounds" into klp-dev
a42ceb03cf6a1cbcd9f526afb02d806b2c200ee3 18-Sep-2013 Chris Craik <ccraik@google.com> Merge "Disallow negative scale matrices in merged Bitmap drawing" into klp-dev
32f05e343c5ffb17f3235942bcda651bd3b9f1d6 18-Sep-2013 Chris Craik <ccraik@google.com> Conservatively estimate geometry bounds

bug:10761696

Avoids a case where a rect with top coordinate of (e.g.) 0.51f is
assumed to not draw in the first row of pixels, which leads to it not
being clipped. Since rounding can cause it to render in this first
pixel anyway, we very slightly expand geometry bounds.

Now, in ambiguous cases, the geometry bounds are expanded so clipping
is more likely to happen.

Change-Id: I119b7c7720de07bac1634549724ffb63935567fc
penGLRenderer.cpp
rogram.cpp
ect.h
ertex.h
d965bc5823d878a3fd056b8a95fb4eb578ed3fe4 16-Sep-2013 Chris Craik <ccraik@google.com> Disallow negative scale matrices in merged Bitmap drawing

bug:10622962

Change-Id: I55ac18ad56b53dc9e6e6ea14cd3ec4bdafa98ac3
eferredDisplayList.cpp
isplayListOp.h
atrix.cpp
atrix.h
5af5fc50c2f43fc0e0813e02cb6a950901a9c0b8 13-Sep-2013 Chris Craik <ccraik@google.com> Fix merged operation clipping

bug:10745870

Missing 'const' meant MergingDrawBatch would never clip anything.

Change-Id: Ia6367eff94cf5f437efafbc3ba7f0da102ffd956
eferredDisplayList.cpp
1de466fc91511de8428affcf1eb71dc6af946145 13-Sep-2013 Romain Guy <romainguy@google.com> Always disable the clip for layers
Bug #8149344

Change-Id: Ifd413cadb171232eb846b3d91b05b2d2457b9f35
isplayList.cpp
88ee0dac81dec12aefdeee23072df9b3864a06a4 13-Sep-2013 Chris Craik <ccraik@google.com> Merge "Move DeferredDisplayState out of ops" into klp-dev
c1c5f0870282b56dafe5a4d756e4b9e6884655a7 12-Sep-2013 Chris Craik <ccraik@google.com> Move DeferredDisplayState out of ops

bug:9969358

Instead of storing DeferredDisplayState within an op (thus forcing ops
to be tied to a single state instance), associate each op with a new
state at DeferredDisplayList insertion time.

Now, DisplayLists (and the ops within) can be reused in a single
DeferredDisplayList draw call, as ops will use different state
instances at different points in the frame.

Change-Id: I525ab2abe0c3883679f2fa00b219b293e9ec53d9
eferredDisplayList.cpp
eferredDisplayList.h
isplayList.h
isplayListOp.h
isplayListRenderer.cpp
penGLRenderer.h
874ae2adf8c24c4b9d68f781239a95ad047e212a 10-Sep-2013 John Reck <jreck@google.com> Merge "Fix scissor for functor invocation" into klp-dev
7a454ba5fee0bbb9f2e1292f8eede655516c0f2c 10-Sep-2013 Tim Murray <timmurray@google.com> Fix FontRenderer bug.

bug 10691313

Change-Id: Icd5341a3c2066e337911f040ddc935c48c8d7cd1
ontRenderer.cpp
25d2f7bc1ff9b475eff75bfff647466e91dbacb2 10-Sep-2013 John Reck <jreck@google.com> Fix scissor for functor invocation

Bug: 10677765
enableScissor() must precede setScissorFromClip() as
otherwise setScissorFromClip() doesn't do anything.
Also make sure to call setScissorFromClip() if
enableScissor() returns true as enableScissor() calls
resetScissor() if the scissor state has changed.

Change-Id: I9226b20bb256c92066aae344e4e6407540b6eae9
penGLRenderer.cpp
9578e642403c0fa4fdcb32828f27c2417cabe88d 10-Sep-2013 Tim Murray <timmurray@google.com> Add flags word to initialization.

bug 10427951

Change-Id: I1356b9b96315ead44aa3898de5604d75f9bb8be5
ontRenderer.cpp
66063ae2d6ff523bbf200cccdb9223d824c240a4 06-Sep-2013 Chris Craik <ccraik@google.com> Dump the right matrix when logging display lists

bug:10631274
Change-Id: I6b32bfcb3e207321da60807091d7ac0ecf6112ab
isplayList.cpp
54f574acf4dd5483170b8f79e2f7c70b58763ce7 26-Aug-2013 Chris Craik <ccraik@google.com> Move functor GL setup to just before functor

bug:10399469

Because the stencil setup can issue draws, it *must* come before the
GL state setup.

Change-Id: I52a36213549fc60b091a90cbb923a1f0d35f9a65
penGLRenderer.cpp
5d923200846ed59e813373bde789d97d4ccc40b5 22-Aug-2013 Romain Guy <romainguy@google.com> Second attempt at avoiding infinite loop in PathCache::trim()
Bug #10347089

Change-Id: I70f5a3933e848632473acc6636c88be5dc6ac430
athCache.cpp
0a8c51b1d0d66d6060afcec1eab33091d49332ae 22-Aug-2013 Romain Guy <romainguy@google.com> Properly account for created paths in the cache

Change-Id: I47b89b3085cefab6daac9194e7bfd3c140b37fa2
athCache.cpp
hread/TaskManager.cpp
627c6fd91377ead85f74a365438e25610ef1e2ee 21-Aug-2013 Romain Guy <romainguy@google.com> Add overdraw debugging that accounts for Deuteranomaly

Change-Id: I31f68a07aa7cf0490d2572e24e4c5ac2066a1151
aches.cpp
aches.h
penGLRenderer.cpp
roperties.h
d8c8aaa82ef90f30df647ca42453e953ee52af0f 19-Aug-2013 Tim Murray <timmurray@google.com> Handle updates to C++ API.

Change-Id: I8ab17cbae3a9a4cc3c3202b8277d49f27bdf1fec
ontRenderer.cpp
46bfc4811094e5b1e3196246e457d4c6b58332ec 17-Aug-2013 Romain Guy <romainguy@google.com> Fix hardware layers lifecycle
Bug #10075732

Hardware layers could survive across EGL terminate events.

Change-Id: Ie8565d55cb29fe6625fa1584d695edfecd37ab5e
aches.cpp
b0a41ed3dcc34a2b4026f6cc8336796f3523aa21 16-Aug-2013 Romain Guy <romainguy@google.com> Prevent ANR in apps using drawPath()
Bug #10347089

If an app clears its path cache before stopping background tasks, it could
get into an infinite loop in PathCache::trim().

Change-Id: Ieb865b762e7b00aebaba0c023769c2db286a94f5
aches.cpp
b746371de7f21ae36a14953d9b253df06838efb1 16-Aug-2013 Romain Guy <romainguy@google.com> Clear FBO cache on full memory flush

Change-Id: I44e06d5d15cd899a0522c62d7c0d042170665abb
aches.cpp
723b2feb929b96b1dde40a865c49ea18bc42f055 12-Aug-2013 Victoria Lease <violets@google.com> fix kBW_Format glyphs

Oops! kBW_Format was omitted from a couple of switch statements,
resulting in glyphs in that format being invisible.

Bug: 10206452
Change-Id: Ib2aa52250aeeecc0de1b1b78e3d0f568f368c73e
ontRenderer.cpp
ont/CacheTexture.cpp
9b5a1a28c327e6113d68302b1f0eed1d1c6f6183 09-Aug-2013 Romain Guy <romainguy@google.com> Take shadow bounds into account for quick rejects
Bug #8634346

Change-Id: I995c5205c2959d8e4da638ae47fedcda92eb1b36
isplayListOp.h
isplayListRenderer.cpp
penGLRenderer.h
003123004f7b23b3dc472d5c40b8c1a16df37a54 09-Aug-2013 Romain Guy <romainguy@google.com> Remove an unnecessary allocation

Also remove dead code from OpenGLRenderer.cpp

Change-Id: I7eb54ca19e77ee3c32f1fe9513a031e6b2e115cf
(cherry picked from commit 5c7d5ab878b26f855175a3305a14ac12fcacf25e)
penGLRenderer.cpp
penGLRenderer.h
7f6d6b0370df4b5a9e0f45bffc31ea6caeeb509d 06-Aug-2013 Romain Guy <romainguy@google.com> Split assets atlas batches
Bug #10185769

The assets atlas contains assets that need to be blended and assets
that do not need to be blended. With a single merge id, currently
set to be the pointer to the atlas itself, draw ops merging could
generate batches of commands containing both opaque and translucent
assets. The blend state was chosen from only one of the assets in
the batch, leading either to inefficiencies (blending large opaque
assets) or incorrect behaviors (not blending translucent assets.)

This change introduces two new merge ids in the atlas: an opaque
key and a blend key. These keys are simple booleans set to false
and true respectively (the values do not matter really.) Their
memory addresses are used as the merge ids when createing draw ops
batches, allowing all opaque ops to be batched together and all
translucent ops to be batched together.

Change-Id: I114dba0533c44987e53864b471ccb28c811f2025
ssetAtlas.cpp
ssetAtlas.h
eferredDisplayList.h
isplayListOp.h
250b1cfc831fd2a271c09cab547efcc5e3d5f828 01-Aug-2013 Tim Murray <timmurray@google.com> Handle updates to RS C++ API.

Change-Id: I73127fc7369643b94d4a49f31a516b50c74b54ac
ndroid.mk
ontRenderer.cpp
ontRenderer.h
b213cec0ce659c1e35c3e7f60a61bae38d94482a 02-Aug-2013 Chris Craik <ccraik@google.com> Merge "Fix quickReject's handling of AA ramp geometry"
5e49b307eb99269db2db257760508b8efd7bb97d 31-Jul-2013 Chris Craik <ccraik@google.com> Fix quickReject's handling of AA ramp geometry

By having quickReject round out the window-space geometry bounds, we
prevent the AA perimeter (which falls outside the local bounds passed
in) from drawing outside the clip.

Change-Id: I8ee36be9039a9c47906815ee2f0dbaa5eb910b82
eferredDisplayList.h
isplayListOp.h
penGLRenderer.cpp
penGLRenderer.h
ect.h
b7b93e00893f5c690a96bd3e0e10583bc5721f83 02-Aug-2013 Romain Guy <romainguy@google.com> Fix region clipping bugs
See external bug #58344

Change-Id: Iecd6c41fc8076cd76add2335d3442a6dd8878f12
isplayListOp.h
penGLRenderer.cpp
tencil.cpp
1e546815bbb736c50679a8aefc25f48561026fc5 25-Jun-2013 Victoria Lease <violets@google.com> Support RGBA fonts and bitmap fonts (and RGBA bitmap fonts)

Quite a few things going on in this commit:

- Enable bitmap strikes by default in Paint objects.

The SkPaint parameter that enables bitmap strikes was not previously
included in DEFAULT_PAINT_FLAGS. This effectively disabled bitmap
fonts. Oops! It's for the best, though, as additional work was needed
in Skia to make bitmap fonts work anyway.

- Complain if TEXTURE_BORDER_SIZE is not 1.

Our glyph cache code does not currently handle any value other than 1
here, including zero. I've added a little C preprocessor check to
prevent future engineers (including especially future-me) from
thinking that they can change this value without updating the related
code.

- Add GL_RGBA support to hwui's FontRenderer and friends

This also happened to involve some refactoring for convenience and
cleanliness.

Bug: 9577689
Change-Id: I0abd1e5a0d6623106247fb6421787e2c2f2ea19c
aches.cpp
ontRenderer.cpp
ontRenderer.h
ammaFontRenderer.h
penGLRenderer.cpp
ixelBuffer.h
ont/CacheTexture.cpp
ont/CacheTexture.h
ont/FontUtil.h
fb6c743c6e01aa2d4c457d85389a698a193c60b8 24-Jul-2013 Romain Guy <romainguy@google.com> Merge "Fix 9patches' limitation of 32 empty quads"
6cad75744ed3b81cf2c96f545368067b62c726ec 24-Jul-2013 Romain Guy <romainguy@google.com> Fix 9patches' limitation of 32 empty quads

The 9patch format allows to define more empty quads than this, remove
the use of a single int to index empty quads and replace it with a
lookup in the 9patch resource data structure.

Change-Id: I148ee5d9e0c96822b534a344e15c9d88078db7c2
xtensions.cpp
atch.cpp
atch.h
98427708a81eefcc24ae29e2f22e55f1ae44c927 23-Jul-2013 Chris Craik <ccraik@google.com> Merge "Ensure glActiveTexture is cleaned up correctly on functor resume"
9ab2d1847552aa4169b4325aae1b1368d6947a9f 23-Jul-2013 Chris Craik <ccraik@google.com> Ensure glActiveTexture is cleaned up correctly on functor resume

Change-Id: I103d7d63b17289d599c2c08dcc442cfba9b8e51d
aches.cpp
aches.h
penGLRenderer.cpp
448455fe783b0a711340322dca272b8cc0ebe473 22-Jul-2013 Romain Guy <romainguy@google.com> Use global indices array to draw layers

An array of indices local to a layer would only be necessary if
we changed the way we resolve T-junctions. Since we only ever
draw quads, let's just use the indices we use everywhere else.

This change also uses the global indices array to render list
of colored rectangles to save on the number of vertices generated
CPU-side.

Change-Id: Ia6d1970b0e9247805af5a114ca2a84b5d0b7c282
ayer.cpp
ayer.h
ayerRenderer.cpp
penGLRenderer.cpp
penGLRenderer.h
b3d83888229d9a9d40c3ada037fcf6f96e80e125 17-Jul-2013 Chris Craik <ccraik@google.com> Merge "Support stencil-based clipping for functors"
4e7b772b733593fbe25c733e95b8dcea293234b6 16-Jul-2013 Romain Guy <romainguy@google.com> Fix crashes in setMatrix() and concat()

setMatrix() was crashing in native code, only with hw acceleration on.
concat() would throw a NullPointerException. It now ignores null matrices.

Change-Id: Iebd8b410a957d2ba501570c6fbb3f680ff4a1a23
isplayListOp.h
isplayListRenderer.h
ecca6da4eab601f05a9d977c8d2651068b6e16b2 16-Jul-2013 Chris Craik <ccraik@google.com> Support stencil-based clipping for functors

bug:9070351
Change-Id: I1c54e1bea1b84b1619cce27b14f189b42cab7062
penGLRenderer.cpp
0c20c3898a533b7b76f60827cb6ea02e17c5953d 02-Jul-2013 Chris Craik <ccraik@google.com> Use global references for Bitmap AndroidPixelRefs

bug:9621717

Because we're no longer holding onto Bitmaps Java side during
DisplayList lifetime, use global refs to keep the backing byte arrays
around.

Adds back bitmap buffer passing + native ref management removed by
3b748a44c6bd2ea05fe16839caf73dbe50bd7ae9

Adds back globalRef-ing removed by
f890fab5a6715548e520a6f010a3bfe7607ce56e

Change-Id: Ia59ba42f05bea6165aec2b800619221a8083d580
esourceCache.cpp
c36fe2fc5354fadc140c898f59d47859cbdeac67 28-Jun-2013 Romain Guy <romainguy@google.com> am 55e789db: am ed96349a: am 3d1b158e: Merge "Fix out of range glCopyTexImage2D Bug #9425270" into jb-mr2-dev

* commit '55e789dbc782be0dcaf1d4bae5f32e9e2f674152':
Fix out of range glCopyTexImage2D Bug #9425270
b254c242d98f4a9d98055726446351e52bece2c6 28-Jun-2013 Romain Guy <romainguy@google.com> Fix out of range glCopyTexImage2D
Bug #9425270

A better solution would be to use glCopyTexImage2D whenever possible but
this change would be a little more dangerous.

Change-Id: Ib1aaceda39d838716285ef97f356721416822dbb
penGLRenderer.cpp
55b6f95ee4ace96c97508bcd14483fb4e9dbeaa0 28-Jun-2013 Romain Guy <romainguy@google.com> Track the atlas' generation ID
Bug #9589379

If the atlas is terminated/reinitialized and a view does not invalidate
in between it might end up using a stale AssetAtlas::Entry. This change
is similar to how 9patch meshes are cached in DrawPatchOp: we simply
track the generation ID of the cache to make sure we always use the
latest data.

Change-Id: Ib5abb3769d2ce0eabe9adc04e320ca27c422019e
ssetAtlas.cpp
ssetAtlas.h
isplayListOp.h
isplayListRenderer.cpp
penGLRenderer.cpp
penGLRenderer.h
e3b0a0117a2ab4118f868a731b238fe8f2430276 27-Jun-2013 Romain Guy <romainguy@google.com> Refcount 9-patches and properly handle GC events

This change adds refcounting of Res_png_9patch instances, the native
data structure used to represent 9-patches. The Dalvik NinePatch class
now holds a native pointer instead of a Dalvik byte[]. This pointer
is used whenever we need to draw the 9-patch (software or hardware.)

Since we are now tracking garbage collection of NinePatch objects
libhwui's PatchCache must keep a list of free blocks in the VBO
used to store the meshes.

This change also removes unnecessary instances tracking from
GLES20DisplayList. Bitmaps and 9-patches are refcounted at the
native level and do not need to be tracked by the Dalvik layer.

Change-Id: Ib8682d573a538aaf1945f8ec5a9bd5da5d16f74b
aches.cpp
isplayList.cpp
isplayList.h
isplayListRenderer.cpp
isplayListRenderer.h
atchCache.cpp
atchCache.h
athCache.cpp
athCache.h
esourceCache.cpp
esourceCache.h
f296dca95f09be9832b5dcc79717986525d2b6cb 24-Jun-2013 Romain Guy <romainguy@google.com> (Small) 9patch drawing improvements

Save a bit of memory in meshs generated from native code
Avoid an extra if/else when drawing with hardware accelration on

Change-Id: I31a4550bde4d2c27961710ebcc92b66cd71153cc
atch.cpp
4f20f8ae50ecc3b6c04afd2e62716ca87620962b 21-Jun-2013 Chris Craik <ccraik@google.com> Merge "Initialize MergingDrawBatch clip with viewport bounds"
0e87f00f8cb79635aa70b9a2dfa02bf19dc7473d 20-Jun-2013 Chris Craik <ccraik@google.com> Initialize MergingDrawBatch clip with viewport bounds

This allows merged, clipped operations to behave correctly within a
savelayer, even if the base viewport has a large offset.

Additionally, disregard opaqueness when within a
complexclip/savelayer, as the coverage can't be trusted.

Change-Id: Ic908b82a4bb410bc7fac1b4295f4874ed166efc5
eferredDisplayList.cpp
penGLRenderer.cpp
penGLRenderer.h
64d592129e4f5231f61ac2b6055e1b37f8c0ebb6 21-Jun-2013 Romain Guy <romainguy@google.com> Merge "Refcount the paint used by Canvas.drawPatch()"
16ea8d373b03b1e115dd505af70dbee4e3a3a182 21-Jun-2013 Romain Guy <romainguy@google.com> Refcount the paint used by Canvas.drawPatch()

Prevents crashes :)

Change-Id: I62103ce97490613142321f080b82c2edaed67a95
isplayListRenderer.cpp
2c290392c9a934f9ac48364af01c848b01ba8e80 21-Jun-2013 Romain Guy <romainguy@google.com> Merge "Batch 9-patches in a single mesh whenever possible"
ede7eb7749e08b6343955cf52304a17f21c54e6f 21-Jun-2013 Chris Craik <ccraik@google.com> Merge "Make op outputting const, for more general logging"
03c00b5a135e68d22ca5bb829b899ebda6ed7e9d 21-Jun-2013 Romain Guy <romainguy@google.com> Batch 9-patches in a single mesh whenever possible

This change also fixes the way batched bitmaps were handled
inside a layer. The layer is now correctly dirtied to minimize
the amount of pixels to blend.

Fix alpha, mode and opaque computations for DrawPatchOp.

Change-Id: I1b6cd581c0f0db66c1002bb4fb1a9811e55bfa78
isplayListOp.h
isplayListRenderer.cpp
penGLRenderer.cpp
penGLRenderer.h
atch.cpp
atch.h
atchCache.cpp
ixelBuffer.cpp
d485ef27c795648c4a05c4c089e8c5a15712fd36 21-Jun-2013 Romain Guy <romainguy@google.com> Merge "An identity matrix should be considered a pure translate matrix"
f6bed4f12a2c975678fc0bdea15054ab169aafb5 21-Jun-2013 Romain Guy <romainguy@google.com> An identity matrix should be considered a pure translate matrix

Change-Id: I75e91797e8270f902f67bdd7bb526cccc23adc6b
atrix.cpp
atrix.h
d4fed90d246a8decf962cd3a63507a3637354fb1 21-Jun-2013 Romain Guy <romainguy@google.com> Merge "Add debugging logs for GPU pixel buffers"
9e6f3ac109b5cd7736122d1bdf83ed38b9d739c6 21-Jun-2013 Romain Guy <romainguy@google.com> Add debugging logs for GPU pixel buffers

Change-Id: I7edb04dd30ee6fd823099e72788169cc185e70f2
ixelBuffer.cpp
c5493fb7fa1f6995955c667d4377f2337f2cf465 20-Jun-2013 Chris Craik <ccraik@google.com> Make op outputting const, for more general logging

Change-Id: Iaf78985ee5558e0b5d32d7bc1cd039eaffc820e5
isplayListOp.h
fb5a41a371e540f402e3dd987b0fbf92d1267902 20-Jun-2013 Romain Guy <romainguy@google.com> Merge "Fix regression: TextureView.setAlpha() was ignored"
2458939b5f926176a485a3196f59688eed78e858 19-Jun-2013 Romain Guy <romainguy@google.com> Fix regression: TextureView.setAlpha() was ignored

Change-Id: I9f43eec0fe23a65dcc1cf9cd0ac1f5e8907786a7
penGLRenderer.cpp
cadc5bf4116945a1800061f984d95175e20caba6 19-Jun-2013 Romain Guy <romainguy@google.com> Merge "Share Caches' index buffer with FontRenderer"
31e08e953fe7bdb1b1cbc247156cb6a19917a2f1 19-Jun-2013 Romain Guy <romainguy@google.com> Share Caches' index buffer with FontRenderer

This reduces state changes when we draw 9patches and text together,
which happens *a lot*. Also disable the NV profiling extension by
default since it doesn't play nice with display lists deferrals.
To enable it set debug.hwui.nv_profiling to true.

Change-Id: I518b44b7d294e5def10c78911ceb9f01ae401609
aches.cpp
aches.h
xtensions.cpp
ontRenderer.cpp
ontRenderer.h
penGLRenderer.cpp
roperties.h
ont/CacheTexture.h
77d55c7e5c7ace27dfe56665a59edc17102418a8 18-Jun-2013 Romain Guy <romainguy@google.com> Merge "Take hinting into account when caching fonts Bug #9464403"
2d5945e88731787babce1061f44cd54f02eeefc5 18-Jun-2013 Romain Guy <romainguy@google.com> Take hinting into account when caching fonts
Bug #9464403

Change-Id: I26a5f0c17eb27d096717b444d3e18ad1d2b5a43c
ont/Font.cpp
ont/Font.h
49cc5d71192cbd776e237488218aea18a3ed14b1 18-Jun-2013 Chris Craik <ccraik@google.com> Merge "Handle all text bounds as post-translated"
f09b746acb266a849f3421df1604ebec161bb93d 18-Jun-2013 Chris Craik <ccraik@google.com> Handle all text bounds as post-translated

We were treating immediate mode bounds as pre translate, which is
inconsistent with using them for quickRejection.

This fixes the overdraw counter not drawing correctly (since it uses
immediate mode drawing.

Change-Id: I1c734d367a00942bd7d9b041822c0a9f284e70a8
isplayListOp.h
36d38cb904556025b76c6d98f9fe2ccfa1c8a304 17-Jun-2013 Chris Craik <ccraik@google.com> Merge "Better handle op size edge cases"
d72b73cea49f29c41661e55eb6bfdbc04f09d809 17-Jun-2013 Chris Craik <ccraik@google.com> Better handle op size edge cases

bug:9464358

Previously, empty and unknown sized ops are assumed to fully cover
their clip. This is now corrected such that empty sized ops are
pre-rejected before defer. Additionally, unknown sized ops disable
overdraw avoidance.

Change-Id: Icf2ce24f98be5ea6299e24ffcf826790373564a1
eferredDisplayList.cpp
isplayListOp.h
penGLRenderer.cpp
penGLRenderer.h
fb5c9050978afad2c1df570a13a6747f438c27f7 17-Jun-2013 Romain Guy <romainguy@google.com> Merge "Cancel layer update when a layer is about to be destroyed Bug #9310706"
e93482f5eac3df581d57e64c2a771a96aa868585 17-Jun-2013 Romain Guy <romainguy@google.com> Cancel layer update when a layer is about to be destroyed
Bug #9310706

Change-Id: I73eea6314c326f15a979617e3a05b525935f0d3f
ayer.cpp
ayer.h
ayerCache.cpp
penGLRenderer.cpp
penGLRenderer.h
61e1ca68fa82e5228b5bfcdad8deecd9383fb183 17-Jun-2013 Chris Craik <ccraik@google.com> Merge "Check for layer renderer in flush"
8c6e17c2a9b0ad7864a261cc9a30b9623e20bdcb 17-Jun-2013 Chris Craik <ccraik@google.com> Check for layer renderer in flush

bug:9310706

In some cases flush will occur after a layer is destroyed. Avoid
trying to draw after putting the layer in the layer cache.

Change-Id: I55d66f420e7354fe552c82eb3145a7d91b4441e3
ayer.cpp
2a0451e54a3c3b397861736c42e42125bd938d43 17-Jun-2013 Chris Craik <ccraik@google.com> Merge "Fix clip merging behavior"
5216c3b05fc6c7bacd74be67b932fe3aba89cc8e 15-Jun-2013 Romain Guy <romainguy@google.com> Merge more 9patches

Change-Id: If8b16af84f0ee42afc406922d15897e51d833e68
isplayListOp.h
a02c4ed885d97e516f844ddb0a96083f1b45b4cb 14-Jun-2013 Chris Craik <ccraik@google.com> Fix clip merging behavior

Previously, a new op with a clipped side could be added to a
MergingDrawBatch without considering the batch's current bounds.

Change-Id: I1b873ecf821bad7cda6630c3f311edd90ac5cc8c
eferredDisplayList.cpp
penGLRenderer.cpp
penGLRenderer.h
d1f9aaa5d776a94907f9e5b632125648043c47b3 14-Jun-2013 Chris Craik <ccraik@google.com> Merge "Fix various draw ops that may incorrectly not scissor"
39a908c1df89e1073627b0dcbce922d826b67055 13-Jun-2013 Chris Craik <ccraik@google.com> Fix various draw ops that may incorrectly not scissor

bug:8965976

Also consolidates quickReject scissor-ing and scissor-less paths.
Renamed plain 'quickReject' method, as it has sideEffects beyond what
the java and skia canvases do.

Change-Id: I4bdf874d3c8f469d283eae1e71c5e7ea53d47016
isplayList.cpp
penGLRenderer.cpp
penGLRenderer.h
ect.h
735760e3c28c18a86ba503031497cb2d5fa81903 14-Jun-2013 Romain Guy <romainguy@google.com> Merge "Add new Query class for debugging"
7f4307668b10467ee39d41c7ea29cf1ff238a835 13-Jun-2013 Romain Guy <romainguy@google.com> Add new Query class for debugging

This class can be used to perform occlusion queries. An occlusion query
can be used to test whether an object is entirely hidden or not.

Change-Id: Ida456df81dbe008a64d3ff4cb7879340785c6abf
aches.cpp
ither.cpp
xtensions.h
radientCache.cpp
uery.h
f70119cd776f871a82c94be8522dce02e04c73a8 13-Jun-2013 Chris Craik <ccraik@google.com> Reset batching state when overlap batch deletion occurs

Change-Id: Ifdbee9baaa734e27d15d2b54aa3b3abfffbce1e9
eferredDisplayList.cpp
eferredDisplayList.h
7112fddbe26acb12f478f4e77ff9607b523180b4 13-Jun-2013 Romain Guy <romainguy@google.com> Merge "Restore buildLayer()'s old behavior; it's synchronous again Bug #9193833"
149b015db9a478c6345cf0528fe4df3c7c2b5110 13-Jun-2013 Chris Craik <ccraik@google.com> Merge "Overdraw avoidance and merging of clipped ops"
9846de68f1b4f2720da421e5242017c28cfc93ed 13-Jun-2013 Chris Craik <ccraik@google.com> Remove crash workarounds, add logging

bug:9321162
Change-Id: I748c27f979af1a303be01db29aedcbad6d608c38
isplayList.cpp
isplayList.h
405436021da156fbe3c5d4de48bdefa564cf7fc0 13-Jun-2013 Romain Guy <romainguy@google.com> Restore buildLayer()'s old behavior; it's synchronous again
Bug #9193833

Change-Id: I4ee07e65c0a8967f0b55da030ecaad6dfc46136f
ence.h
penGLRenderer.cpp
penGLRenderer.h
28ce94a4ffc7576f40776d212f1ada79fafaa061 31-May-2013 Chris Craik <ccraik@google.com> Overdraw avoidance and merging of clipped ops

bug:8951267

If an opaque op, or group of opaque ops covers the invalidate region,
skip draw operations that precede it.

Clipped operations may now be merged, but only if they share a
clipRect - this is a very case for e.g. ListView, where all background
elements may now be a part of the same MergingDrawBatch.

It is this more aggressive merging that groups together clipped
background elements in the ListView case, enabling the overdraw
avoidance skipping the window background.

Change-Id: Ib0961977e272c5ac37f59e4c67d828467422d259
eferredDisplayList.cpp
eferredDisplayList.h
isplayListOp.h
ayer.cpp
atrix.h
penGLRenderer.cpp
penGLRenderer.h
ect.h
1e4795ab64755bdae48fe7b8cd78f204c9022791 12-Jun-2013 Romain Guy <romainguy@google.com> Merge "Avoid 9patch cache lookups when possible"
4c2547fa9244e78115cde0a259291053108c3dc7 12-Jun-2013 Romain Guy <romainguy@google.com> Avoid 9patch cache lookups when possible

This optimization saves up to 0.3ms per frame on the Play Store's
front page, on a Nexus 4 device.

Change-Id: Iaa4ef33c6e3b37e175efd5b9eea9ef59b43f14f3
isplayListOp.h
ayerRenderer.cpp
atrix.h
penGLRenderer.cpp
penGLRenderer.h
atchCache.cpp
atchCache.h
rogram.cpp
e13fb01d25b22f46206115faff2c7787d330f0d1 11-Jun-2013 Chris Craik <ccraik@google.com> am 8cb26c09: am cb5d644f: Merge "Workaround possible use after delete" into jb-mr2-dev

* commit '8cb26c099dc6357340141c9d81a1131ee404ae41':
Workaround possible use after delete
9abddd54d4177d1a9790889046407da13aa7077b 10-Jun-2013 Chris Craik <ccraik@google.com> Workaround possible use after delete

bug:9321162
Change-Id: Ic35af5b5925da56e9a143e6b33658831038f3b72
isplayList.cpp
be1b127c7bec252e0c6ab0e06ed6babed07d496f 06-Jun-2013 Romain Guy <romainguy@google.com> Assume a texture is unbound after deleting it
Bug #9316260

The GL specification indicates that deleting a bound texture has
the side effect of binding the default texture (name=0). This change
replaces all calls to glDeleteTextures() by Caches::deleteTexture()
to properly keep track of texture bindings.

Change-Id: Ifbc60ef433e0f9776a668dd5bd5f0adbc65a77a0
aches.cpp
aches.h
ither.cpp
radientCache.cpp
mage.cpp
ayer.cpp
ayerRenderer.cpp
athCache.cpp
extDropShadowCache.cpp
exture.cpp
exture.h
extureCache.cpp
ont/CacheTexture.cpp
450dc7554de90026a6dd2a1ec7108c1423fce18e 05-Jun-2013 Romain Guy <romainguy@google.com> Remove string allocations when creating display lists

Change-Id: Id520db981a3988cb980c8da5dbea8f26ef94989f
isplayList.h
8aa195d7081b889f3a7b1f426cbd8556377aae5e 05-Jun-2013 Romain Guy <romainguy@google.com> Introduce Caches::bindTexture() to reduce glBindTexture calls

Change-Id: Ic345422567c020c0a9035ff51dcf2ae2a1fc59f4
ndroid.mk
ssetAtlas.cpp
ssetAtlas.h
aches.cpp
aches.h
ither.cpp
ither.h
ontRenderer.cpp
radientCache.cpp
mage.cpp
ayer.cpp
ayer.h
ayerRenderer.cpp
penGLRenderer.cpp
penGLRenderer.h
athCache.cpp
athCache.h
kiaShader.cpp
kiaShader.h
extDropShadowCache.cpp
extDropShadowCache.h
exture.cpp
exture.h
extureCache.cpp
ont/CacheTexture.cpp
ont/CacheTexture.h
f9f0016b1ff816eb2c7561eed482c056189005f8 09-May-2013 Romain Guy <romainguy@google.com> Enable GPU pixel buffers on OpenGL ES 3.0 devices

Change-Id: I164d72ccd7a9bf6ae0e3f79dfef50083558937ba
aches.cpp
aches.h
ixelBuffer.cpp
roperties.h
7d9b1b3c02eb1ffd99742ecb7b69e3ab97d2ba18 28-May-2013 Romain Guy <romainguy@google.com> Re-initialize the 9patch cache if cleared with onTrimMemory

The 9aptch cache was reinitialized after destroying/recreating
the EGL context but not after clearing it during a normal
memory trim.

Change-Id: If6155bfc8a62439e9878bc742a4766b3bd6c6aec
atchCache.cpp
atchCache.h
a404e16e4933857464046d763ed7629cd0c86cbf 25-May-2013 Romain Guy <romainguy@google.com> Make sure atlas antries can correctly filter/wrap textures

The virtual textures would each have their own values for wrapping
and filtering which could lead to conflict and/or extraneous GL
commands being issued.

Change-Id: I64cb59a03e598f46bf645bd1d30fccfa63a07431
ssetAtlas.cpp
ssetAtlas.h
penGLRenderer.cpp
penGLRenderer.h
exture.h
608094041177193dcce7a91e8dc96a2556d29bfd 23-May-2013 Romain Guy <romainguy@google.com> Merge "Add PerfHUD ES profiling capabilities"
e9bc11f7121dbe373b0cbe5779ee6a12d824492c 23-May-2013 Romain Guy <romainguy@google.com> Add PerfHUD ES profiling capabilities

The eglGetSystemTimeNV extension can be used to enable profiling
in PerfHUD ES. When the delta of two calls to eglGetSystemTimeNV
equals 0, we now cancels display lists updates. This allows the
tool to redraw the same frame several times in a row to run its
analysis.

For better results profiling should only be attempted after
setting viewroot.profile_rendering to true using adb shell
setprop.

Change-Id: I02e3c237418004cff8d6cb0b9a37126efae44c90
xtensions.cpp
xtensions.h
341ac60009e6b3c1114938f40743fd81a0ce034f 23-May-2013 Chet Haase <chet@google.com> am 1bf58a5a: am cfbbc864: Merge "Restore previous alpha value on noop\'d DisplayList operations" into jb-mr2-dev

* commit '1bf58a5a4c3275a8de676046da311ec0c3c61c78':
Restore previous alpha value on noop'd DisplayList operations
c725903eec82aa73ebe9682d142904c06321bc2c 23-May-2013 Chet Haase <chet@google.com> Restore previous alpha value on noop'd DisplayList operations

Previously, when a DisplayList operation was rejected because it was not
in the clip bounds, the code would not properly restore the previous
state, leading to errors in alpha values of the noop'd op being applied
to unrelated operations later in the DisplayList.

Issue #9051935 Flash of grey background when transitioning to conversation view

Change-Id: I56645cc9ebf2e07be0228ca5e249213dbeb10d7d
isplayList.cpp
7f77736599c39cdd5540168fc652cf6846799a33 22-May-2013 Romain Guy <romainguy@google.com> Merge "Merge scaled bitmaps with translated bitmaps"
2db5e993b626794eb07a0ff354269f9a77da81b3 22-May-2013 Romain Guy <romainguy@google.com> Merge scaled bitmaps with translated bitmaps

Change-Id: I03089f48f97b69fcb4a0171984d3ff548d41c4a8
eferredDisplayList.cpp
isplayListOp.h
penGLRenderer.cpp
penGLRenderer.h
ect.h
41541825bc90dac740e424cdd41a8c997e15cdb7 04-May-2013 Chris Craik <ccraik@google.com> Use individual glyph positions to determine text bounds.

bug:8766924

Previously text bounds were calculated to be from 0 to totalAdvance in
the X, and from the font's top to bottom. These are incorrect,
especially in light of the font fallback mechanism.

Now, we calculate the bounds of the text as we layout each glyph.
Since these are much tighter bounds in the common case, this
significantly reduces the amount of clipping required (which in turn
enables more aggressive text merging).

Change-Id: I172e5466bf5975bf837af894a9964c41db538746
eferredDisplayList.cpp
isplayListOp.h
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
7f43674db314ab76e77cfd2a9488058eae144aa8 21-May-2013 Chris Craik <ccraik@google.com> Merge "Fix DISPLAY_LIST_DEBUG"
6045d2b7cd0fe62d4385a053bbd1a74d64614d8e 21-May-2013 Chris Craik <ccraik@google.com> Fix DISPLAY_LIST_DEBUG

will now log ops

Change-Id: I4e119999af7ceea0558225aa78926e761277fee2
isplayList.cpp
6d29c8d5218cac0fb35f3b7c253f2bdebd44f15a 09-May-2013 Chris Craik <ccraik@google.com> Add tessellation path for points

bug:4351353
bug:8185479

Point tessellation is similar to line special case, except that we
only tessellate one point (as a circle or rect) and duplicate it
across other instances.

Additionally:

Fixes square caps for AA=false lines

Cleanup in CanvasCompare, disabling interpolation on zoomed-in
comparison view

Change-Id: I0756fcc4b20f77878fed0d8057297c80e82ed9dc
penGLRenderer.cpp
penGLRenderer.h
athTessellator.cpp
athTessellator.h
rogram.h
rogramCache.cpp
ertex.h
e8f9a37395691f8988e09c8efb9ab1601025c5dc 10-May-2013 Chris Craik <ccraik@google.com> am f420a36e: am 4329ee25: Merge "Fix off by one error in log tracking" into jb-mr2-dev

* commit 'f420a36e5f62a9ab38f6782db78f5d94947b034e':
Fix off by one error in log tracking
d4b43b3cf3ee109a5251228dcc1d9bc3c25ff150 09-May-2013 Chris Craik <ccraik@google.com> Fix off by one error in log tracking

bug:8875715

Additionally moves op logging before the op is executed, to print
correctly, in pre-order traversal

Change-Id: I4e9566261f8363c73739d183e6d82b854f72ffad
eferredDisplayList.cpp
isplayList.cpp
isplayListLogBuffer.cpp
1f5762e646bed2290934280464832782766ee68e 07-May-2013 Mathias Agopian <mathias@google.com> libutils clean-up

Change-Id: I11ee943da23a66828455a9770fc3c5ceb4bbcaa9
ontRenderer.h
d5207b2eb9ba520da822d61ff78b539842fc5255 07-May-2013 Romain Guy <romainguy@google.com> Fix double-free in AssetAtlas
Bug #8833153

If Atlas::terminate() is called twice without an init() in between
libhwui would double-free Atlas::mImage. This lead to a lot of crashes
with the monkeys as they can easily trigger memory trims.

Change-Id: I96798414e5e71cd498aaca85a790661ebccdaa91
ssetAtlas.cpp
72bd95b8feb7ef41eb5dd00003b1aed8f30f4abe 06-May-2013 Romain Guy <romainguy@google.com> am b90ff505: am fdf13c90: Merge "Convert alpha from [0..1] to [0.255] range Bug #8808886" into jb-mr2-dev

* commit 'b90ff505df143abd957cfc19b60727e3460ee68c':
Convert alpha from [0..1] to [0.255] range Bug #8808886
94268b0dd908ea003772e24bec12cea473434486 06-May-2013 Chet Haase <chet@google.com> am 33be275d: am d65eebf4: Merge "Fix scaled-view droppings artifact" into jb-mr2-dev

* commit '33be275deb072ca3e6155b61370578b16dbee64a':
Fix scaled-view droppings artifact
1f8a0db348f6c7bf2d1f55065472c913677f3d69 06-May-2013 Romain Guy <romainguy@google.com> Remove stray log

Change-Id: I392eea216ad67f376ded802c19a3e2287aacc6f8
atchCache.cpp
fdf13c90cb6b412dd93ae6a8990bf962e0d71407 04-May-2013 Romain Guy <romainguy@google.com> Merge "Convert alpha from [0..1] to [0.255] range Bug #8808886" into jb-mr2-dev
87b515cde53f3c8cc3fdf698c100e67508487e59 04-May-2013 Romain Guy <romainguy@google.com> Convert alpha from [0..1] to [0.255] range
Bug #8808886

Without this conversion, alpha was always set to 0 or 1 which causes
things to disappear mysteriously. Mysteries are meant to be solved
and I solved them all in 6 characters.

Change-Id: I2078420fbe968c046e999b0eabb24403e71108fd
penGLRenderer.cpp
78dd96d5af20f489f0e8b288617d57774ec284f7 03-May-2013 Romain Guy <romainguy@google.com> Add an on-screen overdraw counter

The counter can be enabled by setting the system property called
debug.hwui.overdraw to the string "count". If the string is set
to "show", overdraw will be highlighted on screen instead of
printing out a simple counter.

Change-Id: I9a9c970d54bffab43138bbb7682f6c04bc2c40bd
aches.cpp
penGLRenderer.cpp
penGLRenderer.h
rogram.h
rogramCache.cpp
roperties.h
hread/TaskManager.h
259b696b00f07938569fc9a0ea43858cdaab909b 04-May-2013 Chet Haase <chet@google.com> Fix scaled-view droppings artifact

Sometimes views that are scaled leave behind rows/columns on the
screen as they move/scale around.

The problem was that the pivot point around which the scale takes place
(in the default case of scaling around the center of the view)
was getting truncated to integer coordinates in the display list.
Meanwhile, the pivot point at the Java level was using the true float
values, resulting in a mis-match between the invalidation rectangle
(computed at the Java level) and the drawing-operation rectangle (computed
at the native level).

This only occurred when views had odd bounds (thus the integer representation
of the center differed from the float representation of the center), and only
when some other drawing operation would expand the clip rect to allow the
incorrect drawing operation (using the wrong pivot point) to draw outside of
its clip boundaries.

Issue #8617023 7x7 screen not updated correctly

Change-Id: If88889b9450d34535df732b78077a29b1f24802d
isplayList.cpp
1212c9dafe932f70956651338568c5e1fdf21bcf 03-May-2013 Romain Guy <romainguy@google.com> Remove warning

Change-Id: Ia1523d02dc2b7f58ca26a142a5aef710792a5f3d
ndroid.mk
mage.cpp
mage.h
877cfe0e32a845d5a58252b8a6e1f54f95b4379c 03-May-2013 Romain Guy <romainguy@google.com> Wrap EGLImage with a C++ API

Change-Id: I0fa3282ea7e2ace3ba2aadd929b32232b3d41628
ssetAtlas.cpp
ssetAtlas.h
mage.h
3b748a44c6bd2ea05fe16839caf73dbe50bd7ae9 18-Apr-2013 Romain Guy <romainguy@google.com> Pack preloaded framework assets in a texture atlas

When the Android runtime starts, the system preloads a series of assets
in the Zygote process. These assets are shared across all processes.
Unfortunately, each one of these assets is later uploaded in its own
OpenGL texture, once per process. This wastes memory and generates
unnecessary OpenGL state changes.

This CL introduces an asset server that provides an atlas to all processes.

Note: bitmaps used by skia shaders are *not* sampled from the atlas.
It's an uncommon use case and would require extra texture transforms
in the GL shaders.

WHAT IS THE ASSETS ATLAS

The "assets atlas" is a single, shareable graphic buffer that contains
all the system's preloaded bitmap drawables (this includes 9-patches.)
The atlas is made of two distinct objects: the graphic buffer that
contains the actual pixels and the map which indicates where each
preloaded bitmap can be found in the atlas (essentially a pair of
x and y coordinates.)

HOW IS THE ASSETS ATLAS GENERATED

Because we need to support a wide variety of devices and because it
is easy to change the list of preloaded drawables, the atlas is
generated at runtime, during the startup phase of the system process.

There are several steps that lead to the atlas generation:

1. If the device is booting for the first time, or if the device was
updated, we need to find the best atlas configuration. To do so,
the atlas service tries a number of width, height and algorithm
variations that allows us to pack as many assets as possible while
using as little memory as possible. Once a best configuration is found,
it gets written to disk in /data/system/framework_atlas

2. Given a best configuration (algorithm variant, dimensions and
number of bitmaps that can be packed in the atlas), the atlas service
packs all the preloaded bitmaps into a single graphic buffer object.

3. The packing is done using Skia in a temporary native bitmap. The
Skia bitmap is then copied into the graphic buffer using OpenGL ES
to benefit from texture swizzling.

HOW PROCESSES USE THE ATLAS

Whenever a process' hardware renderer initializes its EGL context,
it queries the atlas service for the graphic buffer and the map.

It is important to remember that both the context and the map will
be valid for the lifetime of the hardware renderer (if the system
process goes down, all apps get killed as well.)

Every time the hardware renderer needs to render a bitmap, it first
checks whether the bitmap can be found in the assets atlas. When
the bitmap is part of the atlas, texture coordinates are remapped
appropriately before rendering.

Change-Id: I8eaecf53e7f6a33d90da3d0047c5ceec89ea3af0
ndroid.mk
ssetAtlas.cpp
ssetAtlas.h
aches.cpp
aches.h
ebug.h
isplayListOp.h
isplayListRenderer.cpp
isplayListRenderer.h
xtensions.h
penGLRenderer.cpp
penGLRenderer.h
atch.cpp
atch.h
atchCache.cpp
atchCache.h
rogram.cpp
rogram.h
roperties.h
exture.h
vMapper.h
69ca575b5bdfa023858db3fff11ec5c2a7b277a9 24-Apr-2013 Chris Craik <ccraik@google.com> Merge "Avoid incorrectly dirtying the functor output rect"
4a2bff7b387403ac976cd041cb5a1b57afa44d9c 16-Apr-2013 Chris Craik <ccraik@google.com> Avoid incorrectly dirtying the functor output rect

bug:8640186
Change-Id: I360cb85e59cfdd0b499561e92b81089341d07046
penGLRenderer.cpp
684634144b15e4da0ed04baa2c4531ef538652a6 21-Apr-2013 Chet Haase <chet@google.com> am 371d4ccc: am 339ac854: Merge "Fix quickReject logic to account for setClipChildren() setting" into jb-mr2-dev

* commit '371d4cccde56ec4d26e51f8e82ef68f196169a3d':
Fix quickReject logic to account for setClipChildren() setting
dd671599bed9d3ca28e2c744e8c224e1e15bc914 19-Apr-2013 Chet Haase <chet@google.com> Fix quickReject logic to account for setClipChildren() setting

The rendering code optimizes by rejecting drawing operations that
lie outside of the bounds of their views. This works in most
situations, but breaks down when containers have called
setClipChildren(false), because we reject drawing that is outside
of that container, but which should be drawn anyway.

Fix is to pass in the value of that flag to the DisplayList drawing
routines which take that flag into account when deciding whether
to quickReject any particular operation.

Issue #8659277 animation clipping

Change-Id: Ief568e4db01b533a97b3c5ea5ad777c03c0eea71
isplayList.cpp
isplayList.h
isplayListOp.h
e0cedc40a2c6671370fd0c434874e7e79c0ba71f 18-Apr-2013 Chris Craik <ccraik@google.com> am 17917a95: am d3f9ffe2: Merge "Prevent transformed ops from merging in the first place" into jb-mr2-dev

* commit '17917a95f355634ba881cd3f587002cb7ef27ce6':
Prevent transformed ops from merging in the first place
d3f9ffe28d1599e40f8c9a7c0c32465324bb2828 18-Apr-2013 Chris Craik <ccraik@google.com> Merge "Prevent transformed ops from merging in the first place" into jb-mr2-dev
ee5b2c6de7fb32d945a5a1303012a5f94b719dfa 18-Apr-2013 Chris Craik <ccraik@google.com> Prevent transformed ops from merging in the first place

bug:8649215

Previously we prevented ops with non-translate transforms from
merging, but missed the case of the first op in a merging batch
containing a non-translate transform.

This fulfills the assumption of drawText's non-immediate mode that
merged ops will have pure translate transforms.

Change-Id: I6f6db341aff3f7e84e74b4c3ccf970d585a2db1a
isplayListOp.h
e76dd37bdb75e7ed757e1284249c64f0c58e869d 17-Apr-2013 Chris Craik <ccraik@google.com> am 680ca941: am ec5dc76a: Merge "Make layer double drawing visible in overdraw debug mode" into jb-mr2-dev

* commit '680ca9418b6b3f01547b286d1a80e07e186bc05f':
Make layer double drawing visible in overdraw debug mode
34416eaa1c07b3d7a139e780cea8f8d73219650e 16-Apr-2013 Chris Craik <ccraik@google.com> Make layer double drawing visible in overdraw debug mode

A clipped saveLayer will cause two draws - first to an onscreen
buffer, then again back to the framebuffer. This change - when in
overdraw debug - reissues draws associated with a clipped saveLayer,
but only to the stencil buffer. Operations within a saveLayer are
shown correctly to be twice drawn, and View.setAlpha() without an
associated hardware layer, or hasOverlappingRendering() are made more
visible.

Hardware layers, on any frame that they are updated, similarly draw
twice, and will also be counted against the stencil buffer doubly.

Note: greater depths of layers - e.g. a saveLayer within a saveLayer -
are not respected, as that would require additional region tracking.

Change-Id: I61fb0e61038fe66013d59914c20bb47a550dea7d
ayer.cpp
ayer.h
penGLRenderer.cpp
09d3636485eb1601c5beaf0d8682bb3027d2271d 16-Apr-2013 Romain Guy <romainguy@google.com> Fix indentation

Change-Id: If54b7d7c016acb5e7300323d2eada57142a814c0
ndroid.mk
55709fc1c7b2741ba3cf7f160d7d8644c112bb99 15-Apr-2013 Chris Craik <ccraik@google.com> am 55b883b0: am 30c990c3: Merge "Draw Operation merging" into jb-mr2-dev

* commit '55b883b0a960b37aa453253f3ccb614dd95c221c':
Draw Operation merging
30c990c361291ad578ef4ffe4a4dd0fd6080797b 15-Apr-2013 Chris Craik <ccraik@google.com> Merge "Draw Operation merging" into jb-mr2-dev
527a3aace1dd72432c2e0472a570e030ad04bf16 04-Mar-2013 Chris Craik <ccraik@google.com> Draw Operation merging

Merge simple bitmap draw operations and text operations to avoid
issuing individual gl draws for each operation. Merging other ops to
be done eventually.

The methods are different - the bitmap merging generates a single
mesh for reused, unclipped images (esp. repeated images in a listview)

The text approach queries just defers the normal font rendering until
the last drawText in the sequence that can share the same shader.

Patches are sorted and merged, but don't yet have a multiDraw
implementation. For now, the pretending-to-merge gives better sorting
behavior by keeping similar patches together.

Change-Id: Ic300cdab0a53814cf7b09c58bf54b1bf0f58ccd6
ebug.h
eferredDisplayList.cpp
eferredDisplayList.h
isplayList.cpp
isplayListOp.h
isplayListRenderer.cpp
isplayListRenderer.h
ontRenderer.cpp
ontRenderer.h
penGLRenderer.cpp
penGLRenderer.h
tils/TinyHashMap.h
5069101c08ff11e78bfab7eeb7360b0b12e3b54b 13-Apr-2013 Romain Guy <romainguy@google.com> am 5141bf80: am 80fccb4d: Merge "There should be a mandatory coder\'s license. Bug #8586560" into jb-mr2-dev

* commit '5141bf801e9d58e618c76e4cdc042218b24193fc':
There should be a mandatory coder's license. Bug #8586560
4abab937bf3f168763a7c029275bf1de151ec1ae 13-Apr-2013 Romain Guy <romainguy@google.com> There should be a mandatory coder's license.
Bug #8586560

And I don't deserve to pass the test.

Change-Id: Ic7886205511f16145a925fc860e4a03dfaf473d5
ither.cpp
0f6ba077321ef275649fdcc29c0b323e9740d739 13-Apr-2013 Romain Guy <romainguy@google.com> am 543c5dcf: am efcb252f: Merge "Properly computer gradient textures width" into jb-mr2-dev

* commit '543c5dcfcb93925a5b9ac073eedb0bd813b2ebe0':
Properly computer gradient textures width
95aeff8f11968c8b29ae114bb5e1172c70cf7634 13-Apr-2013 Romain Guy <romainguy@google.com> Properly computer gradient textures width

Only on devices that do not have the npot extension

Change-Id: I472a13dc707d2abaf5fcc06f99c9da343b333558
radientCache.cpp
e48da96ab5837f305ef55d5ea9d3215930884f83 12-Apr-2013 Romain Guy <romainguy@google.com> resolved conflicts for merge of 886e1204 to master

Change-Id: Id002d2ae799c6946672335f122ecbfa07d9c0bc1
cf51a4199835e9604aa4c8b3854306f8fbabbf33 09-Apr-2013 Romain Guy <romainguy@google.com> Introduce PixelBuffer API to enable PBOs

PBOs (Pixel Buffer Objects) can be used on OpenGL ES 3.0 to perform
asynchronous texture uploads to free up the CPU. This change does not
enable the use of PBOs unless a specific property is set (Adreno drivers
have issues with PBOs at the moment, Mali drivers work just fine.)

This change also cleans up Font/FontRenderer a little bit and improves
performance of drop shadows generations by using memcpy() instead of
a manual byte-by-byte copy.

On GL ES 2.0 devices, or when PBOs are disabled, a PixelBuffer instance
behaves like a simple byte array. The extra APIs introduced for PBOs
(map/unmap and bind/unbind) are pretty much no-ops for CPU pixel
buffers and won't introduce any significant overhead.

This change also fixes a bug with text drop shadows: if the drop
shadow is larger than the max texture size, the renderer would leave
the GL context in a bad state and generate 0x501 errors. This change
simply skips drop shadows if they are too large.

Change-Id: I2700aadb0c6093431dc5dee3d587d689190c4e23
ndroid.mk
aches.cpp
aches.h
eferredDisplayList.cpp
ontRenderer.cpp
ontRenderer.h
ammaFontRenderer.cpp
ammaFontRenderer.h
penGLRenderer.cpp
ixelBuffer.cpp
ixelBuffer.h
roperties.h
extDropShadowCache.cpp
ont/CacheTexture.cpp
ont/CacheTexture.h
ont/Font.cpp
c4c8f2d82e4d047c479fbdad5e1e296d745bfe3b 10-Apr-2013 Chet Haase <chet@google.com> am 78b24b6f: am dacd4751: Merge "Fix Contacts animation jank" into jb-mr2-dev

* commit '78b24b6f03f467a59afd6797b4c03224fe3af767':
Fix Contacts animation jank
dacd47516321d263efa7489b5b9bd7d8e1714332 10-Apr-2013 Chet Haase <chet@google.com> Merge "Fix Contacts animation jank" into jb-mr2-dev
58d110afa0e0f3843d72617046185a3c2d48dca9 10-Apr-2013 Chet Haase <chet@google.com> Fix Contacts animation jank

The last frame of an animation stays stuck on the screen for a couple of frames.
Specifically, the "Quick Contact" animation that animates the picture
closed (fades/scales it away) animates all the way to the end... then hangs there
briefly before being taken down.

The problem is a rendering bug where we correctly detect that a DisplayList
has nothing to draw (since the last frame is completely transparent, alpha==0),
but incorrectly ignore the fact that we cleared the transparent-background
window prior to not-drawing that DisplayList. When we detect that there's
nothing to draw, we don't bother swapping buffers. So even though we drew
the right thing (clearing the buffer), we didn't actually post the buffer to the
screen.

This change factors in both the clear and the draw to decide when to swap buffers.

Issue #8564865 Quick contact close animation jank redux

Change-Id: Ib922cff88a94f025b62f7461c1a29e96fe454838
penGLRenderer.cpp
28af35e8cdc601c7ab9c7287d9e72fdc331e8a9d 10-Apr-2013 Ying Wang <wangying@google.com> resolved conflicts for merge of a976bddd to master

Change-Id: I64e1cbfb0eee891ce4d1eee40eefdcedcc501f7f
d8b26d6c424741dd09cf70ee88fd237807aaf301 10-Apr-2013 Ying Wang <wangying@google.com> Merge "Add liblog" into jb-mr2-dev
d685894212e6dbeac1fda4996903c1da115d49a6 10-Apr-2013 Ying Wang <wangying@google.com> Add liblog

Bug: 8580410
Change-Id: I746aa8258866508c3a725d0773faf4518096548f
ndroid.mk
6c825d49b77b1b257b59a30c24792d1bf0f5df84 09-Apr-2013 Romain Guy <romainguy@google.com> am 52706c6c: am 4a745e78: Merge "Change the dither texture\'s swizzling" into jb-mr2-dev

* commit '52706c6cc0d8ded20cfa8d46f200ca38f1009468':
Change the dither texture's swizzling
032d47af737d803e841ab79f38ac9068a46c9aeb 09-Apr-2013 Romain Guy <romainguy@google.com> Change the dither texture's swizzling

This is a more elegant way to sample from a float alpha texture.
Instead of sampling from the red channel in the fragment shader
we can set the alpha channel swizzle to redirect it to the
red channel. This lets us sample from the alpha channel in the
fragment shader and get the correct value.

Change-Id: I95bbf7a82964e1bf42c0fee1b782b6bdbbcef618
ither.cpp
rogramCache.cpp
6adbb9033502d98b77176a2fe4001f37d177d78c 06-Apr-2013 Romain Guy <romainguy@google.com> am 5ea0465d: am 8299f683: Merge "Use float textures to render gradients when possible" into jb-mr2-dev

* commit '5ea0465d4550944e2e5ac953a5c18ef31f31ec4d':
Use float textures to render gradients when possible
b48800428906ae455c2b63acacd44e390e1fee49 05-Apr-2013 Romain Guy <romainguy@google.com> Use float textures to render gradients when possible

Float textures offer better precision for dithering.

In addition this change removes two uniforms from gradient shaders.
These uniforms were used to dither gradients but their value is
a build time constant. Instead we hardcode the value directly in
the shader source at compile time.

Change-Id: I05e9fd3eef93771843bbd91b453274452dfaefee
ither.cpp
ither.h
radientCache.cpp
radientCache.h
rogramCache.cpp
rogramCache.h
f7648b7f24bc4cf8a66df4c0cfb5e8aa2b7d3ac8 05-Apr-2013 Romain Guy <romainguy@google.com> am 21af446c: am a151ef8c: Merge "First OpenGL ES 3.0 based optimization" into jb-mr2-dev

* commit '21af446ce9704bdc465bf15755148c5de50ea019':
First OpenGL ES 3.0 based optimization
a151ef8c667a52d9fae28c09f780784f19bdb039 05-Apr-2013 Romain Guy <romainguy@google.com> Merge "First OpenGL ES 3.0 based optimization" into jb-mr2-dev
59f5015fc3c1e0be54fddc2abbdd1a854f742362 05-Apr-2013 Chris Craik <ccraik@google.com> am 233f6730: am de4f8c38: Merge "Traverse layers in update order" into jb-mr2-dev

* commit '233f67302e7d35242613c5d4502459b085868595':
Traverse layers in update order
de4f8c3872c6284605c168687c69ebfa72ea49d2 05-Apr-2013 Chris Craik <ccraik@google.com> Merge "Traverse layers in update order" into jb-mr2-dev
1206b9bba91f7ed899c5c87427cce725fe5aadfc 04-Apr-2013 Chris Craik <ccraik@google.com> Traverse layers in update order

bug:8540150

Layers now require traversal in update order, as it will be child
first, then parent for layer-in-layer

Fixes issue with deferred layer playback not flushing in order, and
thus child not painting before parent

Also fixes DisplayList to only be cleared after flush in deferred list

Change-Id: I2f284d00079cdb20798aeef6a1c94e823940db40
eferredDisplayList.h
ayer.cpp
penGLRenderer.cpp
0908764b2b3cf5075df4178a5f0a8547dcb7b317 04-Apr-2013 Romain Guy <romainguy@google.com> First OpenGL ES 3.0 based optimization

This change uses a new OpenGL ES 3.0 feature to upload less data when
the font cache needs to be update. This can result in significant
performance improvements on device with large textures or with locales
that use a lot of glyphs (CJK for instance.)

This change also fixes various unpack alignment issues. The unpack
alignment, as well as the unpack row length, is not texture specific
but a global state that affect all glTex/SubImage2D calls. Some of
them were missing the appropriate glPixelStorei() call. This could
result in corrupted textures.

Change-Id: Iefb429d4d0d0b4e0faeadf27daafee6d30a21d85
ontRenderer.cpp
ayer.cpp
ayer.h
ayerRenderer.cpp
penGLRenderer.cpp
ont/CacheTexture.cpp
ont/CacheTexture.h
2a54c185a64b247ff261de962e3a4e0ddf4c2ff0 04-Apr-2013 Romain Guy <romainguy@google.com> am ae74f598: am eaadd123: Merge "Add internal API to query GL version number" into jb-mr2-dev

* commit 'ae74f59856d4f790c173857bb8024291d585861d':
Add internal API to query GL version number
eaadd123a7d7b0a02046db33e882ddcef33e1a49 04-Apr-2013 Romain Guy <romainguy@google.com> Merge "Add internal API to query GL version number" into jb-mr2-dev
df1dc28ba0c63b195016ad0453fc58025ee82acb 30-Mar-2013 Romain Guy <romainguy@google.com> Add internal API to query GL version number

Change-Id: Idc02efc237b8e97445a9bab05c291bf193c7f279
xtensions.cpp
xtensions.h
e4d9a01bfc7451afff1ed399a5801c7aa2af2831 29-Mar-2013 Dan Morrill <morrildl@google.com> Phase 1 of refactoring SystemServer.

SystemServer is currently a monolithic class that brings up key system
services. This change is the first phase of refactoring it to be more
configurable. Specifically, it adds a set of on/off switches used to control
startup of individual services. Future plans include finer grained controls
and a more explicit and consistent startup sequence for these services.

Change-Id: I7299f5ce7d7b74a34eb56dffb788366fbc058532
ndroid.mk
ontRenderer.cpp
ontRenderer.h
ff7ae2dccd3b8ba015963126d8a655b417d3fcd3 03-Apr-2013 Chris Craik <ccraik@google.com> Merge "Correct save/restore match up" into jb-mr2-dev
e0b39fc18c10224c4e66f70aa472d8497b1b4621 03-Apr-2013 Chris Craik <ccraik@google.com> Merge "Account for hairlines in quick rejection logic" into jb-mr2-dev
1ed30c907ffbb71d1bc448ee57c66b0d16f600ef 03-Apr-2013 Chris Craik <ccraik@google.com> Correct save/restore match up

bug:8480642

With the additional save/restore around the operations in flush, the
stored restore batches weren't matching up to the correct saves.

Change-Id: I2f48f19009bd97289b6973283f43dc8d3e35affd
eferredDisplayList.cpp
e7c69c6fe3eac1fb01126ede550e5dc32979804a 03-Apr-2013 Chris Craik <ccraik@google.com> Account for hairlines in quick rejection logic

bug:8531373
Change-Id: I35444014f23fc61da687694fccc0d13bce718793
isplayListOp.h
athTessellator.cpp
16ecda5317c40fc3da284952d9b3add34d6763ae 29-Mar-2013 Chris Craik <ccraik@google.com> Update view's alpha and layer docs

bug:8501661

Makes the performance issues and interaction with layer type/paint
more clear.

Additionally, corrects change from 47ab7d6612e2b5b8b66fb261dafef7c91264e173
to still allow displayList alpha to override layer paint

Change-Id: Ic94d75865700820489370461cd8ac9f9077a8d90
isplayList.cpp
penGLRenderer.cpp
penGLRenderer.h
02b49b70ede0b9eb760ff334823aee1d9520ed85 29-Mar-2013 Romain Guy <romainguy@google.com> Prevent crash when a single layer is enqueued several times for updates
Bug #8504687

Change-Id: I9b01bbc4e3f37af23dfe5e68d3d03ad3d238b94a
ayer.cpp
ayer.h
penGLRenderer.cpp
5399a5648fb6756a7e7429b07a5a36493ff00395 29-Mar-2013 Romain Guy <romainguy@google.com> Merge "Update layers to clear them Bug #8489505" into jb-mr2-dev
94eaab4a5ddd6db4bcbc8a1e65a4d8e60d1d1274 28-Mar-2013 Elliott Hughes <enh@google.com> am 3ae30483: am a19647d3: Merge "Correct executable bit for source files [Take 2]"

* commit '3ae30483777708ff3a4f59a4fa75c6a76213cc30':
Correct executable bit for source files [Take 2]
dc1975ea717cdafb914fd00ea781fd314e1ac478 28-Mar-2013 Chris Craik <ccraik@google.com> Merge "Fix issues related to saveLayer/restore deferral" into jb-mr2-dev
696dcf84a382fcc5ef7041e0bbf3af20b0ecb99f 28-Mar-2013 Romain Guy <romainguy@google.com> Update layers to clear them
Bug #8489505

A layer should be updated even with an empty deferred display list. It is
possible for a layer to request an update just to execute a clear which
will be handled by LayerRenderer::prepareDirty().

Change-Id: Iffb98bd71d6caa8d4a701df98197676f9423c0c2
ayer.cpp
58f7689ac634afa616d2b754b68d65f9a2e83814 28-Mar-2013 Romain Guy <romainguy@google.com> Merge "Don't crash when making a layer larger than supported dimensions Bug #8437401" into jb-mr2-dev
7273daace9303f4662444111c40bb83d3ead4a92 28-Mar-2013 Chris Craik <ccraik@google.com> Fix issues related to saveLayer/restore deferral

bug:8464795

Changes drawModifiers and alpha to be restored for all operations,
since saveLayer/restore use these values, not just draw operations

Also forces a renderer state restoration before a deferred restore op
is played back, in case it is associated with a saveLayer that
doesn't have the save_clip flag set

Change-Id: I9da5d44fefbfffdee164c98f4f139843dacf85df
eferredDisplayList.cpp
eferredDisplayList.h
isplayListOp.h
penGLRenderer.cpp
penGLRenderer.h
ce4a7dfc516ee61301e9af91fad17ca1320efaab 28-Mar-2013 Romain Guy <romainguy@google.com> Don't crash when making a layer larger than supported dimensions
Bug #8437401

A misplaced ref count decrement was causing a crash when attempting to
resize a layer to dimensions larger than the max texture size supported
by the GPU.

This change fixes the crash and clarifies the warnings to make it more
obvious what's happening.

Change-Id: I632dc1b90aaa2605969e10523491a81c4922d3dc
isplayListRenderer.cpp
isplayListRenderer.h
ayer.cpp
ayerRenderer.cpp
9cd645121584bc167b3fab61b1ed89ddc4631365 27-Mar-2013 Chris Craik <ccraik@google.com> Merge "Set ignore flag during deferred savelayer" into jb-mr2-dev
408eb12631376cbdc96803e918decf6ea804d346 27-Mar-2013 Chris Craik <ccraik@google.com> Set ignore flag during deferred savelayer

bug:8471552

Additionally, add ignore check for draw functor

In deferred mode, if we don't set ignore, a 0 alpha displayList won't
be quickRejected, and not only would its contents be needlessly
deferred, but upon playback any functors would be drawn, ignoring the
state of the snapshot.

Change-Id: Ib1edb3252080f674254086edee6f965f0efcce78
penGLRenderer.cpp
penGLRenderer.h
3e4a3ea2ff03a6a1f1f7a2bebac9a86fe6555754 27-Mar-2013 Chirayu Desai <cdesai@cyanogenmod.org> Correct executable bit for source files [Take 2]

Change Ieb51bafb46c895a21d2e83696f5a901ba752b2c5 left out some
files, this fixes them.

Change-Id: Ia949a8581668836ea0251602e048f09c852f5169
ither.cpp
ither.h
4500a8d5d7fbec9dba5e693212da160849e401ff 27-Mar-2013 Romain Guy <romainguy@google.com> Path precaching creates duplicate cache entries
Bug #8478275

Change-Id: Ib541ea051e42e01cc0d277790e9c09de38ef72ee
athCache.cpp
athCache.h
96885eb480c5e0526fe2f77d30f6e551f3f3ceab 26-Mar-2013 Romain Guy <romainguy@google.com> Avoid multiple font cache texture uploads
Bug #8378964

This change defers drawing into layers until after the renderer for FBO0
is ready to draw. At that point, all the precaching is done which means
all glyphs can be uploaded at once in the font caches.

Change-Id: Ie1f7a7ff30f76f06fb3dbc72c7d05e66207d1ecb
eferredDisplayList.h
ayer.cpp
ayer.h
ayerRenderer.cpp
penGLRenderer.cpp
penGLRenderer.h
a4e16c58c9e3c983251e0475125a2a6f5bec2dbf 22-Mar-2013 Chris Craik <ccraik@google.com> Restore final canvas state after deferred flush

bug:8450062

- Fixes overdraw indication with DeferredDisplayList
- Fixes drawHardwareLayer called after flush

Additionally changes drawLayer to pass its paint to native via setLayerPaint

Wrap flush in save/restore so that reordering doesn't affect final
transform

Change-Id: I08befa42c28500da6387699eefd4be28aedf9f4c
eferredDisplayList.cpp
741f6bb81063cd12c9cd5e0a6822a41561ef93b2 21-Mar-2013 Chris Craik <ccraik@google.com> Merge "Isolate tiling clip state from snapshot" into jb-mr2-dev
5f803623559aab395a29d575c37c4e39c23a4b4e 21-Mar-2013 Chris Craik <ccraik@google.com> Isolate tiling clip state from snapshot

bug:8409891

Snapshots frequently have their clip overwritten due to applying
deferred state - now, store tiling clip information in a separate
rect, outside of the snapshot so it isn't overwritten.

Change-Id: I21ca4c45dcd802eae99e8de86f11525196777ccb
isplayList.cpp
penGLRenderer.cpp
penGLRenderer.h
napshot.cpp
napshot.h
c5cbee7d78513527e89450e6369a30a04b2d5e7a 21-Mar-2013 Romain Guy <romainguy@google.com> Stop worker threads on memory trim & fix bad pointer access

Change-Id: I6fe7e31aeb6dd41fa65ab952caed97bc2da510d7
aches.cpp
athCache.cpp
athCache.h
hread/TaskManager.cpp
hread/TaskManager.h
tils/Pair.h
9eac52698b18d089e73c7ec2bf73a64a39504733 21-Mar-2013 Romain Guy <romainguy@google.com> Merge "Optimize text GL setup" into jb-mr2-dev
7564c716bbee6a4825ae747797068d0e7c370c0d 21-Mar-2013 Chris Craik <ccraik@google.com> Merge "Use snapshot alpha in all layer drawing" into jb-mr2-dev
e83569ca76308bfe945efcfef5a12c64b8fb8849 21-Mar-2013 Chris Craik <ccraik@google.com> Use snapshot alpha in all layer drawing

Change-Id: Icc093390da2fc36b2b6693d0e5e4357b2f730bf9
penGLRenderer.cpp
257ae3502cfad43df681b1783528d645bdabc63f 21-Mar-2013 Romain Guy <romainguy@google.com> Optimize text GL setup

Only performs the GL setup steps when at least one glyph is drawn.
This change also skips various draw operations when the specified
paint draws with alpha = 0.

Change-Id: I9eda148b0503acffc552ee19196f5d52e958a1a2
ontRenderer.cpp
ontRenderer.h
penGLRenderer.cpp
penGLRenderer.h
d90144db52c7297879b950cbbc85137ed123ab5b 19-Mar-2013 Chris Craik <ccraik@google.com> Update snapshot upon saveLayer deferral

bug:8409891

In order to defer fbo-targetting saveLayer operations, it's necessary
to update the snapshot at defer time so that deferred display state
(namely, clip and transform) are fbo relative.

Re-enables deferring, as the issues with saveLayer are fixed.

Change-Id: I74b0779bc732675c747208f0757c3ea85f6dfbed
eferredDisplayList.cpp
eferredDisplayList.h
isplayList.cpp
isplayListOp.h
penGLRenderer.cpp
penGLRenderer.h
4494599e5a4931426d5649e1d1c4f9db83824ae8 20-Mar-2013 Chris Craik <ccraik@google.com> Merge "Use snapshot alpha for layers" into jb-mr2-dev
ec3928bf0993e13fb82c65ac26a4d70f5bc6c5e4 20-Mar-2013 Romain Guy <romainguy@google.com> Merge "Reduce number of glDraw calls when drawing text" into jb-mr2-dev
661a87ec28a49458f1faf533783abf2ab9927cab 19-Mar-2013 Romain Guy <romainguy@google.com> Reduce number of glDraw calls when drawing text

This change moves the mesh buffer from FontRenderer to CacheTexture
to help reduce the number of texture binds and glDraw calls when
drawing text that spans across multiple textures.

Change-Id: I7de574d88313ca3672879ca878c253ff5f131fc1
ontRenderer.cpp
ontRenderer.h
ont/CacheTexture.cpp
ont/CacheTexture.h
df9d2ba9b0b92608ea633bf04ffbef8d7ba3dd28 19-Mar-2013 Romain Guy <romainguy@google.com> Merge "Minimize texture binds when drawing text" into jb-mr2-dev
115096f50a560e64a7f95d37686d4861042c7aeb 19-Mar-2013 Romain Guy <romainguy@google.com> Minimize texture binds when drawing text

When several CacheTextures are used to draw text, sort the
draw batches by texture ID to minimize state changes in the
driver.

This change also tweaks the font cache size and renames
a property that was too long to be set using setprop.

Change-Id: I0a36dfffe58c9e75dd7384592d3343c192d042b1
ontRenderer.cpp
ontRenderer.h
roperties.h
ont/FontUtil.h
603ce559f290f369ef1a0d0744f1697b36e9c10e 19-Mar-2013 Romain Guy <romainguy@google.com> Merge "Apply ComposeShader's local matrix to children" into jb-mr2-dev
d4289922ce772ed8e170a27d1c9521672b315698 19-Mar-2013 Romain Guy <romainguy@google.com> Apply ComposeShader's local matrix to children

Change-Id: Idf9b8e7d7b30f8fcd8ba1fd4bfe8991e9ca148e2
kiaShader.cpp
16b7dc9c1ca4336b29afbd2f56f580014863add0 19-Mar-2013 Romain Guy <romainguy@google.com> Merge "Merge all shapes/paths caches to PathCache" into jb-mr2-dev
c46d07a29e94807e768f8b162ce9f77a88ba6f46 16-Mar-2013 Romain Guy <romainguy@google.com> Merge all shapes/paths caches to PathCache

This change will greatly simplify the multi-threading of all
shape types.

This change also uses PathTessellator to render convex paths.

Change-Id: I4e65bc95c9d24ecae2183b72204de5c2dfb6ada4
ndroid.mk
aches.cpp
aches.h
ebug.h
eferredDisplayList.cpp
isplayList.cpp
isplayListRenderer.cpp
penGLRenderer.cpp
athCache.cpp
athCache.h
roperties.h
hapeCache.cpp
hapeCache.h
cada41aeb1e4cd87a94df2dfb4dd645309fe66ba 19-Mar-2013 Chris Craik <ccraik@google.com> Work around saveLayer clipping/transform deferring issues

bug:8409891

Disables deferring

Change-Id: I93498a4a45a5bfe01143faa154926c6a138db8f9
penGLRenderer.cpp
d0afeac6dfc0856eeb72e6176ad6335e81871d24 16-Mar-2013 Chris Craik <ccraik@google.com> Reset draw modifiers after flushing

bug:8401910

This avoids leaving the renderer in a state with stale pointers (to,
e.g., shaders or color filters)

Change-Id: Idf8b63657041352e70e34e91ea416fe4385d4bc2
eferredDisplayList.cpp
penGLRenderer.cpp
penGLRenderer.h
a08f95cfeca7217f9c533b03663bf0dceedd259a 16-Mar-2013 Chris Craik <ccraik@google.com> Use snapshot alpha for layers

Removes mMultipliedAlpha, using the snapshot alpha for all
non-overlapping display list alpha control.

Additionally, fixes opacity issues where children of
hasOverlappingRendering=false displaylists (both hw layer sublists and
other sublists with hasOverlappingRendering=false)

Change-Id: I6adc16da855835f9f518f8967628e5d0135c789b
eferredDisplayList.cpp
isplayList.cpp
isplayList.h
isplayListOp.h
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
f40b8a939fef0a19b40188f007a3364311d6dabf 15-Mar-2013 Chris Craik <ccraik@google.com> Merge "Fully deferred displaylist replay" into jb-mr2-dev
ff78583d8a73ca35ce65b5d2592570ff6fb9901b 08-Mar-2013 Chris Craik <ccraik@google.com> Fully deferred displaylist replay

bug:8037003

A recursive drawDisplayList call is now entirely deferred before
playing back to the screen and issuing GL commands. This way, the
entire stream can be inspected, optimized, and batch work (such as
uploading textures) before issuing commands.

Additionally, this fixes an issue where operations draw could move
across restores corresponding to saveLayer(alpha). Those and other
similar cases (such as complex clipping, requiring the stencil) are
now treated as batching barriers, with the operations that change
renderer state in a way that's difficult to defer are just re-issued
at flush time.

Change-Id: Ie7348166662a5ad89fb9b1e87558334fb826b01e
aches.cpp
eferredDisplayList.cpp
eferredDisplayList.h
isplayList.cpp
isplayList.h
isplayListOp.h
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
bd3055f95e67a55648fd84a125e939293115171b 14-Mar-2013 Romain Guy <romainguy@google.com> Less aggressive glyphs precaching

The renderer used to pre-cache glyphs at record time. This then changed
to pre-caching at the beginning of every frame. This unfortunately entails
a lot of duplicate work on every frame, which amounts to 0.5 to 1ms in
some stock applications.

This change is somewhere in the middle: pre-caching happens the first
time a DrawTextOp is deferred or every time the screen-space transform
is different from the last pre-caching operation.

Change-Id: Id6d9e2599d90a5b75010b0f0a28746befbf3c205
isplayListOp.h
atrix.h
ont/Font.cpp
0f809f3b794174f044366bf421f8d0c72d9afc14 13-Mar-2013 Romain Guy <romainguy@google.com> Prevent infinite loop when trimming the path cache

Change-Id: I04b5fa498336068f997c68d8613b35a99f67adbe
athCache.cpp
hapeCache.h
5dc7fa709646799a5207a5d217f70aa02bf4a3aa 12-Mar-2013 Romain Guy <romainguy@google.com> Add TaskManager API

This API can be used to run arbitrary tasks on a pool of worker
threads. The number of threads is calculated based on the number
of CPU cores available.

The API is made of 3 classes:

TaskManager
Creates and manages the worker threads.

Task
Describes the work to be done and the type of the output.
A task contains a future used to wait for the worker thread
to be done computing the result of the task.

TaskProcessor
The processor dispatches tasks to the TaskManager and is
responsible for performing the computation required by
each task. A processor will only be asked to process tasks
sent to the manager through the processor.

A typical use case:

class MyTask: Task<MyType>

class MyProcessor: TaskProcessor<MyType>

TaskManager m = new TaskManager();
MyProcessor p = new MyProcessor(m);
MyTask t = new MyTask();
p.add(t);

// Waits until the result is available
MyType result = t->getResult();

Change-Id: I1fe845ba4c49bb0e1b0627ab147f9a861c8e0749
ndroid.mk
aches.h
athCache.cpp
athCache.h
hapeCache.h
hread/Future.h
hread/Task.h
hread/TaskManager.cpp
hread/TaskManager.h
hread/TaskProcessor.h
ca89e2a68703bd428e8b66547d033a6ed35b3595 09-Mar-2013 Romain Guy <romainguy@google.com> Precache paths from a worker thread

Change-Id: I3e7b53d67e0e03e403beaf55c39350ead7f1e309
isplayListOp.h
radientCache.cpp
penGLRenderer.cpp
athCache.cpp
athCache.h
hapeCache.h
extureCache.cpp
hread/Barrier.h
hread/Future.h
hread/Signal.h
6e2004089305cf2cd958b52b234459a49a4e5c83 08-Mar-2013 Romain Guy <romainguy@google.com> Move blur code from FontRenderer to utils/Blur.cpp

Change-Id: I2cebbfbcb722ed4b37e54ffbf8b53bb92ad0c964
ndroid.mk
ontRenderer.cpp
tils/Blur.cpp
tils/Blur.h
b09f1471262c3e629daacbc319bcefc2d621a484 08-Mar-2013 Romain Guy <romainguy@google.com> Don't apply scale to glyphs when a perspective is set.
Bug #8337925

Magazines uses very large scale factors that blow up font cache & CPU.

Change-Id: I1c0ed430ed91b86cc6c6f59f7e8bdcc89a464e46
penGLRenderer.cpp
8afce816df7e8f668761f7ed443f54238958c49f 07-Mar-2013 Romain Guy <romainguy@google.com> Round scale factors to rasterize text

Harder, better, faster, stronger.

Change-Id: Iee4125de98c4e61603f56bb7f06002cc86458214
isplayList.cpp
ont/Font.cpp
624234f69b2a4781d24f3e4c6ae6450729e38397 06-Mar-2013 Romain Guy <romainguy@google.com> Take only the scale params into account to rasterize text

This change extracts the scale parameters of the current transform
to pass then to the font renderer. Rotation and perspective are
applied to the generated mesh inside the vertex shader. This limits
the number of glyphs we have to create in the font cache and thus
reduces memory churn.

Change-Id: Ic5b3bae2b2b0e0250a8ee723b071a1709725c749
isplayListOp.h
ayerRenderer.cpp
ayerRenderer.h
atrix.cpp
atrix.h
penGLRenderer.cpp
penGLRenderer.h
ont/Font.cpp
ont/Font.h
0b58a3deab66c30a8d35072e55aac6279dd367cc 05-Mar-2013 Romain Guy <romainguy@google.com> Make glyph copies a little more cache friendly

Change-Id: Ie21b7079cc5d3ea67a03597c57842636e4afe143
ontRenderer.cpp
3b753829ae858d424fe109f714745379a6daf455 05-Mar-2013 Romain Guy <romainguy@google.com> Fix colored rects clipping and code cleanup

The drawColorRects() method was clipping individual rectangles
using the wrong parameters left, top, right and bottom instead
of l, r, t and b. It also checked for count == 0 after the loop
when it should have checked for vertexCount == 0. The quickReject
is now not part of the loop since it's a bit overkill to perform
so many matrix multiplications. What we really care about is the
final quickReject performed on the max bounds of the entire set
of rectangles.

This change also replaces all instances of mSnapshot->transform
by currentTransform() to make the code slightly more readable.

Change-Id: I6485280414499716852f7dbfba186774eb6763d4
atrix.cpp
atrix.h
penGLRenderer.cpp
penGLRenderer.h
19d4dd8599cb870923ab349d2ab96cacffd9c6f5 04-Mar-2013 Romain Guy <romainguy@google.com> Take text scale/skew into account only when rendering into a layer

3D rotations can undo scale/skew transforms; since FreeType only accepts
2x2 matrices we can end up generating very large glyphs that are drawn
at a 1:1 scale on screen. For instance, if the current transform has a
scale of 2000 set on both X and Y axis and a perspective Z factor set to
Z, the actual scale factor on screen ends up being 1. We would however
generate glyphs with a scale factor of 2000 causing the font renderer
to blow up.

Change-Id: Ia5c3618d36644e817825cb9c89e2f53aece2074e
penGLRenderer.cpp
151b71cb5259eabf9bdcdc9248ba5100ad4c5bcf 02-Mar-2013 Romain Guy <romainguy@google.com> Merge "Fix math issue when transforming text in perspective" into jb-mr2-dev
874f5c6e4ac655b4f118074c90d51e6a44abe50c 02-Mar-2013 Romain Guy <romainguy@google.com> Fix math issue when transforming text in perspective

Change-Id: Iad6b4e477c11bd1ef5f0ceab2fabcd440030154d
ont/Font.cpp
ont/Font.h
28459117a797bbf09ac589af4c8083a98fdbfb90 02-Mar-2013 Romain Guy <romainguy@google.com> Merge "Precache glyphs at final raster size" into jb-mr2-dev
0f6675332c04c74909425d1d328f02b32c0ff40e 01-Mar-2013 Romain Guy <romainguy@google.com> Precache glyphs at final raster size

The deferred display lists model now allows us to precache glyphs
at their exact size on screen.

This change also removes debug markers when the renderer defers
and reorders display lists. It also adds a flush event marker.

Change-Id: I66ec5216dc12b93ecfdad52a7146b1cfb31fbeb4
aches.cpp
aches.h
eferredDisplayList.cpp
isplayListOp.h
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
ont/Font.cpp
1da8a6a36df0389dd4c213a8f9698874c484c839 01-Mar-2013 Chris Craik <ccraik@google.com> Merge "Add shader program selection shortcut" into jb-mr2-dev
096b8d96d539429de5e67b2821ef3f9ee0300842 01-Mar-2013 Chris Craik <ccraik@google.com> Add shader program selection shortcut

Add a key manipulation that makes black text/paths use the standard
simple bitmap/patch shader, since they are the same. Previously we'd
create a separate shader for each because the keys differed, even
though the shaders were functionally equivalent.

Also fixes some issues around setting DEBUG_PROGRAM

Change-Id: I0c77c684d58da03501ee9ab8239c7d4a70fd6b5c
rogram.h
rogramCache.cpp
rogramCache.h
1361dff5eb54b9b02b4d1a2d3e2ed3afd216d79d 01-Mar-2013 Romain Guy <romainguy@google.com> Merge "Support 3D rotations when drawing text" into jb-mr2-dev
a4adcf0239039eb8f005be252409901c41b28839 28-Feb-2013 Romain Guy <romainguy@google.com> Support 3D rotations when drawing text

If a perspective transform is set on the Canvas, drawText() should
not attempt to rasterize glyphs in screen space. This change uses
the old behavior instead (i.e. rasterize the glyphs at the native
font size and apply the transform on the resulting mesh.)

This change also adds an optimization: empty glyphs (spaces) do
not generate vertices anymore. This saves a lot of vertices in text
heavy applications such as Gmail.

Change-Id: Ib531384163f5165b5785501612a7b1474f3ff599
isplayListRenderer.cpp
ontRenderer.cpp
penGLRenderer.cpp
ont/Font.cpp
ont/Font.h
d6960a49b40703e8af55c1fb628a2e0c5d2b40cf 28-Feb-2013 Chris Craik <ccraik@google.com> Account for text alignment in Op bounds calculation

bug:8243821

Previously this wasn't done for deferred clipping + reordering, so
non-left-aligned text would be clipped at defer time, when it wouldn't
have been at draw time (in OpenGLRenderer::quickReject())

Change-Id: Ic96949c2dca4378f284606b37d9411ed42f8d203
isplayListOp.h
19886f8b5109218191908d2ce5faf0293f85cf31 28-Feb-2013 Romain Guy <romainguy@google.com> Merge "Properly scale text" into jb-mr2-dev
c74f45a334f0e3725c23cdd270cbcb0efac4ea75 27-Feb-2013 Romain Guy <romainguy@google.com> Properly scale text

This change does not apply to drawPosText() and drawTextOnPath() yet.

Prior to this change, glyphs were always rasterized based on the
font size specified in the paint. All transforms were then applied
on the resulting texture. This creates rather ugly results when
text is scaled and/or rotated.

With this change, the font renderer will apply the current transform
matrix to the glyph before they are rasterized. This generates much
better looking results.

Change-Id: I0141b6ff18db35e1213e7a3ab9db1ecaf03d7a9c
atrix.cpp
atrix.h
penGLRenderer.cpp
penGLRenderer.h
ont/Font.cpp
ont/Font.h
d041e476f3c959f5b373b64a329aa427d057375e 28-Feb-2013 Chris Craik <ccraik@google.com> Merge "Correct sub-hairline tessellation threshold" into jb-mr2-dev
d80806b305ce337283c24f14522cc58fea090b8c 28-Feb-2013 Chris Craik <ccraik@google.com> Merge "Fix T-junctions in layers' generated meshes" into jb-mr2-dev
19a390bff348cd379caba1265faec77fcff29200 28-Feb-2013 Chris Craik <ccraik@google.com> Correct sub-hairline tessellation threshold

Change-Id: Id868d41a36db5b4daa762d84b6329f9c31916bce
athTessellator.cpp
a6456d0d7ea2a65474b8a3db5dbf001880c40a71 27-Feb-2013 Romain Guy <romainguy@google.com> Merge "Draw text drop shadows even when the text color is transparent" into jb-mr2-dev
6c5b9be7450903762f676522c32d65f7545730df 27-Feb-2013 Chris Craik <ccraik@google.com> Fix T-junctions in layers' generated meshes

bug:4128442

Currently we fix T-junctions for hardware layers, and for
Canvas.saveLayer if the transform isn't rectAsRect. Ideally, hardware
layers should lazily re-generate T-junction free geometry if the
transform becomes non-rectAsRect

Depends on frameworks/native change:
https://googleplex-android-review.googlesource.com/#/c/277668/
which adds Region::createTJunctionFreeRegion()

Change-Id: Ice75b4a1a4459ff835059ea81d70f7d1563fd96d
ayerRenderer.cpp
penGLRenderer.cpp
768bffc9b814f6a1f7d9ff59d91285895c23bbe9 27-Feb-2013 Romain Guy <romainguy@google.com> Draw text drop shadows even when the text color is transparent

This matches Skia's behavior.

Change-Id: Ibf0a52611f5801cfa68169f66ab0ec06f256600f
penGLRenderer.cpp
penGLRenderer.h
758724fd09a1599f2c55130f81953cfa6c17c300 27-Feb-2013 Romain Guy <romainguy@google.com> Don't increment the paint's generation ID when drawing bitmaps

When the renderer draws a bitmap as part of a display list with an
alpha < 1.0f, the paint is temporarily modified to alter the opacity
of the bitmap. This has the side effect of increasing the paint's
generation ID counter which can break paint caching.

Change-Id: I5055d059ad1639829fa50af3d946e296c4dab877
isplayListOp.h
penGLRenderer.cpp
penGLRenderer.h
08bca88b272f0006e1581e9c28bc6312490f634e 26-Feb-2013 Romain Guy <romainguy@google.com> Rename debug property and expose it in HardwareRenderer

Change-Id: If46a9bc14a50f6c9a202d901881b36bbac32cba3
roperties.h
3ff0bfdd144bba3b023eda8c49b25fb0d0de8653 25-Feb-2013 Romain Guy <romainguy@google.com> Add new property to debug non-rectangular clip operations

This change adds a new property called "debug.hwui.show_stencil_clip"
that accepts the following values:

- "highlight", colorizes in green any drawing command that's tested
against a non-rectangular clip region
- "region", shows the non-rectangular clip region in blue every time
it is used
- "hide", default value, nothing is shown

Change-Id: I83c8602310edc4aaeb8b905371cdd185b17d32b5
aches.cpp
aches.h
ebug.h
penGLRenderer.cpp
rogram.h
rogramCache.cpp
roperties.h
tencil.h
fb6806570911851fb8cbaaf5bdf275a89f3c3ef4 23-Feb-2013 Chris Craik <ccraik@google.com> Merge "Add deferredList null check"
ba868c3e2297bd75cd3f8bb1f9eaa286855a1919 23-Feb-2013 Chris Craik <ccraik@google.com> Add deferredList null check

Needed for non-deferred mode (debug.hwui.disable_draw_defer = true)

Change-Id: I278cbe200aa6ce06fa92dc45c63ceda6e85a0cbe
isplayList.cpp
dd8697c095272f19ddad214834a490b00f11a477 22-Feb-2013 Chris Craik <ccraik@google.com> Avoid double blur

bug:8204062

Avoids incorrectly blurring with RenderScript after a C++ blur

Additionally, avoids draw/blurring if the input text has empty bounds

Change-Id: Ibbaf74800fff7a6e4cda3aa24286b90e7aef589d
ontRenderer.cpp
505d1d64eda6e47caabf8701cb39ec9b176b3238 22-Feb-2013 Romain Guy <romainguy@google.com> Merge "Prettify display lists logging"
7031ff68bb998dbbd7caf3b2fd75eef747a86725 22-Feb-2013 Romain Guy <romainguy@google.com> Prettify display lists logging

This change makes it a lot easier to see the tree structure.

Change-Id: I4969abd1eb010f1d529671f8d86dc4c930be24f6
isplayList.cpp
isplayList.h
isplayListOp.h
penGLRenderer.cpp
94b97b38b749d50c8693a044dd2688328cca863e 22-Feb-2013 Chris Craik <ccraik@google.com> am eab51de4: Merge "Fix clipping and stencil layer issues"

* commit 'eab51de4de88219256260fe26e2018a6234ef83b':
Fix clipping and stencil layer issues
b98a016c6769b9e80d392df22fe77a2fca048d9f 21-Feb-2013 Chris Craik <ccraik@google.com> Fix clipping and stencil layer issues

bug:8235699

Ensure rectangle clipping operations disable deferring when necessary
(i.e., when the op might create a non-rect region), including in
DisplayList::setViewProperties

Additionally, makes clipping with a kUnion always use a region, for
consistency with software rendering

Change-Id: I6730f1a80250bcf3f91cd4afde646d470a12dbc2
isplayList.cpp
isplayList.h
isplayListOp.h
penGLRenderer.cpp
penGLRenderer.h
napshot.cpp
08d160a366932aec170a115a1edb3bb5ac4e3a4e 20-Feb-2013 Ben Cheng <bccheng@google.com> am 7a60c43d: Merge "Use free for memory chunks allocated through memalign."

* commit '7a60c43d874bd047ea4b93b94c9b8771ea5739cc':
Use free for memory chunks allocated through memalign.
7a60c43d874bd047ea4b93b94c9b8771ea5739cc 20-Feb-2013 Ben Cheng <bccheng@google.com> Merge "Use free for memory chunks allocated through memalign."
15641a6181cdaac2aadf07585de66483b4b7ae6b 20-Feb-2013 Ben Cheng <bccheng@google.com> Use free for memory chunks allocated through memalign.

BUG: 8234423
Change-Id: Ic4100a780908c94540722cc4af5f73f4940431b4
ontRenderer.cpp
extDropShadowCache.cpp
c4ca87f0f4034d4b987084d2b62ed7e5e0430557 20-Feb-2013 Chris Craik <ccraik@google.com> am 8a47d8ea: Merge "Clean up clipping and deferral logic"

* commit '8a47d8eaec26d0937aee94a057f561f246748339':
Clean up clipping and deferral logic
8a47d8eaec26d0937aee94a057f561f246748339 20-Feb-2013 Chris Craik <ccraik@google.com> Merge "Clean up clipping and deferral logic"
5d11676414b3606792e23c269cf75b44faa1a2af 20-Feb-2013 Chris Craik <ccraik@google.com> Clean up clipping and deferral logic

bug:8037003

-Merges replay methods
-Bounds checking for DrawBitmapMesh, DrawRects and DrawDisplayList
-Use clip as bounds for otherwise unbounded draw operations

Clip-as-bounds is correct for drawColor and functor, but other draw
operations (pos text, text on path, and layers) still need true bounds
calculation

Change-Id: I5d5149d2c624f01e3fe46628bf156e835e69b9d5
isplayList.cpp
isplayListOp.h
penGLRenderer.cpp
846f5f238fd96a14197022baad86eab8882fe3bc 19-Feb-2013 Romain Guy <romainguy@google.com> am e91efaba: Merge "Expose display list APIs"

* commit 'e91efabaf2c51d017bf4c5bc4e06491c3511f4e5':
Expose display list APIs
52036b19a5f82bc4d75cfcbff99c65df8d25a99b 15-Feb-2013 Romain Guy <romainguy@google.com> Expose display list APIs

The exposed APIs are slightly simpler than the full APIs used internally.
Only APIs useful to applications are exposed.

Change-Id: Ie03014628d40ad5ef63dedbc52ce3def84429d54
isplayList.cpp
isplayList.h
penGLRenderer.cpp
620cff4006ee0b507f00ef8a242ecff4e60ba4e9 19-Feb-2013 Chris Craik <ccraik@google.com> am ad82f20d: Merge "DisplayList draw operation reordering"

* commit 'ad82f20d2382396f5ac75fdf6f7db5c4da1c4c23':
DisplayList draw operation reordering
ad82f20d2382396f5ac75fdf6f7db5c4da1c4c23 19-Feb-2013 Chris Craik <ccraik@google.com> Merge "DisplayList draw operation reordering"
eea34dab432586788008d2afd00f5a3c19aaed7f 16-Feb-2013 Chris Craik <ccraik@google.com> am ac838a3a: Merge "Correct PatchCache comparison logic"

* commit 'ac838a3ab9d85112576cf2c943930441f62c51d2':
Correct PatchCache comparison logic
ac838a3ab9d85112576cf2c943930441f62c51d2 16-Feb-2013 Chris Craik <ccraik@google.com> Merge "Correct PatchCache comparison logic"
9935abceea10df337969f08cce05b7c02bb1eb19 16-Feb-2013 Chris Craik <ccraik@google.com> Correct PatchCache comparison logic

Change-Id: I3d0832505b5380bfa362863b39e09dd10f792582
atchCache.cpp
225e8943de3994834f18b0b255e8addf812cb86a 16-Feb-2013 Chris Craik <ccraik@google.com> am 857089eb: Merge "Adjust offset for non-AA line drawing"

* commit '857089eb1efcc7d86f373edf8cb30911a95f6bac':
Adjust offset for non-AA line drawing
857089eb1efcc7d86f373edf8cb30911a95f6bac 16-Feb-2013 Chris Craik <ccraik@google.com> Merge "Adjust offset for non-AA line drawing"
62a42c13a6e86255a0118688a60c9248030c95a9 15-Feb-2013 Chris Craik <ccraik@google.com> Adjust offset for non-AA line drawing

bug:8114304

The original .375 was chosen to make GL_LINES align with Skia drawing.
The new value of .065 is chosen to be as small as possible to make
triangle-based lines align with Skia, while keeping lines drawn on
integer coordinates unambiguous as to which column/row they draw on.

Also adds more lines in CanvasCompare test to highlight the difference

Change-Id: If578684f2db320682219c3caa625cf79bc62d88f
rogram.cpp
df93fdb6c0d00bcbf548c4f1fa16be8bc3b15334 15-Feb-2013 Romain Guy <romainguy@google.com> am aa8307b9: Merge "Remove obsolete header file"

* commit 'aa8307b991b9fca5403b5d7f43659b92527af4fd':
Remove obsolete header file
c3566d06421c8acc0aafb18f7e307e5725ce87e1 05-Feb-2013 Chris Craik <ccraik@google.com> DisplayList draw operation reordering

bug:8037003

The reordering enables similar operations to draw together, minimizing the
OpenGL state change operations that go inbetween draws. Eventually, multiple
complete canvas draw operations will be merged (into a single glDrawArrays call,
for example)

Reorders DisplayList draw operations when:

-They can move backwards in the command stream to be after similar
operations without violating draw ordering

-The OpenGLRenderer is in a simple, replayable state (no complex clip,
or filter/shadow etc)

Also adds two system properties to control the deferral/reordering:
"debug.hwui.disable_draw_defer"
"debug.hwui.disable_draw_reorder"
which can be set to "true" to control the display list manipulation

Change-Id: I5e89f3cb0ea2d2afd3e15c64d7f32b8406777a32
ndroid.mk
ebug.h
eferredDisplayList.cpp
eferredDisplayList.h
isplayList.cpp
isplayList.h
isplayListOp.h
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
roperties.h
ect.h
13ba0054846ce630ca31e8f26169fd9388faee02 15-Feb-2013 Romain Guy <romainguy@google.com> Remove obsolete header file

We now use the same mechanism to compare keys everywhere in libhwui.

Change-Id: I8b3cb25b13f4f38eb6f12aed0356f796a773617c
atrix.cpp
atch.h
atchCache.cpp
atchCache.h
tils/Compare.h
41250b67fe6308570860f2435c6b305ed8270002 15-Feb-2013 Kristian Monsen <kristianm@google.com> resolved conflicts for merge of 101ae3bb to master-chromium

Only include file changes in conflict.

Change-Id: I1b6eb3343e7163827d8031ffea4b77f294980ccc
101ae3bb3909827303121e5e11ed16b7efe36538 15-Feb-2013 Chris Craik <ccraik@google.com> Merge "Move DisplayList to its own cpp file"
0776a6069365bdea83855db154fa2d37f9d1d808 15-Feb-2013 Chris Craik <ccraik@google.com> Move DisplayList to its own cpp file

Change-Id: Ic9c1bbf4673ad5c756f3908b2ab7e699edd6a119
ndroid.mk
isplayList.cpp
isplayList.h
isplayListOp.h
isplayListRenderer.cpp
isplayListRenderer.h
feb6954da185901dfb558a8ec85f4908ca86a4eb 14-Feb-2013 Romain Guy <romainguy@google.com> am 10c0aa24: Merge "Implement support for drawBitmapMesh\'s colors array"

# Via Android (Google) Code Review (1) and Romain Guy (1)
* commit '10c0aa246d9b2633c6cb4e5b714abb0031a4f4cd':
Implement support for drawBitmapMesh's colors array
10c0aa246d9b2633c6cb4e5b714abb0031a4f4cd 14-Feb-2013 Romain Guy <romainguy@google.com> Merge "Implement support for drawBitmapMesh's colors array"
ff316ec7a76e52572a2e89b691e6b3bba0cafba3 14-Feb-2013 Romain Guy <romainguy@google.com> Implement support for drawBitmapMesh's colors array

Change-Id: I3d901f6267c2918771ac30ff55c8d80c3ab5b725
aches.cpp
aches.h
penGLRenderer.cpp
penGLRenderer.h
rogram.h
rogramCache.cpp
ertex.h
0229d0818c8f08753a0df583798bbac19f67a4c4 14-Feb-2013 Chris Craik <ccraik@google.com> am 805a6fe7: Merge "Revert "Revert "Use RenderScript for large text blurs"""

# Via Android (Google) Code Review (1) and Chris Craik (1)
* commit '805a6fe7b1417640ccaf7914171cb65515b6ab39':
Revert "Revert "Use RenderScript for large text blurs""
f2d8ccc15d7272b3416f73605c1f31d1d346bd40 14-Feb-2013 Chris Craik <ccraik@google.com> Revert "Revert "Use RenderScript for large text blurs""

This reverts commit bf5703e52e3304246cbf0e73f6976f7d7312d238.

Change-Id: Ic6f991277dec9e80a6fed93db91499726b30ab2a
ndroid.mk
ontRenderer.cpp
ontRenderer.h
extDropShadowCache.cpp
tils/Timing.h
c932760f667cf56ca7a1aeffde505745dc3632e1 14-Feb-2013 Chris Craik <ccraik@google.com> Merge "Revert "Merge remote-tracking branch 'goog/master-chromium' into 'goog/master'" DO NOT MERGE"
68b600913b699da0fbfcd9d913e4c4fdb08e06b8 13-Feb-2013 Chris Craik <ccraik@google.com> Merge "Revert "Use RenderScript for large text blurs""
bf5703e52e3304246cbf0e73f6976f7d7312d238 13-Feb-2013 Chris Craik <ccraik@google.com> Revert "Use RenderScript for large text blurs"

This reverts commit 3f76e65d251ead65fe8ff98e3bd4c7623fbaac07

Change-Id: Ia81cd485e5ca696bb284c419dc8a1d2f3247100e
ndroid.mk
ontRenderer.cpp
ontRenderer.h
extDropShadowCache.cpp
tils/Timing.h
0450086a845709091e176f142d60dbe553c1bce3 13-Feb-2013 Romain Guy <romainguy@google.com> Merge "Fix format name typo"
2b44eb75c42e4caa94f0b002f0ea9e134fe7b543 13-Feb-2013 Romain Guy <romainguy@google.com> Fix format name typo

Change-Id: If7d86b74ad9735f12349d9fcb62b335f5a742bb5
enderBuffer.h
bce29d2a549c374e642ad7a41a1daf869b46f53c 13-Feb-2013 Chris Craik <ccraik@google.com> Merge "Use RenderScript for large text blurs"
8d4aeb7111afac0c3c7e56d4ad5d92f9cfce2ffd 13-Feb-2013 Romain Guy <romainguy@google.com> Add a render buffer cache to reuse stencil buffers
Bug #7146141

This new cache is used in a similar way to LayerCache. It helps
reuse already allocated stencil buffers and thus avoid churning
memory on every frame.

Change-Id: I19551d72da52c40039e65904563600e492c8b193
ndroid.mk
aches.cpp
aches.h
ebug.h
ayer.cpp
ayerCache.cpp
ayerCache.h
penGLRenderer.cpp
roperties.h
enderBuffer.h
enderBufferCache.cpp
enderBufferCache.h
7c1a49f5f5ed6613d736464bf5001b777e89ced2 13-Feb-2013 Chris Craik <ccraik@google.com> Revert "Merge remote-tracking branch 'goog/master-chromium' into 'goog/master'" DO NOT MERGE

This reverts commit 6c0307dd0aefe9a08794b155fc03ee60ebd14f25, reversing
changes made to a2cd828b749c444d55c2c41c7dbb85088ff94b9f.

Conflicts:
packages/SystemUI/res/values-sv/strings.xml

Change-Id: Ia178efe8b14751583d47b2826bfe3d3d5463dd2e
ndroid.mk
isplayListRenderer.h
ontRenderer.cpp
ayer.h
penGLRenderer.cpp
ont/CacheTexture.cpp
ont/Font.cpp
3f76e65d251ead65fe8ff98e3bd4c7623fbaac07 15-Nov-2012 Chris Craik <ccraik@google.com> Use RenderScript for large text blurs

Still fall back to simple path for small tasks

Change-Id: I492f1b3f7d6fec1738f3e45cbfb15864bd23a392
ndroid.mk
ontRenderer.cpp
ontRenderer.h
extDropShadowCache.cpp
tils/Timing.h
e67307c816f3fdae2bfba8e9a4410dc015645e91 12-Feb-2013 Romain Guy <romainguy@google.com> Prevent crash when setting up a stencil-based clip
Bug #8177690

Clear the layers before we setup the stencil to avoid dereferencing
the recently deleted rects.

Change-Id: I5dce5f965672f276f9490636d85b6018d3ab9422
penGLRenderer.cpp
ont/Font.cpp
d71ff91dcd79f6beea4bbe768ab3bcbb1a6d7c39 08-Feb-2013 Romain Guy <romainguy@google.com> Apply the clip rect/region to drawLines()

Without the check to quickReject, drawConvexPath would never
setup the clip properly.

Change-Id: I23e5b25de3383c9e9b86eea4ee7a9552f8d9efb4
penGLRenderer.cpp
b4c1dc1c1580d0970631cc291b4b4c6e9dc96af3 08-Feb-2013 Romain Guy <romainguy@google.com> Merge "Don't clip when drawing a layer"
63696bfc0592a0b8808aa2b1c40bcf33c656c659 08-Feb-2013 Romain Guy <romainguy@google.com> Don't clip when drawing a layer

A layer will, by definition, clip its content already. The extra
clip added by the UI toolkit/renderer is wasteful and in some
situations very expensive. If a layered view is rotated, the clip
will be transformed into a non-rectangular region, thus forcing
the renderer to rely on the stencil buffer. The whole point of
using layers is to draw efficiently so let's avoid this case.

Change-Id: I813465f6468cc386b84a4d058c11a258fef8507a
isplayListRenderer.cpp
da8d8b9699fe8e9557389465007e333d3f03dcc1 07-Feb-2013 Romain Guy <romainguy@google.com> Merge "Add a RenderBuffer object to store stencil buffers. Bug #7146141"
3bbacf27c0be1bae4e4483577fc89ae3113abe5d 07-Feb-2013 Romain Guy <romainguy@google.com> Add a RenderBuffer object to store stencil buffers.
Bug #7146141

This change is needed to add a render buffer cache to avoid
creating and destroying stencil buffers on every frame.

This change also allows the renderer to use a 1 bit or 4 bit
stencil buffer whenever possible.

Finally this change fixes a bug introduced by a previous CL
which causes the stencil buffer to not be updated in certain
conditions. The fix relies on a new optional parameter in
drawColorRects() that can be used to avoid performing a
quickReject on rectangles generated by the clip region.

Change-Id: I2f55a8e807009887b276a83cde9f53fd5c01199f
ndroid.mk
aches.cpp
aches.h
ebug.h
xtensions.cpp
xtensions.h
radientCache.cpp
ayer.cpp
ayer.h
ayerRenderer.cpp
penGLRenderer.cpp
penGLRenderer.h
enderBuffer.h
napshot.cpp
tencil.cpp
tencil.h
extureCache.cpp
1ba0289d18f16e190a3bc7cf9226d061016dc355 07-Feb-2013 Chris Craik <ccraik@google.com> Merge "Add cap tessellation support"
65cd612face362d054a85d0f7e5881c59cd523be 11-Dec-2012 Chris Craik <ccraik@google.com> Add cap tessellation support

bug:7117155
bug:8114304

Currently used for lines (with and without AA) and arcs with useCenter=false

Also removes 0.375, 0.375 offset for AA lines

Change-Id: Ic8ace418739344db1e2814edf65253fe7448b0b0
ndroid.mk
aches.h
penGLRenderer.cpp
penGLRenderer.h
athRenderer.cpp
athRenderer.h
athTessellator.cpp
athTessellator.h
rogram.h
rogramCache.cpp
ertex.h
511afdd3ac55ba27c5882cbe189d89a2942420b1 07-Feb-2013 Romain Guy <romainguy@google.com> Merge "Fix uninitialized variables in Caches.cpp Bug #8151401"
c2a972131f1870042eb63847d4b24fbe718d8e3f 07-Feb-2013 Romain Guy <romainguy@google.com> Fix uninitialized variables in Caches.cpp
Bug #8151401

Change-Id: I221f93de0f1981974f82a094297836dd3fe418bc
aches.cpp
83315e0cb425db5dde514c90df56a7188c7983d5 07-Feb-2013 Romain Guy <romainguy@google.com> Merge "Fix Snapshot::resetClip to also reset the clip region"
3c099c42fd7ead1429076055990ae39b72c904f4 07-Feb-2013 Romain Guy <romainguy@google.com> Fix Snapshot::resetClip to also reset the clip region

Change-Id: I979151e73f64ff9d45f8a5232d8700361b09fbc7
napshot.cpp
23e500d168e8d649305445f6c1d2b49d8d2c00fd 06-Feb-2013 Derek Sollenberger <djsollen@google.com> Merge "Merge remote-tracking branch 'goog/master-chromium' into 'goog/master'"
b969a0de65730b071d846f8302e751e2637e6dbe 05-Feb-2013 Romain Guy <romainguy@google.com> Add support for non-antialiased text

Change-Id: I17c073955ab94abc9b409e5fcfbc675faa07c5ba
isplayListRenderer.cpp
ontRenderer.cpp
ont/Font.cpp
ont/Font.h
f5db9b8ed42cace00d4e84b4a7e2e63a7c654b35 05-Feb-2013 Derek Sollenberger <djsollen@google.com> Merge "Changes needed to roll Skia to r7527." into master-chromium
43c6eda4d3535e7601e586a75206b20e42209ae2 04-Feb-2013 Romain Guy <romainguy@google.com> am b3778531: Merge "Set the scissor from OpenGLRenderer::drawColorRects Bug #8131254"

# Via Android (Google) Code Review (1) and Romain Guy (1)
* commit 'b377853123ff53974bb06ffc30e09db41a767c3a':
Set the scissor from OpenGLRenderer::drawColorRects Bug #8131254
b377853123ff53974bb06ffc30e09db41a767c3a 04-Feb-2013 Romain Guy <romainguy@google.com> Merge "Set the scissor from OpenGLRenderer::drawColorRects Bug #8131254"
a362c69d6cdf448107e5a539f77df73937141870 04-Feb-2013 Romain Guy <romainguy@google.com> Set the scissor from OpenGLRenderer::drawColorRects
Bug #8131254

This method is used as an optimization for paths containing only
non-overlapping rectangles. The implementation was correctly
rejecting rectangles invidually but not the bounds of the array
of rectangles. If quickReject() is not called, setupDraw() won't
be able to properly set the scissor.

Change-Id: I50aa11a4bd8b525b267d36a3039fe7a6fba50518
penGLRenderer.cpp
d4cf7df151c68e621fbc3e1552e5f33020bc7b6d 04-Feb-2013 Chris Craik <ccraik@google.com> am e51ccb15: Merge "Simplify display list logging, removing pointers"

# Via Android (Google) Code Review (1) and Chris Craik (1)
* commit 'e51ccb1543ef5b6427e5f270ae38be75e18daccd':
Simplify display list logging, removing pointers
e51ccb1543ef5b6427e5f270ae38be75e18daccd 04-Feb-2013 Chris Craik <ccraik@google.com> Merge "Simplify display list logging, removing pointers"
3dc553babe515fbf9bd042dd63a792e5de578ecd 04-Feb-2013 Chris Craik <ccraik@google.com> Simplify display list logging, removing pointers

Also fix save indents

Change-Id: Ia1add83422fbc200b85fd6688f5be60292b0f178
isplayListOp.h
isplayListRenderer.cpp
d81ec456bb097a712bcbc093c5a1e0075434158e 04-Feb-2013 Derek Sollenberger <djsollen@google.com> Changes needed to roll Skia to r7527.

Change-Id: I84aef3f8a733c869fade06021816646001532758
penGLRenderer.cpp
da805b149fde3f7f8ef404c39ef74b2fbbf7af7f 01-Feb-2013 Romain Guy <romainguy@google.com> am c5801680: Merge "Tag HardwareRenderers with a name to help debugging"

# Via Android (Google) Code Review (1) and Romain Guy (1)
* commit 'c580168011334db756f5e68aa005d20bace69171':
Tag HardwareRenderers with a name to help debugging
b86e75ea85e62e3ecfe989ebe2b6bdaa962cbcdf 01-Feb-2013 Romain Guy <romainguy@google.com> am b7475e7b: Merge "Fix tiling on QCOM GPU"

# Via Android (Google) Code Review (1) and Romain Guy (1)
* commit 'b7475e7b0b0ababe8c5f3fbfde565c97960c633c':
Fix tiling on QCOM GPU
5019546c8cbdd8c647008dc9b3ce2481e2e52758 01-Feb-2013 Romain Guy <romainguy@google.com> am 65f4effc: Merge "Discard the correct buffer when the bound FBO is not 0"

# Via Android (Google) Code Review (1) and Romain Guy (1)
* commit '65f4effcab1f4bb6e2e96a2b8eb2c774601b87db':
Discard the correct buffer when the bound FBO is not 0
ef35927abcd089652f87a985dd6dde7afde58b92 01-Feb-2013 Romain Guy <romainguy@google.com> Tag HardwareRenderers with a name to help debugging

The name of the renderer is the same as the window it belongs to.

Change-Id: Ie9adc0a1978afa026923ea41f5540eda6ba65a92
aches.h
penGLRenderer.cpp
penGLRenderer.h
f735c8e5cb59d6e1d1aa152fed7a6480a08d1c2a 01-Feb-2013 Romain Guy <romainguy@google.com> Fix tiling on QCOM GPU

Rename Caches::startTiling parameter from opaque to discard to
make it clearer what its role is. Tweak calls to startTiling
to preserve the buffer when needed and discard it when possible.

Change-Id: If7f8ff19003f79f36885a0a7207cc61901f637d2
aches.cpp
aches.h
penGLRenderer.cpp
f158198ccc3a1f53bfebaa6b8f4426e80e1867ea 01-Feb-2013 Romain Guy <romainguy@google.com> Discard the correct buffer when the bound FBO is not 0

glDiscardFramebufferEXT uses different constants depending on whether
the default FBO is bound or not. The code was choosing the proper value
for the color buffer but not for the stencil buffer.

Change-Id: I55cfcbdf663582119cb1a6289317016440d9e361
penGLRenderer.cpp
2dbd185fd0e5dfe9addb677f42716c442b7e62bd 30-Jan-2013 Derek Sollenberger <djsollen@google.com> resolved conflicts for merge of c93c6aa5 to master-chromium

Change-Id: I51429ed5359355025f873ccab11bfabbbe772a46
c93c6aa5553203f05df871804517885fcc071cfd 30-Jan-2013 Chris Craik <ccraik@google.com> Merge "Object-based DisplayList recording"
781fd2b7c86a20b0f00b5e009237d69b557e3cc4 30-Jan-2013 Romain Guy <romainguy@google.com> am f5f85022: Merge "Fix graphical corruption on QCOM GPU Bug #7146141"

# Via Android (Google) Code Review (1) and Romain Guy (1)
* commit 'f5f8502271b04d63c518e3aecfd5eaf557904e72':
Fix graphical corruption on QCOM GPU Bug #7146141
c3fedafc5f50100219449125a000e3138f6fb987 30-Jan-2013 Romain Guy <romainguy@google.com> Fix graphical corruption on QCOM GPU
Bug #7146141

The GL_QCOM_tiled_rendering extension requires careful use of
start/endTiling when attaching a renderbuffer dynamically.

Change-Id: I20036683ed3909ffaf40cc3d57a25257e35b6fa2
ayer.h
ayerRenderer.cpp
penGLRenderer.cpp
penGLRenderer.h
2af4635e4a9e448a65ff541252f8f94bc6ac48e0 27-Nov-2012 Chris Craik <ccraik@google.com> Object-based DisplayList recording

bug:8037003

Changes the DisplayList from using stream read/write commands to use an array of
objects manually allocated on a linear buffer.

Depends on frameworks/native change https://googleplex-android-review.googlesource.com/#/c/257695/ which adds LinearAllocator

Also changes drawRects to use float count instead of rect count, to be more like drawLines/drawPoints

Change-Id: Ia2e4a11acd8f0a757042a05cbc9e7563cb73ee47
isplayListLogBuffer.cpp
isplayListLogBuffer.h
isplayListOp.h
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
atch.cpp
athRenderer.cpp
ect.h
7d4f807b830eceb557e849629e95bd4bdc06ccfd 19-Jan-2013 Romain Guy <romainguy@google.com> am 49464796: Merge "Allow layers with a stencil buffer to be resized on the fly Bug #7146141"

* commit '494647961feb21d925d5e6e5ce1d42aa8b6949db':
Allow layers with a stencil buffer to be resized on the fly Bug #7146141
2055abaa0a590c35e27e1ae2e7d7cfccdfb98b59 19-Jan-2013 Romain Guy <romainguy@google.com> Allow layers with a stencil buffer to be resized on the fly
Bug #7146141

This change moves the resizeLayer() from LayerCache (where it should
never have been anyway) to Layer. This makes a little more sense.

Change-Id: I8b2f9c19c558e738405a58b9e71ec5799fc6be88
ayer.cpp
ayer.h
ayerCache.cpp
ayerCache.h
ayerRenderer.cpp
penGLRenderer.cpp
e9a983b44407413f18aeb16c892e97ea938a7fab 18-Jan-2013 Romain Guy <romainguy@google.com> am b12db26f: Merge "Implement clipRect with a transform, clipRegion & clipPath Bug #7146141"

* commit 'b12db26fec178794915d819c3dd64f13d788c461':
Implement clipRect with a transform, clipRegion & clipPath Bug #7146141
8ce00301a023eecaeb8891ce906f67b513ebb42a 16-Jan-2013 Romain Guy <romainguy@google.com> Implement clipRect with a transform, clipRegion & clipPath
Bug #7146141

When non-rectangular clipping occurs in a layer the render buffer
used as the stencil buffer is not cached. If this happens on a
View's hardware layer the render buffer will live for as long
as the layer is bound to the view. When a stencil buffer is
required because of a call to Canvas.saveLayer() it will be allocated
on every frame. A future change will address this problem.

If "show GPU overdraw" is enabled, non-rectangular clips are not
supported anymore and we fall back to rectangular clips instead.
This is a limitation imposed by OpenGL ES that cannot be worked
around at this time.

This change also improves the Matrix4 implementation to easily
detect when a rect remains a rect after transform.

Change-Id: I0e69fb901792d38bc0c4ca1bf9fdb02d7db415b9
aches.h
ayer.cpp
ayer.h
ayerRenderer.cpp
ayerRenderer.h
atrix.cpp
atrix.h
penGLRenderer.cpp
penGLRenderer.h
napshot.cpp
napshot.h
tencil.cpp
616a87736d819a7fe4e1d60d4703aabc7b888cd7 15-Jan-2013 Romain Guy <romainguy@google.com> am 61840eb0: Merge "Preliminary Support for region clipping"

* commit '61840eb03882e1a964ae971725bd21229c3db42c':
Preliminary Support for region clipping
735738c4ddf3229caa5f6e634bf591953ac29944 03-Dec-2012 Romain Guy <romainguy@google.com> Preliminary Support for region clipping

Region clipping, using Canvas.clipPath or Canvas.clipRegion, requires
a stencil buffer to be always present. In addition, extra wiring is
required in JNI and display lists.

This change only adds the necessary JNI/C++ APIs and some extra
plumbing to start the real work on properly supporting region
clipping.

A new debug define called DEBUG_CLIP_REGIONS can be used to draw
the current clip region. It is off by default, as is region
clipping.

The default implementation of clipPath() and clipRegion(), now
in native, mimics the previous Dalvik implementation to prevent
regressions.

Change-Id: I7903e7cfd7412b9b9b622566d4dbfce7bdcec00c
ebug.h
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
napshot.cpp
bf06ccba95961f9f67af8957b52981eb3a46a9db 09-Jan-2013 Romain Guy <romainguy@google.com> am 33a9741c: Merge "Cleanup 9patch mesh matching code Bug #7970966"

* commit '33a9741c1be99e8be01ab799eb50df97849ed801':
Cleanup 9patch mesh matching code Bug #7970966
5341cead27070656458750a789ba211a505b57b5 09-Jan-2013 Romain Guy <romainguy@google.com> Cleanup 9patch mesh matching code
Bug #7970966

The bug described in #7970966 should normally never happen but just in
case, change the detection code to be more robust.

Change-Id: I7040a6087590e34abe8803cb8f83f051d77f3944
atch.cpp
atch.h
atchCache.cpp
14c40b47565778b7185de7655836485f3065877a 09-Jan-2013 Romain Guy <romainguy@google.com> Fix build

Change-Id: Ia465bd844b592fc05e59ad392ecc5ca4d34d24d7
ont/Font.cpp
19d4f1806a953b87435a2bb6fd8e738424e94003 09-Jan-2013 Romain Guy <romainguy@google.com> resolved conflicts for merge of c88c60be to master-chromium

Change-Id: I3b4b42443312068e942aa779dfdc928afa7569fd
e3a9b24b5e3f9b2058486814a6d27729e51ad466 08-Jan-2013 Romain Guy <romainguy@google.com> Add plumbing for better text scaling

Fonts are now described by a transform matrix. This lead to switching
from a vector to a hashmap. This change therefore adds new comparators
and hash computations to Font.

Change-Id: I2daffa7d6287c18554c606b8bfa06640d28b4530
isplayListRenderer.cpp
ontRenderer.cpp
ontRenderer.h
ayerCache.cpp
ayerCache.h
penGLRenderer.cpp
athCache.cpp
ont/Font.cpp
ont/Font.h
ont/FontUtil.h
7bac55434caa9de7fc31f6fd8b0384042c700b4c 05-Jan-2013 Romain Guy <romainguy@google.com> am 9acd1b4f: Merge "Add visual profiling feature"

* commit '9acd1b4fa897f3a007dd23dc1f0471b151fa03ad':
Add visual profiling feature
9acd1b4fa897f3a007dd23dc1f0471b151fa03ad 05-Jan-2013 Romain Guy <romainguy@google.com> Merge "Add visual profiling feature"
672433d90fab7383cd28beac9d4485b566a90940 05-Jan-2013 Romain Guy <romainguy@google.com> Add visual profiling feature

When profiling is enabled with debug.hwui.profile set to true,
setting debug.hwui.profile_visualizer to true will display the
profiling data directly on screen.

Change-Id: I3d5fe3f0347090815087b1cbfce66b8e76d9347b
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
95bdeddb97b2f14e115751041b7831f73d92a4cd 05-Jan-2013 Romain Guy <romainguy@google.com> am 48f7cfb1: Merge "Properly support ALPHA_8 bitmaps in all drawBitmap() methods"

* commit '48f7cfb10622f8675741f36bdf5b1f679e3fe37c':
Properly support ALPHA_8 bitmaps in all drawBitmap() methods
886b275e529e44a59c54b933453d9bc902973178 04-Jan-2013 Romain Guy <romainguy@google.com> Properly support ALPHA_8 bitmaps in all drawBitmap() methods

Change-Id: I869993c59e0a0d76f369c09acbae711753908f48
penGLRenderer.cpp
penGLRenderer.h
e0ece54bd97e66f3a2ee586e49b9502e5de62b93 03-Jan-2013 Romain Guy <romainguy@google.com> am 59131481: Merge "Remove unnecessary & uninitialized variable Bug #7728929"

* commit '5913148104f0b233d861fab2873befc865bf57c0':
Remove unnecessary & uninitialized variable Bug #7728929
15a65bfee5b0a98664eb5ebadad63c73e2c471f8 03-Jan-2013 Romain Guy <romainguy@google.com> Remove unnecessary & uninitialized variable
Bug #7728929

The uninitialized variable was taken into account to compute
the hash of gradient cache entries, thus causing cache corruptions
and sometimes infinite loops (it would also cause the cache to fill
up.)

Change-Id: Ic807a9bf901888b121a6a781a81dafc33075ed2a
radientCache.cpp
radientCache.h
65dcf5322f4b25c6e7a0fbaa42957296bcdec198 03-Jan-2013 Romain Guy <romainguy@google.com> am 44080524: Merge "Remove C++11 related warning"

* commit '44080524f083dc00704267a0919016388f0d5426':
Remove C++11 related warning
dcfc836b457a87881da409e1acf251515f121446 03-Jan-2013 Romain Guy <romainguy@google.com> Remove C++11 related warning

Change-Id: I250ff7bd0ea49908e11b14c995d77312cd09a8b4
penGLRenderer.cpp
penGLRenderer.h
kiaShader.h
ca79cf69d09efa0c327e9b1237d86a119aea5da7 14-Aug-2012 Derek Sollenberger <djsollen@google.com> Update framework to support r5967 of Skia.

bug: 6906025
Change-Id: Iefdb830ec3aa2ab3472c1c142484a7aa21788a15
ndroid.mk
isplayListRenderer.h
ontRenderer.cpp
ayer.h
ont/CacheTexture.cpp
ont/Font.cpp
53018e520de44795e250e6165f9a2195adc73a98 01-Dec-2012 Romain Guy <romainguy@google.com> Merge "Apply dev. settings at runtime Bug #7434649"
5bb3c730f5ebd2a0db1b02a8981c6fdbea6c1a2e 30-Nov-2012 Romain Guy <romainguy@google.com> Apply dev. settings at runtime
Bug #7434649

Change-Id: I16f00eaa8a5eefd9f9849e196cf2cb1659215390
aches.cpp
aches.h
ayer.cpp
ayer.h
penGLRenderer.cpp
69fcbccf476ffc55af4da4dfedc72c3de8f91ce8 01-Dec-2012 Romain Guy <romainguy@google.com> Fix crash in TextDropShadowCache

The lengths used to copy/read arrays were completely wrong.

Change-Id: If21f23a73cce59bbd32975760e6d728eeeb9e40d
extDropShadowCache.cpp
extDropShadowCache.h
c4aa38a1e38ff65460e98b4768fc76022a66621a 29-Nov-2012 Chris Craik <ccraik@google.com> am c0da873e: am a9473881: am 2435f98d: Merge "Use the same interrupt/resume logic for all functor calls" into jb-mr1.1-dev

* commit 'c0da873ee25e1e67fd0454ebc2473a5c3cac002c':
Use the same interrupt/resume logic for all functor calls
c0da873ee25e1e67fd0454ebc2473a5c3cac002c 29-Nov-2012 Chris Craik <ccraik@google.com> am a9473881: am 2435f98d: Merge "Use the same interrupt/resume logic for all functor calls" into jb-mr1.1-dev

* commit 'a9473881eb066b41ea2fb3389b5c0031c2ab4f38':
Use the same interrupt/resume logic for all functor calls
b8dca777caafe1fd8c6ff6a1cc9e1bdd55f8e4c1 29-Nov-2012 Romain Guy <romainguy@google.com> Merge "Use LruCache instead of GenerationCache in libhwui"
059e12ccd20f5c249724a8362d6bac325334ea76 29-Nov-2012 Romain Guy <romainguy@google.com> Use LruCache instead of GenerationCache in libhwui

Change-Id: Ic26ddc7151eb5462bcd243b21daf7187ed6d3bec
radientCache.cpp
radientCache.h
athCache.cpp
athCache.h
hapeCache.h
extDropShadowCache.cpp
extDropShadowCache.h
extureCache.cpp
extureCache.h
d15321bbf57ff7a4615076fefcee5e196c4fc796 28-Nov-2012 Chris Craik <ccraik@google.com> Use the same interrupt/resume logic for all functor calls

bug:7093396

The functor was able to change the renderer's blend mode without it
being restored in process mode. This single path of updating gl caches
reduces likelihood of this occurring in the future.

Change-Id: Ie367532f9c683299f02bc4f635d7cb31f96db39f
penGLRenderer.cpp
7bb3cfe1cca4016ce95d3ef059761f4bb2d668bb 15-Nov-2012 Sangkyu Lee <geteuid@gmail.com> Another optimization of glyph cache uploads

Previously, cache textures were updated whenever mCurrentCacheTexuture was changed.
Since updating cache textures needs glTexSubImage2D call, frequent changing
of mCurrentCacheTexture (which can easily happen when an app uses lots of unique glyphs
even with precaching) caused many glTexSubImage2D calls and bad framerates.
This patch optimized isssueDrawCommand function. Consequently, changing mCurrentCacheTexture doesn't
cause glTexSubImage2D call any more and it will improve font rendering performance.

Change-Id: Id19d959fa0e69eeb2a39f83a57e311d7394586b2
Signed-off-by: Sangkyu Lee <geteuid@gmail.com>
ontRenderer.cpp
ontRenderer.h
7fae5216d24ebe67e22777ab933689dbcbc001b9 01-Nov-2012 Chris Craik <ccraik@google.com> Avoid tesselation path when useCenter is set

bug:7458300

The tesselation path doesn't handle sharp joins.

Change-Id: I28bf03f3b72fc584a205daa40934dda17031098f
penGLRenderer.cpp
fbba753f62f13a12d9287c67921d1ea60e92768d 24-Oct-2012 Chet Haase <chet@google.com> Merge "Handle offscreen animations correctly" into jb-mr1-dev
3561d062ff01f3455c984e4cfcd101a64a2e902f 23-Oct-2012 Chet Haase <chet@google.com> Handle offscreen animations correctly

A bug in software rendering caused animations on views that are offscreen
to not get drawn, therefore the animation doesn't continue (since old-style
animations depend on the logic in the drawing code to keep running). Fix is
to special case the isAnimating case in ViewRoot to go ahead and schedule
a traversal even if the dirty rect does not intersect with the visible region.

Issue #7396035 Animations starting offscreen don't draw run/end/draw properly (sw rendering only)

Change-Id: Iae25b3a424ddc5a16ba431ecd68cf42d5500db3f
isplayListRenderer.cpp
41308e2936c768103d0e9c82500e97938d6797f1 23-Oct-2012 Romain Guy <romainguy@google.com> Properly draw the window background on window resize
Bug #7385090

This change gets rid of two silly asumptions:
- That a layer needs to be cleared with opaque black (it shouldn't,
it's already cleared to transparent and the view will cover it up
with its own background)
- The the clip should be dirty at the beginning of a frame only
when the render target is opaque

Change-Id: I415b6d3cab196057fb0281419a53fef601a44e28
penGLRenderer.cpp
547e66531d521eb1eadac87edb0f79f8c2f1bbe0 23-Oct-2012 Chet Haase <chet@google.com> Don't null the reference to Bitmap pixels until we're really ready

A change in the VM triggers a native memory error more aggressively than before,
showing that there's a bug in the logic of recycling bitmaps. Since the pixel
memory is allocated on the Java heap, nulling out the reference to that memory
in the Java level Bitmap object can cause that memory to get collected at any time.
Meanwhile, we may have a reference to that memory at the native level for rendering
purposes, causing an error if/when we access that memory after it has been collected
by the VM.

The fix is to avoid setting the reference to the pixels to null unless we are
not referring to it in native code. This is determined at the time we call
recycle() - we return a boolean to indicate whether the native code is still
using the memory. if not, the Java code can null out the reference and allow the
VM to collect it. Otherwise, it will get collected later when the encompassing
Bitmap object is collected.

Issue #7339156 HTML5 tests crash the app (Vellamo)

Change-Id: I3a0d6b9a6c5dd3b86cc2b0ff7719007e774b5e3c
esourceCache.cpp
esourceCache.h
7c25aab491707f7324f9941b8cfa9bd2b4b97e76 19-Oct-2012 Romain Guy <romainguy@google.com> Defer layer rendering to avoid stalls
Bug #7326824

When a layer is taken out of the cache and initialized it gets cleared
to prepare it for future rendering. This triggers the following sequence
of operations:

glBindFramebuffer(layer.fbo)
attach texture storage to FBO
glClear()
glBindFramebuffer(defaultFbo)

The clear forces a resolve on tilers which stalls the CPU for a little
while, thus producing jank during animations. This change moves the
clear to the next frame when we know we will have to execute a resolve
anyway.

Change-Id: Ic1939c25df20ed65a4c48dc81ee549b2cd8b6ec3
isplayListRenderer.cpp
isplayListRenderer.h
ayer.cpp
ayer.h
ayerRenderer.cpp
ayerRenderer.h
penGLRenderer.cpp
penGLRenderer.h
b2e2f2470693e78baed20617f989d9a166864ed4 18-Oct-2012 Romain Guy <romainguy@google.com> Take into account the texture layer's transform for clipping
Bug #7370212

Change-Id: Ibdc3161306f54a1cfe66e08458f05ee01a13b1df
ayer.h
penGLRenderer.cpp
52439570800891345981c0968b513843edc2b27a 17-Oct-2012 Romain Guy <romainguy@google.com> Enable mipmapping, without a deadlock this time
Bug #7353771

Change-Id: I89a08a58608e374f1c604a26ee0769d5850b2f7b
extureCache.cpp
extureCache.h
be29d82f740fea2ed35d89bd9aa4644f4c042762 17-Oct-2012 Chet Haase <chet@google.com> Merge "Correctly adjust clip regions that lie offscreen" into jb-mr1-dev
a33d161250b0787f4e7a3f3f09244451e22496ce 17-Oct-2012 Mathias Agopian <mathias@google.com> workaround to unbreak the build (deadlock during boot)

bug: 7363206
Change-Id: Ie79c309e367ba07336a5299af9fd59c6bd2390e7
extureCache.cpp
1b85122bd22c4528679ae8bd67077dfc2fdf1847 17-Oct-2012 Romain Guy <romainguy@google.com> Merge "Add API to enable mipmaps on Bitmap Bug #7353771" into jb-mr1-dev
713e1bb9df6bdfc21bd5c40d1a6ecf6c822a4be5 17-Oct-2012 Romain Guy <romainguy@google.com> Add API to enable mipmaps on Bitmap
Bug #7353771

This API can be used when scaling large images down to a small size
to get nicer looking results.

Change-Id: If09087eed36077eee5355f6047a3ca67747d7d9e
penGLRenderer.cpp
exture.h
extureCache.cpp
extureCache.h
aa42c9af6ea2158a685ebf9b338e6d2355712268 17-Oct-2012 Chet Haase <chet@google.com> Correctly adjust clip regions that lie offscreen

We were clamping the x/y location of the scissor to 0,0, but not adjusting
the width/height appropriately. This fix adjusts width/height and also clamps
them to 0 to correctly clip out offscreen operations.

Issue #7221524 Top left and top right portions of the screen blanks out after some time

Change-Id: I47f23336ea612409ed86652b9a68e272819ef00e
aches.cpp
5778cb9a98aacd74c7f915b2d02eccc7189d5946 16-Oct-2012 Romain Guy <romainguy@google.com> Merge "Always use the correct pixel store size Bug #7357394" into jb-mr1-dev
d43b22da291fd08017fac627561091a633c85807 16-Oct-2012 Romain Guy <romainguy@google.com> Always use the correct pixel store size
Bug #7357394

When a bitmap is reused it may change configuration which can lead
to a different pixel store alignment. Our current texture cache
implementation assumes this never happens and keeps the old alignment
which can lead to distorted texture (if the bitmap goes from
ARGB8888 to RGB565 for instance.)

Change-Id: Ic57acf2403411ae4d0924e92f221298350612617
extureCache.cpp
a92bb4dc9605c86b8773c929412af2dc242b1fa8 16-Oct-2012 Romain Guy <romainguy@google.com> Support clipping in Canvas.drawBitmapMesh()
Bug #7354162

Change-Id: Ifd1d0b365e8a4d88e0ff0629c9ee13f27e1a7331
penGLRenderer.cpp
780c12875ce0c0d3fd072484d4b8b3c327cc4f31 04-Oct-2012 Chris Craik <ccraik@google.com> HW Acceleration support for stroked arcs with BUTT caps

bug:4419017

Change-Id: I7371bfb36cef460da861a47d4d945218c6d0c3d0
penGLRenderer.cpp
athRenderer.cpp
athRenderer.h
3add43ab0e26c9fd44d4dea683092807229eaa59 12-Oct-2012 Chris Craik <ccraik@google.com> Merge "fix stroke sub-hairline threshold" into jb-mr1-dev
2154af209f6d269e29c6e991ce6c1349dfc85b93 12-Oct-2012 Chris Craik <ccraik@google.com> fix stroke sub-hairline threshold

bug:7339943

Change-Id: I4051a03f4cd5bd2c313840208540601fb7a056e2
athRenderer.cpp
c37f349ecff54f15ed31d57c1b886897c91430af 11-Oct-2012 Romain Guy <romainguy@google.com> Prevent possible divide by 0
Bug #7307304

Should never happen, but eh :))

Change-Id: Ic7a09fd5c7a3622e6b4963f9ee6920e232018e2e
atch.cpp
41d35aef06c2a570a45474a01ca95a6cb9c29d9e 11-Oct-2012 Romain Guy <romainguy@google.com> Allow 9patches to shrink
Bug #7307304

Change-Id: I1fabf6df99c18c86ab1ec0e1e398a3d6d4098496
atch.cpp
atch.h
bb5f014ae805f166328d72cbf826e8f1f17c9daf 08-Oct-2012 Chris Craik <ccraik@google.com> Merge "Use offset in line drawing" into jb-mr1-dev
50ae66a554126fadee2054e0d01a9e57150cedb5 07-Oct-2012 Romain Guy <romainguy@google.com> Work around a possible driver bug
Bug #7296475

When re-enabling the scissor the driver seems to ignore the already
existing scissor box. This change resets the scissor box when the
test state changes.

Change-Id: I3a68433164f99d21fbab769a26c56fe416c1539a
aches.cpp
b30cb10a0c75c2295e89b1b30d91a73f38ee09fb 06-Oct-2012 Chris Craik <ccraik@google.com> Use offset in line drawing

Partial revert of cb4d6009

bug:7299070
Change-Id: I1db7b035e3015e0f6d15c95aef71ea74dbeca13e
penGLRenderer.cpp
cf8675ee176a375f873792684d38a47f78348dff 02-Oct-2012 Romain Guy <romainguy@google.com> Draw stroked rectangle as meshes instead of textures
Bug #7233734

Stroked rectangles were rendered using software generated textures
which would lead to slightly misaligned results. Instead, let's use
the new convex path rendering code that will do the right thing
(and save a lot of bandwidth.)

Change-Id: Ib95ff581e56c1ecead97e4919298e6fd146ca167
penGLRenderer.cpp
bf09ffb4e0dc820aeae56a3e576aed33cab218da 01-Oct-2012 Chris Craik <ccraik@google.com> Quick reject empty paths

bug:7260035

Adding a circle of radius 0 to a path is a no-op in skia, so detect
this case both in the PathRenderer, and in quickReject().

Change-Id: I7a172db49a5d5351b4734b39d4e4ca6379658096
penGLRenderer.cpp
athRenderer.cpp
6a2d17f71342f981c9df1dc5beff33e30eb3ae2b 30-Sep-2012 Chet Haase <chet@google.com> Fix texture corruption

When memory gets low on a device, activities flush everything they can.
Hardware-accelerated activites, such as Launcher, flush GL resources and destroy
the GL context. However, some resources were still hanging around, due to deferred
destruction policies (we don't delete layers until the DisplayLists they are in
are finalized, to ensure we don't deref deleted objects). This meant that we were
referring to obsolete GL data in these objects. in particular, it meant that we might
come around later, after a new GL context was created, and delete a texture object
that was incorrect. We use the layer's "texture id" to refer to the texture underlying the
layer. But if there's a new GL context, then this texture ID is no longer valid, and
we may be deleting the texture that a different object (layer, icon, whatever) is referring
to, because the driver may return that same ID under the new GL context.

The fix is to more aggressively delete things that we know will not be used again
when the GL context is destroyed. In particular, we delete all resources being used
by all DisplayLists at GL context destruction time.

Issue #7195815 Textures corruption on all devices, in many apps

Change-Id: I52d2d208173690dbb794a83402d38f14ea4c6c22
aches.cpp
isplayListRenderer.cpp
isplayListRenderer.h
a3dc55f83ab583e0a66b893c71b849afa046770a 28-Sep-2012 Romain Guy <romainguy@google.com> Fix a couple of rendering issues
Bug #7253839

1. Make sure we don't make GL calls while recording display lists

2. Disable an early and trivial clip optimization in font renderer
when a perspective transformation is used on the Canvas

Change-Id: I3f1052164239329346854f72d0a0d401fbfecf06
isplayListRenderer.cpp
atrix.cpp
atrix.h
penGLRenderer.cpp
napshot.cpp
napshot.h
ont/Font.cpp
a7a257d6578cf37723d92b4b90c6ef9caea18528 28-Sep-2012 Hiroshi Lockheimer <hiroshi@google.com> Merge "Plug memory leak that happens when reusing display lists Bug #7195815" into jb-mr1-dev
034de6b1ec561797a2422314e6ef03e3cd3e08e0 28-Sep-2012 Romain Guy <romainguy@google.com> Plug memory leak that happens when reusing display lists
Bug #7195815

We did not reclaim resources when reusing an existing DisplayList to
record a new empty list of commands. This would lead to various memory
leaks: bitmaps, paints, paths, matrices, etc.

This is not a common case but some apps run into this situation,
such as Launcher.

Change-Id: I2eb14ac86a212123f8edbe42b70a7c1c51fa4145
isplayListRenderer.cpp
a852ff3a4b637e8101c2f54e110467586fe604cf 28-Sep-2012 Romain Guy <romainguy@google.com> Merge changes I9873540e,I4f6c38e3 into jb-mr1-dev

* changes:
Skia's ColorMatrix vector is in the 0..255 range not 0..1 Bug #7248980
Don't use the QCOM_tiled_rendering extension with functors Bug #7247880
6ed9e43879039ce0cbead08d304edbce79a88ced 28-Sep-2012 Romain Guy <romainguy@google.com> Skia's ColorMatrix vector is in the 0..255 range not 0..1
Bug #7248980

Change-Id: I9873540e3bc1ea0526ea0884279a427c0de96006
kiaColorFilter.cpp
54c1a64d5441a964890b44280e4457e11f4f924a 28-Sep-2012 Romain Guy <romainguy@google.com> Don't use the QCOM_tiled_rendering extension with functors
Bug #7247880

Change-Id: I4f6c38e37b953c58e6107097c613891a49dac766
aches.cpp
aches.h
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
16b897c488a740e004bfce7d50b0d7602277fc0b 27-Sep-2012 Chris Craik <ccraik@google.com> Fix rectangle AA offset calculation

bug:4419017

Fixes compiler warning
Handle bezier thresholds with large stroke widths better
Fix sub-hairlines (for scaleX == scaleY)

Change-Id: Ida387483348ee61424b7fba729abca2a88bd68b3
aches.h
athRenderer.cpp
b0d135d91f3a41af09fd0281211f18e8452e7fc6 27-Sep-2012 Chris Craik <ccraik@google.com> Merge "Add stroke support to polygonal shape rendering" into jb-mr1-dev
244a0bcadc167ed8519c7e34c62e116c1adc2dbe 27-Sep-2012 Romain Guy <romainguy@google.com> Merge "Make gradients beautiful again Bug #7239634" into jb-mr1-dev
39284b763a09688468ed3799ebd2ebb76ea5dfd5 27-Sep-2012 Romain Guy <romainguy@google.com> Make gradients beautiful again
Bug #7239634

This change passes two matrices to the vertex shader instead of one.
We used to compute the final MVP matrix on the CPU to minimize the
number of operations in the vertex shaders. Shader compilers are
however smart enough to perform this optimization for us. Since we
need the MV matrix to properly compute gradients dithering, this
change splits the MVP matrix into two. This has the advantage of
removing one matrix multiplication per drawing operation on the
CPU.
The SGX 540 shader compiler produces the same number of instructions
in both cases. There is no penalty hit with having two matrices
instead of one. We also send so few vertices per frame that it
does not matter very much.

Change-Id: I17d47ac4772615418e0e1885b97493d31435a936
rogram.cpp
rogram.h
rogramCache.cpp
cb4d6009576cf08195dc23f341a3f4939c0878bb 25-Sep-2012 Chris Craik <ccraik@google.com> Add stroke support to polygonal shape rendering

bug:4419017
bug:7230005

- Adds support for stroke/strokeAndFill for shapes without joins
- Fixes path-polygonization threshold calculation
- Fixes rendering offset (now only used for points)
- Several formatting fixes

Change-Id: If72473dc881e45752e2ec212d0dcd1e3f97979ea
aches.cpp
aches.h
ontRenderer.cpp
penGLRenderer.cpp
penGLRenderer.h
athRenderer.cpp
athRenderer.h
2ea1045a0148cac45f873fc6324682044d599f73 26-Sep-2012 Romain Guy <romainguy@google.com> Merge "Applies a layer's color filter even when the layer is a quad Bug #7238059" into jb-mr1-dev
e529ece37f664f8947a1d4a1e27d679f6f286388 26-Sep-2012 Romain Guy <romainguy@google.com> Applies a layer's color filter even when the layer is a quad
Bug #7238059

Change-Id: Ib4736a419bc1a9a67a01d090516ed049fe3aebca
penGLRenderer.cpp
98d3a64ffa13596e3ea9125bbff40c51ec96bd8d 26-Sep-2012 Chet Haase <chet@google.com> Assign default texture id of 0

Some logic depends on a default value of 0, which was not being
assigned.

Issue #7195815 chrome url bar is corrupted
Issue #7190656 Textures corrupted on mr1

Change-Id: I346b7b76e885bf8f04740e711fd88f917a5418c7
ayer.cpp
ayer.h
ayerRenderer.cpp
ayerRenderer.h
exture.h
17ef62cc1f9d092669af0fed465a9a77e0dc1a4f 26-Sep-2012 Mathias Agopian <mathias@google.com> fix a possible dead-lock when clearing caches

Bug: 7195815
Change-Id: I8e226b7ec445f9f4fe46ae216ef7cc41efc5a0fd
aches.cpp
54643d72f86d0ee0b23e3643ac9257d52ddfae6b 26-Sep-2012 Mathias Agopian <mathias@google.com> make sure to destroy GL objects on the GL thread

Bug: 7195815
Change-Id: I5bcac61cd0b903d1ccca0754fdb9cb1023efbe0f
aches.cpp
esourceCache.cpp
56257aff8a55c847be72be9924c392033fd8151d 26-Sep-2012 Dave Burke <daveburke@google.com> Revert "Deleting objects on the wrong thread is a silly idea Bug #7195815"

This reverts commit 8a1374946a928fcba7495c87ff6adda327fdfb9f

Change-Id: I53564a6c531d334afcc1fce0bea1e57ae266aa78
ayer.cpp
ayer.h
ayerRenderer.cpp
ayerRenderer.h
esourceCache.cpp
8a1374946a928fcba7495c87ff6adda327fdfb9f 26-Sep-2012 Romain Guy <romainguy@google.com> Deleting objects on the wrong thread is a silly idea
Bug #7195815

Turns out that multi-threading is hard.

Change-Id: Ib0b4bd6dc3caea27f7ced22cbb363bb955fe58ab
ayer.cpp
ayer.h
ayerRenderer.cpp
ayerRenderer.h
esourceCache.cpp
ef09a210dd6ea481158b7028ec2424a7f5769ed2 25-Sep-2012 Romain Guy <romainguy@google.com> Don't destroy the same texture twice
Bug #7221449

SurfaceTexture already deletes the GL texture when detachFromContext
is invoked. The newly introduced refcount would casue the Layer
object to be destroyed later and attempt to delete the GL texture
again. By the time the second cleanup occurs, the texture name
might have been reused by somebody else, resulting in erroneous
behaviors.

Change-Id: I257c589fea64b34c00f46fbfaa7732e6854a5e41
ayer.h
e83221c547cf2038752e5378e72e49a62cfd9954 25-Sep-2012 Romain Guy <romainguy@google.com> Fix alpha channel computation with ColorMatrixColorFilter
Bug #7222476

There were two issues:
- Blending was ignored with color filters
- The addition vector of a color filter was treated as integer values
instead of float values

Change-Id: Id94065704a30ee8aaaa5724a9f3a3cff7c50ced7
penGLRenderer.cpp
rogramCache.cpp
kiaColorFilter.cpp
908a43234aca51af5021249c03030cec6b36417f 25-Sep-2012 Jean-Baptiste Queru <jbq@google.com> Merge into jb-mr1-dev

Change-Id: I7b777c7a4818d699582419d2eb4fc1f5cc0f4f46
87e2f757be9b24d369bab354e37c276e851b1fc7 24-Sep-2012 Romain Guy <romainguy@google.com> Add a property to disable libhwui's scissor optimization
Bug #7158326

When scissor optimization is enabled, OpenGLRenderer will attempt to
minimize the use of scissor by selectively enabling and disabling the
GL scissor test.
When the optimization is disabled, OpenGLRenderer will keep the GL
scissor test enabled and change the scissor rect as needed.
Some GPUs (for instance the SGX 540) perform better when changing
the scissor rect often than when enabling/disabling the scissor test
often.

Change-Id: Idb68862e287a23358f9188d577ae0f86161902fd
penGLRenderer.cpp
penGLRenderer.h
roperties.h
6b3292ce5b3908c7433503f64c852cf2b27718ed 24-Sep-2012 Romain Guy <romainguy@google.com> Merge "Avoid deadlock when deleting layers Bug #7217459" into jb-mr1-dev
97dc9172b0e58979c63de0dedbab656399a62281 24-Sep-2012 Romain Guy <romainguy@google.com> Avoid deadlock when deleting layers
Bug #7217459

Change-Id: I12bfa6c30c5030bd1b23ea6a3ce64240ab1dfba3
ayer.cpp
ayer.h
esourceCache.cpp
esourceCache.h
d392b87e3d30cd4f0836623d848019c5724efce8 24-Sep-2012 Romain Guy <romainguy@google.com> Merge changes Ib0a0b7d1,Ibec4b2aa into jb-mr1-dev

* changes:
Fix overdraw debug on QCOM
Make sure we never bind to texture #0 Bug #7195815
4285de3c8bc77856a2df98894f74bb7333f1d348 23-Sep-2012 Romain Guy <romainguy@google.com> Fix overdraw debug on QCOM

Disable the use of the tiling extension when overdraw debug is
turned on.

Change-Id: Ib0a0b7d1998146aa0c7efef2d3822f9997efb123
aches.cpp
574cf6070d34e66dfd6f2006937986eddd1f09e7 23-Sep-2012 Romain Guy <romainguy@google.com> Make sure we never bind to texture #0
Bug #7195815

Change-Id: Ibec4b2aa4c580419eb5eb61adae6c9c960694d0c
ont/CacheTexture.h
b92d8f7979c29c7c09932578a11b2f8d6eec1d90 21-Sep-2012 Chet Haase <chet@google.com> Optimize glyph cache texture uploads

Only upload the changed area of the glyph cache, not the entire
bitmap. Note that we can't do the full-on optimization here of copying a sub-rect
of the bitmap because of GL ES 2 limitations, but we can at least copy the
horizontal stripe containing the dirty rect, which can still be a big
savings over uploading the entire bitmap.

Issue #7158326 Bad framerates on MR1 (Mako, Manta, Prime)

Change-Id: Iab38d53202650f757ead4658cf4287bdad2b3cb9
ontRenderer.cpp
ont/CacheTexture.cpp
ont/CacheTexture.h
8e586f61dd4f7fa53b01e63ac779ffc7cde05bdd 22-Sep-2012 Romain Guy <romainguy@google.com> Merge "Add support for a new developer setting: overdraw debugging" into jb-mr1-dev
7c450aaa3caac2a05fcb20a177483d0e92378426 22-Sep-2012 Romain Guy <romainguy@google.com> Add support for a new developer setting: overdraw debugging

Change-Id: I350ba4486577c3289f82c20938f7a35138778727
aches.cpp
aches.h
penGLRenderer.cpp
penGLRenderer.h
roperties.h
tencil.cpp
tencil.h
dbb261455b1b8d2fdf4f0f8ad84ddb09dda1ed9b 22-Sep-2012 Chet Haase <chet@google.com> Merge "Optimize shaders for dithered gradients" into jb-mr1-dev
a1d12dd619c86c9ac121a3095ff5e5633c11e876 21-Sep-2012 Chet Haase <chet@google.com> Optimize shaders for dithered gradients

It's faster to compute a dither calculation in the vertex shader and use
a varying (letting the GPU interpolate the fragment values) than to perform
that calculation in the fragment shader as part of a texture lookup.

Issue #7207600 Prime mr1 shader performance issues
Issue #7158326 Bad framerates on MR1 (Mako, Manta, Prime)

Change-Id: I15789582a6e9e2d8b9dd22aa5b0f72f0ba1cce7f
ither.cpp
rogramCache.cpp
059aedf808c8b9b3da1457eef52f3d477878d50b 22-Sep-2012 Romain Guy <romainguy@google.com> Merge "Finish this bit before I forget." into jb-mr1-dev
f7e52d92b41adf460089625ea47bfea2ed7e6296 22-Sep-2012 Romain Guy <romainguy@google.com> Finish this bit before I forget.

This code is not enabled in current builds.

Change-Id: I488ec9e94889efbf2c8f3312abfed4298a76b7f1
tencil.cpp
61d37041ac76a95aedb98d3550bb5efa33d898a1 21-Sep-2012 Chris Craik <ccraik@google.com> Merge "Polygonal rendering of simple fill shapes" into jb-mr1-dev
11cb642756093a4af901b1525375b1eb2b5c3e2b 21-Sep-2012 Romain Guy <romainguy@google.com> Update layers in a single batch at the beginning of a frame
Bug #7186819

Change-Id: Ice5926dfedfb3be3a3064e65008dafa2852407da
ayerRenderer.cpp
ayerRenderer.h
penGLRenderer.cpp
penGLRenderer.h
57b5268708c3b974296c7d4e58a02a957979224a 21-Sep-2012 Romain Guy <romainguy@google.com> Optimize tiling management
Bug #7186819

Change-Id: Iebc42a6e9c96ad5605fbbe1539aa887695d2e829
aches.cpp
penGLRenderer.cpp
penGLRenderer.h
710f46d9d6a5bf9ea1c1833384caf61e1934124f 18-Sep-2012 Chris Craik <ccraik@google.com> Polygonal rendering of simple fill shapes

bug:4419017

Change-Id: If0428e1732139786cba15f54b285d880e4a56b89
ndroid.mk
ayerRenderer.cpp
atrix.cpp
atrix.h
penGLRenderer.cpp
penGLRenderer.h
athRenderer.cpp
athRenderer.h
rogram.h
rogramCache.cpp
2b7028eabac80cec170572bc0e945a1d4224e595 20-Sep-2012 Romain Guy <romainguy@google.com> Add support for QCOM_tiled_rendering
Bug #7186819

This optional OpenGL extension can be used by tiled renderers to optimize
copies from main memory to tiles memory.

Change-Id: Id4a5d64e61ad17f50e773e8104b9bf584bb65077
aches.cpp
penGLRenderer.cpp
penGLRenderer.h
35643ddc689913f5b5f80ceed864470d987bd6cd 19-Sep-2012 Romain Guy <romainguy@google.com> Minimize state changes when updating layers

Change-Id: I407fcc80bd3178f9f09a3b379ceb7f7ce0749e08
aches.cpp
ayerRenderer.cpp
ayerRenderer.h
penGLRenderer.cpp
penGLRenderer.h
0990ffbc4d407e174423a4a04b5902ed83f71db5 18-Sep-2012 Chet Haase <chet@google.com> Fix GL shader bugs

Fixing errors in emitted shader code that caused GL errors
at runtime

Change-Id: I267a84398a81329a6688b292505f8779bd750ad1
rogram.cpp
rogramCache.cpp
a8a402f8ad1549e23f4238786269bd548b6b445d 18-Sep-2012 Chet Haase <chet@google.com> Merge "Fix bad shader code" into jb-mr1-dev
1c5c206953d673f8424908c77c974c06d5b99a9c 18-Sep-2012 Chet Haase <chet@google.com> Fix bad shader code

Shader code missing "=" in a couple of cases.

Change-Id: Iff8a99a0ccb2903c30e2bdb2f698ef9b2e03d5d1
rogramCache.cpp
f74d2f2fe8a157bee25516d2a6ae3e329507cb2c 17-Sep-2012 Chet Haase <chet@google.com> Merge "Fix occasional crash bug with layers" into jb-mr1-dev
603f6de35f21d74ae242d52d501f4f5c25ff4f4c 15-Sep-2012 Chet Haase <chet@google.com> Fix occasional crash bug with layers

Launcher occasionally crashes with a stack trace indicating that the memory
of a Layer object is corrupt. It is possible for us to delete a Layer
structure and then, briefly, use it to draw a DisplayList again before
that DisplayList gets recreated (without the layer that got deleted).

When this happens, if the memory got corrupted, it's possible to crash.

The fix is to add Layer to the other objects which we currently refcount
(bitmaps, shaders, etc.). Then instead of deleting a Layer, we decrement the
refcount. We increment when creating it, then increment it again when it's
referenced from a DisplayList. Then we decrement the refcount instead of
deleting it, and decrement when we clear a DisplayList that refers to it.
Then when the refcount reaches 0, we delete it.

Issue #6994632 Native crash in launcher when trying to launch all apps screen

Change-Id: I0627be8d49bb2f9ba8d158a84b764bb4e7df934c
isplayListRenderer.cpp
isplayListRenderer.h
ayer.cpp
ayer.h
ayerCache.cpp
ayerRenderer.cpp
penGLRenderer.cpp
esourceCache.cpp
esourceCache.h
a938f569ce206c1ed68d736181016b5b708c0084 14-Sep-2012 Romain Guy <romainguy@google.com> Fix modulation and gamma correction issues

Modulation is normally enabled in a shader when drawing with an alpha
mask (A8 texture.) Modulation is used to do one of two things:

- Colorize the primitive (to draw text in red for instance)
- Apply extra translucency (50% translucent circle filled with a bitmap)

The current implementation has four issues:

1. Unnecessary work is performed by assigning the modulation color
to vec4 fragColor early in the shader
2. The modulation color's alpha is applied twice when the primitive
is drawn with an SkShader
3. The decision to modulate is wrong and triggers when any of the
RGB channels is < 1.0. Only the alpha channel needs to be taken
into account to make the decision
4. Gamma correction is not applied properly

This change addresses all four issues above.

Change-Id: I73fcc74efc4b094bf2d1b835f10ffaa2ea4b9eb9
rogram.h
rogramCache.cpp
494ac35c27a0960f57b00bf8457f1956ecf149a2 14-Sep-2012 Romain Guy <romainguy@google.com> Merge "Multiply alpha for AA as late as possible" into jb-mr1-dev
85ef80d8902afe8d26cb75fa7837fd9e6d019620 14-Sep-2012 Romain Guy <romainguy@google.com> Foundation for tiling optimization

Change-Id: I4db32a4749f196472ba0dde7e102439d2ba4a3a7
aches.cpp
aches.h
xtensions.h
9f44a13a125980fee92cdc76376063129f0eebc9 14-Sep-2012 Chris Craik <ccraik@google.com> Multiply alpha for AA as late as possible

Should be done after all color computation

Change-Id: Iaadd565f7d2263f111f6841a00e7c341025833d3
rogramCache.cpp
45e4c3df6c00ac98ff6144de9af574877d4fff19 12-Sep-2012 Romain Guy <romainguy@google.com> Discard framebuffer commands when we redraw the entire buffer

Change-Id: I32e3014832cbd3bdbace8c3d2206eb20a2002d64
isplayListRenderer.cpp
ayerRenderer.cpp
penGLRenderer.cpp
df46c637550b4c6f0543574cfbd544329f48f5c7 11-Sep-2012 Romain Guy <romainguy@google.com> Merge "Prevent degenerate 9-patches from drawing out of bounds Bug #7137292" into jb-mr1-dev
70561df470c31513056df181571632851fd0d081 11-Sep-2012 Romain Guy <romainguy@google.com> Prevent degenerate 9-patches from drawing out of bounds
Bug #7137292

Change-Id: I371e94899445d2f3c6794d5c0aee8faa514d3c2c
atch.cpp
beb8bd0db28d8c5cad2a258f2ba2f3b8b76cf037 10-Sep-2012 Chet Haase <chet@google.com> Reset GL buffer state after functor invocation

Functors in WebView were binding to different buffers than we
assumed in the toolkit, eventually causing a crash due to improper
dereferencing in the currently bound buffer. Fix is to reset state
after invoking functors.

Issue #6666279 Native crash in Currents, mostly on Nakasi

Change-Id: I3697812d83613fffc9193daa99beea4dbf26474a
penGLRenderer.cpp
4aacf93d40b4be82aa35bf164d6fd6536c8b2a50 08-Sep-2012 Romain Guy <romainguy@google.com> Merge "Fix memory corruption in LayerRenderer::copyLayer" into jb-mr1-dev
e49d7ec36132f33b7c9e2c044ab9dd3585aa3747 08-Sep-2012 Romain Guy <romainguy@google.com> Fix memory corruption in LayerRenderer::copyLayer

The pixel store pack alignment was not set for the source texture,
causing a write to occur outside of the destination bitmap's
bounds.

Change-Id: Iaa5767acf7b5943fbc2765c3810a142f06b1a796
ayerRenderer.cpp
dc531fa7d4ec545ace1b3daae0849d3101102e49 08-Sep-2012 Chris Craik <ccraik@google.com> Merge "Handle different x, y scales in drawLines AA path" into jb-mr1-dev
75040f8a7727f18bb33da23696a32a0760926ff2 07-Sep-2012 Chris Craik <ccraik@google.com> Handle different x, y scales in drawLines AA path

bug:7114630

Fixes different x, y scales, and fixes boundaryWidthProportion to be from
center, not edge.

Also adds drawLine tests that previously drew blurry.

Change-Id: I2b648a60361ad3931eac67647b9b27909525ee1e
penGLRenderer.cpp
89b3f48fa3ccaf9a05628f0e540c1f94716809f7 07-Sep-2012 Chet Haase <chet@google.com> Merge "Enable changing properties of layer paint" into jb-mr1-dev
55e6b77bda7da1684ca32493d9e03184bd441dab 07-Sep-2012 Romain Guy <romainguy@google.com> Merge "Reduce the number of locks acquired by display lists" into jb-mr1-dev
58ecc204fbcacef34806290492384677a330d4d4 07-Sep-2012 Romain Guy <romainguy@google.com> Reduce the number of locks acquired by display lists

Change-Id: I1123aae0355de84db705bb75042c7083fc69c9f2
isplayListRenderer.cpp
isplayListRenderer.h
esourceCache.cpp
esourceCache.h
d15ebf25c595b855f6978d0600218e3ea5f31e92 05-Sep-2012 Chet Haase <chet@google.com> Enable changing properties of layer paint

Previously, to draw a layered view with a changed Paint object for the
drawLayer operation, you'd have to invalidate the parent view, to get the
native DisplayList to pick up the new Paint properties. This change adds
API and functionality so that the developer can call setLayerPaint(), which
does the proper invalidation (lightweight, doesn't cause redrawing the view).

Issue #6923810 Make it easy to efficiently animate a layer's Paint

Change-Id: I7fea79788d50f6d9c86dd5e5b2a4490cb95142bb
ndroid.mk
isplayListRenderer.cpp
ayer.cpp
ayer.h
penGLRenderer.cpp
penGLRenderer.h
9147cd4ac56d53dec6da1ef13dd04ba1eec1a7df 07-Sep-2012 Chris Craik <ccraik@google.com> Fix m11 to be Y scale instead of X

bug:7114630

Fixes different X and Y values resulting in blurry lines/rects.

Change-Id: I3eb244e0cf769efa6b38d08741cf37d0bf62b786
penGLRenderer.cpp
378d131e65348d199db36c21ba7156542bbf0045 06-Sep-2012 Chris Craik <ccraik@google.com> Merge "Varying-based AA rect drawing" into jb-mr1-dev
6ebdc114e0d72137394f02bc8ffe9d7a782a65c4 01-Sep-2012 Chris Craik <ccraik@google.com> Varying-based AA rect drawing

Instead of calculating opacity from relative position in the shader, use a
shader varying to do this computation for us.

bug:5045101

Also adds a test to HwAccelerationTest to show incorrect antialiasing in
scaled drawAARect / boundarySize calculation.

Change-Id: Icdc41acb01dc10ce354834f8389a5aed2f439162
aches.h
penGLRenderer.cpp
penGLRenderer.h
rogram.h
rogramCache.cpp
521dc51fd411285f900c083a4fe560d2ed7c3f8a 05-Sep-2012 Romain Guy <romainguy@google.com> Don't invalidate all the glyphs when flushing large textures

FontRenderer::flushLargeCaches identifies the large textures used to
cache glyphs and visits all the known fonts to mark their glyphs
invalid if they belong to one of these large textures.

Unfortunately, Font::invalidateTextureCache had a logic error
which would make it mark *all glyphs* as invalid, not matter
what texture they belong to. This means that any large cache
flush would cause all glyphs to be invalidate, thus forcing
the rendering system to recreate them on the next draw.

Font::invalidateTextureCache is supposed to behave this way:
- If the specified cacheTexture is NULL (default value), mark
all glyphs as invalid (see FontRenderer::flushAllAndInvalidate())
- If cacheTexture is *not* NULL, invalidate only the glyphs for
which glyph.cacheTexture == cacheTexture.

The previous condition read:

if (cacheTexture || glyph.cacheTexture == cacheTexture)

This test *always* passes.

Change-Id: I418886cb594c81c6178d0f9e9953d975e991cf22
ont/Font.cpp
6c8c6d9d44f97ebfba9c6d997665ad58ac39273a 05-Sep-2012 Romain Guy <romainguy@google.com> Merge "Correctly check the height of a glyph prior to caching it" into jb-mr1-dev
e43f785b7ff3fdf75f6d1c92282ebca6db191f2f 05-Sep-2012 Romain Guy <romainguy@google.com> Correctly check the height of a glyph prior to caching it

Change-Id: Iaf3977afc20fcde65bfda7b9e092b3e723241684
ont/CacheTexture.cpp
ont/CacheTexture.h
d84aaa23a53b57834b0722ad36c460833dc4823c 05-Sep-2012 Chris Craik <ccraik@google.com> Merge "Fix line drawing path to use proportional distance from center" into jb-mr1-dev
8087246d9964b11de8ce116bc63b156faa4197e0 05-Sep-2012 Romain Guy <romainguy@google.com> Code cleanup in FontRenderer

Change-Id: Ic788721c224a77f0a76f4cd6d9817b62e390a5a7
ontRenderer.cpp
ontRenderer.h
ont/CacheTexture.h
ont/Font.cpp
ont/Font.h
9b1204baf4740b4d443e72157dea98571cf84e1f 05-Sep-2012 Romain Guy <romainguy@google.com> Small code cleanup in FontRenderer

Change-Id: I09c00debe9b0b4f45b232cae402ed19bdaeabfe4
ontRenderer.cpp
ontRenderer.h
ont/CacheTexture.cpp
ont/CacheTexture.h
ont/Font.cpp
8f5ad7657b6c7cdb8927d7da5140602b68b450ac 04-Sep-2012 Chris Craik <ccraik@google.com> Fix line drawing path to use proportional distance from center

boundaryWidth and boundaryLength are now distance from center, instead of
distance from edge, in order to avoid unnecessary calculation in the shader. New
calculation of these matches drawAARect.

Change-Id: I1c7f576a97a6f0ce00d521661fd56fb62e05e6f2
penGLRenderer.cpp
9f5dab3fc228fa11c32b483e6101ec086895a32b 04-Sep-2012 Romain Guy <romainguy@google.com> Refactor FontRenderer.cpp

FontRenderer.h defined several classes and structures that now live
in the font/ folder. This will make the code easier to read and
maintain.

Change-Id: I3dc044e9bde1d6515f8704f5c72462877d279fe2
ndroid.mk
ontRenderer.cpp
ontRenderer.h
ont/CacheTexture.cpp
ont/CacheTexture.h
ont/CachedGlyphInfo.h
ont/Font.cpp
ont/Font.h
ont/FontUtil.h
0baaac5e9adf3ee280ae1239e2e58754a9d2b099 01-Sep-2012 Romain Guy <romainguy@google.com> Revert "Revert "Add more support for transformed clip rects and paths""

This reverts commit a8557d2169e14997637f57bc897640c8882d4a46.

Change-Id: I36d4883d548fc47ba6c0b4a42012107d0d2f85a6
ndroid.mk
aches.h
penGLRenderer.cpp
penGLRenderer.h
napshot.cpp
napshot.h
tencil.cpp
tencil.h
a8557d2169e14997637f57bc897640c8882d4a46 01-Sep-2012 Mathias Agopian <mathias@google.com> Revert "Add more support for transformed clip rects and paths"

this introduced a dead lock in GradientCache's ctor.

This reverts commit dfe082f63e94cde9aee271c94d13de5e7217e036.

Bug: 7096001
Change-Id: I57b8bbab11fb7cb502fa58e3bbf5d19864db874f
ndroid.mk
aches.h
radientCache.cpp
penGLRenderer.cpp
penGLRenderer.h
napshot.cpp
napshot.h
tencil.cpp
tencil.h
703bd32647556524fa8cadbe869c8a8d734640ef 01-Sep-2012 Romain Guy <romainguy@google.com> Merge "Add more support for transformed clip rects and paths" into jb-mr1-dev
dfe082f63e94cde9aee271c94d13de5e7217e036 01-Sep-2012 Romain Guy <romainguy@google.com> Add more support for transformed clip rects and paths

Change-Id: I41791b1e1bffef77d503dc9e52428395d2309688
ndroid.mk
aches.h
radientCache.cpp
penGLRenderer.cpp
penGLRenderer.h
napshot.cpp
napshot.h
tencil.cpp
tencil.h
eb32a499194119b3783b86c925172df02e5d2685 31-Aug-2012 Chet Haase <chet@google.com> Paramaterize and adjust the glyph cache sizes

Add new parameters for the texture size used for the larger, fallback caches.
Bump up the defaults in some situations.

Issue #7045164 Adjust cache sizes for manta

Change-Id: I562118ce785d7f8b6e445178878672e9709d25f2
ontRenderer.cpp
ontRenderer.h
roperties.h
c0c1c94e2df33ca8b85bb25fa89bf8379f9a6415 30-Aug-2012 Chet Haase <chet@google.com> Merge "Avoid thrashing the glyph cache during the precache phase" into jb-mr1-dev
f942cf10e04567f6b9456f6258e29c803b8bfb41 30-Aug-2012 Chet Haase <chet@google.com> Avoid thrashing the glyph cache during the precache phase

It is unlikely, but possible, to draw so many glyphs in a frame
(especially of the glyphs are quite large) that the cache starts flushing
itself to fit the later glyphs in. This causes unnecessary thrashing, because
when we actually draw the frame, we will again need to flush to fit the
earlier glyphs in, and then flush again to fit the later ones in.

It is better to avoid thrashing the cache at the precache phase, and wait
until we actually draw the glyphs that do not fit to do any eviction of
the earlier glyphs.

This change simply notes when we are in the preaching phase, and avoids flushing
the cache when a glyph does not fit.

Issue #7081725 avoid thrashing cache during DisplayList recording

Change-Id: I230410ab5b478091b1032fa99dc1752acf868bbe
ontRenderer.cpp
ontRenderer.h
63f2fcae3e7089ce0e27837a5152392d503f41eb 30-Aug-2012 Chet Haase <chet@google.com> Merge "Fix bug with Fbo layer clipping" into jb-mr1-dev
7808581ca3b462fb187aed6b0d1b86fb83a8a215 30-Aug-2012 Romain Guy <romainguy@google.com> Merge "Pre-multiply color components for 2-stop gradients Bug #7033344" into jb-mr1-dev
d679b57ef279239cf11bb6c9bd14fb99b07971c9 30-Aug-2012 Romain Guy <romainguy@google.com> Pre-multiply color components for 2-stop gradients
Bug #7033344

Change-Id: Ia168501f1dc56ba7a1bb0c55078320432309a66a
radientCache.cpp
kiaShader.cpp
kiaShader.h
d48885a6c8cd27a8a62552c33b5282e9882e19f6 29-Aug-2012 Chet Haase <chet@google.com> Fix bug with Fbo layer clipping

Rendering views with alpha causes the creation of Fbo layers. These layers
are created at the size of the view, clipped by the current clip rect.
However, if the view lies completely outside the current clip rect, the
Fbo layer is created at the full size of the view and copied into place
outside of its container, causing artifacts like notification items showing
up outside the notification panel.

Fix is to note when the intersect() operation fails and to set an empty bounds
on the layer.

Issue #7069881 Bottom notification sometimes shows below bottom of notification panel shade

Change-Id: Ib52f7c4e503bbe9204cb808755ab269195aa94c1
penGLRenderer.cpp
penGLRenderer.h
a798b95a9ef328720febec72d01462cd97e3d4c7 28-Aug-2012 Chris Craik <ccraik@google.com> Use smoothstep to eliminate branches in AA shader

Change-Id: If4ecb1a9446f29b2f8444f5cee551f863c1993e8
penGLRenderer.cpp
rogramCache.cpp
5a3ec7113c99242fa0d0a328a0ec3892698203f1 18-Aug-2012 Chet Haase <chet@google.com> Fix glyph cropping bug

Glyphs were being stored in the glyph cache incorrectly.
The second row of glyphs in any column were being positioned exactly
one pixel too high, causing the preceding glyph in that column to be
cropped, resulting in the reported truncation in some glyphs.

Issue #7003215 Minor UI truncation while reading the mails

Change-Id: I47ce376f78a04d4e07e8b7ed1b3f0b58864c5498
ontRenderer.cpp
378e919ccb75efe24d5a5aa75ac2c6ef255dcb48 16-Aug-2012 Chet Haase <chet@google.com> Remove CacheTextureLine structure from FontRenderer

CacheTextureLine was useful before we were packing the glyph
textures; it allowed simple packing of any particular texture according to
how many lines there were in a texture, and how tall those lines were.
Now that we are packing more efficiently (both horizontally and vertically
in any given texture line), it is more efficient to have
open space in every texture, removing the need for CacheTextureLine (which
now gets in the way since it limits how much can be stored in each line).

This change removes CacheTextureLine and just uses CacheTexture directly,
allowing caching of glyphs anywhere in the open space of each texture. As before,
the packing of these glyphs is determined by the CacheBlock structure, which
is a linked list of open spaces in each CacheTexture.

Change-Id: Id6f628170df0f676f8743ac7de76f2377fc6a012
ontRenderer.cpp
ontRenderer.h
6b7d46b78c1c5c1ce3e077c0eed41c730f1686b4 15-Aug-2012 Chet Haase <chet@google.com> Merge "Restore scissor state correctly" into jb-mr1-dev
2efd5c5886d9acf747bc92f888d731ed558aabcc 15-Aug-2012 Chet Haase <chet@google.com> Glyph cache optimization

Precaching at startup was not working. One-liner fix to init the caches
so that precaching would kick in earlier, saving time at startup by avoiding
the multiple-upload issue of caching at render time.

Issue #6893691 long app launch time on manta for some apps comparing to nakasi/stingray

Change-Id: Ie5c7f0536ec8ea371c7892e5e09c1db14795531c
ontRenderer.cpp
8025061c594e5171e1bf370d8fdd77e0e9a02b47 15-Aug-2012 Chet Haase <chet@google.com> Restore scissor state correctly

Chrome is disabling the scissor, which doesn't play well with our
code that assumes that we know the state of the scissor. This fix
sets up our internal state based on the actual state of the scissor
in the resume() function (which is called after any calls out to the
Chrome or Browser GL functor). This fixes intermittent rendering
artifacts, including a gray address bar (where the gray background
gets painted without the clip that is being applied to the text foreground).

Issue #6886339 Address bar in Chrome turns gray after swiping the tabs / favicons drift outside of tab

Change-Id: I3d8a23f4438b41a367336507845baaea90cccc7e
penGLRenderer.cpp
e816baea651476aca4407200d4a5e629b9ab8dfa 09-Aug-2012 Chet Haase <chet@google.com> Optimize interactions with glyph cache

There are two fixes here:
- precaching: instead of caching-then-drawing whenever there is a new
glyph, we cache at DisplayList record time. Then when we finally draw that
DisplayList, we just upload the affected texture(s) once, instead of once
per change. This is a huge savings in upload time, especially when there are
larger glyphs being used by the app.
- packing: Previously, glyphs would line up horizontally on each cache line, leaving
potentially tons of space vertically, especially when smaller glyphs got put into cache
lines intended for large glyphs (which can happen when an app uses lots of unique
glyphs, a common case with, for example, chinese/japanese/korean languages). The new
approach packs glyphs vertically as well as horizontally to use the space more efficiently
and provide space for more glyphs in these situations.

Change-Id: I84338aa25db208c7bf13f3f92b4d05ed40c33527
isplayListRenderer.cpp
isplayListRenderer.h
ontRenderer.cpp
ontRenderer.h
320d46bf844b84351cb80c5d4a4768d86447ac81 09-Aug-2012 Romain Guy <romainguy@google.com> Reduce gradients textures size whenever possible

Change-Id: Ifd58625ee62edac3b5d20b77553cb98b6fa2b46e
radientCache.cpp
rogramCache.cpp
c89b14bba0f6cc2c91629080617f7ed215f697f3 08-Aug-2012 Romain Guy <romainguy@google.com> It seems that apparently useless public APIs are actually useful
Bug #6953651

Change-Id: Ic47ce504e63262711f5d3edc76f7d2b9c12471ad
penGLRenderer.h
b6039811fa0fbc23f25c47491810faeb04ce3125 08-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am 05e97e81: am 0be33f2d: Merge "Add shortcut to avoid potential divide by zero in some case"

* commit '05e97e81a5fa2c9cab4cdda15aa2d036243a0c0e':
Add shortcut to avoid potential divide by zero in some case
05e97e81a5fa2c9cab4cdda15aa2d036243a0c0e 08-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am 0be33f2d: Merge "Add shortcut to avoid potential divide by zero in some case"

* commit '0be33f2d522f76f48062a59ddb520815a0851875':
Add shortcut to avoid potential divide by zero in some case
33fa1f774c8e7289fd7c39fbc2c65b9361f2c2c4 08-Aug-2012 Romain Guy <romainguy@google.com> Draw an empty border around glyphs to avoid sampling issues
Bug #6942209

The font renderer was preserving a 1 px border around each glyph to ensure
bilinear filtering would work nicely. Unfortunately, this border was not
set to 0 when glyphs were added in the cache to replace old evicted glyphs.

Change-Id: Ib85afca7ebad5cb63f960dc0e87ae162333dbfe8
ontRenderer.cpp
penGLRenderer.cpp
17112ad8a21a77620eb1ff14dcf8bdd6b7859712 07-Aug-2012 Romain Guy <romainguy@google.com> Cleanup of libhwui

Change-Id: Ib7f5771548462c00027a8ad57badfb68c50644f9
penGLRenderer.h
4ff0cf4b83605bff630c4e6f1fabe4f72a3f93a1 06-Aug-2012 Romain Guy <romainguy@google.com> Add new debug tool to track hardware layers updates

You can setprop debug.hwui.show_layers_updates true to flash
hw layers in green when they update. This is also a setting
in the Dev. section of the settings app.

Change-Id: Ibe1d63a4f81567dc1d590c9b088d2e7505df8abf
aches.cpp
aches.h
ayerRenderer.cpp
penGLRenderer.cpp
atch.cpp
roperties.h
8801b2fef3bc54db1bbb24748d91c909b901116a 04-Aug-2012 Romain Guy <romainguy@google.com> Bowing my head in shame
Bug #6924514

Change-Id: Ifcc08fb5dbaf3f9c6ac3a3e618db2fd6349dc290
ammaFontRenderer.h
18edb81172daa9b98b53d226d94fc03249b1aded 04-Aug-2012 Romain Guy <romainguy@google.com> Avoid crash when dumping display lists

We recently changed the drawText implementation to accept more parameters
which were not taken into account during a dump operation.

Change-Id: Ia1dc682dc7bb2bb02a1f4a514ed5af5556f92a97
isplayListRenderer.cpp
a70cd04985eec51d95355cc7b822bc65f4ebce05 03-Aug-2012 Romain Guy <romainguy@google.com> Merge "Add dithering to gradients" into jb-mr1-dev
211efea7376371ee755edd2ad03e83ef6eea464e 01-Aug-2012 Romain Guy <romainguy@google.com> Add dithering to gradients

Change-Id: Ic1208855bde3a254eca2fd7cef43e0f1318ce419
ndroid.mk
aches.cpp
aches.h
ither.cpp
ither.h
rogramCache.cpp
kiaShader.cpp
1ae49ab8655baeb0ddf1944d0a66cd598122408a 01-Aug-2012 Raph Levien <raph@google.com> Merge "Fix bug 6892600 Font (character pairs) rendering issue" into jb-mr1-dev
42e1e0d482d774cf18a55773e434f02edb9e4462 30-Jul-2012 Romain Guy <romainguy@google.com> Improve gradients

Avoid using textures for common gradients (two stops from 0.0 to 1.0)

Change-Id: Iff55d21b126c8cfc4cfb701669f2339c8f6b131a
radientCache.cpp
radientCache.h
rogram.h
rogramCache.cpp
kiaShader.cpp
kiaShader.h
8b4072d3fb9bb49d774d97689a065204beca1752 31-Jul-2012 Raph Levien <raph@google.com> Fix bug 6892600 Font (character pairs) rendering issue

Alignment on paint for actual glyph drawing needs to always be left,
even when drawing centered or right aligned text. The x offset for
alignment is applied by OpenGLRenderer::drawText (and needs to be early
in the pipeline for quickReject to work). Similar change needed for
drawing drop shadow.

Also fixes bug with mispositioned underline (offset for alignment has
already been applied once, no need to do it again in
drawTextDecorations).

Change-Id: Id3dcd62de5536a26b158d768889273a1492b35d6
penGLRenderer.cpp
extDropShadowCache.cpp
c25259519f1b74bb62a2b051b74537f073436b5c 28-Jul-2012 Romain Guy <romainguy@google.com> Rename drawGeneralText to drawText

Change-Id: I5062ea5b0605fc7af27f410fafc930d10f38e926
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
0412cfcbcdd7224f80a80180a946f0fdd28c3afc 25-Jul-2012 Chen YANG <chen.yang@intel.com> Add shortcut to avoid potential divide by zero in some case

Change-Id: If4b34c95402daf8ebcc28736edfb2012553aa57c
ontRenderer.cpp
996e57c84368058be793897ebc355b917a59abc2 24-Jul-2012 Raph Levien <raph@google.com> Hardware implementation of glyph positioning (bug 5443796)

This implementation adds a drawGeneralText() method to the OpenGL
Renderer, which supports both a global x, y position, an array of
individual glyph positions, and also a length parameter (which enables
drawing of underline and strikethrough. It also adds the method to the
display list (with marshalling and unmarshalling).

With this change, the existing drawText() method is removed entirely, as
it's subsumed by the new method. It's easy enough to revert to the old
functionality if needed by passing in a NULL positions array.

Change-Id: I8c9e6ce4309fd51cc5511db85df99f6de8f4f6f5
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
98ba89492a477114148fcb1f89675e41679ca7cc 21-Jul-2012 Romain Guy <romainguy@google.com> Make gradients look slightly better

Change-Id: Ib12c628a88b9ec6af1214ce6e5cb14cfde40485e
radientCache.cpp
00755fed35e4a91291c42a8a47bed8b957e9f8e1 20-Jul-2012 Raph Levien <raph@google.com> Merge "Add drop shadow for drawPosText in hwui renderer."
416a847633680d94efb926837efdc18726d54918 20-Jul-2012 Raph Levien <raph@google.com> Add drop shadow for drawPosText in hwui renderer.

This patch adds support for drop shadows (setShadowLayer) for
drawPosText in the hwui renderer. In and of itself, it's not very
important, but it's on the critical path for correct mark positioning,
tracked as bug 5443796.

The change itself is fairly straightforward - it basically just adds an
extra "positions" argument to all draw and measure methods on the code
path for drawing drop shadowed text, as well as to the cache key for
cached shadow textures.

Change-Id: Ic1cb63299ba61ccbef31779459ecb82aa4a5e672
ontRenderer.cpp
ontRenderer.h
penGLRenderer.cpp
penGLRenderer.h
extDropShadowCache.cpp
extDropShadowCache.h
8dcfd5e836341b4a803b04d104a930bb312182d3 20-Jul-2012 Romain Guy <romainguy@google.com> Clamp gradient textures to max GL texture size

Change-Id: I8ce4e50988f5194fe5ce4bde7945ec01673af3cd
radientCache.cpp
radientCache.h
esourceCache.cpp
0aa87bbfc41e8b5f52de701ac17b4e66a7a7b609 20-Jul-2012 Romain Guy <romainguy@google.com> Fix crash with new LookupGammaFontRenderer
Bug #6853934

Change-Id: I15e6ca73bfe00eff1a37c4b9d2f7f709ee018eb6
ontRenderer.cpp
ontRenderer.h
ammaFontRenderer.h
eb61cd8296ed7e3f3aef5bd430d846aa54d5d7e2 19-Jul-2012 Romain Guy <romainguy@google.com> Optimize gradient textures

Compute the size of the backing textures based on the maximum possible
number of shades in the gradient.

Change-Id: I2d7f20477d31b81e9735f2c1d83ebdd0dbcbe340
radientCache.cpp
63553478130f78d44c8fbeaebc610e19925544a5 19-Jul-2012 Romain Guy <romainguy@google.com> Remove vendor specific precision qualifier

Change-Id: I0a56ca7a5a399ec94993d3cea0c4aff6c0f86e39
xtensions.h
rogramCache.cpp
8e025de5fb3ab1c099541e3a387123170bf9d1a9 19-Jul-2012 Romain Guy <romainguy@google.com> Note to self

Change-Id: Ic5699bdbf880ad68748c827bb5b4976b12d4d413
rogramCache.cpp
04299385c681140239b0dc31d9780d087d2b4d7c 19-Jul-2012 Romain Guy <romainguy@google.com> Clip lines, AA rects and points correctly

Change-Id: I900dd986f397b66f133e6021aa4c2539e7abc2b9
penGLRenderer.cpp
dfab50d8b97a90dca279b119ebe439f595616ffa 19-Jul-2012 Romain Guy <romainguy@google.com> Tweak text gamma correction

Change-Id: Icd3326e6a054d6020c3ed61c8459394bc87401dd
ammaFontRenderer.cpp
roperties.h
6e25e38e43f9e7f71397dfab7ed32c81c7bf7d46 19-Jul-2012 Romain Guy <romainguy@google.com> Add a new method for text gamma correction

To select the gamma correction method, adb shell setprop hwui.text_gamma_correction
with one of the following values:

lookup3
lookup
shader3
shader

See Properties.h for more information about these different methods.
You can also control gamma correction using the following properties:

hwui.text_gamma
hwui.text_gamma.black_threshold
hwui.text_gamma.white_threshold

Change-Id: I47970b804d2c590c37d3da5008db094241579e25
ebug.h
ammaFontRenderer.cpp
ammaFontRenderer.h
roperties.h
3409e728e22609b54de8b33d1e614ca51f6d6a77 18-Jul-2012 Romain Guy <romainguy@google.com> Correctly pre-clip paths when recording display lists
Bug #6836448
External bug: http://code.google.com/p/android/issues/detail?id=34946

DO NOT MERGE

DisplayListRenderer::drawPath was not invoking quickReject() properly,
passing x,y,width,height instead of left,top,right,bottom. A path
could thus get rejected when it should be drawn instead.

While working on this change I found a similar issue with another
drawing command, drawBitmapData().

Change-Id: I8306faf72db14d71b54ecb7de295c9a6957d9494
isplayListRenderer.cpp
95c21d0546e36ade3e0601394f5b625541836545 18-Jul-2012 Romain Guy <romainguy@google.com> Correctly pre-clip paths when recording display lists

External bug: http://code.google.com/p/android/issues/detail?id=34946

DisplayListRenderer::drawPath was not invoking quickReject() properly,
passing x,y,width,height instead of left,top,right,bottom. A path
could thus get rejected when it should be drawn instead.

While working on this change I found a similar issue with another
drawing command, drawBitmapData().

Change-Id: I56484e8c101768cde6a78625290872f7849dd5ee
isplayListRenderer.cpp
8a4ac610e1aaf04931ac1af54b146a7fc8e66114 18-Jul-2012 Romain Guy <romainguy@google.com> Don't clear the dirty clip flag if it's not applied
Bug #6833979

Change-Id: I0ea78b7f31a557a335de10d910d03b0520029080
ndroid.mk
aches.cpp
aches.h
ebug.h
isplayListRenderer.cpp
penGLRenderer.cpp
penGLRenderer.h
4121063313ac0d6f69f6253cac821d0c1c122086 17-Jul-2012 Romain Guy <romainguy@google.com> Add shader-based text gamma correction

To enable it, the system property ro.hwui.text_gamma_shader must be
set to true. For testing, DEBUG_FONT_RENDERER_FORCE_SHADER_GAMMA
can be set to 1 in libhwui/Debug.h.

Change-Id: If345c6b71b67ecf1ef2e8847b71f30f3ef251a27
ebug.h
ammaFontRenderer.cpp
ammaFontRenderer.h
penGLRenderer.cpp
penGLRenderer.h
rogram.h
rogramCache.cpp
157bd5749f40b0330fccf3ef159d922742103ef2 17-Jul-2012 Romain Guy <romainguy@google.com> Add makefile flags for perf

Change-Id: Ibcb6e1c883551273c3392cdaa40cd0b71a3bfa70
ndroid.mk
be6f9dc1e71b425b7ac1c40c0a2c72d03eb9fbee 16-Jul-2012 Romain Guy <romainguy@google.com> Don't copy paints for 9patches

Change-Id: I863100a0dc53fec1a3a1b2acbdeb76e6049ffe58
isplayListRenderer.cpp
penGLRenderer.cpp
penGLRenderer.h
b1d0a4ed21168fefcb82232c8f22cb95d60acb85 14-Jul-2012 Romain Guy <romainguy@google.com> Refactor GammaFontRenderer

This change is the first step to a shader-based text antialias
gamma correction.

Change-Id: I9eb02d4c56cb95d05219f712290c865b46141954
aches.cpp
aches.h
ontRenderer.cpp
ammaFontRenderer.cpp
ammaFontRenderer.h
penGLRenderer.cpp
roperties.h
c9cf9e5459c05f05b29ec81b0e83e154816f7595 14-Jul-2012 Romain Guy <romainguy@google.com> Merge "Improve rendering speed by disabling scissor tests"
586cae3ac69c0c667fbf8a954edbd399f620a717 14-Jul-2012 Romain Guy <romainguy@google.com> Improve rendering speed by disabling scissor tests

This change improves execution of display lists, particularly on
tiled renderers. The goal is to disable the scissor test as
often as possible. Drawing commands are rarely clipped by View
bounds so most of them can be drawn without doing a scissor test.

The speed improvements scale with the number of views and drawing
commands.

Change-Id: Ibd9b5e051a3e4300562463805acc4fd744ba6266
aches.cpp
aches.h
ayerRenderer.cpp
penGLRenderer.cpp
ect.h
0a386ffac026e259c408b77c2dd2cc5d2e22b5f8 13-Jul-2012 Romain Guy <romainguy@google.com> Text shadow alpha handling incorrect
DO NOT MERGE

External bug: http://code.google.com/p/android/issues/detail?id=34879
This is a regression from ICS.

This CL also fixes a bug where a View's alpha would be applied twice.

Change-Id: I13a1546228f44d4c169259414b6fa103a6e4a0fa
penGLRenderer.cpp
penGLRenderer.h
489041dd4192e594f2180ea7bff705894ab4031d 13-Jul-2012 Romain Guy <romainguy@google.com> Merge "Text shadow alpha handling incorrect"
9c0b188e4231bcb967234f3646c178d22d8a9f50 13-Jul-2012 Romain Guy <romainguy@google.com> Text shadow alpha handling incorrect

External bug: http://code.google.com/p/android/issues/detail?id=34879

This CL also fixes a bug where a View's alpha would be applied twice.

Change-Id: I13a1546228f44d4c169259414b6fa103a6e4a0fa
penGLRenderer.cpp
penGLRenderer.h
401b1f85746ab7005907747a59534def967d825b 13-Jul-2012 Romain Guy <romainguy@google.com> Merge "Remove obsolete optimization"
f877308f77f7c6f3edd91618a092207dd3be9077 13-Jul-2012 Romain Guy <romainguy@google.com> Remove obsolete optimization

Change-Id: I2d43c009c62a7f4a4a2e0a6303bdfa692c4b8c8c
penGLRenderer.cpp
rogram.h
roperties.h
f0af1d5cb255f136d2fff773be7518ffd7ae3b93 12-Jul-2012 Romain Guy <romainguy@google.com> Remove unused View.flushLayer() API

Change-Id: I5d4c7388afb5265964ab6b769cc0abfee9745c84
ayerRenderer.h
16c88085255c71a1a8fc034129aa2dcc61e1ddd0 12-Jun-2012 Romain Guy <romainguy@google.com> Textured text calls could be invisible
Bug #6597730

Text would sometimes not appear when rendered with textured content
(BitmapShader, LinearGradientShader, etc.) This was due to a misuse
of OpenGL texture unit in FontRenderer. Textured text normally uses
two texture units:
- texture unit 0 for the font cache
- texture unit 1 for the textured content (gradient, etc.)

Recent changes to the font renderer allow it to bind new textures
while processing the text's geometry (this happens when caches get
full or when switching font size for instance.) The bindings were
done without ensuring the texture unit was the correct one
(unit 0), thus replacing the content of another texture unit
(unit 1).

This lead to text being drawn using the font cache itself as the
content texture, making the text invisible.

Change-Id: I392b4c884f09223305f6cbc6253e2ef9a98944c9
ontRenderer.cpp
penGLRenderer.cpp
44b2fe3fc114ee5f7273c6b0fee2cc999bf244a2 07-Jun-2012 Chet Haase <chet@google.com> Track canvas clearing for swap buffers logic.

A previous fix made it necessary for a frame to render something to GL
in order to cause a call to eglSwapBuffers(). Besides the calls being
tracked as part of issuing a DisplayList, there is also a potential call
to clear the canvas (via glClear()) on non-opaque surfaces. This call is also
good to track, since a surface that gets cleared without any other drawing operations
is worth flipping to the screen (to erase old contents on that surface).

This fix tracks the status of the pre-draw operations to find out whether
glClear() was called and then sets the drawing status appropriately.

Issue #6606422 QuickContact dismissal is janky again (Tracking)

Change-Id: I5fcaccfdc9293dd46b83f2fc279730a5d2740ebf
isplayListRenderer.cpp
isplayListRenderer.h
ayerRenderer.cpp
ayerRenderer.h
penGLRenderer.cpp
penGLRenderer.h
932b7f6765968bd526c03512f3805fbc3924dc29 06-Jun-2012 Chris Craik <ccraik@google.com> Revert "Add more temporary logging for investigating detachFunctor"

bug:6608646

This reverts commit 8857b2f76abad1e4ec742dfd85d0c997880be376

Change-Id: I1563b5974c52b84201ae448298f804eb0dcc235d
penGLRenderer.cpp
8857b2f76abad1e4ec742dfd85d0c997880be376 05-Jun-2012 Chris Craik <ccraik@google.com> Add more temporary logging for investigating detachFunctor

bug:6596807
Change-Id: Ic9e34e323b12a887f2e8df0773a6155627b6a64f
penGLRenderer.cpp
486590963e2207d68eebd6944fec70d50d41116a 01-Jun-2012 Chet Haase <chet@google.com> Skip eglSwapBuffers() call when we do not draw to GL

The fix is to track when we issue GL drawing commands, and to skip the
call to eglSwapBuffers() when a DisplayList does not result in
any actual rendering calls to GL.

Issue #6364143 QuickMuni list items and buttons flicker instead of fade

Change-Id: I60a02c61a58c32d92481a1e814b4c8a49c6a37a3
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
3534e13486a0081b1229e698f13bd3a37efa3fb0 23-May-2012 Chris Craik <ccraik@google.com> Merge "Avoid crash if onDetachedFromWindow called after destroy" into jb-dev
9e08012869f77f212186a5d5856831a85fb73d40 23-May-2012 Chris Craik <ccraik@google.com> Avoid crash if onDetachedFromWindow called after destroy

This also removes the temporary logging from commit
f8dafa14e058cdc2f408b59be7911abaceb73c47.

bug:6535911
Change-Id: Icf1d0438b349a0e92e7d9cefed57a252eed2b9b0
penGLRenderer.cpp
7a9328a3118725389564fe2a9b926837fa3d58a9 22-May-2012 Chris Craik <ccraik@google.com> Merge "Add temporary functor lifetime logging" into jb-dev
e5a4a3dc1648844f06d29efd42c9306c3cdf177e 22-May-2012 Romain Guy <romainguy@google.com> Merge "Ensure we always set the proper blending mode Bug #6527305" into jb-dev
f8dafa14e058cdc2f408b59be7911abaceb73c47 22-May-2012 Chris Craik <ccraik@google.com> Add temporary functor lifetime logging

bug:6535911

Change-Id: Ida5cc1def7fe1fc314317bbc5df50e1465753deb
penGLRenderer.cpp
ddf74373616c89e0880a28a2185fd7ce3db91de6 22-May-2012 Romain Guy <romainguy@google.com> Ensure we always set the proper blending mode
Bug #6527305

At the beginning of a frame, always set the blending mode that we
think GL is using just in case it was modified by another entity
(for instance a WebView functor.)

Change-Id: I0e1d0abee8a2abb2b8e7622aed28346e89562c06
isplayListRenderer.cpp
penGLRenderer.cpp
penGLRenderer.h
c8538ade8df2c2f013f8b93094912057ee1cc417 22-May-2012 Chris Craik <ccraik@google.com> Don't clear the functor at every draw

instead clear functors at invoke time, and let them detach themselves as needed.

bug:6511995
Change-Id: I9115fcadffb27eb850c1d1773c098d3d2e22788b
penGLRenderer.cpp
f26c8be01bb218619e073a209c9d57fe9d26c517 18-May-2012 Romain Guy <romainguy@google.com> Sanitize display list properties

The comparisons used in the various properties setters could fail badly
in some specific conditions. The scale properties in particular did not
use the same comparisons.

This change also clamps alpha to the 0..1 range which avoids overflow
issues with lowp registers in GLSL computations.

Change-Id: I3e73b584e907a14e2c33d0865ca0d2d4d5bff31d
isplayListRenderer.h
penGLRenderer.h
tils/Compare.h
49c5fc0b9e850497233e189ff9dcc71a78ebe6e7 15-May-2012 Romain Guy <romainguy@google.com> Avoid unnecessary copy when invoking drawBitmap(int[])
Bug #6483390

Change-Id: I4d2d725ef50c9401b4bd998b6160128102b40745
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
esourceCache.cpp
e651cc6239616a202f6e96ebc2ed93b4b8b3627c 15-May-2012 Romain Guy <romainguy@google.com> Remove all Dalvik allocations from Cavnas.drawBitmap(int[], ...)

Change-Id: Ie28538a2104d21154fdc78a56525e7403f08287d
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
extureCache.cpp
extureCache.h
99a6ddd4cd8762654a575eb4ac3d0e5431d919b8 15-May-2012 Romain Guy <romainguy@google.com> Forget the name of a texture after freeing
Bug #6408362

FontRenderer allocates large font textures when more room is needed
to store all the glyphs used by an application. Thse large textures
are the first to be freed when memory needs to be reclaimed by the
system. When freeing a texture, the renderer would however not set
the texture name to an invalid name, leading future allocations to
be performed on the same texture name. That name could have by then
be recycled by the driver and returned by a call to glGenTexture
and used to create an entirely different texture. This would cause
the font renderer to point to the wrong texture, thus leading to
the "corruptions."

Change-Id: I8a1e80e5b79e8f21d1baf5320c090df4f2066cd4
ontRenderer.cpp
ontRenderer.h
9d9758ae30a59dcf594e0d26ba5d4ee153a3e44a 15-May-2012 Romain Guy <romainguy@google.com> Fix two memory leaks
Bug #6408362

Change-Id: I58543938e7b64d83504e11e97b0dd21ef8ebf3b6
ontRenderer.cpp
ontRenderer.h
ae91c4cbc79ea910753be65e2f1d7899abcb4da2 14-May-2012 Romain Guy <romainguy@google.com> Properly pre-cache latin glyphs
Bug #6408362

Change-Id: Ie11644c5a9e2d87d3b851b7e619e5f04b60a7e02
ontRenderer.cpp
ontRenderer.h
dfa1046ecab165eb0daf5caa8475e993350f4a2b 13-May-2012 Romain Guy <romainguy@google.com> Add call sites for OpenGL's debug label extension

Change-Id: I9c689127e8166cbef92c935f8aa07217ab806dda
aches.cpp
aches.h
xtensions.h
aa9972943cab627db9b10e5c9c4bb80f99f8a4bd 08-May-2012 Chris Craik <ccraik@google.com> Merge "Revert "Add temporary functor lifetime logging"" into jb-dev
12d434a9be03214e9c673580a6f55128eec9b3f9 08-May-2012 Chris Craik <ccraik@google.com> Revert "Add temporary functor lifetime logging"

bug:6445573

This reverts commit 2fe99801e81bb7c0ff846b536cbb7a12707410ed
penGLRenderer.cpp
4bbcae7eb80704d919d8115d523196798e208439 07-May-2012 Chet Haase <chet@google.com> Merge "Fix issue where scale-animating text would jump temporarily a few pixels" into jb-dev
d3efd6920e64d0207a0655640297d87d4937ee27 07-May-2012 Chet Haase <chet@google.com> Fix issue where scale-animating text would jump temporarily a few pixels

Some logic in the native matrix code would determine that a matrix was
'pureTranslate' based on the scale values of a matrix being close-enough to 1,
which was within a very small epsilon. This works in general, because screen space
coordinates make that epsilon value irrelevant, so close-enough really is close-enough.

However, TextView, when centering text, works in a coordinate system that is quite
huge, with left/right values about 500,000. These numbers multiplied times that small
epsilon value would give a result that was significant, and would cause a miscalculation
of up to 4-5 pixels, causing the snap that we'd see for a couple of frames as the
scale got "close enough" to 1.

The fix is to remove the optimization of "close enough". What we really need the matrix to
do is to identify itself as being translate-only when no scale as been set (which is the
default). For the purposes of that check, it is good enough to simply check the values against
1 directly. Similarly, the bounds-check logic needs to check against 0 and 1 directly.

Issue #6452687: Glitch when changing scale of a view containing text

Change-Id: I167fb45d02201fb879deea0e5a7ca95e38128e17
isplayListRenderer.h
atrix.cpp
d34dd71800d9a1077e58c3b7f2511c46848da417 03-May-2012 Chet Haase <chet@google.com> Fix hang/crash in native path code

An optimization for paths is to only create a texture for the original native
Path object, and have all copies of that object use that texture. This works in
most cases, but sometimes that original path object may get destroyed (when the
SDK path object is finalized) while we are still referencing and using that object
in the DisplayList code. This causes undefined errors such as crashes and hanging
as we iterate through the operations of a destroyed (and garbage-filled) path object.

The fix is to use the existing ResourceCache to refcount the original path until
we are done with it.

Issue #6414050 Analytics Dogfood App crashes reliably on Jellybean

Change-Id: I5dbec5c069f7d6a1e68c13424f454976a7d188e9
isplayListRenderer.cpp
isplayListRenderer.h
2fe99801e81bb7c0ff846b536cbb7a12707410ed 02-May-2012 Chris Craik <ccraik@google.com> Add temporary functor lifetime logging

bug:6405861

Note: revert once the above bug is verified fixed

Change-Id: Iae04ec6ffa73a2711f96e128d60011bcb5864b5c
penGLRenderer.cpp
6f9ad204cc529babeb3aa7c9a57cf00ed7188471 01-May-2012 Chet Haase <chet@google.com> Fix launcher invisibility bug

There was a bug in the DisplayList code for layers where we would
set the alpha value for a layer only if the alpha were non-1. This works
most of the time (since the value is usually 1 and doesn't need to
be set at all, and if the value is non-1, it is set correctly). But when
the value has been set to a non-1 value, setting alpha back to 1 cannot happen
due to this logic. This caused launcher to have some invisible pages when
returning to Home because those pages previously had an alpha value of 0, and
setting the alpha to 1 had no effect due to this DisplayList code.

The fix is to simply remove the check for non-1 values; we should
always set the alpha value of layers to handle all cases.

Issue #6413892 alpha value is messed up after AlphaAnimation

Change-Id: Ia51acb2eaaf0609ea7189998ed449bdd9ea7e05f
isplayListRenderer.cpp
665a376d245d7bbfc43e3cfa651afc7448604afa 28-Apr-2012 Romain Guy <romainguy@google.com> Merge "Work-around for a Skia rasterization bug Bug #6411457" into jb-dev
fdd6fc1beb5076a630c7066b8b1731995636c09f 27-Apr-2012 Romain Guy <romainguy@google.com> Work-around for a Skia rasterization bug
Bug #6411457

Skia does not generates the bottom right pixel of a rect when
drawing a rect as an SkPath into an alpha8 bitmap.

Change-Id: Ifb5286ae67745c9e44ee387b6d6ad607a9a2e6ce
athCache.cpp
hapeCache.cpp
hapeCache.h
8bd12ea8001f72f4450e318e43c50dbc46b4869c 26-Apr-2012 Romain Guy <romainguy@google.com> Merge "Decode common GL error codes when logging frame error status" into jb-dev
a44a63ac5c29b2cc57df95ec495def8cdddd9c6f 26-Apr-2012 Romain Guy <romainguy@google.com> Decode common GL error codes when logging frame error status

Change-Id: I38b333eea53aef20340ce48dfcb0dd30a223f7a8
penGLRenderer.cpp
a75fbc3c76dfe6a1c678b66f83cef878e3f3cdf4 26-Apr-2012 John Reck <jreck@google.com> Merge "On new content, attach functor directly" into jb-dev
c189ef53220059acf2adedc92ac4ac7e6a993e6b 26-Apr-2012 Romain Guy <romainguy@google.com> Ensure we start every frame in the proper GL state
Bug #6345013, #6314960

Change-Id: I6985f7f233eb6a5f9223e9f4be3f323154b5dbf0
penGLRenderer.cpp
c2c9543c135ffc4e18c7db0e817112ac03e3e97a 26-Apr-2012 Chris Craik <ccraik@google.com> On new content, attach functor directly

bug:6323847

depends on external/webkit change: https://android-git.corp.google.com/g/#/c/184314/

Change-Id: Ibdf997f3ee4f5c5c1ea5a320556813f175fea93f
penGLRenderer.cpp
3d745c03ace18ee59c539e1b7f1df13f22beb57d 24-Apr-2012 Romain Guy <romainguy@google.com> Fix the build before the bot yells at me.

Change-Id: Ice7fe02b684ad662262aae3cac7a48a835ebcad5
penGLRenderer.cpp
ba6be8a62dcdb3ffd210cd36b9af4e3a658eac47 24-Apr-2012 Romain Guy <romainguy@google.com> Prevent WebView from crashing when detached from the window
Bug #6365056

WebView enqueues a functor in the hardware renderer to handle
animations and this functor is called at a later time by the
hardware renderer. However, the functor was not removed from
the queue when WebView was removed from the window. This could
cause the hardware renderer to attempt to execute an invalid
functor and lead to a crash.

Change-Id: I9d38e80f3fdc5e29d4d0cdfa1e893c251a954508
penGLRenderer.cpp
penGLRenderer.h
1271e2cc80b01d577e9db339459ef0222bb9320d 20-Apr-2012 Chet Haase <chet@google.com> Remove USE_DISPLAY_LIST_PROPERTIES flag

This flag was still hanging around pending any need to disable
DisplayList properties. But things seem stable, so it's time to clean up
and simplify the code.

At the same time, I reduced redundance in DisplayList dimensions. We
used to call drawDisplayList() with width/height parameters that were
used to do a clip reject. This is redundant with the DisplayList properties
that set the bounds of the DisplayList; the left/right and top/bottom properties
represent the same width/height properties formerly used in drawDisplayList().
The new approach is to not pass dimensions to drawDisplayList(), but to
instead pull those dimensions directly from the DisplayList when needed.

Change-Id: I8871beff03b1d4be95f7c6e079c31a71d31e0c56
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
a23eed808a1ae4ec0d818c0a9238385e797fd056 13-Apr-2012 Chet Haase <chet@google.com> Fix layer blending bug

Cached layers were sometimes retaining an obsolete blending
value, causing artifacts where translucent objects were disappearing
completely. Also, added extra tracing info for DisplayLists.

Issue #6303668 Flickering views during SwipeHelper drag

Change-Id: I66ce158652c4a3ed316040585b40b1744e1fad0c
isplayListRenderer.cpp
penGLRenderer.cpp
penGLRenderer.h
7b6a75872bd2df96a23453d31c2e2e7fcc373554 11-Apr-2012 Chet Haase <chet@google.com> Pass width/height parameters to webview

When webview draws into an fbo layer, it needs to know the
size of that surface to create the rendering transform appropriately.
This change copies in the current viewport size to the structure that
is passed to the webview.

Change-Id: I7160b0836d00834134c799c95a439cdc045e2035
penGLRenderer.cpp
65924a3e56c2e7ac863f8e25e9f9a58b9db7d513 06-Apr-2012 Chris Craik <ccraik@google.com> fix functor flag parsing, tweak process delay

Change-Id: I0a679cc33f92ff6fd2e33db9ad58b52622def012
penGLRenderer.cpp
fda531c9e4e49cfd962d3784b3501f6a1e64dc22 04-Apr-2012 Romain Guy <romainguy@google.com> Merge "Disable AA lines vertex attrib arrays after rendering"
7b63142d2f4bc32beacedcc761453b8aea1f3a86 04-Apr-2012 Romain Guy <romainguy@google.com> Disable AA lines vertex attrib arrays after rendering

Change-Id: I2f035e9d87f4f97bc1e37355c84570fd58df0374
penGLRenderer.cpp
penGLRenderer.h
8c8c2400923bd5b0ab1f52adc4f2232dbf690d91 04-Apr-2012 Romain Guy <romainguy@google.com> Merge "Optimize FBOs composition"
e0aa84b7dc087e999e20055dcc04cb6a48d5bd62 04-Apr-2012 Romain Guy <romainguy@google.com> Optimize FBOs composition

Change-Id: Ifc8eada8922509373c0e4c3b2ed75b6f08d098de
penGLRenderer.cpp
db8c9a6a4d9bf8c39f834b25611926caf21380f6 22-Mar-2012 Chet Haase <chet@google.com> Optimization of alpha with DisplayList properties

Some views (such as ImageView and TextView) handle non-opaque alpha
values directly. This was originally an optimization, but we can handle it faster
in many cases without this optimization when DisplayList properties are enabled.
Basically, if a view has non-overlapping rendering, we set the alpha value directly
on the renderer (the equivalent of setting it on the Paint object) and draw each
primitive with that alpha value. Doing it this way avoids re-creating DisplayLists
while getting the same speedup that onSetAlpha() used to get pre-DisplayList properties.

Change-Id: I0f7827f075d3b35093a882d4adbb300a1063c288
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
napshot.cpp
napshot.h
e2eaf6997d429249904f842092b075f3da92c5be 03-Apr-2012 Romain Guy <romainguy@google.com> Merge "Prevent crash when flushing the layers cache Bug #6258973"
5c88fc744db977ef26887df9605beaa409394806 03-Apr-2012 Romain Guy <romainguy@google.com> Prevent crash when flushing the layers cache
Bug #6258973

When flushing the layer caches we would attempt to delete the FBOs
associate with layers in the cache. The FBO property was however not
always properly cleared when recycling layers.

Change-Id: I7dedfe391d659a0849f1e1d84df17313b2c6e2b2
ayerCache.cpp
ayerRenderer.cpp
penGLRenderer.cpp
b6a80077dca5a17f33350075485a534d7ed8fa2b 03-Apr-2012 Chris Craik <ccraik@google.com> Merge "Allow fine-grained control over functors execution"
8d56b0e1d24f7392314df4be6503af395a843696 03-Apr-2012 Chet Haase <chet@google.com> Enabling DisplayList properties

An earlier commit fixed problems with enabling DisplayList properties.
This CL actually enables the properties.

Change-Id: I5c41d0c64e9241822af53eb367de0fed7d9608e0
isplayListRenderer.h
9420abd56a2af7ddbeb70562b79d61b2dca8c5a1 30-Mar-2012 Chet Haase <chet@google.com> Re-enable DisplayList properties.

Re-enabling DisplayList properties last week caused some app
errors due to the way that some transforms were being handled (specifically,
those coming from the old Animations and ViewGroup's childStaticTransformation
field). This change pushes *all* transform/alpha data from View.draw() into
the view's DisplayList, making DisplayLists more encapsulated (and correct).

Change-Id: Ia702c6aae050784bb3ed505aa87553113f8a1938
isplayListRenderer.cpp
isplayListRenderer.h
8f3b8e32993d190a26c70c839a63d8ce4c3b16d9 28-Mar-2012 Romain Guy <romainguy@google.com> Allow fine-grained control over functors execution

Adds non-drawing execution mode

Change-Id: I82f92cf1b9a3b9ff2ca6d7427c4e02b73e04e6bf
penGLRenderer.cpp
penGLRenderer.h
76240dafe8654cc3b858241e76618e5b2db5451c 29-Mar-2012 Chet Haase <chet@google.com> Disable DisplayList properties pending fixes for AlphaAnimation

The new DisplayList properties design has ordering conflicts with the
way that alpha works with old animations (AlphaAnimation). This CL
disables DiksplayList properties while I'm working on a fix and some
more thorough tests for old animations-vs-DL properties in general.

Change-Id: I8f6893138f939171491c2ec3c889214ee55d17b7
isplayListRenderer.h
b85967b9af76e1e60f7a96603e2567a6449d2e04 26-Mar-2012 Chet Haase <chet@google.com> Re-enabling DisplayList properties

Several issues came up after DisplayList properties were enabled,
so they were disabled pending fixes. Those issues have been fixed, so
DisplayList properties are once again being enabled by default. This
CL both re-enables these properties (in View.java and DisplayListRenderer.h)
and fixes the various issues that enabling them caused the first time around.

Related issues (all currently marked as Fixed, though that was simply because
DL properties were disabled - this CL provides the real fixes now that
DL properties are enabled by default):
Issue #6198276 Text input broken
Issue #6198472 Native crash at pc 00076428 in many different apps in JRM80
Issue #6204173 Date/time picker isn't rendering all parts of UI
Issue #6203941 All Apps overscroll effect is rendered weirdly/has flickering
Issue #6200058 CAB rendering issue - not drawing items?
Issue #6198578 Front camera shows black screen after taking picture.
Issue #6232010 Layers not recreated when children change (DisplayList properties)

Change-Id: I8b5f9ec342208ecb20d3e6a60d26cf7c6112ec8b
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
6554943a1dd6854c0f4976900956e556767b49e1 27-Mar-2012 Romain Guy <romainguy@google.com> Use a status_t return type for GL functors

WebView needs more fine-grained control over the behavior of the
framework upon execution of the display lists. The new status_t
allows WebView to requests its functor to be re-executed directly
without causing a redraw of the entire hierarchy.

Change-Id: I97a8141dc5c6eeb6805b6024cc1e76fce07d24cc
isplayListRenderer.cpp
isplayListRenderer.h
ontRenderer.cpp
penGLRenderer.cpp
penGLRenderer.h
a9dd820184ee4d083bd9b2af735dcf50b78fc6cd 26-Mar-2012 Romain Guy <romainguy@google.com> Prevent random crashes on SGX architecture
Bug #6219894

Change-Id: If77f29da03e557a50e53bae505e1c638a1dbe2cc
ontRenderer.cpp
ad13c81371cb0b7e49b4c33159a346ce08ac5d69 22-Mar-2012 Chet Haase <chet@google.com> Disable DisplayList properties

DisplayList properties are (again) disabled by default, via flags in
View.java and DisplayListRenderer.h. There are various artifacts to
chase down before enabling by default.

Issue #6198472 Native crash at pc 00076428 in many different apps in JRM80
Issue #6204173 Date/time picker isn't rendering all parts of UI
Issue #6203941 All Apps overscroll effect is rendered weirdly/has flickering
Issue #6200058 CAB rendering issue - not drawing items?
Issue #6198578 Front camera shows black screen after taking picture.

Change-Id: I045dc82ce1d85fedbae3bb88eb2a2dfb6891d41f
isplayListRenderer.h
b0317984d34da99b614597ad0a8b39268eacb783 21-Mar-2012 Romain Guy <romainguy@google.com> Plug memory leak.
Bug #6196903

Whenever a memory flush happens, the GL renderer discards some or all of its
font caches. Each font cache holds an array of vertex indices that was
initially designed to have the same life cycle as the process. This changed
when memory flushes were introduced but this array was never taken care of
in the destructor.

Change-Id: Ief124f609ea55b671c0a9b43637d9e013629ebaa
ontRenderer.cpp
bdd896c26453ffc56831b0cd167e8780068cee53 19-Mar-2012 Chet Haase <chet@google.com> Enable DisplayList properties

This CL simply enables DisplayList property functionality. The code for
this feature is already there, but it's been disabled by default pending further
testing and analysis. This change sets these build-type flags to true
so that all hw-accelerated apps will now use DisplayList properties by default.

In particular, this feature enables a fast-path for changes that affect the
handful of View properties involved in animations (alpha, translationX, etc.).
Setting these properties now gets propagated to the native DisplayList associated
with the View, avoiding costly recreation of the SDK-level DisplayList and
also enabling faster invalidation of the view hierarchy.

Change-Id: Ic99c8f28fa9183f2e54e9e4860b333eb9c540f7c
isplayListRenderer.h
4bf8b209955e8a35ec2e4101ed3612e03ecc5dbb 16-Mar-2012 Chet Haase <chet@google.com> Merge "Optimizing DisplayList properties"
9d1992deaeb3d60d5928f05b649a2cc654ba98a3 13-Mar-2012 Chet Haase <chet@google.com> Optimizing DisplayList properties

DisplayList properties are still disabled default (flags in View.java
and DisplayListRenderer.h). When they are enabled, and when a View has
a DisplayList, invalidations due to property changes are now optimized
to avoid causing DisplayList recreation. This eliminates the drawing step
of invalidation (due to changes in these properties), only requiring
issuing the previously-created DisplayList to the GL renderer. Invalidation
is slightly faster (less overhead as we walk up the hierarchy), getDisplayList()
is potentially much faster (going down to ~0ms), depending on the complexity
of the View being redrawn and the size of the invalidated hierarchy.

Change-Id: I57587d5b810c3595bdd72a6c52349c2a3d1bdf25
isplayListRenderer.cpp
acdd4b9c4b03bc6660274ab878731383adb5bca5 15-Mar-2012 Romain Guy <romainguy@google.com> Set the default text length to -1, not 1

Change-Id: Iccf6f8366c0b659ba7c90df99ae05ebc5d81fcbb
isplayListRenderer.h
390f882f8905e8d1ac0d4b7f2e01aa04dccc3c16 14-Mar-2012 Romain Guy <romainguy@google.com> Correctly compute the number of bytes written by each op.
Bug #6157792

Previously, DisplayListRenderer would compute the number of bytes
written after a drawing op by looking at the difference between
the start pointer of the command stream and the end pointer of
the command stream. The SkWriter class used to record the commands
stream allocates blocks of storage which would cause a crash when
a command spanned two blocks.

Change-Id: I4d79d3feeb6d72d9d4e6ab05ecebd72d004be56c
isplayListRenderer.cpp
isplayListRenderer.h
491189f6bb81827a0c8e343f89420a9bcd2e62ae 13-Mar-2012 Chet Haase <chet@google.com> Fix garbage deref with DisplayList property structures

This is the real fix to issue 6158892. We currently delete
transform/camera structures at DisplayList destructor time, if these
structures are not NULL. We set the fields to NULL in an init() method
called (eventually) by the constructor. But it is possible for the object
to be destroyed before that init code is called, resulting in the deref
bug reported. The fi is to set these structures to NULL directly in the
constructor.

Issue 6158892i: Device runtime restarts frequently

Change-Id: Ibfa0f9314767eed6fd51f4ec7edc0d0edd5fdd0f
isplayListRenderer.cpp
3c9d9c18b41d052c76bad10a448d3acce024649b 13-Mar-2012 Romain Guy <romainguy@google.com> Merge "Follow the include style used elsewhere in the library"
d5a85fb63d91a9297e8d9a11016f3b3ed60dfbab 13-Mar-2012 Romain Guy <romainguy@google.com> Follow the include style used elsewhere in the library

Change-Id: I14aebdaeb04b6f4c611153ece4ac1f6ad9bfc15f
isplayListRenderer.cpp
866ed817d0adf5b874eff277b4a4d2bcc6f61830 13-Mar-2012 Chet Haase <chet@google.com> Fix garbage deref in DisplayList structures

Issue #6158892: Device runtime restarts frequently

Change-Id: I4e6afaaf9ac66d6846caf0ed82ea67163d8b15c2
isplayListRenderer.cpp
a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3 21-Feb-2012 Chet Haase <chet@google.com> Handle view properties at the native level

Basic functionality of handling View properties (transforms,
left/right/top/bottom, and alpha) at the native DisplayList level.
This logic is disabled for now (via compile-time flags in View.java and
DisplayListRenderer.h) as we continue work on it (there is no advantage
to the new approach until we optimize invalidation and rendering paths
to use the new code path).

Change-Id: I370c8d21fbd291be415f55515ab8dced6f6d51a3
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
3fe4eb9c60d39acaadd9f807b1a21c239d1270ef 12-Mar-2012 Romain Guy <romainguy@google.com> Turn down the number of glGetError() calls.

glGetError() was invoked every time a display list was updated. This
was unnecessary since display list updates do not execute OpenGL code.

Change-Id: Ia0a75a65ccf2a4701fb3a828848cd0c42f256c6c
isplayListRenderer.cpp
55fd2c9b2e87986b03cb58676bdf46bc6d5f1c36 10-Mar-2012 Romain Guy <romainguy@google.com> Don't bind data to missing uniforms

Change-Id: Ib9d1f14eb0bef04e0910baa4eaf3e49cce81c0ce
penGLRenderer.cpp
6d159451bbb5f568c4c3ae3a9e010a9512a106d5 06-Mar-2012 Derek Sollenberger <djsollen@google.com> Merge "Add missing includes for Mutex.h"
029f64303b8fe506ef34c12777da86b830d3bf7a 05-Mar-2012 Derek Sollenberger <djsollen@google.com> Add missing includes for Mutex.h

The missing header was being transitively included through a
Skia header which is being removed.

Change-Id: I5a65bae076027951fe07d1e7eecd4732124fb0e4
radientCache.h
extureCache.h
bb0acdf9e1d862a7cf0e2533321fc1105c29b5e3 05-Mar-2012 Romain Guy <romainguy@google.com> Delete display list objects and resources on the UI thread
Bug #6073717
Bug #6065504
Bug #6026515
Bug #5971725

Prior to this patch, the destructor of DisplayList would always run
on the finalizer thread. This could cause a race condition if the UI
thread was busy rendering display lists at the same time leading to
various random native crashes.

Change-Id: Ie11108e3b1538d4b358a1a8b4cce1b2d33152d0c
aches.cpp
aches.h
isplayListRenderer.cpp
isplayListRenderer.h
fb9c41c2060497a459d16c30122e1d082895e5d1 05-Mar-2012 Romain Guy <romainguy@google.com> Merge "Deferred layer updates"
2bf68f063b0077ddef6ebfe54f2ae5e063c2c229 02-Mar-2012 Romain Guy <romainguy@google.com> Deferred layer updates

Change-Id: I83d9e564fe274db658dcee9e0cc5bbf9223ebb49
ayer.h
penGLRenderer.cpp
ad1daaa87b793af30f3dd67a0f3cd5c0fd6ac0c1 02-Mar-2012 Romain Guy <romainguy@google.com> Remove stray log

Change-Id: I0c1979aab395098651c8a63d0bae0198ebc3746b
isplayListRenderer.cpp
isplayListRenderer.h
dd7c8e4c68205d39109d4317dd0c9b05ed43e8e5 01-Mar-2012 Romain Guy <romainguy@google.com> Small tweak to Canvas.drawPath() GL implementation

Change-Id: I1d668a912996e1267bcf2127058888e489a2d9b3
ontRenderer.cpp
penGLRenderer.cpp
9777173eb6c9eb97c7921c8288ebc65e3ab3ce6f 29-Feb-2012 Romain Guy <romainguy@google.com> Full implementation of Canvas.drawPath()

Change-Id: I23223b89770a0cd2b4762365bead9bfddb094290
ontRenderer.cpp
ontRenderer.h
penGLRenderer.cpp
03d58520c3eb6bb7efb7235bfd957550533d6725 25-Feb-2012 Romain Guy <romainguy@google.com> More infrastructure for Canvas.drawTextOnPath

Change-Id: Iff42b24e342650d06fa4e2fa9db6c28da820ff01
penGLRenderer.cpp
325740fb444af8fc7fb0119b2e30ce322c2ae134 25-Feb-2012 Romain Guy <romainguy@google.com> Add hooks to implement Canvas.drawTextOnPath() in GL

Change-Id: I165c9e05facf5365aa6850605688e538640c7fcc
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
4bcb7467a174ed03a67b0c62950c555813ddf00d 24-Feb-2012 Romain Guy <romainguy@google.com> Only recreate path textures when necessary

When a drawPath command is recorded in a display list, a copy of the
source path is made to preserve against possible modifications of the
said source path. Copies are discarded when a display list is cleared,
which usually happens on invalidate(). This means that even if a path
is never modified, the texture generated to draw it on screen is
destroyed every time an invalidate() is issued. This change fixes this
problem by introducing a reference to the source path in the copy.
If both the copy and the source path have the same genID, they are
the same path and can share the same texture.

Change-Id: I34849311c183e06336a1391d2d1568a087f973f6
isplayListRenderer.h
athCache.cpp
9c10ab03cd6a35fca9eec617b9bd444d13544b99 22-Feb-2012 Romain Guy <romainguy@google.com> Reduce logs

Change-Id: I2768972ec62f4d3ad800a4d7a4c44307a2fa0105
ebug.h
96ebc6b5097ab73eef45e094241e444f4c21bfcc 22-Feb-2012 Romain Guy <romainguy@google.com> Only copy paths, paints and shaders when we need to.

Change-Id: Iba7a9c92c865f698821b6ff7bc4f502659642ac1
isplayListRenderer.h
33f6beb10f98e8ba96250e284876d607055d278d 17-Feb-2012 Romain Guy <romainguy@google.com> Record possible clip rejects when recording display lists

This optimization allows us to quickly skip operations that lie
entirely outside of the known bounds of a display list. Because
of ViewGroup.setClipChildren, we must keep the operations recorded
in the display list. setClipChildren(false) is however a very
uncommon operation and we will therefore often benefit from this
new optimization.

Change-Id: I0942c864e55298e6dccd9977d15adefbce3ba3ad
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
athCache.cpp
hapeCache.h
21c9c8551d9ab36629cabc01f228d3a302e0c673 08-Feb-2012 Romain Guy <romainguy@google.com> Fix the system

Change-Id: Ie097ea5d6c0af9c5929b8c5deb76b4824d5de787
napshot.cpp
967e2bf3ac8943a8e8a374bf86021915445cda67 08-Feb-2012 Romain Guy <romainguy@google.com> Preliminary support for clipRect(Rect, Op)

This adds basic support for clip regions. It is currently disabled at compile
time. Enabling clip regions will require setting up a stencil buffer.

Change-Id: I638616a972276e38737f8ac0633692c3845eaa74
napshot.cpp
napshot.h
ada4d53d50dc869b8278573ad640dc44118d3bcf 03-Feb-2012 Romain Guy <romainguy@google.com> Separate interface definition and implementation of Snapshot

The Snapshot class is getting complicated enough that its implementation
should now live in a separate .cpp file. This will become particularly
useful when support for clip regions and paths will be added later on.

Change-Id: I050fac5683a9f7a0ff2f7a6beec3dd28aa5eb0d8
ndroid.mk
roperties.h
napshot.cpp
napshot.h
b629490ffb21752750cc081827ca4c1eae1eb015 03-Feb-2012 Romain Guy <romainguy@google.com> Disable debugging code in the font renderer

Change-Id: I92463057ff4ae712bb25789db1667ff1ecfd389f
ebug.h
ontRenderer.cpp
211370fd943cf26905001b38b8b1791851b26adc 02-Feb-2012 Romain Guy <romainguy@google.com> Add optional metadata to initiliaze the render threat.

The render threat is likely to break your application if you initiate it.
As such it must be explicitely requested using the following meta-data
tag in your manifest's application tag:

<meta-data android:name="android.graphics.renderThread" android:value="true" />

Change-Id: Ibf0a48af2a0d091562bf6907eac970e3d1d601c4
penGLRenderer.cpp
13631f3da855f200a151e7837ed9f6b079622b58 31-Jan-2012 Romain Guy <romainguy@google.com> Add debug markers to OpenGLRenderer

These markers will be used to group the GL commands by View in the
OpenGL ES debugging tool. This will help correlate individual GL
calls to higher level components like Views.

Change-Id: I73607ba2e7224a80ac32527968261ee008f049c6
aches.cpp
aches.h
isplayListRenderer.cpp
isplayListRenderer.h
xtensions.h
penGLRenderer.cpp
penGLRenderer.h
530041d3191ce817832a0108514617768e43cda6 26-Jan-2012 Romain Guy <romainguy@google.com> Add stencil buffer to the EGL config

Change-Id: If76c0cd6127534d90f9526b75c0f8e56259c6722
penGLRenderer.cpp
penGLRenderer.h
roperties.h
5ff9df658230d49e42c43586997a02d8e4dd417e 24-Jan-2012 Romain Guy <romainguy@google.com> Add full support for Canvas.setDrawFilter()

Change-Id: I0ad35d0603c4eeda469014803be14c1dcdde918c
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
22d418437e44587cb0fba4353515719453269189 20-Jan-2012 Romain Guy <romainguy@google.com> Fix the build, for real

Change-Id: I6263f7e5e3ae2f7efe045f8b464c0ed1b87fc793
isplayListRenderer.h
671d6cf460531825a321edb200523d0faa7792c9 18-Jan-2012 Romain Guy <romainguy@google.com> Full support for Canvas.drawPosText

This also introduces a small optimization when rendering text.

Change-Id: Iff620ac97bf878eaac406bccc6daa07052c93890
ontRenderer.cpp
ontRenderer.h
penGLRenderer.cpp
eb9a5367e8f0e970db8509ffb2584f5376bc62ed 18-Jan-2012 Romain Guy <romainguy@google.com> First pass at implementing Canvas.drawPosText() in GL

Change-Id: Ia3ac347e95d57eb86c63045156c8dbc0572b03cb
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
3762c311729fe9f3af085c14c5c1fb471d994c03 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
ontRenderer.cpp
radientCache.cpp
penGLRenderer.cpp
rogram.cpp
hapeCache.h
extureCache.cpp
8564c8da817a845353d213acd8636b76f567b234 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
aches.cpp
ayerRenderer.cpp
hapeCache.h
extureCache.cpp
d4a69b4a1cb5b52035345abd8cb9595ae4cf9fa5 06-Jan-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix bug #5753006 Garbled Labels in Maps"
c511bee87cda99a252d1a62487f47c8f05aee78c 05-Jan-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #5753006 Garbled Labels in Maps

- it was a regression introduced into this CL: https://android-git.corp.google.com/g/#/c/154240/5
- basically needed to set the GlyphID encoding to the Skia Paint as we are now using glyphID resulting
from the Harfbuzz shaping
- also define GlyphID encoding as the default on the Paint class

Change-Id: Idb7c2c57ac67595425ce3be9421258962690fcdd
isplayListRenderer.cpp
5baa3a62a97544669fba6d65a11c07f252e654dd 20-Dec-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
aches.cpp
ebug.h
isplayListRenderer.cpp
isplayListRenderer.h
xtensions.h
ayerCache.h
ayerRenderer.cpp
ayerRenderer.h
atrix.cpp
penGLRenderer.cpp
atchCache.h
rogram.h
rogramCache.h
ect.h
esourceCache.cpp
hapeCache.h
extDropShadowCache.cpp
extureCache.cpp
extureCache.h
ector.h
82bc7a772747fcf8a6fe7097f70bf2981429ffe9 03-Jan-2012 Romain Guy <romainguy@google.com> Properly restore the GL scissor after a GL draw functor
Bug #5781254

Change-Id: I1dc4809563a793b6b579814951d4d73b4c34bf32
aches.cpp
aches.h
penGLRenderer.cpp
9a8245629d69d81e0b62e52970feaf9c02580e75 17-Dec-2011 Chet Haase <chet@google.com> De-allocate caches for large glyphs when trimming memory

Currently, font renderers eliminate some texture caches when
memory is trimmed. This change makes it go further by eliminating the
large-glyph caches for all font renderers. These caches are
only allocated as needed, but continue to consume large amounts of
memory (CPU and GPU) after that allocation. De-allocating this memory
on a trim operation should prevent background apps from holding onto
this memory in the possible case that they have allocated it by drawing
large glyphs.

Change-Id: Id7a3ab49b244e036b442d87252fb40aeca8fdb26
ontRenderer.cpp
ontRenderer.h
ammaFontRenderer.cpp
0904c203c4c56e43f723522351b7a3bc304196ef 16-Dec-2011 Chet Haase <chet@google.com> Merge "Fix issues from recent glyph caching change"
2a47c14e2a6f152496b43104bc785c488583fd59 15-Dec-2011 Chet Haase <chet@google.com> Fix issues from recent glyph caching change

There were 2 issues remaining after a recent change to support
glyph caching from multiple textures:
- memory in the GPU for all textures was being allocated automatically.
This is now lazy, being allocated only when those textures are first
needed.
- filtering (applied when a rendered object is transformed) was ignoring
the new multiple-texture structure. Filtering should be applied correctly
whenever we change textures.

Change-Id: I5c8eb8d46c73cd01782a353fc79b11cacc2146ab
ontRenderer.cpp
ontRenderer.h
8f85e80b64b89fd38cc23b129f61ec36ddde7f15 15-Dec-2011 Romain Guy <romainguy@google.com> Generate even fewer GL commands

Change-Id: I0f4dcacb03ef5ee7f6ebd501df98bfead5f0a7f8
aches.cpp
aches.h
penGLRenderer.cpp
ect.h
2d4fd364843d3efc6e6ee59ccc5beb513a86d789 14-Dec-2011 Romain Guy <romainguy@google.com> Reduce the number of active texture changes

Change-Id: I94046bdfe20740c26c8183822e3002d692fde7c4
ontRenderer.cpp
penGLRenderer.cpp
rogram.cpp
rogram.h
ec31f83bd3af1f900d1ee9116b15f56904c66dcd 14-Dec-2011 Romain Guy <romainguy@google.com> <Insert something improper about OpenGL>

Change-Id: Ib645376093838156771588adc76a718da0ceb0db
aches.cpp
ect.h
a1d3c91afbd52c7e8b01f4a9060c5459f02ae7a5 13-Dec-2011 Romain Guy <romainguy@google.com> Further reduce the number of GL commands sent to the driver

Change-Id: Id922b2a166ea4573b767c27d3195e11c70320b23
aches.cpp
aches.h
ayerCache.cpp
ayerRenderer.cpp
penGLRenderer.cpp
ect.h
kiaShader.cpp
e829bc0f0364e942bed01536d115a5c08d25d776 13-Dec-2011 Chet Haase <chet@google.com> Merge "Make glyph cache more flexible"
7de0cb12d0e5fd64811da0b5d1ae0c0d58b86f86 06-Dec-2011 Chet Haase <chet@google.com> Make glyph cache more flexible

Some GPU architectures could not handle the previous implementation
of our glyph cache. Frequent uploads would cause memory problems in the GPU
and eventually a crash due to these memory issues. The solution is to move to
a system of several, smaller caches instead of one monolythic cache for all
glyphs.

Change-Id: I0fc7a323360940d16d5a33eeb33abfab194c5920
ontRenderer.cpp
ontRenderer.h
ammaFontRenderer.h
15bc6437f8b4cf10dba55c7638d349e7b9563f4f 13-Dec-2011 Romain Guy <romainguy@google.com> Reduce the number of GL commands generated by the UI

This optimization along with the previous one lets us render an
application like Gmail using only 30% of the number of GL commands
previously required

Change-Id: Ifee63edaf495e04490b5abd5433bb9a07bc327a8
aches.cpp
aches.h
ontRenderer.cpp
ontRenderer.h
penGLRenderer.cpp
penGLRenderer.h
f3a910b423db7ad79cf61518bdd9278c048ad0d8 13-Dec-2011 Romain Guy <romainguy@google.com> Optimize state changes

Change-Id: Iae59bc8dfd6427d0967472462cc1994987092827
aches.cpp
aches.h
ontRenderer.cpp
ontRenderer.h
penGLRenderer.cpp
atch.cpp
rogram.cpp
rogram.h
rogramCache.cpp
rogramCache.h
d71dd367af604571c7d00ca473184a1b9240eca2 13-Dec-2011 Romain Guy <romainguy@google.com> Minimize the amount of data uploaded to draw text

Change-Id: I6313ac039291c9cd93aadafe3566ad9d60cab42d
ontRenderer.cpp
ontRenderer.h
penGLRenderer.cpp
39d252a6632d057d5077f7eaf1b8ed7a142f3397 13-Dec-2011 Romain Guy <romainguy@google.com> Various OpenGL optimizations

Change-Id: Ib0742c96f10f5f50e7e5148b742c31b6c232d127
radientCache.cpp
ayerCache.cpp
ayerRenderer.cpp
penGLRenderer.cpp
extDropShadowCache.cpp
exture.h
f44e66fcf70aa4a354deca72dfbd3b29c29302be 13-Dec-2011 Romain Guy <romainguy@google.com> Remove leftover debugging code

Change-Id: I1589af7991da36744071d5081daa24ebae5b4dfd
rogram.cpp
3e263fac8c9c0e0fb242186b514a7af8efb40961 13-Dec-2011 Romain Guy <romainguy@google.com> Keep shaders to render properly

I don't know who's to blame, SGX or Tegra2 but one of those two GPUs is not
following the OpenGL ES 2.0 spec.

Change-Id: I2624e0efbc9c57d571c55c8b440a5e43f08a54f2
ayerRenderer.cpp
penGLRenderer.cpp
rogram.cpp
rogram.h
6752d0ab029a185a42e34e7a933b669e6ed19e89 12-Dec-2011 Romain Guy <romainguy@google.com> Mark color uniform fetched after fetching it

Change-Id: I10e8027018608070a536eb8b51c7a4272e37006c
rogram.cpp
24edca8b526515979778e577191089a57f5277d7 09-Dec-2011 Romain Guy <romainguy@google.com> Code cleanup

Change-Id: If92e3addfc4d8546a60edcdea60a1fc89c27b680
rogram.cpp
rogramCache.h
roperties.h
05bbde70fd2a3af737656b9f8c5a25b56429632e 09-Dec-2011 Romain Guy <romainguy@google.com> Free up resources by deleting shaders early on

Change-Id: I29a39775732c0a48d3e6823f7afa3e741cae8541
rogram.cpp
rogram.h
roperties.h
9c4b79af221b53f602f946faa9ff317a596a0c39 11-Nov-2011 Romain Guy <romainguy@google.com> Discard framebuffer rendering queues when discarding layers
Bug #5581817

Change-Id: Ie30700a29059d2ea60eb7bd3f8bd20ac48a149ab
ndroid.mk
xtensions.h
ayerRenderer.cpp
ayerRenderer.h
penGLRenderer.cpp
8f9a9f61ab793d9387a5942b307e74324704893b 05-Dec-2011 Romain Guy <romainguy@google.com> Clip text correctly
Bug #5706056

A newly introduced optimization relied on the display list renderer
to properly measure text to perform fast clipping. The paint used
to measure text needs to have AA and glyph id encoding set to return
the correct results. Unfortunately these properties were set by
the GL renderer and not by the display list renderer. This change
simply sets the properties in the display list renderer instead.

This change also improves the error message printed out when the
application attempts to use a bitmap larger than the max texture
size.

Change-Id: I4d84e1c7d194aed9ad476f69434eaa2c8f3836a8
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
hapeCache.h
extureCache.cpp
cac5fd3e09e9dc918753d4aff624bf29a367ade3 02-Dec-2011 Romain Guy <romainguy@google.com> Faster text clipping

Change-Id: I03a00c4261d81a416b1ad7b86ce2d432c71908b4
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
d21b6e1fe337b35f62cf2028e9bd0637fd009a75 01-Dec-2011 Romain Guy <romainguy@google.com> Optimize away unnecessary state changes

Change-Id: I0f6816f9f6234853575ecee5033186ad19e76380
ayer.h
ayerRenderer.cpp
penGLRenderer.cpp
hapeCache.h
kiaShader.cpp
exture.h
extureCache.cpp
cb52d6760078197cd6d0c16349348dd2ad16a88c 29-Nov-2011 Romain Guy <romainguy@google.com> am 02e88f23: am 46685db9: Merge "Fix crash in existing applications Bug #5659476" into ics-mr1

* commit '02e88f23a65c602e83d7a46c0925e653b948e418':
Fix crash in existing applications Bug #5659476
46685db957cc01cef4ba198aafe44d99fe31f62c 29-Nov-2011 Romain Guy <romainguy@google.com> Merge "Fix crash in existing applications Bug #5659476" into ics-mr1
d3ea6b40bb8f0fbc2a877963db1ab4fa0fc02b2f 29-Nov-2011 Chet Haase <chet@google.com> am 38928899: am 8990cb57: Merge "Fix flashing wifi dialog after rotating back from landscape." into ics-mr1

* commit '3892889952b0ad3fa0b095c96d8ae2ae110585e2':
Fix flashing wifi dialog after rotating back from landscape.
08837c246c9c27902c59b41c8661c2f27a4aa2bc 28-Nov-2011 Chet Haase <chet@google.com> Fix flashing wifi dialog after rotating back from landscape.

There was an error in some of the OpenGL layer logic such that we would
occasionally set up a layer for rendering and then not clean up when it was
done. This caused future OpenGL rendering to go into that layer instead of
to the buffers being displayed on the screen, resulting in artifacts including
flashes and displaying of stale content. This happened specifically when
using the wifi settings dialog with the InputMethod keyboard displayed,
but it was probably visible in other situations as well.

Issue #5628248: Flickering/flashing after entering password for WiFi

Change-Id: I38139f620b310f4309570fa7224552d2ee633999
penGLRenderer.cpp
ff98fa5a847f66e591287154c634ef7895a9549c 28-Nov-2011 Romain Guy <romainguy@google.com> Fix crash in existing applications
Bug #5659476

The FontRenderer was not cleaning up its temporary state, leading
to crashes when invoking renderDropShadow.

Change-Id: I43b24820dd5625af8c080bbe11b64de2f74164b2
ontRenderer.cpp
c28e574037b2bfc8c2ea24593299aa20ae9078f8 22-Nov-2011 Romain Guy <romainguy@google.com> am a2fabf4a: am 303a0695: Merge "Draw in the correct FBO after invoking a GL functor Bug #5650514" into ics-mr1

* commit 'a2fabf4a109d46f99ff7370aa05e48c1708c2838':
Draw in the correct FBO after invoking a GL functor Bug #5650514
421458aad764cd9d1403d2540ab979b336b02341 22-Nov-2011 Romain Guy <romainguy@google.com> Draw in the correct FBO after invoking a GL functor
Bug #5650514

After invoking a GL functor, libhwui restores a few OpenGL states
including the current FBO. The renderer was however making the
wrong assumption that the FBO to restore to was the base layer
instead of the FBO associated with the current canvas state.

Change-Id: Ie565500832ebffd673f6a43b83422d6cc05470a0
penGLRenderer.cpp
napshot.h
7077506f9945b87b02bdd47ffce75a5b813c821c 14-Nov-2011 Dave Burke <daveburke@google.com> Revert "Discard framebuffer rendering queues when discarding layers"

This reverts commit da96f8ac2c1c35a54f3f36e6d776cb386a251d03.
ndroid.mk
xtensions.h
ayerRenderer.cpp
ayerRenderer.h
penGLRenderer.cpp
d9e688cab3015d858110fb8240cf7378c6befd82 12-Nov-2011 Jeff Brown <jeffbrown@google.com> Clean up GenerationCache.

Use const references to keys and values where appropriate to avoid
copying them unnecessarily.

Deleted some dead code.

Simplified a few pieces that were doing unnecessary redundant work.

Change-Id: Ib2145b7094a40db2d679e05dafe050fe1e87b846
athCache.cpp
1333742bedc9b462024302f302e3a7f27053df66 11-Nov-2011 Akwasi Boateng <akwasi.boateng@ti.com> am cb0db030: Merge branch \'ics-mr1-plus-aosp\' of ssh://android-git:29418/platform/frameworks/base into ics-mr1-plus-aosp

* commit 'cb0db0306b5849a35d3d99eea1b34ce019c6f0d8':
Make the overridden ImageView#setVisibility remotable
Clamp non-monotonic stats instead of dropping.
DO NOT MERGE. Fix leak in LayoutTransition
Fix lastVisible/global rects
Fix Wimax-less build.
Fix leak in LayoutTransition
Deferring wallpaper update to improve workspace scrolling (issue 5506959)
Terminate EGL when an app goes in the background
boot animation is dithered and scaled
Fix NdefRecord byte-stream constructor.
PopupWindow dismiss() can get into a recursive loop.
Fold WiMAX state into the mobile RSSI.
Remove dedicated wimax icon to fix RSSI layout.
da96f8ac2c1c35a54f3f36e6d776cb386a251d03 11-Nov-2011 Romain Guy <romainguy@google.com> Discard framebuffer rendering queues when discarding layers
Bug #5581817

Change-Id: If612846ec5f7793710fc4df152791fb32c506551
ndroid.mk
xtensions.h
ayerRenderer.cpp
ayerRenderer.h
penGLRenderer.cpp
8ff6b9ebeeb24a6161ec6098e6bfdf8790ee5695 10-Nov-2011 Romain Guy <romainguy@google.com> Terminate EGL when an app goes in the background

This does not happen on high end gfx devices. This happens
only if only one EGL context is initialized in the current
process.

Change-Id: Ibd1737efdf84eef8a84108b05795440d1ae9964e
aches.cpp
aches.h
9039e43ab1edac9e81f1308a7f3380cff4e9fa27 05-Nov-2011 Romain Guy <romainguy@google.com> am 2ccc47b8: Merge "Memory optimizations for libhwui Bug #5566149" into ics-mr1

* commit '2ccc47b89868d4f39683e0e2bd057ce95d7d1217':
Memory optimizations for libhwui Bug #5566149
eca0ca2424afc1e98912405906edfc32f7733e16 04-Nov-2011 Romain Guy <romainguy@google.com> Memory optimizations for libhwui
Bug #5566149

Lazily initialize font renderers
Keep 60% of the texture cache when an app goes to the background
Delete least used font renderer when going to the background
Delete all font renderers on full memory trim

Change-Id: I3c2454d46dc1107ec0f0f72a9ce69cbbcc8825e7
aches.cpp
ammaFontRenderer.cpp
ammaFontRenderer.h
roperties.h
extureCache.cpp
extureCache.h
ef9bb3c3ea3aa08071ea0c32a505b379c322e5b5 17-Oct-2011 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #5438102 Double Arabic harakat overlap instead of stack In TextView

IMPORTANT: this change needs two patches for Harfbuzz:
- one concerning hb_utf16_script_run_prev() which was not returning the correct "previous" script
- one for the "script_properties" table that was missing Arabic code point ranges and declaring
HB_Script_Inherited instead of HB_Script_Arabic

The current change is doing the following:
- pass the correct typeface for Harbuzz shaping (depending on the script of the run)
- offset correctly the glyphIDs returned by Harfbuzz

We need to offset the glyphsID as Harfbuzz will return local glyphIDs (meaning in the
local range of the font used for shapping).

We then cannot use those glyphIDs when we are using a fallback Font (Arabic, Hebrews...)
because the FontRenderer needs glyphIDs in the range of all the Fonts (including the fallbacks)

Change-Id: I494897435bbc59293b02392ee2059cebcdf0e571
penGLRenderer.cpp
e707859415f4c8e1c01228dfaa58fb0a690d442e 28-Oct-2011 Romain Guy <romainguy@android.com> Load identity matrix when calling Canvas.setMatrix(null)
Bug #5446826

Change-Id: I3a7817f266b17e9abe948500816d629edd9a2822
penGLRenderer.cpp
5e7c469c7a3039af7696789a797f8d91a45227eb 21-Oct-2011 Romain Guy <romainguy@google.com> Make sure 9patches are not filtered when not necessary
Bug #5383406

Change-Id: I061c8069a4d9f4eaf45671283710b564639eeb32
atch.cpp
a62f172215727a1e00af0cb934904e00926a86c9 20-Oct-2011 Romain Guy <romainguy@google.com> Correctly dump DrawPatch operations in display lists

Change-Id: I8cd1c764ddc184ce45727913fa2a23a3d81b337e
isplayListRenderer.cpp
5cd5c3f7e4df99f47e3def6e3707b9eb8205aef3 18-Oct-2011 Romain Guy <romainguy@google.com> Return early when we cannot allocate a hardware layer
Bug #5462308

Change-Id: I52dab809662f6f42a49ca03edc50f6b98fc35a06
ayerRenderer.cpp
71e36aa7db69449e210d0791284cb810a7471c07 12-Oct-2011 Romain Guy <romainguy@google.com> Add missing public native API

Change-Id: Ie3bc706b2ac91d686a5b888e8ae841820e9d37c7
atrix.h
7953745dd565167113f8cbfc461bc0521d32d870 12-Oct-2011 Romain Guy <romainguy@google.com> 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
ndroid.mk
aches.h
isplayListLogBuffer.h
isplayListRenderer.h
ayerRenderer.cpp
ayerRenderer.h
penGLRenderer.h
esourceCache.h
kiaColorFilter.h
kiaShader.h
a9dc86b21defc26db0d71f276aff5c3af0b62ff5 11-Oct-2011 Romain Guy <romainguy@google.com> Correctly apply transforms when getting a TextureView's bitmap
Bug #5439406

Change-Id: I271a9a2e38f5b3600dc158f8f442a6b0893f472b
ayerRenderer.cpp
5a6d3a4c0311318e6f1d4ee06aa47606e055a81b 08-Oct-2011 Romain Guy <romainguy@google.com> Stupid fixed point math.
Bug #5423215

Change-Id: I39379e1f8fb4d59de4ede6e4fe7cf7a2c7cc625a
ontRenderer.cpp
ed7a8fc768df158241819f062a12dafdaf8a628d 05-Oct-2011 Romain Guy <romainguy@google.com> Canvas.getClipBounds() was broken and unreliable with OpenGL ES 2.0

This bug was affecting several third party applications. The bug was
introduced by an optimization that prevented the local clip to be
recomputed when needed.

Change-Id: I7b5c464db21b5ff1a7274af75a3a64d0e9d84772
napshot.h
59c7f80dd20258cefa1fc4bdd3c9a709a8dd53b8 30-Sep-2011 Romain Guy <romainguy@google.com> TextureView works best when it draws stuff.
Bug #5391188

Change-Id: I5e754881ccb08ff288ebd60de77282c9cbcf3f86
extDropShadowCache.h
83b186a246e8ffd52b91a17c0019dd8c9c9d21b1 20-Sep-2011 Mathias Agopian <mathias@google.com> fix the float Rect in OpenGLRenderer to handle NANs

- we want functions like isEmpty() to return true if NANs are
involved in the Rect

- also clean-up the intersect familly of calls

- minor cleanup in the int32_t Rect as well

These played a role in http://b/5331198.

Bug: 5331198

Change-Id: I5369725ab482e4b83da9f1bd4cee5256e5de75b2
ect.h
13ede62fd77acdf158f7210043fe48644cb4a589 16-Sep-2011 Jeff Brown <jeffbrown@google.com> Make LTE_FLOAT a strict weak order.
Bug: 5327776

Currently LTE_FLOAT isn't even a valid partial order, let alone
a strict weak order as needed by binary search. Consequently,
KeyedVectors with keys whose types have operator< using LTE_FLOAT
sometimes find the wrong values!

This problem affects several graphics caches including the
TextLayoutCache.

(This is still not a total order because NaNs are not comparable
but hopefully we don't ever search for NaNs this way!)

Change-Id: Ic447a34c7d87f681ee81538f22a0937a039072dd
tils/Compare.h
2ffefd48e20d311b38c0673edadb27c1f6ad328b 09-Sep-2011 Romain Guy <romainguy@google.com> Add support for 3 new blend modes when blending with framebuffer:
Add
Multiply
Screen

Change-Id: I92a3c2612c86613087568bf0c03cc6f92b5ded44
penGLRenderer.cpp
8a3957d43bcae93fbb9f6b4b4c3de8abdb3c953c 08-Sep-2011 Romain Guy <romainguy@google.com> Add reminder in the code to fix T-junctions

Change-Id: I52b112694f930e641f01fb78dc55412986023411
ayerRenderer.cpp
penGLRenderer.cpp
799833a8b451a04be201d25ae72213e8562f7774 30-Aug-2011 Romain Guy <romainguy@google.com> Text would disappear when the font size is 75px.
Bug #5230196

Yes, 75px. Any other font size would work. Don't ask.

Change-Id: I96c7db9926a97f65128d60c8238c3640ee2444ba
ontRenderer.cpp
04c9d8c2ffd028c35c750bac0a4a7b79e48059b5 25-Aug-2011 Romain Guy <romainguy@google.com> Optimize display lists

Remove redundant or useless operations

Change-Id: If989b4eaa9143eef4254c38b39959aeed1f2b9ab
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
631582f7f7a3c879a5fba81f2bc082e4826758aa 24-Aug-2011 Romain Guy <romainguy@google.com> Enable linear filter when scaling bitmaps
Bug #5205673

Change-Id: I8b0f90877df6b6c6757d35dcf6cd14e79e840b96
penGLRenderer.cpp
6816972eb69ee8b294553dac92b3c1ad5b1ca1f7 23-Aug-2011 Romain Guy <romainguy@google.com> Don't use bilinear filtering on unscaled bitmaps
Bug #5198590

Change-Id: I4333d850501ac849eeeeb247e4178dd469b9de3d
penGLRenderer.cpp
28d8ff6dbcc1b137131c70b72b4dbd211db7fbd9 22-Aug-2011 Romain Guy <romainguy@google.com> Move constants to the correct header

Change-Id: Id4bd14f72487bd7156cd2e1930eaf97b47896273
ayerCache.cpp
ayerCache.h
roperties.h
302a9df1d50373c82923bb84ff665dfce584fb22 16-Aug-2011 Romain Guy <romainguy@google.com> Add an API to set the transform on a TextureView's surface texture.
Bug #5156689

Change-Id: I635a625885c9b832a60d44ece0de7613ceb84109
ayer.h
atrix.cpp
atrix.h
penGLRenderer.cpp
e5df231434357424cea8d2b8d0cdf31253a98110 12-Aug-2011 Romain Guy <romainguy@google.com> Make sure we correctly copy caches keys.
Bug #5136067

Change-Id: I366e840bef44415436dc7b13d89cfb610feed663
radientCache.h
ayerCache.h
atchCache.h
athCache.h
hapeCache.h
9d865512f1a39bac6bed612b24023213d5a1fb1d 12-Aug-2011 Romain Guy <romainguy@google.com> Remove unnecessary private API

Change-Id: I2ecb367528ec0691c07153a3d163b82a6ca33fdf
penGLRenderer.cpp
penGLRenderer.h
4974bc1be68a77cf9709a8c50ef6de06ce8a3a0d 08-Aug-2011 Romain Guy <romainguy@google.com> Prevent crash when purging the gradients cache.
Bug #5133876

Change-Id: I3d1fa4e29498044796d725337ac93e6a1e8f0bcb
radientCache.h
bd496bc3d481f9cfc39007d22372d3a1a8809f96 03-Aug-2011 Romain Guy <romainguy@google.com> Paint style and stroke width affect text rendering.
Bug #5112207

Change-Id: Ic34037ace21a5058ba23dd15e51aae58c998454d
ontRenderer.cpp
ontRenderer.h
6203f6c8147069976342be8f42add797a50f9557 02-Aug-2011 Romain Guy <romainguy@google.com> Reduce the amount of data cached by the gradients cache.

Change-Id: I8546f5a5ecf38031c9a40bdcc434d4c7f22da63d
aches.cpp
radientCache.cpp
radientCache.h
esourceCache.cpp
kiaShader.cpp
a60c3889718f4513a6c9d8b80f655db5d6346905 02-Aug-2011 Romain Guy <romainguy@google.com> Use high precision iterators on specific GPUs
Bug #5098359

Change-Id: I52ee8c7b4c9e8d4c7bedb684eaf7bef6c44c74b9
ebug.h
xtensions.h
rogramCache.cpp
b50149825fae95b2918bcf67b2ddb773b9797068 29-Jul-2011 Romain Guy <romainguy@google.com> Correctly apply linear filter to drawBitmap(Rect, Rect)

Change-Id: I1049282e1996b1020c92cb7bec46e9f28e94e967
penGLRenderer.cpp
kiaShader.cpp
65b345fa22b878e141b8fd8ece9c208df00fa40f 28-Jul-2011 Romain Guy <romainguy@google.com> Reclaim more memory, more often.

Yay.

Change-Id: I04557ad575c307a55088549f48f0e9ad994b7275
isplayListRenderer.cpp
isplayListRenderer.h
ayerCache.cpp
ayerRenderer.cpp
roperties.h
6d7475d666baefaa3ba9f0dcee25238739454241 28-Jul-2011 Romain Guy <romainguy@google.com> Destroy layers and flush layers cache when a window is destroyed.

Change-Id: I3fa1bc3ff50fb99e3d2e490925bd6b0a0f809fff
aches.cpp
aches.h
isplayListRenderer.h
eea60692b060737faeaa02bb30f5b79e2202b482 27-Jul-2011 Romain Guy <romainguy@google.com> Improve layers debugging

Change-Id: Ia4950dd5f0e0a224ecb69c581d33aa4f32260a7c
ayerCache.cpp
ayerCache.h
ayerRenderer.cpp
912a7b32d0c59ba38265c5dd6ff84ce93f909a7f 27-Jul-2011 Romain Guy <romainguy@google.com> Make sure we have a current EGL context when invoking EGL
Bug #5081795

Change-Id: Iee3382d362a71c1e6c5c498b319bf7f7bcf5a2f0
ayer.h
ayerCache.cpp
extureCache.cpp
e3c26851dc315b730ea0fe5ef35bb1db81f6d675 26-Jul-2011 Romain Guy <romainguy@google.com> 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
radientCache.cpp
ayer.h
ayerCache.cpp
penGLRenderer.cpp
penGLRenderer.h
hapeCache.h
kiaShader.cpp
extDropShadowCache.cpp
exture.h
extureCache.cpp
162a0217563f4665da6eb183dfce0fef740f641f 22-Jul-2011 Jeff Brown <jeffbrown@google.com> Decouple GLES20RecordingCanvas lifetime from GLES20DisplayList.
Bug: 5062011

Previously, each GLES20DisplayList would hold onto an instance of
GLES20RecordingCanvas. In turn, each GLES20RecordingCanvas
held onto an SkWriter with a 16Kb buffer along with several other
objects. With one display list per view and hundreds of views,
the overhead could add up to a few megabytes.

Ensured that the GLES20RecordingCanvas is reset as soon as
the display list has been constructed, thereby promptly freeing
the 16Kb buffer.

Changed GLES20DisplayList so that it acquires a GLES20RecordingCanvas
from a pool as needed and recycles it when done.

Removed some dead code and cruft related to the construction of
GLES20Canvas objects in general. Some code was written with the
assumption that the underlying renderer object could change
behind the scenes or might be lazily constructed, but that isn't
actually the case so we can simplify things.

Removed an unnecessary weak reference from GLES20DisplayList
to the View. It isn't actually used anywhere.

Fixed a bug in GLES20DisplayList where isValid() would return
true while the display list was being recorded. This is incorrect
because the native display list might not actually exist. Worse,
even if the native display list does exist, it is stale and
potentially refers to old Bitmaps that have been GC'd (because the
mBitmaps list was cleared when recording started).

Change-Id: Ib12d5483688cb253478edeb0156d34c476c2566b
isplayListRenderer.cpp
isplayListRenderer.h
f2fc460a9512500d9d5749fbaada88903d8e3b22 20-Jul-2011 Romain Guy <romainguy@google.com> Reduce the fade area to save bandwidth.

Change-Id: I8ccea17fc1fb3c132329baa0acc1b3d5a140a5c6
penGLRenderer.cpp
bdf7609867a3f886455c51dba91623a86cceb6e2 19-Jul-2011 Romain Guy <romainguy@google.com> Trim OpenGLRenderer's memory usage whenever possible

Change-Id: I9225077184f374b1a43300add15cc1d5b6869d1c
aches.cpp
aches.h
ebug.h
042f7d64b5ccd7b5b73e7e9814a84576f04fb7d4 13-Jul-2011 Kenny Root <kroot@google.com> Fix debugging for hwui caches

Debugging code attempted to delete a stack item.

Also, the flag fields weren't exactly clear, so rewrite it so it's
clear that kDebugMoreCaches is a combined flag.

Change-Id: If42b7f0f754919343301da5656aee5943cc9bd4a
aches.cpp
roperties.h
40c4b86b72d416585335940f928124426d715e59 09-Jul-2011 Romain Guy <romainguy@google.com> Align paths on pixel boundaries when rasterizing in bitmaps.
Bug #5003739

Change-Id: I3dfbf4eb92e2c870f33c96947a7d6439e3730965
hapeCache.h
b2479153b743df9e54f7e17c7132a5ecd87fa453 08-Jul-2011 Romain Guy <romainguy@google.com> Correctly position layers.

Change-Id: I1678b1c5bdab140b44e56556c50ab8329255f18a
penGLRenderer.cpp
ec19b4a764d512091a780fc93ced567dfbf80914 08-Jul-2011 Romain Guy <romainguy@google.com> Use NEAREST filtering mode for TextureView.getBitmap().

Change-Id: I4649062bbdf18ebba7924bdf578f39ad8f6576ac
ayerRenderer.cpp
penGLRenderer.cpp
9ace8f5e79e76893fe4ca9e4d10f6c4056330485 08-Jul-2011 Romain Guy <romainguy@google.com> Use NEAREST filtering for layers whenever possible.

Change-Id: Id5bee1bd4a322cf93e8000b08e18f1e1b058648e
ayer.h
ayerCache.cpp
ayerCache.h
ayerRenderer.cpp
penGLRenderer.cpp
exture.h
9ff3cb57ee46ac5242a7d8f08e0c66189fda2e66 28-Jun-2011 Romain Guy <romainguy@google.com> Fix parameter order evaluation issue.

This problem was affecting Android builds with gcc/x86.

Change-Id: Ibb7978413c89bd1ac09f0d1ea78f5cb4fe61f6ed
isplayListRenderer.cpp
4a5a71518a71a44dbccb3af9a08b82056ea748b3 25-Jun-2011 Romain Guy <romainguy@google.com> Don't set texture parameters on every frame.

Change-Id: Iec368405ad6a4ccfd569a0b3b4d681871a770396
ayerRenderer.cpp
80429c458506485904715180d10584092a5cd082 25-Jun-2011 Romain Guy <romainguy@google.com> Properly tear down TextureView

Change-Id: Ic23cd9257889d0abe8cc3fc1d04a66d0505e383e
ayerRenderer.cpp
02ccac69fd1c0a03c24c5f3ace0ad4bed337b1fd 24-Jun-2011 Romain Guy <romainguy@google.com> Code cleanup

Change-Id: I64c346004e0adf9a776d0315534d4fe445f0c0ca
aches.cpp
a9489274d67b540804aafb587a226f7c2ae4464d 23-Jun-2011 Romain Guy <romainguy@google.com> Add the ability to specify the opacity of a TextureView

TextureView assumes its content is opaque by default.

Change-Id: Iba873423566a5b67c388081838bd910dceba32ba
ayerRenderer.cpp
ayerRenderer.h
penGLRenderer.cpp
d586ad9c9fec80aa1d24d6b53cd2c8d5b47fe868 23-Jun-2011 Romain Guy <romainguy@google.com> Fix another memory leak in OpenGLRenderer

Change-Id: I23ed56891452a05cf3ca13f6919c4fef90d5ff4e
isplayListRenderer.cpp
isplayListRenderer.h
esourceCache.cpp
kiaColorFilter.h
f6a63ae3a7004a8eca87fca5a66cfb6aef4e86b5 23-Jun-2011 Romain Guy <romainguy@google.com> Fix memory leak in OpenGLRenderer.

When creating a display list, matrices are duplicated locally. They
were however never deleted, thus causing apps to slowly leak memory
(a matrix is about 40 bytes.)

Change-Id: Iac465b720d4c4c9b5ca3fce870c0c912c14a74ab
isplayListRenderer.h
d6b2a00dd43257d1498b09175bff63663f6cb861 18-Jun-2011 Romain Guy <romainguy@google.com> Add error checking to LayerRenderer::copyLayer

This method is invoked by TextureView.getBitmap() and failures must be
caught to avoid leaving the GL context in a potentially bad state.

Change-Id: I620de395ba1bc20154de58c81963223dc55cac78
aches.h
ayerRenderer.cpp
penGLRenderer.cpp
98029c825b9234e6b90721d910cc180885fcab1d 18-Jun-2011 Romain Guy <romainguy@google.com> Fix rendering issue with paths when the stroke width is 0

Change-Id: I5d8ac23dc69e9e17df4ef6b5195186b5207e2524
hapeCache.h
77a811610f99e21da7f88dafef60d09f345d0506 15-Jun-2011 Romain Guy <romainguy@google.com> Add TextureView.getBitmap()

This API can be used to get a Bitmap copy of the content of a
TextureView.

Change-Id: I07522216c353720fba5cab333174f58f484eb911
ayerRenderer.cpp
ayerRenderer.h
penGLRenderer.h
54be1cdf3d63095512120fa7ced5c16e462abffa 14-Jun-2011 Romain Guy <romainguy@google.com> Batch glCopyTexImage() calls to get about 15 fps back on SGX.

Change-Id: I04079e070739c1e46df3e90fc388c335e2a7d2b9
penGLRenderer.cpp
penGLRenderer.h
181d0a6ccedee03789919d53c46540a8df751896 10-Jun-2011 Romain Guy <romainguy@google.com> Don't apply AA to rects with no rotation/perspective.

Change-Id: I21138d4d0589cc28f1dcffb8b675cd81a9900e24
atrix.cpp
atrix.h
penGLRenderer.cpp
67ffc36a79ce3a9a0b5da28b65123864b7d2597f 04-Jun-2011 Romain Guy <romainguy@google.com> Measure text with the appropriate text encoding.
Bug #4546327

Change-Id: I8eb593b03a81145e08be92579706ddd775feb0a2
penGLRenderer.cpp
726aeba80ffc6778a9bc3e0ee957b8d644183505 01-Jun-2011 Romain Guy <romainguy@google.com> Add support to OpenGLRendere to draw BiDi text.
Bug #4350336

Change-Id: I1cf31693f7ca9653fa3a41b5b91c27ef288d680f
isplayListRenderer.cpp
ontRenderer.cpp
ontRenderer.h
penGLRenderer.cpp
penGLRenderer.h
roperties.h
extDropShadowCache.h
f09ef51889f75289b041f9e9f949b7b82ed5b686 27-May-2011 Romain Guy <romainguy@google.com> Fix issue with drawColor(color, Mode.Clear)

Change-Id: I486b24a5b609c6f8adb0276037ddb24af2b888b2
penGLRenderer.cpp
penGLRenderer.h
d2ba50ab861ec0950bda18dd0f463b687e66249f 27-May-2011 Romain Guy <romainguy@google.com> Prettify memory dump.

Change-Id: I071c6a04a144a96955d85f56dffc6162288ee33e
aches.cpp
1e59f9d10d164f156221f6d34b932f06cdd29f1f 27-May-2011 Romain Guy <romainguy@google.com> Fix texture coordinates for sub-bitmap rendering.

Change-Id: I05a31775e03f5b223a55a5144d420351abac89be
penGLRenderer.cpp
f504a2fa144504ca1efd39a4ef9208e3d4d336c5 27-May-2011 Romain Guy <romainguy@google.com> Correctly implement the CLEAR xfermode.

The previous implementation was using glBlendFunc with the parameters
GL_ZERO/GL_ZERO which doesn't work for text, paths and other alpha
sources (anti-aliasing.) The correct implementation is GL_ZERO/
GL_ONE_MINUS_SRC_ALPHA.

Change-Id: I4cca65e57b6a37bbf5a41d382cb0648ee8e11e79
ebug.h
penGLRenderer.cpp
atch.cpp
atch.h
44984ea0cb3702384d023b5f211deda3c4b0b656 19-May-2011 Chet Haase <chet@google.com> Enable large font rendering with GPU acceleration

Change-Id: I7b022100fb0762613f9cf7753dbb0217e1e75f8d
ontRenderer.cpp
ontRenderer.h
d39d1affe82cb8c21d32baaa5fbb2d6afb806f8e 16-May-2011 Derek Sollenberger <djsollen@google.com> Updates resulting from the Skia merge (revision 1327)

Change-Id: I2a8f5869dbe95bb594f2ba5d7278f9b330e6f17a
penGLRenderer.cpp
9dec462c1f522533620be3c70f2fc60e69368c1a 13-May-2011 Fabrice Di Meglio <fdimeglio@google.com> Merge "Prepare OpenGLRenderer to use glyphs from TextLayoutCache"
2ea75880142152b3a9993cb245754d73c05749a7 13-May-2011 Fabrice Di Meglio <fdimeglio@google.com> Prepare OpenGLRenderer to use glyphs from TextLayoutCache

- add OpenGLRenderer.drawGlyph()
- refactor glypth logging code

Change-Id: I797e6f1304d3f3f8f6ed31e7f9965d336233d2a4
penGLRenderer.cpp
penGLRenderer.h
858aa93ddb6e69e0503382af63bb681b6728aef1 12-May-2011 Chet Haase <chet@google.com> Antialiasing for rectangles

Change-Id: I7ca6931606541ddd504bd5db7f8dc04b9cde8cd9
penGLRenderer.cpp
penGLRenderer.h
c54ed966f78b9ee8117931859d62faa6f11fe018 06-May-2011 Chet Haase <chet@google.com> Minor javadoc enhancements

Change-Id: Ic24bb0e1e669989f0cae3a9b8fa064b38c8e7948
penGLRenderer.cpp
3825fef300122ffcc262e56a36a9fc36d8d084b0 06-May-2011 Chet Haase <chet@google.com> Merge "Fix for scaled AA lines"
99ecdc480dd4f9b550b2a62ea39f77845a4fec49 06-May-2011 Chet Haase <chet@google.com> Fix for scaled AA lines

Previously, the translucent boundary of AA lines would be scaled
by the line's transform. It should always be exactly one pixel wide
in screen space. This fix accounts for scaling for the boundary
region, and fixes some AA calculations that make wide/AA lines
more correct.

Change-Id: I30df2d5d96315bf3e7ff30be9735282fd5439a39
penGLRenderer.cpp
ed30fd8e9a2d65ee5c8520de55b0089c219f390c 23-Apr-2011 Chet Haase <chet@google.com> Add ability for hierarchyviewer to output displaylist info

Clicking on a node in hierarchyviewer1 and hierarchyviewer2 and then
clicking the new "Dump DisplayList" button will cause the display
list for the selected node (including its children) to be output into
logcat.

Change-Id: Iad05f5f6cca0f8b465dccd962b501dc18fe6e053
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
a17de9b493123f0d6e6d0b842150bf29322b7a88 05-May-2011 Chet Haase <chet@google.com> Revert "Add ability for hierarchyviewer to output displaylist info"

This reverts commit b2a4b52e8d5e499d33e2765e8c47851bf0266299.
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
b2a4b52e8d5e499d33e2765e8c47851bf0266299 23-Apr-2011 Chet Haase <chet@google.com> Add ability for hierarchyviewer to output displaylist info

Clicking on a node in hierarchyviewer1 and hierarchyviewer2 and then
clicking the new "Dump DisplayList" button will cause the display
list for the selected node (including its children) to be output into
logcat.

Change-Id: Id32f62569ad1ab4d533bc62987f3a7390c1bb4e6
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
df0a7fbdcff3c683641b7980da50a7d0eebe0876 03-May-2011 Romain Guy <romainguy@google.com> Merge "Allows to render with an OpenGL context inside a TextureView."
8f0095cd33558e9cc8a440047908e53b68906f5f 03-May-2011 Romain Guy <romainguy@google.com> Allows to render with an OpenGL context inside a TextureView.

Change-Id: I59453f7fc3997f0502a1c5d325d37fed376fabc7
ayer.h
ayerRenderer.cpp
ayerRenderer.h
penGLRenderer.cpp
penGLRenderer.h
rogramCache.cpp
rogramCache.h
99585adeb4167ca357a72eb866f34c1af944f4b9 03-May-2011 Chet Haase <chet@google.com> Line endcaps for AA lines are now antialiased.

Also fixed other minor issues with AA and line rendering.

Change-Id: Icd4638d27c70e2ee0f28b5d9a2b97d8b29e8ac4d
aches.h
penGLRenderer.cpp
penGLRenderer.h
rogramCache.cpp
rogramCache.h
ertex.h
ad44445c772efe66fdf063aa8f78d7ae3233570e 29-Apr-2011 Romain Guy <romainguy@google.com> Merge "New widget: TextureView Bug #4343984"
aa6c24c21c727a196451332448d4e3b11a80be69 29-Apr-2011 Romain Guy <romainguy@google.com> New widget: TextureView
Bug #4343984

TextureView can be used to render media content (video, OpenGL,
RenderScript) inside a View.

The key difference with SurfaceView is that TextureView does
not create a new Surface. This gives the ability to seamlessly
transform, animate, fade, etc. a TextureView, which was hard
if not impossible to do with a SurfaceView.
A TextureView also interacts perfectly with ScrollView,
ListView, etc. It allows application to embed media content
in a much more flexible way than before.

For instance, to render the camera preview at 50% opacity,
all you need to do is the following:

mTextureView.setAlpha(0.5f);
Camera c = Camera.open();
c.setPreviewTexture(mTextureView.getSurfaceTexture());
c.startPreview();

TextureView uses a SurfaceTexture to get the job done. More
APIs are required to make it easy to create OpenGL contexts
for a TextureView. It can currently be done with a bit of
JNI code.

Change-Id: Iaa7953097ab5beb8437bcbbfa03b2df5b7f80cd7
ayer.h
ayerCache.cpp
ayerRenderer.cpp
ayerRenderer.h
penGLRenderer.cpp
penGLRenderer.h
rogramCache.cpp
rogramCache.h
75e3ef048d8826f0db58f117403ce412e1d076a7 27-Apr-2011 Chet Haase <chet@google.com> Merge "Fix various hw-accelerated line/point bugs"
8a5cc92a150bae38ec43732d941b38bb381fe153 26-Apr-2011 Chet Haase <chet@google.com> Fix various hw-accelerated line/point bugs

All accelerated lines are now rendered as quads. Hairlines used to
be rendered as GL_LINES, but these lines don't render the same as our
non-accelerated lines, so we're using quads for everything. Also, fixed
a bug in the way that we were offsetting quads (and not offseting points)
to ensure that our lines/points actuall start on the same pixels as
Skia's.

Change-Id: I51b923cc08a9858444c430ba07bc8aa0c83cbe6a
penGLRenderer.cpp
penGLRenderer.h
rogram.cpp
rogram.h
9fc27819d75e24ad63d7b383d80f5cb66a577a0d 27-Apr-2011 Romain Guy <romainguy@google.com> Correctly compute tex coords for rect layers.
Bug #4192695

This change also fixes Javadoc links in the framework.

Change-Id: Ia548bcb18baba5d6fe6a4a04a2278e3a3bd465b2
ayer.h
ayerRenderer.cpp
penGLRenderer.cpp
740bf2bb2e900d3db2292b5909b4b4c6e90320e6 27-Apr-2011 Romain Guy <romainguy@google.com> Apply shaders/filters to text drop shadows.
Bug #4318323

This change also fixes the fact that shaders were not modulated
by the paint's color when drawing paths.

Change-Id: Id88804143aea06c895d4cbcdbe106d660230aa5a
penGLRenderer.cpp
rogramCache.cpp
6fca9884b3ea24d5775af4cf713fd81506913a39 25-Apr-2011 Chet Haase <chet@google.com> Minor cleanup in GLrenderer code

Changed the way we use bitcodes for one of the rendering
options to make the code cleaner.

Change-Id: Ifaa965f228dbdad297a40da93bfbe63373986e35
rogramCache.h
6cfdf4538049e4b96f50d8c0fe3119664420cc34 23-Apr-2011 Chet Haase <chet@google.com> Fix bitfield bug with vertex shader selection

Change-Id: I8bd3005f363afb52e6624806efb3e04c4a56ee18
penGLRenderer.cpp
rogramCache.h
5b0200bd47e8a9a4dc8d2e6c3a110d522b30bf82 14-Apr-2011 Chet Haase <chet@google.com> 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
aches.h
penGLRenderer.cpp
penGLRenderer.h
rogramCache.cpp
rogramCache.h
ertex.h
9c1e23baf5bfbebd1aebbd6d9a18c225325567ce 24-Mar-2011 Chet Haase <chet@google.com> Add logging of graphics acceleration info to bugreports

Change-Id: I9fa4cda6ccf92df9d1c644ccdc0e7274a30106e0
ndroid.mk
aches.cpp
aches.h
isplayListLogBuffer.cpp
isplayListLogBuffer.h
isplayListRenderer.cpp
isplayListRenderer.h
ad575f4dda3391baf9fcab927e65afbee32e7b95 25-Mar-2011 Romain Guy <romainguy@google.com> Merge "When deleting a path, remove it from the path cache. Bug #4170585"
8a40f6a6324387b324c998cd9d6af900f1dca5ab 25-Mar-2011 Chet Haase <chet@google.com> Merge "Fix bug with accelerated translucent rendering"
1af23a32d879db330eb5a08b21090ec60b604a32 25-Mar-2011 Romain Guy <romainguy@google.com> When deleting a path, remove it from the path cache.
Bug #4170585

Change-Id: I6be4d251ceb908c89afe49c2ff85c05f36c73b70
isplayListRenderer.cpp
hapeCache.h
f147340bd117c16a67287e2f6ca9ded651bb32b2 24-Mar-2011 Chet Haase <chet@google.com> 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
penGLRenderer.cpp
aaceeb0c5be11121a81e44b9633c06fc5c0fcd4d 24-Mar-2011 Romain Guy <romainguy@google.com> Use the correct API to query system properties.

Change-Id: Ie120dee0e24959d4db3fdb0100b6d8fe7fe46cdb
ebug.h
5b7a3150a6dbf193b371854b66fa654937633d3a 24-Mar-2011 Romain Guy <romainguy@google.com> Don't crash when omitting paint to drawBitmap() with A8 configs.

Change-Id: I3d630554ad82fa846385274d12d0434e890ef45d
penGLRenderer.cpp
80bbfb19eefe3cb9be8833b136381cece069e24d 24-Mar-2011 Romain Guy <romainguy@google.com> Fix shaders generation on IMG GPUs.

Change-Id: Id15df2663e41e31f04c8d86b958312341da8101d
rogramCache.cpp
c7b25be64f679e78dfa79080b44be18c9974004c 23-Mar-2011 Romain Guy <romainguy@google.com> Take fake bold font property into account.
Bug #4159731

For real this time!

Change-Id: I9cb6d70e68d2b57eb9a6d9a6bca8176967192421
ontRenderer.h
ed6fcb034b44d9a6ac2fc72fee6030417811f234 21-Mar-2011 Romain Guy <romainguy@google.com> Add support for drawPoint() and drawPoints().

Change-Id: I01bef50c08ec3160f8d40dc060b2cf6c2e4d7639
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
rogramCache.cpp
rogramCache.h
67ac217a81f34ee3d35df84b38f3456843c40706 19-Mar-2011 Romain Guy <romainguy@google.com> Fix hairline rendering.

Change-Id: Ib6129b446b53678b1b955d8516418370cbae4f10
penGLRenderer.cpp
a168d7372132d6c87835878794b6ed43d0d282fd 19-Mar-2011 Romain Guy <romainguy@google.com> Correctly apply filters to Alpha8 bitmaps.

This change also removes unnecessary operations from display lists.

Change-Id: I627f85861982731f0ee7705b48b36d9c56f22f39
penGLRenderer.cpp
penGLRenderer.h
b29cfbf768eab959b31410aafc0a99e20249e9d7 19-Mar-2011 Romain Guy <romainguy@google.com> Fix paths rendering issues.

See ApiDemos, PathEffect and PathFillTypes.

Change-Id: I9f9593c1da33d0d013b5b89c86bc5bd71128a192
isplayListRenderer.cpp
isplayListRenderer.h
athCache.h
hapeCache.h
40667676e542a9daeafeac9904c30004e8706fd3 18-Mar-2011 Romain Guy <romainguy@google.com> 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
ayer.h
ayerRenderer.cpp
penGLRenderer.cpp
roperties.h
08aa2cbd5e62e7ca140f78f8bea0477a19880fd9 17-Mar-2011 Romain Guy <romainguy@google.com> 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
penGLRenderer.cpp
a30f43624f76a7d49fcb48944c310cb4dbfc6522 17-Mar-2011 Romain Guy <romainguy@google.com> 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
80911b851764b073310fd0bffdf4a7db0d8fdd0b 16-Mar-2011 Romain Guy <romainguy@google.com> Modify the GL renderer's functor to pass the clip to WebView

Change-Id: If5efe399ca58f3000b2883e24e9f3736a2025184
penGLRenderer.cpp
89cc2b6422ce28bf3de1ac79b1daa0147b0eca88 16-Mar-2011 Romain Guy <romainguy@google.com> 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
6217a71cd281003a376d998269d577d26a61c206 16-Mar-2011 Romain Guy <romainguy@google.com> 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
ayerRenderer.cpp
penGLRenderer.cpp
roperties.h
8390c7cf6838eb8d63b8e38109751e5c7d13599b 15-Mar-2011 Romain Guy <romainguy@google.com> 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
ad37cd3b5d3de9dd0858af04fbccd102e8ff4b0e 15-Mar-2011 Romain Guy <romainguy@google.com> 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
penGLRenderer.cpp
8329db39f2f55484352d58b1820eb31a22698f11 15-Mar-2011 Romain Guy <romainguy@google.com> 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
7b5b6abf852c039983eded25ebe43a70fef5a4ab 15-Mar-2011 Romain Guy <romainguy@google.com> 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
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
rogramCache.h
3070af08821ee86f06a9cc6b58dbb79c82946b94 14-Mar-2011 Iliyan Malchev <malchev@google.com> frameworks/base: remove LOCAL_PRELINK_MODULE

Change-Id: I54dd62ebef47e7690afa5a858f3cad941b135481
Signed-off-by: Iliyan Malchev <malchev@google.com>
ndroid.mk
f7098ce95dde39a33ca280bd1ef9a13259e7b7e5 08-Mar-2011 Romain Guy <romainguy@google.com> 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
cabfcc1364eb7e4de0b15b3574fba45027b45cfc 08-Mar-2011 Romain Guy <romainguy@google.com> 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
ndroid.mk
isplayListRenderer.cpp
isplayListRenderer.h
penGLDebugRenderer.cpp
penGLDebugRenderer.h
penGLRenderer.cpp
penGLRenderer.h
extDropShadowCache.h
1eb12937329d0fcdc29d9c5ab6c549c42d2dcd52 03-Mar-2011 Fabrice Di Meglio <fdimeglio@google.com> Merge "Add TextLayout Cache"
058f47e8455464d7c9d59297a5d4db026c61eafd 03-Mar-2011 Romain Guy <romainguy@google.com> Merge "We need to go deeper. Bug #3431907"
84962f2fe6ce779c583cc54b11a9de2b6a568117 03-Mar-2011 Romain Guy <romainguy@google.com> 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
penGLRenderer.cpp
40a787f89a6f4c20f2c7fce29e5bc53954305f34 03-Mar-2011 Romain Guy <romainguy@google.com> Properly initialize FBO textures for linear filtering.

Change-Id: I67fc4fd760483ef85809be8d6e608cf4f469650f
ayerRenderer.cpp
a91320e364140ca7d6b33115d83b75f12fba548e 03-Mar-2011 Romain Guy <romainguy@google.com> Merge "Properly initialize FBO textures for linear filtering."
4677c5118c29b5621ababc136b749f02a3d543d6 02-Mar-2011 Romain Guy <romainguy@google.com> Merge "Fix problem with glyph cache and textScaleX property"
8668f8a633d9299091556c3b2e5ae07be8dce360 02-Mar-2011 Chet Haase <chet@google.com> 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
ontRenderer.cpp
ontRenderer.h
d313c665e618af3194f504064bcd284fe5368682 25-Feb-2011 Fabrice Di Meglio <fdimeglio@google.com> 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
tils/GenerationCache.h
d643bb56fdf21973ea75984f0816b7dc024698df 01-Mar-2011 Romain Guy <romainguy@google.com> Correctly mark layers dirty when drawing WebView.

Change-Id: I7ae0c3cfa0916d8fbeaf01e8da127c621a06a0f4
penGLRenderer.cpp
321dce646dc3c2ecfbd72a693d8d9294a6119736 01-Mar-2011 Romain Guy <romainguy@google.com> Avoid UTF-8 conversions and string copies whenever possible.

Change-Id: Ie4584417bbb7247e6c567fbfdb819529e548bb8f
extDropShadowCache.cpp
extDropShadowCache.h
4368c449d7baa398e67eb4d96467f1de8862c5bb 25-Feb-2011 David Li <davidxli@google.com> Merge "Fix mTexCoordsSlot > 0 check to mTexCoordsSlot >= 0"
cf28957c89127ccfc82d535903c776124665446a 25-Feb-2011 David Li <davidxli@google.com> Fix mTexCoordsSlot > 0 check to mTexCoordsSlot >= 0

0 Is a valid attribute location.

Change-Id: Ib24335f48efd6cc59e2ab877569d7d0c95f8490a
Signed-off-by: David Li <davidxli@google.com>
penGLRenderer.cpp
7b8b75892400745f39bb8d5b5d539091bcfb1e1e 25-Feb-2011 Romain Guy <romainguy@google.com> Remove the right entries from the cache when a GC happens.

Change-Id: I4649b18c4721a5511a404299e771e675c843407b
athCache.cpp
b37cbec6d06578a72bdd9c2caa3fd964ade71c53 25-Feb-2011 Romain Guy <romainguy@google.com> Correctly blend translucent GIF bitmaps.

Change-Id: Ifeb2c1d97a4c6dfeb1a7b5b26f1a3153e9f8da7f
penGLRenderer.cpp
extDropShadowCache.h
extureCache.cpp
6062c5912dc79704b489fc8c289b78a400ed05ee 22-Feb-2011 Derek Sollenberger <djsollen@google.com> Skia Merge (revision 808)

This is a companion CL to the one found in /external/skia

Change-Id: If81748545435cab20a5d8479329ab333cb973e16
isplayListRenderer.h
penGLRenderer.cpp
esourceCache.cpp
hapeCache.h
894df17eee708688c8a6e67941add2017239c790 18-Feb-2011 Alex Sakhartchouk <alexst@google.com> Fixing font renderer attribute slot locations.

Change-Id: I6377bb641df7d8372d873c00790189f9a190afd6
ontRenderer.cpp
ontRenderer.h
penGLRenderer.cpp
b18d2d0079b4dbf5675ab79b7111b3dfb3cc1ad0 11-Feb-2011 Romain Guy <romainguy@google.com> Dirty layers in the area covered by a drawBitmapMesh() call
Bug #3410827

Change-Id: Ic8b4f6201af94497bba86c75819588c78debddc2
penGLRenderer.cpp
851beae717dc8e9b66c214d9d6aab2e76d52b086 05-Feb-2011 Mike Cleron <mcleron@google.com> Merge "Properly handle dirty rectangles generated from 9-patches Bug #3409580" into honeycomb
c78b5d50f961ac8f696f8282979ae283cacd3574 04-Feb-2011 Romain Guy <romainguy@google.com> 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
penGLRenderer.cpp
5a7e828842c26f64bb6e0ef3e0019e1949b245ee 04-Feb-2011 Chet Haase <chet@google.com> 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
isplayListRenderer.cpp
isplayListRenderer.h
esourceCache.cpp
esourceCache.h
f28daffda50042c1b7cbfeb34b4d47741c6e21a8 04-Feb-2011 Romain Guy <romainguy@google.com> Empty the clip rect when intersection is empty.
Bug #3410035

Change-Id: I5ceb80514d3b20c9ad230478549ad31ced403d53
napshot.h
d63cbd10765e8f48e39b07b15f0a4b70bf853ec8 04-Feb-2011 Chet Haase <chet@google.com> Fix leak in reused display lists

Change-Id: I32a9c41abf8f8cbcaaaa6fcc82d296800014a1b2
isplayListRenderer.cpp
isplayListRenderer.h
2fc941e4650d618ff6e122f28b616d9032ffa134 04-Feb-2011 Romain Guy <romainguy@google.com> Fixes cache misses and extra allocations.
Bug #3421454

Change-Id: If4d5c960a7e4c581a9d213073e658284b4e1c497
aches.cpp
isplayListRenderer.cpp
isplayListRenderer.h
athCache.cpp
extDropShadowCache.h
09b7c91de73b59aa3f679b3ae3ba299f82ec9f8a 03-Feb-2011 Romain Guy <romainguy@google.com> 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
aches.cpp
ayerCache.cpp
ayerCache.h
ayerRenderer.cpp
roperties.h
62687ec12cb8e0b1d4044a235b1387b9a8c3b4b4 03-Feb-2011 Romain Guy <romainguy@google.com> Don't clobber the local dirty rect after rendering a layer.
Bug #3417254
Bug #3413433

Change-Id: I8045e9ec414ebe4ce4d38124142a00726d2c634d
ayerRenderer.cpp
beff8d83ef062975459f149ad0c632a3797d78ce 02-Feb-2011 Romain Guy <romainguy@google.com> Fix incorrect dirty rectangle transformation in hardware layers.
Bug #3413433

Change-Id: Iba201c7c4b4f11937797f3afcbf20c5a7395be25
ayerRenderer.cpp
3a3133d876caf60ebff2176ad75c3dcf0259148d 02-Feb-2011 Romain Guy <romainguy@google.com> Update layers based on the dirty region.
Bug #3413433

This helps Launcher when a widget updates during a scroll, or when interacting
with widgets on the workspace if layers are still turned on.

Change-Id: Ic7a42eb34f74f4ae988039754f815e2efd1d1e4f
ayerRenderer.cpp
penGLRenderer.cpp
penGLRenderer.h
885153e2d08aadd6333c48c4e98bade637eadc17 28-Jan-2011 Romain Guy <romainguy@google.com> Add more debug info for profiling.

Change-Id: I0c74e2aa108142cc6ddac4577ae2d0fe6c0ddb25
penGLDebugRenderer.cpp
penGLDebugRenderer.h
a45c056e62be0ca97edbdd6f6660822cf453c886 27-Jan-2011 Chet Haase <chet@google.com> Merge "Fix display List bugs" into honeycomb
678e0adbdbac5fa3f25ca8371fdff1b3182f67e9 25-Jan-2011 Chet Haase <chet@google.com> Fix display List bugs

Various property setters in View need to invalidate the parent's
cache to get redrawn properly when accelerated with display lists.

Also, fix logic around display lists and old-style Animations in
ViewGroup.

Change-Id: I70e1c2fa49e62228ee4a1301a006ce50bda4c305
ayerRenderer.cpp
4f09f5417b5c14fd31336dacfff86972e7885a03 27-Jan-2011 Romain Guy <romainguy@google.com> Don't draw the same triangles several times.
Bug #3388197

Change-Id: Ief1dfd9447f144e9992340a173d2893e5e049129
ayerRenderer.cpp
penGLRenderer.cpp
2b1847ea60650a9f68372abe860415f18b55081d 26-Jan-2011 Romain Guy <romainguy@google.com> Remove unused API

Change-Id: I1714fd82a64b752f0350ef4ef9179ce19e089c6a
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
f90f8171e6acb56f9f87093c01fd586f2140697a 26-Jan-2011 Romain Guy <romainguy@google.com> Make sure the opaque bitmap is opaque. GL doesn't like being lied to.
Bug #3382992

The result still looks wrong but it works as designed, unfortunately.

Change-Id: I6108e199fa336cb01faaabf6c75faa3b71c2339b
penGLRenderer.cpp
8d2959ddffcdee8b0c2f6387f2e2772c6df474ae 25-Jan-2011 Romain Guy <romainguy@google.com> Remove debugging log left by mistake.

Change-Id: I7d5165b4b682714940cea9886abeedd3f4858057
penGLRenderer.cpp
82d41a515368236e56454bd84023bebd6306f6b7 25-Jan-2011 Romain Guy <romainguy@google.com> Fix display list support for shapes.

Change-Id: I8b4c9e9ec36266a83c0a53ba3fb6e45d61bbd6d9
isplayListRenderer.cpp
8168396d1acbcb5fdd29eeda4c30b2803d5283ae 25-Jan-2011 Romain Guy <romainguy@google.com> Fix rendering issues with animated layers.
Bug #3385247

- The layer's alpha was interpreted in the wrong range 0..255 instead of 0..1
- 9-patches would not correctly dirty the layer region, the generated mesh
was incorrect

Change-Id: I4916249bedcdb0794929f3796bd17854971efc88
penGLRenderer.cpp
7d7b5490a0b0763e831b31bc11f17d8159b5914a 25-Jan-2011 Romain Guy <romainguy@google.com> Enable partial invalidates when rendering with OpenGL.

Change-Id: Ie8be06c4776b815e8737753eb8003b4fd8936130
isplayListRenderer.cpp
isplayListRenderer.h
ayerRenderer.cpp
ayerRenderer.h
penGLRenderer.cpp
penGLRenderer.h
daf98e941e140e8739458126640183b9f296a2ab 10-Jan-2011 Chet Haase <chet@google.com> Use optimized display lists for all hwaccelerated rendering

Previously, display lists were used only if hardware acceleration
was enabled for an application (hardwareAccelerated=true) *and* if
setDrawingCacheEnabled(true) was called. This change makes the framework
use display lists for all views in an application if hardware acceleration
is enabled.

In addition, display list renderering has been optimized so that
any view's recreation of its own display list (which is necessary whenever
the visuals of that view change) will not cause any other display list
in its parent hierarchy to change. Instead, when there are any visual
changes in the hierarchy, only those views which need to have new
display list content will recreate their display lists.

This optimization works by caching display list references in each
parent display list (so the container of some child will refer to its
child's display list by a reference to the child's display list). Then when
a view needs to recreate its display list, it will do so inside the same
display list object. This will cause the content to get refreshed, but not
the reference to that content. Then when the view hierarchy is redrawn,
it will automatically pick up the new content from the old reference.

This optimization will not necessarily improve performance when applications
need to update the entire view hierarchy or redraw the entire screen, but it does
show significant improvements when redrawing only a portion of the screen,
especially when the regions that are not refreshed are complex and time-
consuming to redraw.

Change-Id: I68d21cac6a224a05703070ec85253220cb001eb4
isplayListRenderer.cpp
isplayListRenderer.h
penGLDebugRenderer.cpp
penGLDebugRenderer.h
penGLRenderer.cpp
penGLRenderer.h
a566b7c3aada08d37cf08096c972e3e641bed773 24-Jan-2011 Romain Guy <romainguy@google.com> Fix bitmap meshes to work in display lists.

Change-Id: Ie226d049840942d9ad9cf58e0c19132f49d62a75
isplayListRenderer.cpp
penGLRenderer.cpp
8b2f5267f16c295f12faab810527cd6311997e34 24-Jan-2011 Romain Guy <romainguy@google.com> Add support for arcs.

Change-Id: I96c057ff4eb1b464b03f132da0b85333777bee4f
aches.h
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
hapeCache.cpp
hapeCache.h
c1cd9ba335b293f11e1082447ef08e474710a05f 23-Jan-2011 Romain Guy <romainguy@google.com> Add support for ovals and stroked rectangles.

Change-Id: I1292e241386763c82e6622c8f7ed90b0f5b7bd4f
aches.h
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
hapeCache.cpp
hapeCache.h
f6834478b379856d3e5de92ddce7de0e6ba9fa4a 23-Jan-2011 Romain Guy <romainguy@google.com> Always render text underline extra.
Bug #3381287

Change-Id: Ibfbc9c51c8dccef216daccc37d835e5dbf143a6a
penGLRenderer.cpp
extureCache.cpp
27454a42de8b3c54cdd3b2b2a12446c2c10c8cb9 23-Jan-2011 Romain Guy <romainguy@google.com> Collapse sucessive calls to restoreToCount() in display lists.

Change-Id: Icb3d3dc2c579436d375269a9cb0b821a931c5a79
isplayListRenderer.cpp
isplayListRenderer.h
4cf6e2f34994f160e1baba205a43c12784dd3e0d 23-Jan-2011 Romain Guy <romainguy@google.com> Fix potential crash in display lists.

Change-Id: I868821cbe69f7e71d93701b9cdb528a2ef796cd4
isplayListRenderer.cpp
c88e357d1ed9dadfc0efb3dfbe92f24460674ef5 22-Jan-2011 Romain Guy <romainguy@google.com> Fix regression with hardware layers.

The renderer was checking whether the layer's region is a rect to
draw it with a simple quad. This test was done against the layer's
region structure, which was cleared after generating the mesh.
Unfortunately Region::isRect() returns true when the region is
empty, which was causing the renderer to always use a quad to
draw a mesh on screen.

Change-Id: If4b874579ee0cedcb67367c9efa5c0c98ca55231
ayerRenderer.cpp
penGLRenderer.cpp
c9855a53edfac818dc68714557185977556f849d 22-Jan-2011 Romain Guy <romainguy@google.com> Log only 1 line per process when using OpenGLRenderer.

Change-Id: Idbdd6b84f31301e58ed53e0d50fd61fece192dfa
aches.h
ebug.h
boCache.cpp
ontRenderer.cpp
ammaFontRenderer.cpp
radientCache.cpp
ayerCache.cpp
hapeCache.h
extDropShadowCache.cpp
extureCache.cpp
5a7b466a2b4b7ced739bd5c31e022de61650545a 21-Jan-2011 Romain Guy <romainguy@google.com> Add support for drawBitmapMesh().

Change-Id: Ic77f9c534bb90dc7b9458299544bd50b8b6ae6a5
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
ff26a0c1c905dc1ec53b1bab860b80f2976d59be 20-Jan-2011 Romain Guy <romainguy@google.com> Remove unnecessary code.

Change-Id: I83eba3406c26a4028af08b4d4c95ecd02803e75a
aches.h
ebug.h
athCache.cpp
athCache.h
hapeCache.cpp
hapeCache.h
ed8f8dd8cf621d6046db7e083f8a36205ed55609 20-Jan-2011 Romain Guy <romainguy@google.com> Merge "Add rounded rects and circles support to OpenGLRenderer." into honeycomb
01d58e43ede5ca98cbebdd166f9b0c545032c01b 20-Jan-2011 Romain Guy <romainguy@google.com> Add rounded rects and circles support to OpenGLRenderer.

Change-Id: I6cedf2b495d58de7c0437096809fa9e4518a1b8c
ndroid.mk
aches.cpp
aches.h
ebug.h
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.cpp
penGLRenderer.h
roperties.h
hapeCache.cpp
hapeCache.h
514fb18827186591d66973c2362c859b64b63556 19-Jan-2011 Romain Guy <romainguy@google.com> Don't attempt to create empty layers.
Bug #3369888

Change-Id: Ic17bbd1c04bbf760cb17d0eb9e6767fd6479948c
ontRenderer.cpp
penGLRenderer.cpp
42f3a4b7c35dd1ea1922356eb3611af8cde05179 19-Jan-2011 Romain Guy <romainguy@google.com> Make embedded hardware layers work.
Bug #3369474

Change-Id: Ib6d7fb44eedda9dc2933b5e1b176f307968af91d
ayerRenderer.cpp
ayerRenderer.h
penGLRenderer.cpp
penGLRenderer.h
a3311ed7a9ddd7ecb066f4731ce4bc3bd3ffd939 19-Jan-2011 Romain Guy <romainguy@google.com> Fix the fix for 9patches.

Change-Id: I66dca835d9d0e9766d887746c3265e4b13ae688b
atch.cpp
fdbec3e4828f93bfa5cde758ad0e77b89c5c2ecd 19-Jan-2011 Romain Guy <romainguy@google.com> Fix 9patches in Launcher

Change-Id: Ieedf36ccaab253909b44ed8c222d523867f095be
atch.cpp
eb6a4a17a07f1aa41bd58d418b2982cddb97685a 18-Jan-2011 Romain Guy <romainguy@google.com> Fix 9patches, again...
Bug #3365243

Change-Id: Id45a1f1fd5e099b1d691e6064401d3de1b0c5c20
atch.cpp
atch.h
2577db1ec135a1470a2c42139772ec97a6c30e78 18-Jan-2011 Romain Guy <romainguy@google.com> Add support for Paint::setTextSkewX in OpenGLRenderer.
Bug #3360888

Change-Id: I42e81a1f10bf7b9ae1c63ca8add1878fd59a1e8a
ontRenderer.cpp
ontRenderer.h
807daf7df615b60ce6fc41355aabe3aa353cebab 18-Jan-2011 Romain Guy <romainguy@google.com> Add support for skew()

Change-Id: Ia3a9a867f74fd78b61f75179e3788fdc2f0cacd0
isplayListRenderer.cpp
isplayListRenderer.h
atrix.cpp
atrix.h
penGLRenderer.cpp
penGLRenderer.h
7444da512680df0c52af39ea521e35adbe0c167d 17-Jan-2011 Romain Guy <romainguy@google.com> Yet another fix for 9patch rendering.
Bug #3362133

Change-Id: Ia6521d31a8c208a2ad2506a23b6a01e5e442ad86
atch.cpp
atch.h
fb13abd800cd610c7f46815848545feff83e5748 17-Jan-2011 Romain Guy <romainguy@google.com> Fix 9patch rendering in ExpandableListView.

Change-Id: I60843d61a40b0cb7dd09923cb4489a5a76f20486
ebug.h
ayerRenderer.cpp
atch.cpp
atch.h
f219da5e32e85deb442468ee9a63bb28eb198557 16-Jan-2011 Romain Guy <romainguy@google.com> Don't blend transparent pixels when rendering layers.

With this change, the rendere keeps track of what regions are rendered into
and generates a mesh that matches these regions exactly. The mesh is used
to composite the layer on screen.

Change-Id: I1f342576b9134fb29caff7fb8f4c1da179fe956d
ayer.h
ayerRenderer.cpp
ayerRenderer.h
penGLRenderer.cpp
penGLRenderer.h
napshot.h
1bd1bad0b4a75e633c5edbe802bf6fb4dd765161 15-Jan-2011 Romain Guy <romainguy@google.com> Preapre region tracking in layers

Change-Id: Ied1fa0d36c99ef4e33cb8fde7e3106a793db3a4c
penGLRenderer.cpp
penGLRenderer.h
43ccf4663c822ddd435b7683cc05221f6169c6c3 15-Jan-2011 Romain Guy <romainguy@google.com> Don't crash Launcher on config change.

Change-Id: Ibbbd7146c5ff69e9639b433f39041053654d808c
isplayListRenderer.cpp
isplayListRenderer.h
esourceCache.cpp
kiaShader.cpp
kiaShader.h
1f1fcb70b6e43a6b4df0dbab75a34429d4744624 15-Jan-2011 Romain Guy <romainguy@google.com> Don't delete objects twice...

Change-Id: Ibc67aed098c9300cf45eb46abda1938c418808c3
isplayListRenderer.h
24c00216687ac87fe531dc4d4168ac0c0ca04ea6 15-Jan-2011 Romain Guy <romainguy@google.com> Copy shaders when recording them in display lists.

Change-Id: I3f22dd35f1e31c9e5102955d76548098b7b0cd8d
isplayListRenderer.cpp
isplayListRenderer.h
kiaShader.cpp
kiaShader.h
f5106847fc962d57c7d5c586099b4a382f3e1c3d 14-Jan-2011 Romain Guy <romainguy@google.com> Don't add clipped rects to layer regions.
Bug #3350208

Change-Id: I9266862f1d4d57b4598852e8dfa202b5f5099cce
penGLRenderer.cpp
1e3a431d07cc0a307c6441e9ae1b17d3bf42323e 14-Jan-2011 Romain Guy <romainguy@google.com> Remove debug code

Change-Id: Idbc54d16adb4d86185d7196ea0297b5019d14ae4
penGLRenderer.cpp
ffac7fc5042296a459d0f5a450dbfe20917093dc 14-Jan-2011 Romain Guy <romainguy@google.com> Add debug logs for display lists.

Change-Id: I7bae8fd96e9eccb51f29f73e4069b4d3e6bdbdd7
ebug.h
isplayListRenderer.cpp
isplayListRenderer.h
penGLDebugRenderer.cpp
penGLDebugRenderer.h
penGLRenderer.cpp
penGLRenderer.h
ada830f639591b99c3e40de22b07296c7932a33f 13-Jan-2011 Romain Guy <romainguy@google.com> Cleanup implementation of hardware layers.

The new implementation relies on OpenGLRenderer's existing layer
code instead of duplicating it. The new code is much cleaner, with
simpler and better APIs and allows tracking of drawn regions inside
layers. Region tracking is not yet enabled but this will be done
in a future CL.

Change-Id: Ie826121a2227de8252c77b992a61218defea5143
aches.cpp
aches.h
isplayListRenderer.cpp
isplayListRenderer.h
ayerRenderer.cpp
ayerRenderer.h
penGLDebugRenderer.cpp
penGLDebugRenderer.h
penGLRenderer.cpp
penGLRenderer.h
c038ea358aadca082198f3effc550d33135bf426 13-Jan-2011 Romain Guy <romainguy@google.com> Reenable region composition pipeline for layers
Bug #3341848

It works this time!

Change-Id: I0d371d8b2c75c67d4ce5009ddb990fe5e55a0a27
penGLRenderer.cpp
roperties.h
1fc883b271707c4206ae20cc9a935d7bd4a7485e 12-Jan-2011 Romain Guy <romainguy@google.com> Add logging to the new layers API.

Change-Id: I78b9426eb17de3e775aca9fafe4a50bd9c0785c4
ebug.h
ayerRenderer.cpp
ayerRenderer.h
57066eb64c9a190d1afc87bb060bbb2d31e5b86c 12-Jan-2011 Romain Guy <romainguy@google.com> Cleanup GL objects on the correct thread.

Change-Id: Iddfea6e08a6591a4fab147151098ef27005f373d
aches.cpp
aches.h
ayerRenderer.cpp
ayerRenderer.h
35f24545e56caaff067f7dcd550ad4073efcface 12-Jan-2011 Romain Guy <romainguy@google.com> Disable the region compositing pipeline for layers.

This composition mode is affecting Gmail in a bad way. Disabling until
I can figure out the problem.

Change-Id: I00e657ea2d05fc7b4a606242d19dc84dd88c1e35
roperties.h
a9d0711392689a94b9f76eb0c16d0718c005603e 12-Jan-2011 Romain Guy <romainguy@google.com> Don't break the build!

Change-Id: I42f68c7b023c03adeedc4e979e5f4705188ee9f4
ayerRenderer.cpp
6c319ca1275c8db892c39b48fc54864c949f9171 11-Jan-2011 Romain Guy <romainguy@google.com> Better backend for hardware layers.

With this new backend, a hardware layer is only recreated when
its associated view is udpated. This offers fast composition
in GL and fast update of the layer in GL as well.

Change-Id: I97c43a612f5955c6bf1c192c8ca4af10fdf1d076
ndroid.mk
isplayListRenderer.cpp
isplayListRenderer.h
ayerRenderer.cpp
ayerRenderer.h
penGLRenderer.cpp
penGLRenderer.h
32228288a957f3823df92365bc709ad6f42b012e 12-Jan-2011 Romain Guy <romainguy@google.com> Solve translucency issue when drawing paths.

Change-Id: I68ae0e2ccddaca2f76b5b2dd3e3cf1277fddaad6
athCache.cpp
7230a74e9a36dfc6c4346c14e325bf07cd05b380 11-Jan-2011 Romain Guy <romainguy@google.com> Composite layers as regions.

This change detects what area of a layer was drawn into and generates a mesh
to match this area exactly. This can be used to avoid blending empty pixels
when the layer is composited.
This change also adds proper layers support to lines rendering and implements
layers composition in a more readable way.

Change-Id: I4a5588b98b19bd66891ebdc39631b193c5e31999
aches.cpp
penGLRenderer.cpp
roperties.h
a07105b7d2a27e6d69407bf96ddb773bddb5e553 11-Jan-2011 Romain Guy <romainguy@google.com> Better logging of out of memory errors in OpenGLRenderer.

Change-Id: I6b72a084340d8d4b6e0b0a100ed4314d09d441ef
penGLRenderer.cpp
171c592f0b7066acf279863c8a52ddabea49d3db 06-Jan-2011 Romain Guy <romainguy@google.com> New layers API for Views.

This API can be used to back a view and its children with either a
software layer (bitmap) or hardware layer (FBO). Layers have
various usages, including color filtering and performance
improvements during animations.

Change-Id: Ifc3bea847918042730fc5a8c2d4206dd6c9420a3
ayer.h
ayerCache.cpp
penGLRenderer.cpp
5977baa1fa24125c148a72699b53e62abaf08960 06-Jan-2011 Chet Haase <chet@google.com> Reuse of native display list objects

Change-Id: Ia4553e23930ad20e56c11faa7809be788a1ad4bb
isplayListRenderer.cpp
isplayListRenderer.h
325a0f969c1d803d7e39a9caee8cc3d400350659 06-Jan-2011 Romain Guy <romainguy@google.com> The font cache should respect the fake bold flag.

Change-Id: Ie4edc9ba46610edde831b55e769944e9a19bdcb5
ontRenderer.cpp
ontRenderer.h
f890fab5a6715548e520a6f010a3bfe7607ce56e 20-Dec-2010 Patrick Dubroy <dubroy@google.com> Ensure bitmaps aren't freed while referenced from a display list

Also removes the reference queue finalizers. They aren't necessary
anymore now that Bitmaps are allocated in the heap.
esourceCache.cpp
b146b1214ef6e4fc75d98779b22434335764cfdb 16-Dec-2010 Romain Guy <romainguy@google.com> Fix text shadow rendering issue.

Change-Id: Ic9eb0d38ad684d2f2c95a4f586f865db911cb872
penGLRenderer.cpp
8d0d4783a0206c5884bf0b958d181f450ba5207d 15-Dec-2010 Romain Guy <romainguy@google.com> Cleanup OpenGLRenderer::drawLines()

Change-Id: I3545a616e964335897c6e4148c431a07a2ce2a8b
penGLRenderer.cpp
penGLRenderer.h
982b71bf4713d57b0fdb9acaaf9f9465a817aacb 15-Dec-2010 Patrick Dubroy <dubroy@google.com> Merge "Allocate bitmap backing buffers in the Java heap."
e4ac2d6b5723c95e648c489b187ddde449452c13 01-Dec-2010 Patrick Dubroy <dubroy@google.com> Allocate bitmap backing buffers in the Java heap.

Change-Id: I60f6ccff13357c1c518e9d56b02fe0171637edd1
esourceCache.cpp
86568198f2c83d4ce5c4cd692eda074ba9de9ed2 15-Dec-2010 Romain Guy <romainguy@google.com> Continue cleanup refactoring in OpenGLRenderer.

Methods that still need refactoring:
- drawLines
- composeLayerRegion

Change-Id: If546641adf598d49c330988803667264fda50ac2
penGLRenderer.cpp
penGLRenderer.h
fa7952dbb86a8aff0c90418aa77dddee3802c23a 14-Dec-2010 Romain Guy <romainguy@google.com> Colors are in the [0..1] range, not [0..255]

This fixes rendering in YouTube and other applications.

Change-Id: Ib5f3df632cde97374113ed42f895f136b2796373
penGLRenderer.cpp
5536841e5452172e7772d84ad5f4a2fc7059c9dd 14-Dec-2010 Romain Guy <romainguy@google.com> OpenGLRenderer would not render colors < ALPHA_THRESHOLD
Bug #3282805

This bug was introduced with a previous refactoring. This also fixes
issues with setting the alpha when drawing bitmaps.

Change-Id: Id47641d26a4536c7e540041f92243bf6db9fc96d
penGLRenderer.cpp
penGLRenderer.h
70ca14e08ae197547ac412e8a1210e1ebdfb2eb1 14-Dec-2010 Romain Guy <romainguy@google.com> Refactor OpenGLRenderer to simplify OpenGL drawing code.

This is the first step of the refactoring:
- drawColorRect
- drawTextureMesh

Remaining methods to refactor:
- setupTextureAlpha8
- drawPath
- setupShadow
- drawText
- drawLines
- composeLayerRegion

Change-Id: I0fced6a05b6b6eee10ee7cef0c3fbdaa6cefab20
penGLRenderer.cpp
penGLRenderer.h
rogramCache.h
32963c393a804db2cd86c24443c2f1c6eee6064b 10-Dec-2010 Romain Guy <romainguy@google.com> Ignore empty layers.

Change-Id: Ib2f99cdab654881fe079306e27d87c5ef9535700
penGLRenderer.cpp
25dc3a7dbac2f90f5144035e9c8ed99c09cc3132 10-Dec-2010 Romain Guy <romainguy@google.com> Correctly compare strings in UTF-8 instead of UTF-16
Bug #3272858

Change-Id: Idacd5d7c2c052b4834a8ddb5906ab32b3f548f73
atchCache.h
roperties.h
extDropShadowCache.cpp
extDropShadowCache.h
af636ebf5feb2837683fbfe965040cb706b32ec1 10-Dec-2010 Romain Guy <romainguy@google.com> Don't set the invisible flag when saving an empty layer.
Bug #3270371

Change-Id: I65e85671c2fb70d74553c91213e5e759e0ac64ee
penGLRenderer.cpp
napshot.h
a957eea78557cb47a91d44d9e6ee641c58cf1c07 09-Dec-2010 Romain Guy <romainguy@google.com> New, better line drawing implementation.
Bug #3207544
Bug #3225875

Change-Id: Ibdd1dfc64e01625d5c441f39eb0aa3ee647f6ff5
aches.h
ine.h
penGLRenderer.cpp
ector.h
67f27952c1bcb2230beef9b5ca0bf42edad436a9 08-Dec-2010 Romain Guy <romainguy@google.com> Correctly release the OpenGL Canvas on EGL error.

Change-Id: Ib31fd8445f7ce5f7aa7e0205de0e7db80d024fc2
rogram.cpp
rogram.h
rogramCache.cpp
8ab4079ca27e36e5c584495bcd71b573598ac021 07-Dec-2010 Romain Guy <romainguy@google.com> Fix 9patch rendering
Bug #3253396

Some quads were incorrectly assumed to be degenerate.

Change-Id: I9155699edc3424afe9d5a131886bb9966d46b109
penGLRenderer.cpp
atch.cpp
atch.h
3a3fa1be9ab8e11edc660ecb35ae21ae0b5c8cc2 07-Dec-2010 Romain Guy <romainguy@google.com> Draw text decorations correctly.

Change-Id: I237c0ca8bfe9f233e62476e80f72bcea4359398e
penGLRenderer.cpp
6620c6d413f972819fada92b574f0fa9e96d36c1 07-Dec-2010 Romain Guy <romainguy@google.com> Correctly render text when coordinates are not integers.
Bug #3225632

Change-Id: If09759e6e95eb2885362ab3ba088cf5aae64c7bf
atrix.cpp
atrix.h
penGLRenderer.cpp
penGLRenderer.h
a5ef39a21683189e5906c9f252b997f0508e350d 04-Dec-2010 Romain Guy <romainguy@android.com> Don't render degenerate triangles in 9patches.
Bug #3251983

Change-Id: Ib0b38a7b8111542372f4c4c106b6321c26fe4ad4
ebug.h
penGLRenderer.cpp
penGLRenderer.h
atch.cpp
atch.h
roperties.h
bd41a11078e94b755c8b6f78e1e4242c715fccd4 03-Dec-2010 Romain Guy <romainguy@google.com> Correctly index transparent quads when generating 9patch meshes.
Bug #3250026

Change-Id: Id7e051e9ed81f6b4e7748756503d8055ac7d531a
atch.cpp
5e3af5fcba360916f38753bd505e47040fc87729 02-Dec-2010 Romain Guy <romainguy@google.com> Rescale ColorMatrix' vector to the [0..1] range
Bug #3246354

Change-Id: Idea7a1e6633c71119628315d65315076bc445eb0
kiaColorFilter.cpp
6f72bebe92a4db7b5dc83f4ac5b5fd02e3b4e2cd 30-Nov-2010 Romain Guy <romainguy@google.com> Update 9patch structure when rendering with different divs/colors.
Bug #3221488

Change-Id: Ifc9e42a991d630feadc9e8032322f37504d09d6d
ine.h
penGLRenderer.cpp
atch.cpp
atch.h
atchCache.cpp
atchCache.h
5cafc52fb10bd05c587a7dec41c953c0722f302a 23-Nov-2010 Chet Haase <chet@google.com> Fix hang in native bitmap recycling due to nested mutex locks

Change-Id: Ic37d5408ddb3f68aba6520fb0c78ffde91dfbe62
esourceCache.cpp
esourceCache.h
e7d2295c06ef9b9df6336cbff23007a13fb3f6e4 12-Nov-2010 Chet Haase <chet@google.com> make ResourceCache for display lists thread-safe

Change-Id: I41885b4ae249d7d7c000bab17bf32340ba85ab3a
esourceCache.cpp
esourceCache.h
fe48f65922d4a3cc4aefe058cee5acec51504a20 12-Nov-2010 Romain Guy <romainguy@google.com> Free resources only from the GL context thread.
Bug #3179882

Resources were freed following garbage collections on a worker thread.
This worker thread had no EGL context, which would cause the renderer
to incorrectly assume that the memory was liberated.

Change-Id: Ifdb51f94ddf42641e8654522787bfac532976c7c
aches.cpp
aches.h
isplayListRenderer.cpp
radientCache.cpp
radientCache.h
penGLRenderer.cpp
athCache.cpp
athCache.h
esourceCache.cpp
extureCache.cpp
extureCache.h
tils/GenerationCache.h
01d065795794fa56be660d6346e4830eb7e90a41 11-Nov-2010 Romain Guy <romainguy@google.com> Reduce number of GL calls when drawing with shaders.

Change-Id: I27aca9f6d381d5c7e363d90a93225d185f2ff4e3
penGLRenderer.cpp
kiaShader.cpp
kiaShader.h
e190aa69756aecfaffabdd4c6d32cb6b3220d842 11-Nov-2010 Romain Guy <romainguy@google.com> Add new runtime debug flags.

Change-Id: I07955de166a89b5053c6c13f250bb3e2936ca86e
aches.cpp
aches.h
penGLRenderer.cpp
athCache.cpp
athCache.h
roperties.h
extureCache.cpp
extureCache.h
c15008e72ec00ca20a271c3006dac649fd07533b 10-Nov-2010 Romain Guy <romainguy@google.com> Move all debug flags in a single place.

This change also adds a new memory usage flag. When turned on, the
following is printed after every frame:

D/OpenGLRenderer( 3723): Current memory usage / total memory usage (bytes):
D/OpenGLRenderer( 3723): TextureCache 3766680 / 20971520
D/OpenGLRenderer( 3723): LayerCache 3538944 / 8388608
D/OpenGLRenderer( 3723): GradientCache 135168 / 524288
D/OpenGLRenderer( 3723): PathCache 41180 / 4194304
D/OpenGLRenderer( 3723): TextDropShadowCache 0 / 2097152
D/OpenGLRenderer( 3723): FontRenderer 0 262144 / 262144
D/OpenGLRenderer( 3723): FontRenderer 1 262144 / 262144
D/OpenGLRenderer( 3723): FontRenderer 2 262144 / 262144
D/OpenGLRenderer( 3723): Other:
D/OpenGLRenderer( 3723): FboCache 2 / 12
D/OpenGLRenderer( 3723): PatchCache 31 / 512
D/OpenGLRenderer( 3723): Total memory usage:
D/OpenGLRenderer( 3723): 8268404 bytes, 7.89 MB

This should help tracking possibe memory issues.

Change-Id: I83f483ca1d2dbef904829bce368e33fe5503e8d6
aches.cpp
aches.h
ebug.h
ontRenderer.h
ammaFontRenderer.h
ayerCache.h
penGLRenderer.cpp
penGLRenderer.h
atchCache.h
athCache.h
rogramCache.cpp
rogramCache.h
extureCache.h
f70a7e34953438dd70573dbb6fd3dd34a1bce831 10-Nov-2010 Romain Guy <romainguy@google.com> Fix possible crash when texture is NULL in the drop shadow cache.

Change-Id: I2142c55dbcfebcdf013a7f4ae04b266a60f5ce8a
extDropShadowCache.cpp
9e10841c27d973b930e1b49a099c69d866659505 09-Nov-2010 Romain Guy <romainguy@google.com> Correctly remove unused paths from the cache.

Change-Id: I41d9334dcd9871634037344ab49bf69383498161
isplayListRenderer.cpp
athCache.cpp
athCache.h
extureCache.cpp
extureCache.h
0d200833fdc53f9796698f97c18cefc4a1b82df2 05-Nov-2010 Chet Haase <chet@google.com> Fix GL rendering of translucent surfaces

GL renderer was not initializing scissor correctly for translucent
surfaces, resulting in invisible window backgrounds in some cases
like fading popup windows

Change-Id: I87a964986e1ba2c4f59708c8892c5fa71903e6fc
penGLRenderer.cpp
0fe478ea04720a57ef3919dbc23711bc7eba517f 08-Nov-2010 Romain Guy <romainguy@google.com> Support nested display lists.

Change-Id: I3815a2832fc0f722c668ba8f51c5f177edb77c94
isplayListRenderer.cpp
isplayListRenderer.h
penGLDebugRenderer.cpp
penGLDebugRenderer.h
penGLRenderer.cpp
penGLRenderer.h
7f78b0c3ae6222b39f6240524390de9764f21764 04-Nov-2010 Romain Guy <romainguy@google.com> Lines would not set the scissor before drawing.

Lines were not drawing in Calendar because they were getting clipped
by the previous clip rectangle. This change simply updates the scissor
as needed. This change also reduces the number of state changes in GL.

Change-Id: I41ab13dca3a33cfa6d1a44371c48852ab418b04e
penGLRenderer.cpp
penGLRenderer.h
1041aded2df45094c36831028245fb7c5e9b67b7 04-Nov-2010 Romain Guy <romainguy@google.com> Fix possible rendering issue when drawing a path.

Change-Id: I25f2e609589f0dd9294bcf7930de6398c0d7e377
athCache.cpp
e45362cad94c014d8b3765cb102db0f8c0d92500 04-Nov-2010 Romain Guy <romainguy@google.com> Fix rendering bug with saveLayerAlpha/drawColor.

drawColor() was not calling quickReject because it fills the clip region
and thus always passes the test. However, quickReject also checks whether
the current layer is invisible. drawColor() now performs the same check
and avoid drawing inside an invisible layer.

Change-Id: I63d0e9a8a9c0fba774f0f5c3870d58e6ed96fbd1
penGLRenderer.cpp
5ec9924d24495822b589f1a17996655d66273b30 04-Nov-2010 Romain Guy <romainguy@google.com> Fix rendering issue with layers.

Change-Id: I1d511ab2707000762a942d32c300a9944ab38603
penGLRenderer.cpp
5b3b35296e8b2c8d3f07d32bb645d5414db41a1d 28-Oct-2010 Romain Guy <romainguy@google.com> 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
ndroid.mk
aches.cpp
aches.h
isplayListRenderer.cpp
isplayListRenderer.h
xtensions.h
boCache.h
ontRenderer.cpp
ontRenderer.h
ammaFontRenderer.h
radientCache.h
ayer.h
ayerCache.h
ine.h
atrix.cpp
atrix.h
penGLDebugRenderer.h
penGLRenderer.cpp
penGLRenderer.h
atch.cpp
atch.h
atchCache.h
athCache.h
rogram.cpp
rogram.h
rogramCache.h
roperties.h
ect.h
esourceCache.h
kiaColorFilter.h
kiaShader.h
napshot.h
extDropShadowCache.h
exture.h
extureCache.cpp
extureCache.h
ertex.h
tils/Compare.h
tils/GenerationCache.h
tils/SortedList.h
tils/SortedListImpl.h
f887594d0e83542d8b374d294b62a1bff606478f 27-Oct-2010 Romain Guy <romainguy@google.com> Merge "Remove unnecessary GL calls."
746b7401ceb86b5f2805f8c0d3b39ac739152015 27-Oct-2010 Romain Guy <romainguy@google.com> Remove unnecessary GL calls.

This change batches calls to glScissor() and removes extra GL
queries and glActiveTexture() calls.

Change-Id: I1cd079d314f87cd9c088f95c8d4909c2f860f6aa
aches.cpp
aches.h
penGLRenderer.cpp
penGLRenderer.h
ad93c2bb63dfc813b2eefa1043aa63afbddce655 23-Oct-2010 Chet Haase <chet@google.com> Optimizing ColorFilter in display lists

Change-Id: Ie4d5e5b0bc45e0ce47bba144049303c270762e54
isplayListRenderer.cpp
isplayListRenderer.h
esourceCache.cpp
esourceCache.h
kiaColorFilter.cpp
kiaColorFilter.h
dcaff67a807de225bc7e5b6dccc98fa15b329512 26-Oct-2010 Chet Haase <chet@google.com> Merge "DisplayList optimizations and fixes."
d98aa2de9ab18e09c2be1997f41212740f51f6e6 26-Oct-2010 Chet Haase <chet@google.com> DisplayList optimizations and fixes.

We now use a copy of SkPaint objects to avoid having it changed from under us.
We reuse copies that have not changed. We also copy the SkMatrix every time to
avoid the same problem.

Change-Id: If3fd80698f2d43ea16d23302063e0fd8d0549027
isplayListRenderer.cpp
isplayListRenderer.h
esourceCache.cpp
esourceCache.h
extureCache.cpp
extureCache.h
9bca4793a33d2714b306d69ceb870925a588fe71 26-Oct-2010 Romain Guy <romainguy@google.com> Small cleanup.

Removes unnecessary forward class declaration, make Caches::currentBuffer
private instead of public.

Change-Id: Idba6325c8c602d89239e667cb8ec87e7943f8e75
aches.cpp
aches.h
atch.cpp
3e3ba155fc0ef7a7f40f06762240d9ba22f62b19 26-Oct-2010 Romain Guy <romainguy@google.com> Don't change texture unit when not needed.

Change-Id: Ifa84426d234f2122402cb13533cb5964f1ce95ec
penGLRenderer.cpp
8164c2d338781c3a3c4a443941070dca5d88f2a7 26-Oct-2010 Romain Guy <romainguy@google.com> Don't change textures wrap modes on every draw.

Change-Id: If6d3f313778cc7f3e803a063338539c8b3e165e3
penGLRenderer.cpp
penGLRenderer.h
kiaShader.cpp
kiaShader.h
exture.h
715a89ebbf3f8c7a4621fc3a1396e6c1539bea28 24-Oct-2010 Chet Haase <chet@google.com> Merge "Fix Caches singleton to avoid resource leaks"
dd78ccacff83f0714ad90be98b58ad85f5d08c66 23-Oct-2010 Chet Haase <chet@google.com> 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
ndroid.mk
aches.cpp
aches.h
ae88e5e8e9cb6c9539314c4360c5b20f8ec1fefc 23-Oct-2010 Romain Guy <romainguy@android.com> 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
penGLRenderer.cpp
ect.h
58ae6db4ff8a9d0910e1183ee8be9a038a2712a6 22-Oct-2010 Romain Guy <romainguy@android.com> Don't use two different variables to refer to mSnapshot.

Change-Id: Ie4a0616d2fe0b040ac14b734a9ddf77bf1f35b0c
penGLRenderer.cpp
ae517591d96be39f5f18a1716c856ade13a8bcc7 22-Oct-2010 Romain Guy <romainguy@android.com> Don't perform glCopyTextImage with coordinates outside the buffer.

Bug #3122179

Change-Id: I91ed397e9e553a8eeb69d82d0c5b1e49a3cdd5ff
penGLRenderer.cpp
5c13d89c1332fcc499379b9064b891187b75ca32 08-Oct-2010 Chet Haase <chet@google.com> Optimizing display lists by referencing pointers to resources instead of copying them

Change-Id: I81ad3551d74aa1e5bb64d69e33d2eb29a6c1eb6a
ndroid.mk
aches.h
isplayListRenderer.cpp
isplayListRenderer.h
penGLDebugRenderer.cpp
penGLDebugRenderer.h
penGLRenderer.cpp
penGLRenderer.h
esourceCache.cpp
esourceCache.h
kiaShader.h
50c0f093d942a59d4e01b2c76d26c0e9d6ed796c 19-Oct-2010 Romain Guy <romainguy@google.com> Solve rendering issue with embedded WebViews.
Bug #3094017

The blending mode was not appropriately set after WebView released the
context.

Change-Id: Ib36d48e82c12f6d131dd5a0bcde9106925b8da63
penGLRenderer.cpp
2665b85b2bd08faabf7c520a622a0e4d3465245f 19-Oct-2010 Romain Guy <romainguy@google.com> Small cleanup.

Change-Id: I0e5b9154a2d93af793d62f462d68cb7c6c3f6d75
atch.cpp
atch.h
athCache.h
tils/Compare.h
03750a067e818ca7fbd0f590e2ff6a8fded21e6c 18-Oct-2010 Romain Guy <romainguy@google.com> Use VBOs to render most geometries.

Change-Id: I4360dc4fe5693ab425450c107282b2c22db4dca7
ndroid.mk
aches.h
ine.h
atrix.cpp
penGLRenderer.cpp
penGLRenderer.h
atch.cpp
atch.h
atchCache.cpp
athCache.h
tils/Compare.h
054dc1840941665e32036f9523df51720ad069c8 16-Oct-2010 Romain Guy <romainguy@google.com> Don't draw entirely transparent 9patch meshes.

Change-Id: If3e62e18b8e0dbde8a22f8ede2889b86500a4dc2
ontRenderer.cpp
penGLRenderer.cpp
atchCache.cpp
9d13fe25f4f10b25776b1dc5c858f9ebb0b28b30 16-Oct-2010 Romain Guy <romainguy@google.com> Fix text rendering artifact.

Change-Id: I50f47207846e4208d363dde4e8f5f1a0f23d2d75
penGLRenderer.cpp
e5ebcb0107a939395e03592fd44c746cd09e311d 15-Oct-2010 Romain Guy <romainguy@google.com> Fix clipping issue in StackView.

Change-Id: I7ec28f25c3993a2bd7ef6399ba1923839d239905
atrix.cpp
penGLRenderer.cpp
d2a1ff003b9b1212c9ab4b5f679b5b097720a359 14-Oct-2010 Romain Guy <romainguy@google.com> 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
penGLRenderer.cpp
napshot.h
4afdf666fdb034834c48445570ed9d6f4133fc71 14-Oct-2010 Romain Guy <romainguy@android.com> Color filters were ignored by the program cache fast path.

Change-Id: I08f2f02d356234a674be778d088e0558fd49c849
rogramCache.cpp
rogramCache.h
93d2361c6d294c390cb5c4a13bd1b88dcd465fd7 14-Oct-2010 Romain Guy <romainguy@google.com> Fix layer rendering glitch.

Change-Id: If2f987fe5526fc88743ca3e91edde4f8232ff658
penGLRenderer.cpp
ect.h
909cbaf8f92d69f507bbdba9e5aa960d1e6c7a1f 14-Oct-2010 Romain Guy <romainguy@google.com> Don't draw TextView's alpha layers when not needed.

Change-Id: Iedf42cbc62d727f18500c78fcccf2d081a761fec
penGLRenderer.cpp
5d794412e3e429e47404395badcd11b0b8639e8b 14-Oct-2010 Romain Guy <romainguy@google.com> Small potential performance improvement for fonts rendering.

Change-Id: If59c1e7803b84340fbc8b31ce6171ef0e5dc6189
ontRenderer.cpp
99bcdc52dcb365ed7d8cfa13540fb33fbcbbac9d 14-Oct-2010 Romain Guy <romainguy@google.com> Return identity matrix when rendering in an FBO.

Change-Id: I57438e745b30c8cfe16c269f3cafcd719049d705
penGLRenderer.cpp
penGLRenderer.h
41030da16856c8869e1e51d4a0405432fa96614e 13-Oct-2010 Romain Guy <romainguy@google.com> Add a getNativeMatrix() API.

This API can be used by WebView to apply the appropriate transform
on its rendering.

Change-Id: I79aa39a29805f462fb08226370328815e74bdc52
penGLRenderer.cpp
penGLRenderer.h
eb07af687319a0f52c219c3c0c1b73162fce9d04 13-Oct-2010 Romain Guy <romainguy@google.com> 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
penGLRenderer.cpp
e91080581f467d55913a8c5ab53dedc2dab2e5b6 13-Oct-2010 Romain Guy <romainguy@google.com> Tweak layers caching for better performance in Launcher.

Change-Id: Ia6e67699d98f69c8a93385b3ecbdd814c7b16921
ayerCache.cpp
ayerCache.h
penGLRenderer.cpp
roperties.h
1f114a55b5eaaa81bd302c9ad851362512b61e2f 13-Oct-2010 Romain Guy <romainguy@google.com> Remove logging.

Change-Id: Ibcb11d704653d8875e22629ea39e4ee2ebce3c22
atchCache.h
4bb942083a0d4db746adf95349108dd8ef842e32 13-Oct-2010 Romain Guy <romainguy@google.com> Optimize 9patch rendering.

This change detects empty quads in 9patches and removes them from
the mesh to avoid unnecessary blending.

Change-Id: I4500566fb4cb6845d64dcb59b522c0be7a0ec704
isplayListRenderer.cpp
isplayListRenderer.h
atrix.cpp
penGLDebugRenderer.cpp
penGLDebugRenderer.h
penGLRenderer.cpp
penGLRenderer.h
atch.cpp
atch.h
atchCache.cpp
atchCache.h
athCache.h
tils/Compare.h
9db91243c5ace4421091557b76a0b1cbd2312fec 12-Oct-2010 Romain Guy <romainguy@google.com> Simplify black texture fragment shader.

Change-Id: If2d43f92f4c98ec128692761a670b0f31207a3c0
rogramCache.cpp
c00972bb162779e52d1b0d8f662a9f6033bf9182 12-Oct-2010 Romain Guy <romainguy@google.com> Don't recreate a new texture every time we draw a layer.

Change-Id: I3c28aff5acffc7c6f1ac74805869725426c62d28
penGLRenderer.cpp
dbc26d2ba13f80a7590c57de2d80530d96832969 12-Oct-2010 Romain Guy <romainguy@google.com> Don't draw fully transparent views/primitives.

Change-Id: Icd7d8ef1f57b51a24faf32f7004125e6300d4fdc
penGLRenderer.cpp
rogramCache.h
napshot.h
707b2f78ccaa09965d7e030fda3a883ce9b75ea8 12-Oct-2010 Romain Guy <romainguy@google.com> Optimize GLSL shaders.

Change-Id: I9a5e01bced63d8da0c61330a543a2b805388a59d
penGLRenderer.cpp
rogram.cpp
rogram.h
rogramCache.cpp
rogramCache.h
7537f856f9076a84db04d8de447f6527b67166fd 11-Oct-2010 Romain Guy <romainguy@google.com> Improve performance of linear gradients.

Change-Id: If1caee31fc045dea13a4c5c10f25f2ffd325c4f8
rogramCache.cpp
21b028a44f3e0bd9b0f0432b8b92c45f661d22a4 09-Oct-2010 Romain Guy <romainguy@google.com> Move GenerationCache to the utils directory.

Change-Id: I210ffa8f1d76a102bb7d971c649c20a74d03fbe6
enerationCache.h
radientCache.h
atchCache.cpp
athCache.h
extDropShadowCache.h
extureCache.h
tils/GenerationCache.h
2728f961614a385df1f056fc24803a9f65c90fab 09-Oct-2010 Romain Guy <romainguy@google.com> Don't update 9patches on every frame.

Change-Id: I7ffb2365f83e0453e7d0a0cdcb3fc9308b305238
penGLRenderer.cpp
atch.h
atchCache.cpp
atchCache.h
roperties.h
8550c4c7b5952b7a4e1e0ede95c9492d03099a13 09-Oct-2010 Romain Guy <romainguy@google.com> Better cache for layers, reduce memory usage and increase framerate.

Change-Id: I5ff864a361db4791bd5ff6be716f7ce692ef572d
ndroid.mk
enerationCache.h
ayer.h
ayerCache.cpp
ayerCache.h
penGLRenderer.cpp
roperties.h
tils/SortedList.h
tils/SortedListImpl.cpp
tils/SortedListImpl.h
14830948d02f768c41b97b7a8d15e1b3cab78267 08-Oct-2010 Romain Guy <romainguy@google.com> Add 3D transforms support to all gradients.

Change-Id: I61409edd00dab3a11684a3f5e4f7df0afc734758
rogramCache.cpp
kiaShader.cpp
kiaShader.h
6b7bd24659fb175fe1f0e97c86c18969918b496a 07-Oct-2010 Romain Guy <romainguy@google.com> Don't clear the framebuffer when not needed.
isplayListRenderer.cpp
isplayListRenderer.h
penGLDebugRenderer.cpp
penGLDebugRenderer.h
penGLRenderer.cpp
penGLRenderer.h
e3095e0c1e2a4a4f34f741aa386eae56536ca5aa 07-Oct-2010 Romain Guy <romainguy@google.com> 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
rogramCache.cpp
kiaShader.cpp
kiaShader.h
eb99356a0548684a501766e6a524529ab93304c8 06-Oct-2010 Romain Guy <romainguy@google.com> Optimize saveLayer() when the clip flag is set.

This speeds up applications, especially Launcher.
boCache.cpp
boCache.h
enerationCache.h
ayer.h
ayerCache.cpp
ayerCache.h
penGLRenderer.cpp
penGLRenderer.h
roperties.h
napshot.h
7adaf3d1aa18c7e521f7154e545fe52d329763c3 05-Oct-2010 Romain Guy <romainguy@google.com> Add support for paletted textures.

Change-Id: I36e6069bd58f78c609cdd1f3e4560c98f128f48e
extureCache.cpp
extureCache.h
bdb801ca993bcccbf2a4c2401d1720c3fa523777 05-Oct-2010 Romain Guy <romainguy@google.com> Remove logs to reduce logcat spam.

Change-Id: I5fc295b05b5d82bb86827b88e94dd51e8bcdc7d3
penGLRenderer.cpp
11fd654a90359043e17ac78c1a3d6578c38b5c42 05-Oct-2010 Romain Guy <romainguy@google.com> Reorder logs.

Change-Id: I4adbd53662e1f509c860898c8ff9d19eaabd6d5b
aches.h
3b3e457c270a4bc5fe3047e815b5867d99b36f8a 04-Oct-2010 Romain Guy <romainguy@google.com> Snap the clip rectangle to pixel boundaries.

Change-Id: Iac2765303552f385995fe46e219af456e0501da7
napshot.h
e8cb9c14309b0f01c0159efdf9a7198f44a62642 04-Oct-2010 Romain Guy <romainguy@google.com> Apply bilinear filtering on text only when necessary.

Change-Id: Ic903f4b5d30e9c92528c6291941896efe4729ee3
ontRenderer.cpp
ontRenderer.h
atrix.cpp
atrix.h
penGLRenderer.cpp
1de1083e98cde9bdd5e8539dbc54fdea6531906e 03-Oct-2010 Romain Guy <romainguy@android.com> 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
ontRenderer.cpp
7975fb6d12cb1eb96b75e3a563627cd4c4081bd6 02-Oct-2010 Romain Guy <romainguy@google.com> Apply bilinear filtering to text.

Change-Id: I2c81ad657ee2a11a2139e0b11ae3749db54c0749
isplayListRenderer.cpp
isplayListRenderer.h
ontRenderer.cpp
ontRenderer.h
0bb5667b4ef91fefd0500fae0186789d15d54e0e 01-Oct-2010 Romain Guy <romainguy@android.com> 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
ayer.h
ayerCache.cpp
penGLRenderer.cpp
d79991277043d6bdbd90bb63fd8aff73ef9e06a5 01-Oct-2010 Romain Guy <romainguy@google.com> Make simple paths made of lines work.

Bug #3041098

Change-Id: Ife9c3f01ded10e2bb35b1cdf1a54734d8347fee4
athCache.cpp
b051e895ccb696604349c6c5efe7c4747e1d1ab6 29-Sep-2010 Romain Guy <romainguy@google.com> Add display lists caching.

Change-Id: Iac3a248a81ed8cb076a83ef9d186b8ebba685b4c
isplayListRenderer.cpp
isplayListRenderer.h
penGLRenderer.h
4aa90573bbf86db0d33a3a790c5dbd0d93b95cfe 27-Sep-2010 Romain Guy <romainguy@google.com> Adding display lists to the GL renderer (checkpoint.)

Change-Id: Iaa49757600a53b39369dbb23f8c3feab282518e6
ndroid.mk
isplayListRenderer.cpp
isplayListRenderer.h
penGLDebugRenderer.cpp
penGLDebugRenderer.h
penGLRenderer.cpp
penGLRenderer.h
atchCache.cpp
atchCache.h
e2d345ea67e2960b37bfdc0fc8626d1bfa747404 25-Sep-2010 Romain Guy <romainguy@google.com> Add debug mode to measure performance.

Change-Id: I9d4c84034dc200b99c8266165942a7cdbcb5c0c5
ndroid.mk
aches.h
boCache.cpp
boCache.h
ontRenderer.cpp
penGLDebugRenderer.cpp
penGLDebugRenderer.h
penGLRenderer.cpp
penGLRenderer.h
roperties.h
38c85b907a478af96d71b9a5df5a2066b8475311 23-Sep-2010 Romain Guy <romainguy@android.com> Correctly initialize/refresh layers.

Change-Id: Id8cdcf587b13098460f7d4aa1bd17708784d89bb
ayer.h
ayerCache.cpp
penGLRenderer.cpp
e20ecbd12d26467754a7770d44bcce2ea92335ef 23-Sep-2010 Romain Guy <romainguy@android.com> Draw text decorations with lines instead of rectangles.

Change-Id: Icd25c85c3a24da96a3d2f76f9477da6f87e0303c
penGLRenderer.cpp
29d8997bd43b7c4ad37fc3d6f91eaafa74913c88 23-Sep-2010 Romain Guy <romainguy@android.com> Fix OpenGL errors in various places.

Change-Id: I3a4e115d8fb13b6c443e65460d92987b16f2524c
aches.h
penGLRenderer.cpp
penGLRenderer.h
kiaShader.cpp
kiaShader.h
extureCache.cpp
8c749f87d29e1a363ddf9027c3a51753c612d510 22-Sep-2010 Romain Guy <romainguy@android.com> Fix texture corruption issue, faster re-upload of textures.

Bug #2950691

Change-Id: I57e2bc1d1a23e8683c25de7d09d6f5af2df59f41
extureCache.cpp
extureCache.h
ddb80bebb0776e6d852aab6e8bba5d5591847a55 21-Sep-2010 Romain Guy <romainguy@google.com> 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
atrix.cpp
atrix.h
rogramCache.cpp
kiaShader.cpp
kiaShader.h
ee916f14cbd1fe1422c063ce2ef7b185e2bc5c6f 21-Sep-2010 Romain Guy <romainguy@google.com> Add support for SweepGradient in the GL renderer.

Change-Id: I7aa397ed4e34655ead9ba1f5b4ce087665e0f022
radientCache.cpp
radientCache.h
rogramCache.cpp
rogramCache.h
kiaShader.cpp
kiaShader.h
b5ab4173e0927e4668a45298c9900cd8007584e1 18-Sep-2010 Romain Guy <romainguy@google.com> Fix positioning of 1 pixel wide lines (esp. non AA lines.)

Change-Id: Ic155cac72f351edae35dffdfbb236954f57ba7de
ine.h
penGLRenderer.cpp
c95c8d6bf8fda5c4e8ebd0033b789be7868e6e07 18-Sep-2010 Romain Guy <romainguy@google.com> Add support for non AA lines.

Change-Id: Id5200e94815404d62760437d0d2dbb0a9276c700
ine.h
penGLRenderer.cpp
penGLRenderer.h
31529ff7918ce891fba9a660d0a861eb313ea554 17-Sep-2010 Romain Guy <romainguy@google.com> Correctly free memory.

Change-Id: I08fcbfa7d27ae413e0a8e8ca6ea305c8530a72c1
ine.h
atch.cpp
rogram.cpp
759ea80dca64ad652110a129e0d8bf93fea79f61 17-Sep-2010 Romain Guy <romainguy@google.com> Add support for drawLines(), with anti-aliasing

Change-Id: I16c0593c5671490909dec13a85df601e1428a1a6
ine.h
penGLRenderer.cpp
penGLRenderer.h
atch.cpp
atch.h
ect.h
kiaShader.cpp
kiaShader.h
bf434114cbf55b216fdc76fc8d65a75e84c9dab5 16-Sep-2010 Romain Guy <romainguy@google.com> Snap layer bounds to pixel boundaries.

Change-Id: I272ceebf469a119f01ea9d73cdd68519afdffa99
penGLRenderer.cpp
ect.h
b025b9c8b4efefadb01937db61a1f8ee7d2452bf 16-Sep-2010 Romain Guy <romainguy@google.com> Better error handling in the OpenGL renderer.

Add a glGetError() check on every frame
Don't attempt to create textures larger than the maximum size allowed

Change-Id: Iee4afae16089406dbe8bf10fc93b674f1271a0ca
ayerCache.cpp
penGLRenderer.cpp
penGLRenderer.h
6820ac8b14b4558f5d8b833dde80895306a3e137 16-Sep-2010 Romain Guy <romainguy@google.com> Fix 9patch rendering.

Change-Id: Ic4c18ff483cca95fbabcb10843f7714efe488adb
penGLRenderer.cpp
penGLRenderer.h
atch.cpp
atch.h
87a76578f76f4a6bceb187da6b7a01899ca0d85a 14-Sep-2010 Romain Guy <romainguy@google.com> Docs updates.

Change-Id: Iff395e1c6d81a484a2c4ad6e88357c0134971b78
penGLRenderer.cpp
napshot.h
1c740bce8a762f02b5283045a0e2de7c8fb41277 14-Sep-2010 Romain Guy <romainguy@google.com> Document the implementation of saveLayer().

The implementation is simple but tricky. Leave explanations to my
future self so that I don't invent a time machine to come back to
now and slap my self.

This change also simplifies the way the GL blending function is
chosen when compositing a layer. It reuses existing OpenGLRenderer
APIs and is easier to understand.

Change-Id: I1b9cf8c5d51e09836d85b8cf157a1c284aa65c59
penGLRenderer.cpp
penGLRenderer.h
81ab046a1127bd2ad397e6d1c6f8021b202a97ff 14-Sep-2010 Romain Guy <romainguy@google.com> Forgot the return value...

Change-Id: Iccf369a613c1cf83f3e948460c567291b084fad2
penGLRenderer.cpp
8411f336c786379c5a03106e9ed3bc8622b579a5 14-Sep-2010 Romain Guy <romainguy@google.com> Fix rendering issue with layers intersecting the clip rect.

Change-Id: Icbe35194fa219ef13ce639d33631235f8d7df3d7
penGLRenderer.cpp
58ef7fbf16864164efe98bf613b15c64deb1afc0 13-Sep-2010 Romain Guy <romainguy@google.com> Forces windows to draw the first time they show.

Change-Id: I239572ee49bc60f30d957f548104e75844859a93
ontRenderer.cpp
2bffd268f135df8308c9e67af110525a5c463424 13-Sep-2010 Romain Guy <romainguy@google.com> Fix text rendering issue with text scaling.

Change-Id: I1f3ae40025697e8f8ca0616ee6550fe215cadcc8
ontRenderer.cpp
ontRenderer.h
penGLRenderer.cpp
8694230ff25fa0a60e480d424843e56b718f0516 12-Sep-2010 Romain Guy <romainguy@google.com> Optimize calls to glCopyTexImage2D().

Change-Id: I34ee87bd4472864f440916e03a2894fae24bbe4a
penGLRenderer.cpp
penGLRenderer.h
f607bdc167f66b3e7003acaa4736ae46d78c1492 11-Sep-2010 Romain Guy <romainguy@google.com> Correct implementation of saveLayer().

Change-Id: I5375126636913e0a84f2d6bbd0ebe40d2e4f2763
ayer.h
ayerCache.cpp
ayerCache.h
penGLRenderer.cpp
penGLRenderer.h
rogramCache.cpp
rogramCache.h
napshot.h
a5aed0d58962a24c44728ffc46dc9e1ba2f9fda5 09-Sep-2010 Romain Guy <romainguy@google.com> Add support for advanced blend modes with the framebuffer.

This adds the ability to blend with the framebuffer using Darken,
Lighten, Add, Multiply, Overlay and Screen.

Change-Id: Iae01a53797d4ad39c373cba6ff2a42293129da1a
xtensions.h
penGLRenderer.cpp
penGLRenderer.h
rogramCache.cpp
rogramCache.h
d90f23e24a4d1768d5a7ed0e7072e67af6330a45 09-Sep-2010 Romain Guy <romainguy@google.com> Do not convert 8888 bitmaps to 565 when doing a copy.

Bug #2988077
This change keeps the 8888 format for new bitmaps and also keeps,
when possible, the opaque flag.

Change-Id: Ia61f2e89936916b329212a4c59a7d815c329f84e
penGLRenderer.cpp
183f17e7eb2f51be24489e7b1bd3e2e5e4bc579a 09-Sep-2010 Romain Guy <romainguy@google.com> A Path can exist in several cache entries.

Change-Id: I742f7425d2b6bef753ed3e04fb39ebb103b2dc00
athCache.cpp
a2341a9f6addcd79723965ec5b1a1c5ae0f8bd65 09-Sep-2010 Romain Guy <romainguy@google.com> Purge Skia objects from GL caches as needed.

Change-Id: I754c671cf790ad5ae8bf047ad328034217da4ecc
aches.h
enerationCache.h
radientCache.cpp
radientCache.h
athCache.cpp
athCache.h
extureCache.cpp
extureCache.h
9aaa8269a3e7291aab84d01c3fc9c744d8f2d2f4 09-Sep-2010 Romain Guy <romainguy@google.com> Fix possible infinite loop when purging textures.

Change-Id: Ib05b398ae03e734da2dab0496df416fed4570b1c
enerationCache.h
atchCache.h
exture.h
extureCache.cpp
extureCache.h
8aef54fa17f2a3753d9a8f2027629bc480088f69 02-Sep-2010 Romain Guy <romainguy@android.com> Add support for Canvas flags on save.

This is required for the rewrite of layers support.

Change-Id: I5c0867dcf5aeb0392c8d0fbab05febb0eaff70d9
penGLRenderer.cpp
penGLRenderer.h
ect.h
kiaShader.cpp
napshot.h
da8532c6f48b4c10b5e2ccb9e08690341efa1616 31-Aug-2010 Romain Guy <romainguy@google.com> Add hooks for hardware accelerated WebView.

Change-Id: I907cdec8a67594f87749ac46bda85f04af5a2003
penGLRenderer.cpp
penGLRenderer.h
b45c0c9774bd19a9dbe77d149abae4e124b08bf6 27-Aug-2010 Romain Guy <romainguy@google.com> Apply gamma correction to font rendering.

Change-Id: I1b05f40e356221b2a5eb9400e67d77ecd98ed6c4
ndroid.mk
aches.h
ontRenderer.cpp
ontRenderer.h
ammaFontRenderer.cpp
ammaFontRenderer.h
penGLRenderer.cpp
roperties.h
extDropShadowCache.cpp
f6fcac7ce16a631ca2b101f5bbebe58af5b247a8 25-Aug-2010 Romain Guy <romainguy@google.com> Fix passion build

Change-Id: I93322bd36a004ac5aa9a0409d22dbf36a2da1680
aches.h
fb8b763f762ae21923c58d64caa729b012f40e05 24-Aug-2010 Romain Guy <romainguy@google.com> Use only one GL context per process, share chaches.

Change-Id: Ieabaa25338d2f4b8d4fd90e7401ad6e7452eae11
aches.h
enerationCache.h
radientCache.cpp
radientCache.h
ayerCache.cpp
ayerCache.h
penGLRenderer.cpp
penGLRenderer.h
atchCache.cpp
atchCache.h
athCache.cpp
athCache.h
rogramCache.h
roperties.h
extDropShadowCache.cpp
extDropShadowCache.h
extureCache.cpp
extureCache.h
a80d32f7b69aa37026ab99e4ade1ad86dae76a81 21-Aug-2010 Romain Guy <romainguy@google.com> Add support for textScaleX.

This will not look great because we render fonts using bitmaps, not
paths.

Change-Id: I01b87b81bfbdbfa28460a5d5309d38e2a65e77c4
penGLRenderer.cpp
e9e7fd0813f1485d20c6cd0014d59aff53c35d84 19-Aug-2010 Romain Guy <romainguy@google.com> Update OpenGLRenderer test to test opaque ARGB8888 bitmaps.

Change-Id: I7159825f4b1d6f5a1cd09ec091994801b52b6bda
extureCache.cpp
c4d8eb6fb7c88c5c4da38b0b113c24cc4b78c0b7 19-Aug-2010 Romain Guy <romainguy@google.com> Speedup TextView fades (no more layers required.)

Also fixes a crash in the drop shadows cache and improves
drop shadows caching.

Change-Id: I9c0208a49467f9201d786ae0c129194b8d423923
extDropShadowCache.h
8b55f377655d13a445b08a0a8ed09b6e95c752b0 19-Aug-2010 Romain Guy <romainguy@google.com> Fix drawing issues with layers.

Prior to this change layers would clip their content incorrectly. They would
also not apply alpha properly.

Change-Id: Id7b3aaa7dbdc51de68fe050e64458f68e40503fd
penGLRenderer.cpp
napshot.h
1f8c9602eeff0a35f8af70bd3fdcd770f0127775 18-Aug-2010 Romain Guy <romainguy@google.com> Fix the build.

Change-Id: I8bd418ba21e3e3f68b793030398d1a5e933dfb19
penGLRenderer.cpp
2542d199745cdf3ec910b8e3e4cff5851ed24e9b 18-Aug-2010 Romain Guy <romainguy@google.com> Layers were using an extra Snapshot causing extra clipping.

Bug #2919310

Change-Id: I72ccd44bba7a3f3db72f581aa96198b6226e4478
penGLRenderer.cpp
penGLRenderer.h
napshot.h
8fb954263dd2f918ad339045cc6d82e346515599 18-Aug-2010 Romain Guy <romainguy@google.com> Fix save()/restore() issues in the OpenGL renderer.

The save stack now behaves exactly like in Skia.

Change-Id: If7e642f41f2c8f693f6e8c26cba81507d466562e
penGLRenderer.cpp
napshot.h
1d83e1981c8b89da93dff37a4f8b2b1ad8480b44 17-Aug-2010 Romain Guy <romainguy@google.com> Correctly set the viewport in layers.

Bug #2919295

Change-Id: I16ce79ab0d5747cb01c6c1abe531da3dfd93fb54
atrix.cpp
penGLRenderer.cpp
napshot.h
extDropShadowCache.h
0a41749953f35d33f61b3119e3161a82bb5fa59e 17-Aug-2010 Romain Guy <romainguy@google.com> Cleanup, better code reuse.

Change-Id: Ib86a7309ae579cce3b7cf464782c34e70a74c616
penGLRenderer.cpp
penGLRenderer.h
1e45aae5de003657e5d18f74d34998f5de5db5b7 14-Aug-2010 Romain Guy <romainguy@google.com> Add drop shadows.

Change-Id: Ic6a72409d4785968d1fbdff229f17ee5c00b240b
ndroid.mk
ontRenderer.cpp
ontRenderer.h
penGLRenderer.cpp
penGLRenderer.h
athCache.cpp
roperties.h
extDropShadowCache.cpp
extDropShadowCache.h
0ba681bce12d522c5575dfccb5a6ca12f0fba746 13-Aug-2010 Romain Guy <romainguy@google.com> Fix GC issue, fix local shader transformations.

Change-Id: I208bdf89815dcd18dcadd43df932a77362918435
atrix.cpp
atrix.h
kiaShader.cpp
af28b514964861d81b48902f942f706050936d38 12-Aug-2010 Romain Guy <romainguy@google.com> Better support for rotation and perspective matrices.

Change-Id: I56b5ae3321735ba5ee42aafc9bc0eb399b9e75b5
atrix.cpp
atrix.h
napshot.h
959c91f7f7b4f921d341264f5b4ef54e702a0df0 12-Aug-2010 Romain Guy <romainguy@google.com> Bunch of fixes.

Fixes memory leak, fixes multiple context support, fix 3d transforms.

Change-Id: I7462cfbc57857dbd4de4e76b9d4cba58a1bce77b
penGLRenderer.cpp
napshot.h
98173a277f8bd6d53d6ff9f7ff09e084f2666fc1 12-Aug-2010 Romain Guy <romainguy@google.com> Delete shaders after a compile error. Also disable extra logging.

Change-Id: I9b1558b0feac3d9b2cca926feeaf73921664cc73
rogram.cpp
rogramCache.h
48daa54d31fc59ec969dcff65eb3cbb0ce879a8d 11-Aug-2010 Romain Guy <romainguy@google.com> Add extra blending modes.

This change adds the following blending modes for shaders and color filters:
Add
Multiply
Screen
Overlay
Darken
Lighten

Change-Id: Iff22f5ce6041b43c71b1857d73013f5010ab3413
rogramCache.cpp
rogramCache.h
a674ab74e359ac73b4c4dd6b1a3a771836ac7e40 11-Aug-2010 Romain Guy <romainguy@google.com> Add support for text underline and strikethru.

Change-Id: I3a0e6643d7cafbdd06d9a908c8cf9347dcaba146
penGLRenderer.cpp
a48a1a87ba17f20f7006eaab21dcedf86c015c13 10-Aug-2010 Romain Guy <romainguy@google.com> Fast text selection drawing.

Change-Id: I93fb1312b47bc05345defa9b6cfe47c0658bb329
kiaShader.cpp
61c8c9c5b2006d18e9310b6521c65b36ffe75ce4 10-Aug-2010 Romain Guy <romainguy@google.com> Fix tons of bugs and add new text rendering support.

Change-Id: I326c66b10784006f6df2f12d38e120cef94cd0d7
ontRenderer.cpp
penGLRenderer.cpp
athCache.cpp
rogramCache.cpp
kiaShader.cpp
163935113919a184122b8b3bd672ef08c8df65dc 08-Aug-2010 Romain Guy <romainguy@android.com> Make libhwui entirely optional.

The makefile variable USE_OPENGL_RENDERER must be set to true to compile
libhwui and the related code in the JNI layer.

This change also removes obsolete APIs from Canvas that must not be used
and would be confusing if left in. These APIs were remnants of our first
attempt at an OpenGL renderer for the view hierarchy and had not been
taken out before Android 1.0 was released.

Change-Id: I2475ff1307212bab26c926724f3c508681c7dae1
ndroid.mk
extureCache.cpp
extureCache.h
9cccc2b9bdd4850a3f9679569aaec3ab98477a5d 08-Aug-2010 Romain Guy <romainguy@android.com> 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
ontRenderer.cpp
radientCache.cpp
penGLRenderer.cpp
athCache.cpp
athCache.h
kiaShader.cpp
kiaShader.h
extureCache.cpp
extureCache.h
8e3e359e59385e4dee38cedf194a4a58e4ad92a8 07-Aug-2010 Alex Sakhartchouk <alexst@google.com> Merge "Added drop shadow renderer to the font class."
f18136cb3c881a9d16c1a4f0f341732c276936bf 06-Aug-2010 Alex Sakhartchouk <alexst@google.com> Added drop shadow renderer to the font class.

Change-Id: Id243abfbbb58e54f6a05f592a302984b5321e608
ontRenderer.cpp
ontRenderer.h
22158e139a3d6c6a9787ca0de224e9368f643284 06-Aug-2010 Romain Guy <romainguy@google.com> Automatically cleanup textures that don't fit in the cache.

Change-Id: I4f29ed96ea11118b391fb957e1e4d1b8fcef1537
penGLRenderer.cpp
athCache.cpp
athCache.h
exture.h
extureCache.cpp
25ee037fee1607e8a77b1f2e259356e74dd6f645 06-Aug-2010 Romain Guy <romainguy@google.com> Fix incorrect memory cleanup in SkiaShader.

Bug #2895037

Change-Id: Id233c2a8a5b709dc9f26ff60aad989e9583a2382
kiaShader.cpp
7fbcc0492fca03857e3c45064f4aa040af817d55 05-Aug-2010 Romain Guy <romainguy@google.com> Add support for paths.

Rendering is implementing by rasterizing the paths into A8 textures.
This cna be extremely inefficient if the path changes often.

Change-Id: I609343f304ae38e0d319359403ee73b9b5b3c93a
ndroid.mk
penGLRenderer.cpp
penGLRenderer.h
athCache.cpp
athCache.h
rogramCache.cpp
roperties.h
6c07daf86c0d3824e1cd88fea455e2dd7b88cbcd 05-Aug-2010 Romain Guy <romainguy@google.com> Fix native crash in SkiaShader.

Bug #2893733

Change-Id: I7feb9ab113fe0012cf9eb271f2b044f12a5c9c4e
kiaShader.cpp
kiaShader.h
a275354c54b372bdfaae429fd2a2f5c2bdcd5d1e 03-Aug-2010 Alex Sakhartchouk <alexst@google.com> Merge "Adding drop shadow support"
db1938e0e6ef816e228c815adccebd5cb05f2aa8 03-Aug-2010 Romain Guy <romainguy@google.com> Add support for ColorFilters.

Color filters are fully supported and can be used with shaders.

Change-Id: Id90ccf1c81cb462f2431f366f3f8f710d7971e04
ndroid.mk
xtensions.h
penGLRenderer.cpp
penGLRenderer.h
rogramCache.cpp
rogramCache.h
kiaColorFilter.cpp
kiaColorFilter.h
kiaShader.h
89a524ac2d4a36739e51b01b336c0bade77e2ee0 03-Aug-2010 Alex Sakhartchouk <alexst@google.com> Adding drop shadow support

Change-Id: I9b1b9568d6cebc0761d96ab678b018571f705ae1
ontRenderer.cpp
ontRenderer.h
06f96e2652e4855b6520ad9dd70583677605b79a 31-Jul-2010 Romain Guy <romainguy@google.com> 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
ndroid.mk
penGLRenderer.cpp
penGLRenderer.h
rogramCache.cpp
rogramCache.h
kiaShader.cpp
kiaShader.h
b82da65cb1601be504241f36778395cd6cb9f87b 30-Jul-2010 Romain Guy <romainguy@google.com> Fix improper clipping after a save()

Change-Id: I13426a67f20d77e2710bd500d82884098f4be97c
penGLRenderer.cpp
napshot.h
ae5575b3421c8fbe590ab046d7d5f2b36ecfd821 30-Jul-2010 Romain Guy <romainguy@google.com> Fix gradients rendering and destructor crashes.

This changes binds all textures to GL_TEXTURE0, this will have
to be changed when combining shader capabilities.

Change-Id: I02df4f5ba41e9b01ffa52fd7c26b41477c7ed18f
ontRenderer.cpp
enerationCache.h
penGLRenderer.cpp
penGLRenderer.h
napshot.h
889f8d1403761d5668115ced6cbb3f767cfe966d 29-Jul-2010 Romain Guy <romainguy@google.com> Moved all the rendering code to the new shader generator.

The generator supports features that are not yet implement in the
renderer: color matrix, lighting, porterduff color blending and
composite shaders.

This change also adds support for repeated/mirrored non-power of 2
bitmap shaders.

Change-Id: I903a11a070c0eb9cc8850a60ef305751e5b47234
ontRenderer.cpp
atrix.cpp
penGLRenderer.cpp
penGLRenderer.h
rogram.cpp
rogram.h
rogramCache.cpp
rogramCache.h
haders/drawColor.frag
haders/drawLinearGradient.frag
haders/drawLinearGradient.vert
haders/drawText.frag
haders/drawTexture.frag
haders/drawTexture.vert
ac670c0433d19397d4e36ced2110475b6f54fe26 28-Jul-2010 Romain Guy <romainguy@google.com> Generate shaders to cover all possible cases.

With this change, all the vertex and fragment shaders used by the GL
renderer are now generated based on a program description supplied
by the caller. This allows the renderer to generate a large number
of shaders without having to write all the possible combinations by
hand. The generated shaders are stored in a program cache.

Change-Id: If54d286e77ae021c724d42090da476df12a18ebb
ndroid.mk
penGLRenderer.cpp
penGLRenderer.h
rogram.cpp
rogram.h
rogramCache.cpp
rogramCache.h
ertex.h
haders/drawColor.vert
haders/drawLinearGradient.vert
65ef909776c03417d8b597738da54ca211e37e4f 26-Jul-2010 Alex Sakhartchouk <alexst@google.com> When font cache still has empty space,
precache some commonly used characters to reduce studder.

Change-Id: I1f66f57482c4a025672dfd1d8ecaf2b9736cd9a0
ontRenderer.cpp
ontRenderer.h
penGLRenderer.cpp
e8e62a4a032a80409114a37908b5f18ab0080848 24-Jul-2010 Romain Guy <romainguy@google.com> Add text alignment support to drawText().

This change also integrates better support for RTL text.

Change-Id: I6da8f5cf5dc28ca7cf1b22e27b0d853c919e8481
penGLRenderer.cpp
penGLRenderer.h
9b9902ddbb01548f4a0199087b7035e7c10b2ae7 23-Jul-2010 Alex Sakhartchouk <alexst@google.com> Updating parts of font cache as needed instead of the entire map.

Change-Id: If9a37e10197255122acdb5b10a0c356edd942d67
ontRenderer.cpp
ontRenderer.h
51769a68a5cb34e9564740c6a854fcb93018789d 23-Jul-2010 Romain Guy <romainguy@android.com> Cleanup, added properties for the FontRenderer.

Change-Id: I909c74815d3ac394438ad8071d17fef5401dbeed
xtensions.h
ontRenderer.cpp
ontRenderer.h
penGLRenderer.cpp
penGLRenderer.h
roperties.h
bd0e6aa0ff0bd8b376772c3e23513a6021bdda87 23-Jul-2010 Romain Guy <romainguy@google.com> Add a way to query GL extensions.

Change-Id: Ic27dbf72289dacf641b640a749fbd40c12cd474f
xtensions.h
ontRenderer.h
penGLRenderer.h
extureCache.cpp
09147fbdc8206a0cac78bfe9083e7e15b3c5689c 22-Jul-2010 Romain Guy <romainguy@google.com> Add support for text culling.

Change-Id: Ibf0adacdc5c64d40a8000b21d7cb0797d63efe29
ontRenderer.cpp
ontRenderer.h
penGLRenderer.cpp
napshot.h
694b519ac647fe998fd396fe0784cc8e179aadc4 22-Jul-2010 Romain Guy <romainguy@google.com> Add text rendering.

Change-Id: Ibe5a9fa844d531b31b55e43de403a98d49f659b9
ndroid.mk
ontRenderer.cpp
ontRenderer.h
penGLRenderer.cpp
penGLRenderer.h
rogram.cpp
rogram.h
haders/drawText.frag
a1db574036c9bc2d397b69f8200594027e1fff16 20-Jul-2010 Romain Guy <romainguy@google.com> Add preliminary support for text rendering.

Change-Id: I547eb631dbda24d13960d54b4144fb8908fd8a49
penGLRenderer.cpp
penGLRenderer.h
c0ac193b9415680f0a69e20a3f5f22d16f8053be 20-Jul-2010 Romain Guy <romainguy@google.com> Add support for linear gradients.

Change-Id: Id15329da065045b3f06fdaed615f33cd57608496
ndroid.mk
radientCache.cpp
radientCache.h
penGLRenderer.cpp
penGLRenderer.h
rogram.cpp
rogram.h
extureCache.cpp
haders/drawLinearGradient.vert
f9764a4f532561f6e2e985ff3b25112f1132ce44 17-Jul-2010 Romain Guy <romainguy@android.com> Add program for linear gradient.

This change adds a new DrawLinearGradientProgram class to enable the drawing
of linear gradients. Two new vertex and fragment shaders are introduced,
based on DrawTextureProgram's shaders.

Change-Id: I885afc076bb6cef8cd3962ae21a086fa6a03bf96
penGLRenderer.cpp
penGLRenderer.h
rogram.cpp
rogram.h
haders/drawLinearGradient.frag
haders/drawLinearGradient.vert
7fac2e18339f765320d759e8d4c090f92431959e 17-Jul-2010 Romain Guy <romainguy@android.com> Add plumbing to support gradients in OpenGL renderer.

The LinearGradient class keeps a copy of the various parameters that
define the gradient. The copies are native arrays to avoid copying
Java arrays on every draw call. The gradient code path is implemented
until OpenGLRenderer::drawRect() (see TODO.) The actual gradient
implementation will be added in a latter change.

Change-Id: I9300d250ef5e2e9c2e097c3116ee71dfc9d752d8
penGLRenderer.cpp
penGLRenderer.h
napshot.h
1e79386ba34f0db38c1b35b22cdf122632534354 17-Jul-2010 Romain Guy <romainguy@android.com> Optimize textures binding.

The renderer is still changing textures' wrap modes every time, this will require
a latter optimization.

Change-Id: I3eb92cb8c886c4a692b7f0ca759911f9371d4d2c
ayerCache.cpp
penGLRenderer.cpp
penGLRenderer.h
extureCache.cpp
079ba2c85b15e882629b8d188f5fbdb42f7f8eea 16-Jul-2010 Romain Guy <romainguy@android.com> Improve clip support (add intersect, union and replace.)

This change also modifies the way the clip is stored. The clip is now
always stored in screen-space coordinates.

Change-Id: I96375784d82dfe975bc6477a159e6866e7052487
atrix.cpp
atrix.h
penGLRenderer.cpp
penGLRenderer.h
ect.h
napshot.h
d27977d1a91d5a6b3cc9fa7664ac7e835e7bd895 15-Jul-2010 Romain Guy <romainguy@google.com> Add support for BitmapShader.

This change also fixes an issue with the clip and layers.

Change-Id: I5fd9832098d8cf7ae8eb781ff9bffe7defaea279
penGLRenderer.cpp
penGLRenderer.h
napshot.h
haders/drawColor.frag
haders/drawTexture.frag
3d58c03de0d8877b36cdb78b0ca8b5cac7f600e2 15-Jul-2010 Romain Guy <romainguy@google.com> Do not apply transforms when using drawColor().

This fixes an issue in the way the clip transformations were applied.

Change-Id: I91e7b5d15baf244d1280e48938282bb33609081d
atrix.h
penGLRenderer.cpp
penGLRenderer.h
napshot.h
594f4065141a53427cad6f4fc89219d2f27e1a7d 14-Jul-2010 Romain Guy <romainguy@google.com> Enable 32-bits only assets.

Go away dithering!

Change-Id: Iee5ee2e9430606e732d9b0abb3adc9f68275bd6d
extureCache.cpp
a979474f15b454c8e2963f239a3770e200bb227c 13-Jul-2010 Romain Guy <romainguy@google.com> Cleanup: remove unnecessary parameters.

Change-Id: I5956ef1db6be28a01369387aaeeb65a94656c48c
penGLRenderer.cpp
penGLRenderer.h
92429d9266edf63cf632c132c5936f0e31850988 13-Jul-2010 Romain Guy <romainguy@google.com> Fix premultiplied alpha.

Change-Id: I08da422c5350503e1f4f27b9890f15a813d0c6c7
penGLRenderer.cpp
penGLRenderer.h
6926c72e25b8dec3dd4b84af0819fa1937ae7296 13-Jul-2010 Romain Guy <romainguy@google.com> Correctly support pre-multiplied alpha, optimizations, more stuff.

Add support for the following drawing functions:
- drawBitmap(int[]...)
- drawPaint()

Optimizes shader state changes by enabling/disabling attribute arrays
only when needed.

Adds quick rejects when drawing trivial shapes to avoid unnecessary
OpenGL operations.

Change-Id: Ic2c6c2ed1523d08a63a8c95601a1ec40b6c7fbc9
penGLRenderer.cpp
penGLRenderer.h
rogram.cpp
rogram.h
260e102162322958cf17dbd895cd6bd30dc87e32 12-Jul-2010 Romain Guy <romainguy@google.com> Optimize shader binding changes.

This change also cleans up the internal API a little bit by using mat4
everywhere instead of float[16] (for the ortho matrix for instance.)

Change-Id: I35924c7dc17bad17f30307118d5ed437c2ed37e0
penGLRenderer.cpp
penGLRenderer.h
rogram.cpp
rogram.h
napshot.h
0b9db91c3dc8007b47c8fd4fb9dd85be97201a88 10-Jul-2010 Romain Guy <romainguy@google.com> Remove math from the vertex shader.

Change-Id: I02847a60a8734bf8b3d29ec12e76297795095e38
penGLRenderer.cpp
rogram.cpp
rogram.h
haders/drawColor.vert
haders/drawTexture.vert
16202fc9745e9b11db089ebc8f40119d13732016 10-Jul-2010 Romain Guy <romainguy@google.com> Fix alpha blending and improve fragment shaders performance.

Change-Id: Ib74f6941d25ca6f6a41708e541174eaa7e8d9bc2
penGLRenderer.cpp
rogram.cpp
haders/drawColor.frag
haders/drawColor.vert
haders/drawTexture.frag
haders/drawTexture.vert
fb5e23c327cd5f8f93d1eaa7c10f34d6fd3efb6c 09-Jul-2010 Romain Guy <romainguy@google.com> Refactoring to move vertex computing to the Patch class.

This change is mostly cleanup to keep less code in OpenGLRenderer.

Change-Id: I954375143b2943829457ab470423729b60b844f5
ndroid.mk
penGLRenderer.cpp
penGLRenderer.h
atch.cpp
atch.h
82ba814ca0dea659be2cc6523bc0137679d961ce 09-Jul-2010 Romain Guy <romainguy@google.com> Optimize blending state changes.

Change-Id: I7c22a8aecccb8b5abfcf7243f049a4ef3cf3979a
penGLRenderer.cpp
penGLRenderer.h
ertex.h
f7f93556c8fcc640ab5adef79d021a80a72a645a 09-Jul-2010 Romain Guy <romainguy@google.com> Draw n-patches using OpenGL.

Currently only tested with title bars and buttons.

Change-Id: I8263a9281898dc0e943b1b8412827fe55639b9d6
ndroid.mk
ayer.h
ayerCache.h
penGLRenderer.cpp
penGLRenderer.h
atch.h
atchCache.cpp
atchCache.h
ertex.h
f18fd99b5c182329cd8936a9611f0103d8ece44a 08-Jul-2010 Romain Guy <romainguy@google.com> Create FBOs in LayerCache.

This moves a bit of code away from OpenGLRenderer and matches
what happens with the TextureCache.

Change-Id: I3c67f54f83d7240770daa015861c0e75a1dd8c42
ayerCache.cpp
ayerCache.h
penGLRenderer.cpp
deba785f122a47915756ffd991f5540d952cf937 08-Jul-2010 Romain Guy <romainguy@google.com> Add support to draw 9patches in OpenGL.

This change only adds the necessary API and stubs. The implementation
will be added in another change.

Change-Id: Ie50b8aff5868e78796cee331df15bdbf990d2ea1
penGLRenderer.cpp
penGLRenderer.h
6c81893c626499e58c8eeb20d6c35ec4e1ce808b 08-Jul-2010 Romain Guy <romainguy@google.com> Simpler way to deal with the FBO multi-cache.

This change removes the need for the SortedList and instead just
add a generated id to each FBO stored in the cache. This is an
artificial way to store several FBOs with the same dimensions.

Change-Id: I9638364e9bdc0f2391261937a0c86096f20505bf
ndroid.mk
enerationCache.h
ayer.h
ayerCache.cpp
ayerCache.h
penGLRenderer.cpp
ortedList.cpp
ortedList.h
extureCache.cpp
extureCache.h
5f0c6a483900f3989f4d2a8f913cf5b6a9777d03 07-Jul-2010 Romain Guy <romainguy@google.com> Optimize FBO cache.

This change introduces a new generational cache called GenerationMultiCache
that can store several values with the same key. This can be used to use
multiple layers of the same size at the same time, without recreating them
over and over again.

Change-Id: I425466a20908b862c5f464a0f9e582ec18cbd7ac
ndroid.mk
enerationCache.h
ayerCache.cpp
ayerCache.h
penGLRenderer.cpp
ortedList.cpp
ortedList.h
extureCache.cpp
extureCache.h
dda570201ac851dd85af3861f7e575721d3345da 06-Jul-2010 Romain Guy <romainguy@android.com> Add a layer (FBO) cache.

The cache is used to draw layers so that a new
texture does not have to be recreated every time
a call to saveLayer() happens.

The FBO cache used a KeyedVector, which is a bad
idea. The cache should be able to store several
FBOs of the same size (this happens a lot during
scrolling with fading edges for instance.) This
will be changed in a future CL.

Change-Id: Ic316189e625f0dbcf0d273a71cc981a433d48726
ndroid.mk
enerationCache.h
ayer.h
ayerCache.cpp
ayerCache.h
penGLRenderer.cpp
penGLRenderer.h
napshot.h
extureCache.cpp
extureCache.h
7d139ba2c331f11e9b485753cc727a0ff202f2a4 02-Jul-2010 Romain Guy <romainguy@android.com> Remove extra leftover logs and use uint32_t instead of unsigned int.

Change-Id: I944f82fe3255de38dc04048cc8bd861f578f01a7
enerationCache.h
penGLRenderer.cpp
exture.h
extureCache.cpp
extureCache.h
121e2242565d5f09ad83a2d33ecd2225838802c5 02-Jul-2010 Romain Guy <romainguy@google.com> Track the size in memory of the texture cache.

The texture cache was previously checking the number of stored textures. This was
not very useful as this could easily lead to an abuse of memory. The new cache
instead tracks the total size occupied in RAM by the cached textures. When a new
texture is generated, older textures are kicked out as needed.

Change-Id: Ib27142f4a018d5bf84774c1fb6f45a67a85f20bc
enerationCache.h
penGLRenderer.cpp
extureCache.cpp
extureCache.h
f86ef57f8bcd8ba43ce222ec6a8b4f67d3600640 01-Jul-2010 Romain Guy <romainguy@google.com> Don't use full screen FBOs, this dramatically increase performance.

The next step will be to add an FBO cache to avoid churning memory on every
frame we draw. This change also adds support for drawBitmap(Bitmap, Matrix, Paint).

Change-Id: I7825cdcf0cad9bffe6219e05d8328a53d4a6e583
penGLRenderer.cpp
penGLRenderer.h
napshot.h
8ba548f81d1ab5f1750cbf86098c4a14e0b8bead 01-Jul-2010 Romain Guy <romainguy@google.com> Add implementation for drawBitmap(Bitmap, Rect, Rect, Paint)

Change-Id: I10904d2325a5431d15801aebcec1048715678e8c
penGLRenderer.cpp
penGLRenderer.h
extureCache.cpp
c1396e93b6a5286a5183c00c781b62e940a12c1f 01-Jul-2010 Romain Guy <romainguy@google.com> Add implementation for drawBitmap().

Change-Id: Iada9325f3c5642b61c2e0c4cd80bcfbc92cb491e
penGLRenderer.cpp
penGLRenderer.h
extureCache.cpp
fe8809471a40cac8acc984adfa51c39e13e83947 01-Jul-2010 Romain Guy <romainguy@google.com> Remove unnecessary return and add bitmap generation ID tracking.

Change-Id: Icf5e0635e789f5ea53268c22fad51cf733b5b1a6
exture.h
extureCache.cpp
extureCache.h
364703c6fa4aa1a7d2ef5b0c048ea2a0d57a4c40 01-Jul-2010 Romain Guy <romainguy@google.com> Fix the build.

Change-Id: I08bd6daf25351daca3ae552e1cfcfce85eefa73b
enerationCache.h
extureCache.cpp
extureCache.h
ce0537b80087a6225273040a987414b1dd081aa0 30-Jun-2010 Romain Guy <romainguy@google.com> Add hooks for drawBitmap().

Change-Id: I58e962c3a8b2bc75c2605fe369ad3002579d86e0

Add texture cache.

Change-Id: I1c0e5581d228869e114438258a1014e33e024ad7
ndroid.mk
enerationCache.h
penGLRenderer.cpp
penGLRenderer.h
exture.h
extureCache.cpp
extureCache.h
d55a86120dd1e8ebcc6906c9ffd463f7460348da 29-Jun-2010 Romain Guy <romainguy@google.com> Add support for saveLayer().

saveLayer() is affected by the paint's alpha and xfermode.

Change-Id: I28693a9337052643adccdb4889a8f228d4e17903
penGLRenderer.cpp
penGLRenderer.h
napshot.h
026c5e16704e817cac7d9c382914c947e34f87e0 29-Jun-2010 Romain Guy <romainguy@google.com> Implement support for PorterDuff's blending modes.

The blending modes are currently hooked up only when drawing filled rects but the
code is reusable for other primitives. This will allow implementation of saveLayer().
This method is required to support the fade effects used throughout the standard
Android UI.

Change-Id: I396023d123436f16cdafc606e358e4eb80c9df2c
penGLRenderer.cpp
penGLRenderer.h
5cbbce535744b89df5ecea95de21ee3733298260 28-Jun-2010 Romain Guy <romainguy@android.com> Reduced the complexity of layers composition.

This change also refactors the code base a bit by moving classes out of
OpenGLRenderer into separate headers/implementations. This makes the code
more manageable.

This change also adds documentation for implementation methods. The
undocumented methods are simply Skia's Canvas methods.

Change-Id: I54c68b443580a0129251dddc1a7ac95813d5289e
ndroid.mk
atrix.cpp
penGLRenderer.cpp
penGLRenderer.h
rogram.cpp
rogram.h
ect.h
napshot.h
bd6b79b40247aea7bfe13d0831c6c0472df6c636 26-Jun-2010 Romain Guy <romainguy@android.com> Add implementations for saveLayerAlpha() and textured rects.

Even though there's an implementation for textured rects, drawBitmap() is not
hooked up yet as it will require a good texture cache.

This method is implemented using FBOs. There's currently an issue either in the
driver or in the Canvas renderer that forces the FBO to be fullscreen, which is
extremely expensive and yields terrible performance.

Change-Id: I148419195e12d45653c60186938aa78c23a68e2c
atrix.cpp
atrix.h
penGLRenderer.cpp
penGLRenderer.h
haders/drawColor.frag
haders/drawTexture.frag
haders/drawTexture.vert
7ae7ac48aa2b53453c9805075171ecd5bcafd7de 25-Jun-2010 Romain Guy <romainguy@android.com> Convert tabs to spaces.

Change-Id: I5d3ae48af79b19b6d293deff0521e4bb57d5114b
atrix.cpp
atrix.h
penGLRenderer.cpp
penGLRenderer.h
ect.h
haders/drawColor.vert
c7d53494f1fbd9f9d74af89053ff9fdb1ccbac6c 25-Jun-2010 Romain Guy <romainguy@android.com> Implement quickReject() and drawRect().

The OpenGL ES 2.0 renderer can now draw colored rectangles. At least there's
something on screen now.

Change-Id: I80a13ccc1dd56784edf74f2670a364f30700234a
atrix.cpp
atrix.h
penGLRenderer.cpp
penGLRenderer.h
haders/drawColor.vert
9d5316e3f56d138504565ff311145ac01621dff4 25-Jun-2010 Romain Guy <romainguy@google.com> Add colored rectangles implementation in OpenGLRenderer.

Drawing two rectangles one after the other discards the second one because of
Z buffering issues. This will be fixed in another changelist.

Change-Id: Ida1b3cde8a78e60cacc07e477abc44def527ff67
atrix.cpp
atrix.h
penGLRenderer.cpp
penGLRenderer.h
ect.h
haders/drawColor.frag
haders/drawColor.vert
f6a11b8a9e25ff9861bbba19251bea84d8a5daf2 24-Jun-2010 Romain Guy <romainguy@google.com> Add support for transformations.

This change adds partial support for the following transforms:
- scale()
- translate()
- rotate()
- setMatrix()
- getMatrix()

The transform is stored in a snapshot and saved/restored as needed.
The transform is currently not applied to the clip rect and is not
mapped to the vertex shader.

Change-Id: Id48993453311200804149917d0c126a4d0471226
atrix.cpp
atrix.h
penGLRenderer.cpp
penGLRenderer.h
bb9524b6bdddc7ac77d8628daa8b366b8a7be4a4 23-Jun-2010 Romain Guy <romainguy@google.com> Add implementations for clipRect(), save() and restore().

The current implementation of clipRect() does not apply local transformations
before setting the new clip.

Change-Id: I5997871bb638dfcd1a8ef96354846af52427e445
atrix.cpp
penGLRenderer.cpp
penGLRenderer.h
ect.h
3e168335b3422008908ac6973bb36078fd979f35 22-Jun-2010 Romain Guy <romainguy@google.com> Fix simulator build again.

Change-Id: Ifd204d64eaa4c356422e3363ec0a6e6aa61c52dc
ndroid.mk
atrix.cpp
85bf02fc16784d935fb9eebfa9cb20fe46ff7951 22-Jun-2010 Romain Guy <romainguy@google.com> Fix the simulator build.

Change-Id: Ie404f7c2c308f0657f273af19a56e8c039b61898
ndroid.mk
atrix.cpp
atrix.h
penGLRenderer.cpp
penGLRenderer.h
IMatrix.cpp
IMatrix.h
IOpenGLRenderer.cpp
IOpenGLRenderer.h
08ae317c21ec3086b5017672bba87420cc38a407 22-Jun-2010 Romain Guy <romainguy@google.com> Add glOrtho equivalent to the OpenGL ES 2.0 renderer.

Change-Id: I063dad3d81dab7833acb1e7a9c7121f8efd2a044
ndroid.mk
IMatrix.cpp
IMatrix.h
IOpenGLRenderer.cpp
IOpenGLRenderer.h
e4d011201cea40d46cb2b2eef401db8fddc5c9c6 17-Jun-2010 Romain Guy <romainguy@google.com> Add libhwui, to hardware accelerate the Canvas API using OpenGL ES 2.0.

This is the initial checkin to setup the library and turn on OEGL ES 2.0
in ViewRoot, not a functional renderer.

Change-Id: I6655c54166e2967da2e21e7d6dcfba78bf113b44
ndroid.mk
ODULE_LICENSE_APACHE2
OTICE
IOpenGLRenderer.cpp
IOpenGLRenderer.h