summaryrefslogtreecommitdiffstats
path: root/tests/HwAccelerationTest/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Preliminary Support for region clippingRomain Guy2013-01-141-7/+3
| | | | | | | | | | | | | | | | | | | | 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
* Add plumbing for better text scalingRomain Guy2013-01-082-6/+49
| | | | | | | | 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
* Add more tests for libhwuiRomain Guy2013-01-072-0/+171
| | | | | | These tests verify the behavior when scaling paths and text Change-Id: I0f3259175bcee93186e30296759996e0447cba99
* Properly support ALPHA_8 bitmaps in all drawBitmap() methodsRomain Guy2013-01-041-0/+97
| | | | Change-Id: I869993c59e0a0d76f369c09acbae711753908f48
* Merge "Add API to enable mipmaps on Bitmap Bug #7353771" into jb-mr1-devRomain Guy2012-10-161-0/+77
|\
| * Add API to enable mipmaps on BitmapRomain Guy2012-10-161-0/+77
| | | | | | | | | | | | | | | | | | Bug #7353771 This API can be used when scaling large images down to a small size to get nicer looking results. Change-Id: If09087eed36077eee5355f6047a3ca67747d7d9e
* | Support clipping in Canvas.drawBitmapMesh()Romain Guy2012-10-161-0/+7
|/ | | | | | Bug #7354162 Change-Id: Ifd1d0b365e8a4d88e0ff0629c9ee13f27e1a7331
* Merge "Fix bug #7206086 NumberPicker widget should use locale digits" into ↵Fabrice Di Meglio2012-09-231-2/+2
|\ | | | | | | jb-mr1-dev
| * Fix bug #7206086 NumberPicker widget should use locale digitsFabrice Di Meglio2012-09-211-2/+2
| | | | | | | | | | | | | | - fix for having the TwoDigitFormatter being able to be recreated if the locale is changed - accept now also the Arabic and Persian digits Change-Id: Ifbf7e274d971008f4a5782402d4b76d9472b68fc
* | Optimize tiling managementRomain Guy2012-09-201-2/+2
| | | | | | | | | | | | Bug #7186819 Change-Id: Iebc42a6e9c96ad5605fbbe1539aa887695d2e829
* | Add support for QCOM_tiled_renderingRomain Guy2012-09-192-0/+8
|/ | | | | | | | | Bug #7186819 This optional OpenGL extension can be used by tiled renderers to optimize copies from main memory to tiles memory. Change-Id: Id4a5d64e61ad17f50e773e8104b9bf584bb65077
* Add test for layer updates optimizationsRomain Guy2012-09-181-0/+75
| | | | | | Optimizations are following. Change-Id: I120e1d0c08d8068fcac46515f37a4ae510e5f3a3
* Merge "Fix memory corruption in LayerRenderer::copyLayer" into jb-mr1-devRomain Guy2012-09-071-0/+81
|\
| * Fix memory corruption in LayerRenderer::copyLayerRomain Guy2012-09-071-0/+81
| | | | | | | | | | | | | | | | 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
* | Handle different x, y scales in drawLines AA pathChris Craik2012-09-071-0/+8
|/ | | | | | | | | | | 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 "Varying-based AA rect drawing" into jb-mr1-devChris Craik2012-09-061-0/+6
|\
| * Varying-based AA rect drawingChris Craik2012-09-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Add new hw acceleration testRomain Guy2012-09-041-0/+67
|/ | | | Change-Id: Id2b94286cf62ab77d8c843cffaba09b3070a6332
* Optimize interactions with glyph cacheChet Haase2012-08-141-0/+75
| | | | | | | | | | | | | | | | | 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
* Reduce gradients textures size whenever possibleRomain Guy2012-08-081-0/+77
| | | | Change-Id: Ifd58625ee62edac3b5d20b77553cb98b6fa2b46e
* Draw an empty border around glyphs to avoid sampling issuesRomain Guy2012-08-071-0/+6
| | | | | | | | | | 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
* Add dithering to gradientsRomain Guy2012-08-011-0/+9
| | | | Change-Id: Ic1208855bde3a254eca2fd7cef43e0f1318ce419
* Improve gradientsRomain Guy2012-07-311-0/+116
| | | | | | Avoid using textures for common gradients (two stops from 0.0 to 1.0) Change-Id: Iff55d21b126c8cfc4cfb701669f2339c8f6b131a
* Make HardwareRenderer able to target generic Surface objectsRomain Guy2012-07-241-5/+4
| | | | Change-Id: I4b7199a1eb30e0df354ae12c4819adc69db5df40
* Make gradients look slightly betterRomain Guy2012-07-201-0/+50
| | | | Change-Id: Ib12c628a88b9ec6af1214ce6e5cb14cfde40485e
* Removing setChildrenLayersEnabledMichael Jurka2012-06-282-139/+18
| | | | Change-Id: I88d8228eadb59160648f2c4e131fcd85945f2109
* Fix TextureView OpenGL sampleRomain Guy2012-05-161-13/+16
| | | | | | | The sample was doing something dumb: instead of binding the texture unit to the shader's sampler, it was binding the texture name. Oops. Change-Id: I13450dacbbd2dad362a2573aebb95e8eb87b25f0
* Remove all Dalvik allocations from Cavnas.drawBitmap(int[], ...)Romain Guy2012-05-141-1/+6
| | | | Change-Id: Ie28538a2104d21154fdc78a56525e7403f08287d
* Fix hang/crash in native path codeChet Haase2012-05-031-0/+101
| | | | | | | | | | | | | | | | 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
* Corrects invalidation logic for layered viewsChet Haase2012-05-021-0/+162
| | | | | | | | | | | | | A bug in the invalidation logic meant that changes to a view would not cause parents in the view hiearchy that were set to have a layer (e.g., View.LAYER_TYPE_HARDWARE) to get invalidated properly. So even though the child view was all set to recreate its display list according to the property change, the layer in the tree above it would stay as-is, meaning that the change would not show up on the screen. Issue #5887530 DropTarget text does not change color with the icon Change-Id: Ie6eac4f406d172cb437822d9fe76340ab2afaf1c
* Merge "New libhwui test activity"Romain Guy2012-04-032-0/+512
|\
| * New libhwui test activityRomain Guy2012-04-032-0/+512
| | | | | | | | Change-Id: I0ce4bc665f117d7c0ed47670ceb4ed6f9b54d85c
* | Optimization of alpha with DisplayList propertiesChet Haase2012-04-031-0/+145
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Re-enable DisplayList properties.Chet Haase2012-04-021-0/+201
|/ | | | | | | | | | 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
* Full implementation of Canvas.drawPath()Romain Guy2012-02-291-1/+54
| | | | Change-Id: I23223b89770a0cd2b4762365bead9bfddb094290
* More infrastructure for Canvas.drawTextOnPathRomain Guy2012-02-241-3/+19
| | | | Change-Id: Iff42b24e342650d06fa4e2fa9db6c28da820ff01
* Add hooks to implement Canvas.drawTextOnPath() in GLRomain Guy2012-02-241-0/+84
| | | | Change-Id: I165c9e05facf5365aa6850605688e538640c7fcc
* Only recreate path textures when necessaryRomain Guy2012-02-231-13/+18
| | | | | | | | | | | | | | 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
* Only copy paths, paints and shaders when we need to.Romain Guy2012-02-211-0/+111
| | | | Change-Id: Iba7a9c92c865f698821b6ff7bc4f502659642ac1
* Prevent AutoCompleteTextView from opening a popup when it shouldn'tRomain Guy2012-02-151-0/+9
| | | | | | | | | | | | Bug #5553515 The People app is forcing ACTV to show the IME which had the side effect of showing the drop down popup. ACTV was unfortunately not ready to show the drop down if the filtering resulted in no results. Doing so was putting ACTV in a weird state that in turn caused a window to be leaked and really bad behavior to occur in the lower graphics levels. Change-Id: I2ff146d5ae4e4a28edf6ea17039c9f8fdb710e4f
* Preliminary support for clipRect(Rect, Op)Romain Guy2012-02-071-0/+57
| | | | | | | 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
* Add full support for Canvas.setDrawFilter()Romain Guy2012-01-231-0/+64
| | | | Change-Id: I0ad35d0603c4eeda469014803be14c1dcdde918c
* Deprecate unused APIsRomain Guy2012-01-191-0/+56
| | | | Change-Id: I0107e246b632dda96b8b025217936954f1f46283
* Full support for Canvas.drawPosTextRomain Guy2012-01-181-0/+13
| | | | | | This also introduces a small optimization when rendering text. Change-Id: Iff620ac97bf878eaac406bccc6daa07052c93890
* Fix text encoding when drawing with drawPosText in softwareRomain Guy2012-01-171-0/+66
| | | | Change-Id: I0cd8ee526189c38c50953a1a08b50e0b31c55d8c
* Make sure 9patches are not filtered when not necessaryRomain Guy2011-10-201-1/+10
| | | | | | Bug #5383406 Change-Id: I061c8069a4d9f4eaf45671283710b564639eeb32
* Correctly apply transforms when getting a TextureView's bitmapRomain Guy2011-10-112-8/+67
| | | | | | Bug #5439406 Change-Id: I271a9a2e38f5b3600dc158f8f442a6b0893f472b
* Don't build display lists for views with a layer.Romain Guy2011-09-281-0/+125
| | | | | | | | | | | | This could cause the draw() code of views to be invoked too often or worse, called with the wrong canvas. For instance, a view backed by a software layer could get its draw() method called to record a display list. Using a software layer is the recommended way to use drawing operations not supported in hardware. Since we would sometimes call the draw() method with the hardware backend anyway, the app could crash by executing an unsupported operation. Change-Id: Ib5f9a3a4c6f3efff5e0162ecd73d2dffe06e30a6
* Add OpenGL backend to ImageWallpaperRomain Guy2011-08-241-45/+7
| | | | | | | | Bug #5204874 Currently disabled. Change-Id: I5e7b35dce2981b0691f107e39c6394b260466543
* Add an API to set the transform on a TextureView's surface texture.Romain Guy2011-08-161-2/+2
| | | | | | Bug #5156689 Change-Id: I635a625885c9b832a60d44ece0de7613ceb84109