summaryrefslogtreecommitdiffstats
path: root/libs/hwui
Commit message (Collapse)AuthorAgeFilesLines
* Take SkBitmap's stride into account when uploading texturesRomain Guy2013-09-255-18/+29
| | | | | Bug #10151807 Change-Id: I7ba4804fa3619088fea70eb55f10519fff0bf5f0
* Merge "Correct bitmap merging logic" into klp-devChris Craik2013-09-215-13/+8
|\
| * Correct bitmap merging logicChris Craik2013-09-205-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | fix emoji clipping in hw draw pathVictoria Lease2013-09-191-1/+1
|/ | | | | | | | 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
* Merge "Conservatively estimate geometry bounds" into klp-devChris Craik2013-09-184-18/+43
|\
| * Conservatively estimate geometry boundsChris Craik2013-09-174-18/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Disallow negative scale matrices in merged Bitmap drawing" into klp-devChris Craik2013-09-184-3/+21
|\ \
| * | Disallow negative scale matrices in merged Bitmap drawingChris Craik2013-09-164-3/+21
| |/ | | | | | | | | | | bug:10622962 Change-Id: I55ac18ad56b53dc9e6e6ea14cd3ec4bdafa98ac3
* | Fix merged operation clippingChris Craik2013-09-131-1/+1
|/ | | | | | | | bug:10745870 Missing 'const' meant MergingDrawBatch would never clip anything. Change-Id: Ia6367eff94cf5f437efafbc3ba7f0da102ffd956
* Always disable the clip for layersRomain Guy2013-09-121-4/+2
| | | | | Bug #8149344 Change-Id: Ifd413cadb171232eb846b3d91b05b2d2457b9f35
* Merge "Move DeferredDisplayState out of ops" into klp-devChris Craik2013-09-126-143/+195
|\
| * Move DeferredDisplayState out of opsChris Craik2013-09-126-143/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Fix scissor for functor invocation" into klp-devJohn Reck2013-09-101-2/+4
|\ \
| * | Fix scissor for functor invocationJohn Reck2013-09-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Fix FontRenderer bug.Tim Murray2013-09-101-1/+1
|/ / | | | | | | | | | | bug 10691313 Change-Id: Icd5341a3c2066e337911f040ddc935c48c8d7cd1
* | Add flags word to initialization.Tim Murray2013-09-091-1/+1
|/ | | | | | bug 10427951 Change-Id: I1356b9b96315ead44aa3898de5604d75f9bb8be5
* Dump the right matrix when logging display listsChris Craik2013-09-051-1/+1
| | | | | bug:10631274 Change-Id: I6b32bfcb3e207321da60807091d7ac0ecf6112ab
* Move functor GL setup to just before functorChris Craik2013-08-261-6/+9
| | | | | | | | | bug:10399469 Because the stencil setup can issue draws, it *must* come before the GL state setup. Change-Id: I52a36213549fc60b091a90cbb923a1f0d35f9a65
* Second attempt at avoiding infinite loop in PathCache::trim()Romain Guy2013-08-211-1/+16
| | | | | | Bug #10347089 Change-Id: I70f5a3933e848632473acc6636c88be5dc6ac430
* Properly account for created paths in the cacheRomain Guy2013-08-212-1/+6
| | | | Change-Id: I47b89b3085cefab6daac9194e7bfd3c140b37fa2
* Add overdraw debugging that accounts for DeuteranomalyRomain Guy2013-08-214-9/+52
| | | | Change-Id: I31f68a07aa7cf0490d2572e24e4c5ac2066a1151
* Handle updates to C++ API.Tim Murray2013-08-191-2/+3
| | | | Change-Id: I8ab17cbae3a9a4cc3c3202b8277d49f27bdf1fec
* Fix hardware layers lifecycleRomain Guy2013-08-161-0/+2
| | | | | | | | Bug #10075732 Hardware layers could survive across EGL terminate events. Change-Id: Ie8565d55cb29fe6625fa1584d695edfecd37ab5e
* Prevent ANR in apps using drawPath()Romain Guy2013-08-161-1/+5
| | | | | | | | | 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
* Clear FBO cache on full memory flushRomain Guy2013-08-161-0/+1
| | | | Change-Id: I44e06d5d15cd899a0522c62d7c0d042170665abb
* fix kBW_Format glyphsVictoria Lease2013-08-122-2/+5
| | | | | | | | Oops! kBW_Format was omitted from a couple of switch statements, resulting in glyphs in that format being invisible. Bug: 10206452 Change-Id: Ib2aa52250aeeecc0de1b1b78e3d0f568f368c73e
* Take shadow bounds into account for quick rejectsRomain Guy2013-08-093-3/+28
| | | | | | Bug #8634346 Change-Id: I995c5205c2959d8e4da638ae47fedcda92eb1b36
* Remove an unnecessary allocationRomain Guy2013-08-092-20/+0
| | | | | | Also remove dead code from OpenGLRenderer.cpp Change-Id: I7eb54ca19e77ee3c32f1fe9513a031e6b2e115cf (cherry picked from commit 5c7d5ab878b26f855175a3305a14ac12fcacf25e)
* Split assets atlas batchesRomain Guy2013-08-064-7/+21
| | | | | | | | | | | | | | | | | | | | | 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
* Handle updates to RS C++ API.Tim Murray2013-08-023-11/+18
| | | | Change-Id: I73127fc7369643b94d4a49f31a516b50c74b54ac
* Merge "Fix quickReject's handling of AA ramp geometry"Chris Craik2013-08-025-12/+52
|\
| * Fix quickReject's handling of AA ramp geometryChris Craik2013-08-025-12/+52
| | | | | | | | | | | | | | | | 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
* | Fix region clipping bugsRomain Guy2013-08-013-6/+10
| | | | | | | | | | | | See external bug #58344 Change-Id: Iecd6c41fc8076cd76add2335d3442a6dd8878f12
* | Support RGBA fonts and bitmap fonts (and RGBA bitmap fonts)Victoria Lease2013-07-319-172/+343
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge "Fix 9patches' limitation of 32 empty quads"Romain Guy2013-07-243-13/+10
|\
| * Fix 9patches' limitation of 32 empty quadsRomain Guy2013-07-243-13/+10
| | | | | | | | | | | | | | | | 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
* | Merge "Ensure glActiveTexture is cleaned up correctly on functor resume"Chris Craik2013-07-223-0/+10
|\ \
| * | Ensure glActiveTexture is cleaned up correctly on functor resumeChris Craik2013-07-223-0/+10
| |/ | | | | | | Change-Id: I103d7d63b17289d599c2c08dcc442cfba9b8e51d
* | Use global indices array to draw layersRomain Guy2013-07-225-47/+54
|/ | | | | | | | | | | | 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
* Merge "Support stencil-based clipping for functors"Chris Craik2013-07-161-0/+1
|\
| * Support stencil-based clipping for functorsChris Craik2013-07-161-0/+1
| | | | | | | | | | bug:9070351 Change-Id: I1c54e1bea1b84b1619cce27b14f189b42cab7062
* | Fix crashes in setMatrix() and concat()Romain Guy2013-07-162-6/+13
|/ | | | | | | setMatrix() was crashing in native code, only with hw acceleration on. concat() would throw a NullPointerException. It now ignores null matrices. Change-Id: Iebd8b410a957d2ba501570c6fbb3f680ff4a1a23
* Use global references for Bitmap AndroidPixelRefsChris Craik2013-07-081-4/+4
| | | | | | | | | | | | | | | | 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
* am 55e789db: am ed96349a: am 3d1b158e: Merge "Fix out of range ↵Romain Guy2013-06-281-6/+9
|\ | | | | | | | | | | | | glCopyTexImage2D Bug #9425270" into jb-mr2-dev * commit '55e789dbc782be0dcaf1d4bae5f32e9e2f674152': Fix out of range glCopyTexImage2D Bug #9425270
| * Fix out of range glCopyTexImage2DRomain Guy2013-06-271-6/+9
| | | | | | | | | | | | | | | | | | Bug #9425270 A better solution would be to use glCopyTexImage2D whenever possible but this change would be a little more dangerous. Change-Id: Ib1aaceda39d838716285ef97f356721416822dbb
* | Track the atlas' generation IDRomain Guy2013-06-276-29/+64
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Refcount 9-patches and properly handle GC eventsRomain Guy2013-06-2611-32/+299
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | (Small) 9patch drawing improvementsRomain Guy2013-06-241-2/+10
| | | | | | | | | | | | | | 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
* | Merge "Initialize MergingDrawBatch clip with viewport bounds"Chris Craik2013-06-213-3/+10
|\ \
| * | Initialize MergingDrawBatch clip with viewport boundsChris Craik2013-06-213-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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