summaryrefslogtreecommitdiffstats
path: root/libs
Commit message (Collapse)AuthorAgeFilesLines
* Take hinting into account when caching fontsRomain Guy2013-06-182-0/+6
| | | | | | Bug #9464403 Change-Id: I26a5f0c17eb27d096717b444d3e18ad1d2b5a43c
* Cancel layer update when a layer is about to be destroyedRomain Guy2013-06-175-3/+25
| | | | | | Bug #9310706 Change-Id: I73eea6314c326f15a979617e3a05b525935f0d3f
* Merge more 9patchesRomain Guy2013-06-141-4/+3
| | | | Change-Id: If8b16af84f0ee42afc406922d15897e51d833e68
* Merge "Fix various draw ops that may incorrectly not scissor"Chris Craik2013-06-144-54/+60
|\
| * Fix various draw ops that may incorrectly not scissorChris Craik2013-06-134-54/+60
| | | | | | | | | | | | | | | | | | | | 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
* | Merge "Add new Query class for debugging"Romain Guy2013-06-135-3/+159
|\ \
| * | Add new Query class for debuggingRomain Guy2013-06-135-3/+159
| | | | | | | | | | | | | | | | | | | | | 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
* | | Reset batching state when overlap batch deletion occursChris Craik2013-06-132-4/+8
| |/ |/| | | | | Change-Id: Ifdbee9baaa734e27d15d2b54aa3b3abfffbce1e9
* | Merge "Restore buildLayer()'s old behavior; it's synchronous again Bug #9193833"Romain Guy2013-06-133-0/+128
|\ \ | |/
| * Restore buildLayer()'s old behavior; it's synchronous againRomain Guy2013-06-123-0/+128
| | | | | | | | | | | | Bug #9193833 Change-Id: I4ee07e65c0a8967f0b55da030ecaad6dfc46136f
* | Merge "Overdraw avoidance and merging of clipped ops"Chris Craik2013-06-138-140/+282
|\ \
| * | Overdraw avoidance and merging of clipped opsChris Craik2013-06-128-140/+282
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Remove crash workarounds, add loggingChris Craik2013-06-122-7/+16
|/ | | | | bug:9321162 Change-Id: I748c27f979af1a303be01db29aedcbad6d608c38
* Merge "Avoid 9patch cache lookups when possible"Romain Guy2013-06-128-24/+71
|\
| * Avoid 9patch cache lookups when possibleRomain Guy2013-06-118-24/+71
| | | | | | | | | | | | | | This optimization saves up to 0.3ms per frame on the Play Store's front page, on a Nexus 4 device. Change-Id: Iaa4ef33c6e3b37e175efd5b9eea9ef59b43f14f3
* | am 8cb26c09: am cb5d644f: Merge "Workaround possible use after delete" into ↵Chris Craik2013-06-111-1/+2
|\ \ | |/ |/| | | | | | | | | jb-mr2-dev * commit '8cb26c099dc6357340141c9d81a1131ee404ae41': Workaround possible use after delete
| * Workaround possible use after deleteChris Craik2013-06-101-1/+2
| | | | | | | | | | bug:9321162 Change-Id: Ic35af5b5925da56e9a143e6b33658831038f3b72
* | Assume a texture is unbound after deleting itRomain Guy2013-06-0613-11/+53
| | | | | | | | | | | | | | | | | | | | | | 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
* | Remove string allocations when creating display listsRomain Guy2013-06-051-1/+6
| | | | | | | | Change-Id: Id520db981a3988cb980c8da5dbea8f26ef94989f
* | Introduce Caches::bindTexture() to reduce glBindTexture callsRomain Guy2013-06-0426-164/+275
| | | | | | | | Change-Id: Ic345422567c020c0a9035ff51dcf2ae2a1fc59f4
* | Enable GPU pixel buffers on OpenGL ES 3.0 devicesRomain Guy2013-06-044-10/+20
| | | | | | | | Change-Id: I164d72ccd7a9bf6ae0e3f79dfef50083558937ba
* | Re-initialize the 9patch cache if cleared with onTrimMemoryRomain Guy2013-05-282-8/+21
| | | | | | | | | | | | | | | | The 9aptch cache was reinitialized after destroying/recreating the EGL context but not after clearing it during a normal memory trim. Change-Id: If6155bfc8a62439e9878bc742a4766b3bd6c6aec
* | Make sure atlas antries can correctly filter/wrap texturesRomain Guy2013-05-245-39/+70
| | | | | | | | | | | | | | | | 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
* | Merge "Add PerfHUD ES profiling capabilities"Romain Guy2013-05-232-40/+60
|\ \
| * | Add PerfHUD ES profiling capabilitiesRomain Guy2013-05-232-40/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am 1bf58a5a: am cfbbc864: Merge "Restore previous alpha value on noop\'d ↵Chet Haase2013-05-231-1/+3
|\ \ \ | | |/ | |/| | | | | | | | | | | | | DisplayList operations" into jb-mr2-dev * commit '1bf58a5a4c3275a8de676046da311ec0c3c61c78': Restore previous alpha value on noop'd DisplayList operations
| * | Restore previous alpha value on noop'd DisplayList operationsChet Haase2013-05-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Move VelocityTracker.cpp to target build only"Nick Kralevich2013-05-232-3/+2
|\ \ \
| * | | Move VelocityTracker.cpp to target build onlyNick Kralevich2013-05-212-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VelocityTracker.cpp makes reference to property_get, which doesn't make a lot of sense when compiling for the host. Compile this file for the target only. Keyboard.cpp: Remove unnecessary include file. Change-Id: Iee9edd81953b2e7e815005770ce286a6ec586f20
* | | | Merge "Merge scaled bitmaps with translated bitmaps"Romain Guy2013-05-225-8/+28
|\ \ \ \
| * | | | Merge scaled bitmaps with translated bitmapsRomain Guy2013-05-215-8/+28
| | |_|/ | |/| | | | | | | | | | Change-Id: I03089f48f97b69fcb4a0171984d3ff548d41c4a8
* | | | Use individual glyph positions to determine text bounds.Chris Craik2013-05-216-63/+36
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Fix DISPLAY_LIST_DEBUG"Chris Craik2013-05-211-0/+4
|\ \ \ | |/ / |/| |
| * | Fix DISPLAY_LIST_DEBUGChris Craik2013-05-211-0/+4
| | | | | | | | | | | | | | | | | | will now log ops Change-Id: I4e119999af7ceea0558225aa78926e761277fee2
* | | Add tessellation path for pointsChris Craik2013-05-147-177/+168
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | am f420a36e: am 4329ee25: Merge "Fix off by one error in log tracking" into ↵Chris Craik2013-05-103-5/+6
|\ \ | |/ | | | | | | | | | | jb-mr2-dev * commit 'f420a36e5f62a9ab38f6782db78f5d94947b034e': Fix off by one error in log tracking
| * Fix off by one error in log trackingChris Craik2013-05-093-5/+6
| | | | | | | | | | | | | | | | | | bug:8875715 Additionally moves op logging before the op is executed, to print correctly, in pre-order traversal Change-Id: I4e9566261f8363c73739d183e6d82b854f72ffad
* | libutils clean-upMathias Agopian2013-05-0711-6/+1489
| | | | | | | | Change-Id: I11ee943da23a66828455a9770fc3c5ceb4bbcaa9
* | Fix double-free in AssetAtlasRomain Guy2013-05-071-0/+4
| | | | | | | | | | | | | | | | | | | | 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
* | am b90ff505: am fdf13c90: Merge "Convert alpha from [0..1] to [0.255] range ↵Romain Guy2013-05-061-1/+1
|\ \ | |/ | | | | | | | | | | Bug #8808886" into jb-mr2-dev * commit 'b90ff505df143abd957cfc19b60727e3460ee68c': Convert alpha from [0..1] to [0.255] range Bug #8808886
| * Merge "Convert alpha from [0..1] to [0.255] range Bug #8808886" into jb-mr2-devRomain Guy2013-05-041-1/+1
| |\
| | * Convert alpha from [0..1] to [0.255] rangeRomain Guy2013-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am 33be275d: am d65eebf4: Merge "Fix scaled-view droppings artifact" into ↵Chet Haase2013-05-061-2/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | jb-mr2-dev * commit '33be275deb072ca3e6155b61370578b16dbee64a': Fix scaled-view droppings artifact
| * | Fix scaled-view droppings artifactChet Haase2013-05-031-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Remove stray logRomain Guy2013-05-061-1/+0
| | | | | | | | Change-Id: I392eea216ad67f376ded802c19a3e2287aacc6f8
* | Add an on-screen overdraw counterRomain Guy2013-05-037-7/+73
| | | | | | | | | | | | | | | | | | 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
* | Remove warningRomain Guy2013-05-023-38/+65
| | | | | | | | Change-Id: Ia1523d02dc2b7f58ca26a142a5aef710792a5f3d
* | Wrap EGLImage with a C++ APIRomain Guy2013-05-023-35/+117
| | | | | | | | Change-Id: I0fa3282ea7e2ace3ba2aadd929b32232b3d41628
* | Pack preloaded framework assets in a texture atlasRomain Guy2013-05-0221-395/+909
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Allow compiling aapt for the deviceBjorn Bringert2013-04-262-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: - The static device version of libandroidfw now includes the extra functions needed by aapt. I could only find a few host tools that use the static library, so this is hopefully not a problem. - The pseudolocalization code is moved into aapt. It was previously in libhost, but only used by aapt. Change-Id: Ib393ebb7dcebee8abbb628cbe5255ea1679674ac