summaryrefslogtreecommitdiffstats
path: root/libs
Commit message (Collapse)AuthorAgeFilesLines
...
| * Fix bad shader codeChet Haase2012-09-171-2/+2
| | | | | | | | | | | | Shader code missing "=" in a couple of cases. Change-Id: Iff8a99a0ccb2903c30e2bdb2f698ef9b2e03d5d1
* | Merge "Fix occasional crash bug with layers" into jb-mr1-devChet Haase2012-09-179-37/+87
|\ \ | |/ |/|
| * Fix occasional crash bug with layersChet Haase2012-09-179-37/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Fix modulation and gamma correction issuesRomain Guy2012-09-142-39/+51
|/ | | | | | | | | | | | | | | | | | | | | | | 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
* Merge "Multiply alpha for AA as late as possible" into jb-mr1-devRomain Guy2012-09-141-5/+7
|\
| * Multiply alpha for AA as late as possibleChris Craik2012-09-131-5/+7
| | | | | | | | | | | | Should be done after all color computation Change-Id: Iaadd565f7d2263f111f6841a00e7c341025833d3
* | Foundation for tiling optimizationRomain Guy2012-09-133-5/+40
| | | | | | | | Change-Id: I4db32a4749f196472ba0dde7e102439d2ba4a3a7
* | Discard framebuffer commands when we redraw the entire bufferRomain Guy2012-09-113-3/+16
| | | | | | | | Change-Id: I32e3014832cbd3bdbace8c3d2206eb20a2002d64
* | Merge "Prevent degenerate 9-patches from drawing out of bounds Bug #7137292" ↵Romain Guy2012-09-101-0/+5
|\ \ | |/ |/| | | into jb-mr1-dev
| * Prevent degenerate 9-patches from drawing out of boundsRomain Guy2012-09-101-0/+5
| | | | | | | | | | | | Bug #7137292 Change-Id: I371e94899445d2f3c6794d5c0aee8faa514d3c2c
* | Reset GL buffer state after functor invocationChet Haase2012-09-101-2/+4
|/ | | | | | | | | | | 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
* Merge "Fix memory corruption in LayerRenderer::copyLayer" into jb-mr1-devRomain Guy2012-09-071-0/+2
|\
| * Fix memory corruption in LayerRenderer::copyLayerRomain Guy2012-09-071-0/+2
| | | | | | | | | | | | | | | | 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
* | Merge "Handle different x, y scales in drawLines AA path" into jb-mr1-devChris Craik2012-09-071-5/+5
|\ \ | |/ |/|
| * Handle different x, y scales in drawLines AA pathChris Craik2012-09-071-5/+5
| | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Enable changing properties of layer paint" into jb-mr1-devChet Haase2012-09-076-43/+101
|\ \
| * | Enable changing properties of layer paintChet Haase2012-09-076-43/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Reduce the number of locks acquired by display lists" into jb-mr1-devRomain Guy2012-09-074-78/+201
|\ \ \ | |/ / |/| |
| * | Reduce the number of locks acquired by display listsRomain Guy2012-09-074-78/+201
| | | | | | | | | | | | Change-Id: I1123aae0355de84db705bb75042c7083fc69c9f2
* | | Merge "Use "ldrtl" and "ldltr" config qualifiers for RTL / LTR resources" ↵Fabrice Di Meglio2012-09-071-2/+2
|\ \ \ | |_|/ |/| | | | | into jb-mr1-dev
| * | Use "ldrtl" and "ldltr" config qualifiers for RTL / LTR resourcesFabrice Di Meglio2012-09-061-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | - we cannot use "rtl" / "ltr" qualifiers as they can conflict with ISO-639 Alpha-3 codespace which uses 3 letters for identifying a language code (and could use either "rtl" or "ltr" strings for defining a language in the future). - we are using instead "ldrtl" for RTL and "ldltr" for LTR resources. Those qualifiers are defined by more than 3 chars and outside of what is defined into ISO-639. They are also more understandable as "ld" prefix is for "layoutdirection" Change-Id: Id43e948103707e09bef63ebd54ac1779dde58e72
* | Fix m11 to be Y scale instead of XChris Craik2012-09-061-2/+2
| | | | | | | | | | | | | | | | bug:7114630 Fixes different X and Y values resulting in blurry lines/rects. Change-Id: I3eb244e0cf769efa6b38d08741cf37d0bf62b786
* | Merge "Varying-based AA rect drawing" into jb-mr1-devChris Craik2012-09-065-39/+87
|\ \ | |/ |/|
| * Varying-based AA rect drawingChris Craik2012-09-055-39/+87
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Don't invalidate all the glyphs when flushing large texturesRomain Guy2012-09-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Correctly check the height of a glyph prior to caching it" into ↵Romain Guy2012-09-042-14/+13
|\ \ | | | | | | | | | jb-mr1-dev
| * | Correctly check the height of a glyph prior to caching itRomain Guy2012-09-042-14/+13
| | | | | | | | | | | | Change-Id: Iaf3977afc20fcde65bfda7b9e092b3e723241684
* | | Merge "Fix line drawing path to use proportional distance from center" into ↵Chris Craik2012-09-041-3/+3
|\ \ \ | | | | | | | | | | | | jb-mr1-dev
| * | | Fix line drawing path to use proportional distance from centerChris Craik2012-09-041-3/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | 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
* | | Merge "Code cleanup in FontRenderer" into jb-mr1-devRomain Guy2012-09-045-82/+122
|\ \ \ | | |/ | |/|
| * | Code cleanup in FontRendererRomain Guy2012-09-045-82/+122
| | | | | | | | | | | | Change-Id: Ic788721c224a77f0a76f4cd6d9817b62e390a5a7
* | | Merge "Small code cleanup in FontRenderer" into jb-mr1-devRomain Guy2012-09-045-24/+59
|\ \ \ | |/ /
| * | Small code cleanup in FontRendererRomain Guy2012-09-045-24/+59
| | | | | | | | | | | | Change-Id: I09c00debe9b0b4f45b232cae402ed19bdaeabfe4
* | | Merge "Refactor FontRenderer.cpp" into jb-mr1-devRomain Guy2012-09-049-829/+1005
|\ \ \ | |/ /
| * | Refactor FontRenderer.cppRomain Guy2012-09-049-829/+1005
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Add support for "-rtl" in resources" into jb-mr1-devFabrice Di Meglio2012-09-041-0/+40
|\ \ \ | |/ / |/| |
| * | Add support for "-rtl" in resourcesFabrice Di Meglio2012-08-231-0/+40
| | | | | | | | | | | | | | | | | | - fix bug #7035019 Need to have "-rtl" support for Resource Change-Id: Ic82145c2ac672729d8a6c695a5f343276a1a0a2c
* | | Revert "Revert "Add more support for transformed clip rects and paths""Romain Guy2012-08-318-76/+187
| | | | | | | | | | | | | | | | | | This reverts commit a8557d2169e14997637f57bc897640c8882d4a46. Change-Id: I36d4883d548fc47ba6c0b4a42012107d0d2f85a6
* | | Revert "Add more support for transformed clip rects and paths"Mathias Agopian2012-08-319-188/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | this introduced a dead lock in GradientCache's ctor. This reverts commit dfe082f63e94cde9aee271c94d13de5e7217e036. Bug: 7096001 Change-Id: I57b8bbab11fb7cb502fa58e3bbf5d19864db874f
* | | Merge "Add more support for transformed clip rects and paths" into jb-mr1-devRomain Guy2012-08-319-77/+188
|\ \ \
| * | | Add more support for transformed clip rects and pathsRomain Guy2012-08-319-77/+188
| | |/ | |/| | | | | | | Change-Id: I41791b1e1bffef77d503dc9e52428395d2309688
* | | Paramaterize and adjust the glyph cache sizesChet Haase2012-08-313-37/+37
|/ / | | | | | | | | | | | | | | | | 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
* | Merge "Avoid thrashing the glyph cache during the precache phase" into ↵Chet Haase2012-08-302-19/+22
|\ \ | | | | | | | | | jb-mr1-dev
| * | Avoid thrashing the glyph cache during the precache phaseChet Haase2012-08-302-19/+22
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Fix bug with Fbo layer clipping" into jb-mr1-devChet Haase2012-08-302-58/+54
|\ \
| * | Fix bug with Fbo layer clippingChet Haase2012-08-292-58/+54
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Pre-multiply color components for 2-stop gradients Bug #7033344" into ↵Romain Guy2012-08-293-41/+11
|\ \ | | | | | | | | | jb-mr1-dev
| * | Pre-multiply color components for 2-stop gradientsRomain Guy2012-08-293-41/+11
| |/ | | | | | | | | | | Bug #7033344 Change-Id: Ia168501f1dc56ba7a1bb0c55078320432309a66a
* | Use smoothstep to eliminate branches in AA shaderChris Craik2012-08-292-29/+6
|/ | | | Change-Id: If4ecb1a9446f29b2f8444f5cee551f863c1993e8
* Fix glyph cropping bugChet Haase2012-08-171-2/+2
| | | | | | | | | | | 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