745 Commits

Author SHA1 Message Date
John Reck
38e0c32852 Track texture memory globally
Also mostly consolidates texture creation

Change-Id: Ifea01303afda531dcec99b8fe2a0f64cf2f24420
2016-01-14 13:42:12 -08:00
Chris Craik
5430ab220b Avoid unneeded rect params
Change-Id: I2d8dcf6b09fdc554a403ac74763bf856b5f5d9fa
2015-12-10 16:29:01 -08:00
Chris Craik
386aa03179 Add more shape drawing to new reorderer/renderer
bug:22480459

Add support for outsetting final bounds based on stroke.

Change-Id: I659318ccec51882bba1906ce3c7042288ce35c30
2015-12-09 11:29:04 -08:00
Chris Craik
15c3f19a44 Merged op dispatch in OpReorderer
bug:22480459

Also switches std::functions to function pointers on OpReorderer, and
switches AssetAtlas' entry getter methods to using pixelRef pointers,
so it's clear they're the keys.

Change-Id: I3040ce5ff4e178a8364e0fd7ab0876ada7d4de05
2015-12-07 12:34:46 -08:00
Chris Craik
a1717271ca Initial text support in new reorderer/renderer
Removes obsolete drawPosText codepath, and unifies text decoration behavior.

Change-Id: I9c563249ab688a3394445a0e7fe1b9d0661f6f7c
2015-11-20 11:03:18 -08:00
John Reck
9557dcd53b Merge "Fix HWUI Path Cache dangling pointer" am: 37bf3ec9d2 am: 7516d4d866
am: 1b85ce17a3

* commit '1b85ce17a316973a170b3932f2d0a9b02063eaa3':
  Fix HWUI Path Cache dangling pointer
2015-11-10 23:36:27 +00:00
Digish Pandya
2e4f67c388 Fix HWUI Path Cache dangling pointer
When precache, PathTexture is added to PathCache, and it is released after drawn if we want to clean it.
But the PathCache LRU still holds the entry of the PathTexture object. When trim the cache in
the end of each frame, LRU finds that its mListener is not NULL and invoke the functor, however,
mListerer points to the released PathTexture object and is a dangling pointer, thus leads to crash.
Smart pointer don't help here since they only manage scopes, while PathTexture is also controled by
its cleanup field.
The fix is to also remove the LRU entry of PathTexture*, it will also release the texture object
and there won't be texture leaks.

Change-Id: Iaa0621df5dc71532e9e75b38ad94384353930b95
2015-11-09 14:22:25 +05:30
Chris Craik
818c9fbf1d Initial version of clipped saveLayer in new pipeline
Additionally disables usage of FBO cache, so FBO destruction safely
interacts with renderstate caching.

Change-Id: I25c277cb7afec2ca33bf226445d6c8867a15a915
2015-10-26 15:51:48 -07:00
Chris Craik
6fe991e5e7 Work to support saveLayer in new pipeline
clipped SaveLayers will now be pulled to the beginning of the frame,
prior to drawing FBO 0. This will remove the need for switching FBOs
mid-frame.

Change-Id: I4d8dc1f845e84e9b49d5acdf4f4703eef4a9cb06
2015-10-21 18:19:37 -07:00
Chris Craik
ac02eb9035 Remove confusing behavior of Rect::intersect() and rename
bug:24670525

Removes silly 'do nothing if rects do not intersect' behavior, and
changes the name to clarify the difference (contrasting against
SkRect::intersect())

bug:24670525

Change-Id: Id2ca1cfea1a9d720d4dc70b251f426d9916f8b53
2015-10-05 14:16:26 -07:00
Chris Craik
f6049a5c55 Merge "Move more utils into paintutils" 2015-10-02 17:28:36 +00:00
Chris Craik
56ce58ee6e Merge "Move ortho matrix out of glop" 2015-10-02 17:28:01 +00:00
Chris Craik
bf6f0f2608 Move more utils into paintutils
Change-Id: I1eb3fd52386bc61a592da235533e40b509eeec24
2015-10-01 15:26:06 -07:00
Chris Craik
12efe649d3 Move ortho matrix out of glop
It's fbo-global, so don't bother stashing/restoring it repeatedly.

Change-Id: Icb32e3eda5d2086aaae07140f8ff40e038dad5fe
2015-09-28 15:52:14 -07:00
Chris Craik
b45c6aa665 Simplify DeferredDisplayList construction
Change-Id: I385bd894fda097e35abb8f8d5eb8271f10bd163b
2015-09-28 15:41:27 -07:00
Chris Craik
c08820f587 Remove lookup3 gamma code
Also clean up gamma / glyph cache properties

Change-Id: I75b1ac0cb55638bf787ffd3cf457483ae314f03b
2015-09-22 14:40:35 -07:00
Chris Craik
64e445bf74 CanvasState frame init refactor
bug:23760482

Change-Id: Idc0802b4b8a6a3cebd20797350f4eb01bcc3fe77
2015-09-02 15:15:56 -07:00
Chris Craik
3aadd60521 Revert "Revert "Simplify TextureView draw path""
Fixed build breakage

This reverts commit d35dcb13115ca1dd8c07e397f43a186cd7fd1a01.

Change-Id: Id3a103fbaac15a05f558bce2161ce17b6e8d2ea3
2015-08-21 10:33:02 -07:00
Bart Sears
3b1c32eb5d Merge "Revert "Simplify TextureView draw path"" 2015-08-20 02:25:30 +00:00
Bart Sears
d35dcb1311 Revert "Simplify TextureView draw path"
This reverts commit 20a248934c67b19c8734362dba76a5cc94254686.

Change-Id: Iaa3ebb1d868acbe184080087aec312b43e87e3c7
2015-08-20 02:23:39 +00:00
Chris Craik
87f9c42f54 Merge "Simplify TextureView draw path" 2015-08-20 00:02:09 +00:00
Chris Craik
20a248934c Simplify TextureView draw path
bug:20461288

Change-Id: I239fbd26ab2177481c84feb62a1da68faeb634ac
2015-08-19 16:59:45 -07:00
Chris Craik
e5e6f4837b Merge "Change setMatrix behavior to only affect canvas-local matrix" 2015-08-19 22:38:07 +00:00
Chris Craik
7c85c54499 Remove Matrix4::load(Matrix4&)
bug:22320446

Change-Id: Id6d1cc9b4aea828b0cdf622ad672064d72671f8d
2015-08-19 15:10:25 -07:00
Chris Craik
6daa13c5fa Change setMatrix behavior to only affect canvas-local matrix
bug:22189925

This makes setMatrix(getMatrix()) work as expected, and makes setMatrix()
much more useful without changing behavior relative to a View's parent
hierarchy.

Change-Id: I608613bd27c1b9052ae583f8fd2119cf37a2f6d7
2015-08-19 13:32:15 -07:00
John Reck
149173d28c Support new EGL extensions
Bug: 21753739

Includes a revert of 13d1b4ab10fbee5e81a2ba1ac59cfae1e51d3ef0
as that only supported EGL_EXT_buffer_age

Change-Id: Ia86a47d19e3355c067934d7764c330b640c6958d
2015-08-12 14:26:05 -07:00
John Reck
272a685f17 Replace most usages of utils/Vector.h
Change-Id: I540d1b3523244d6c71fc52d6fb30555271c25644
2015-07-30 09:51:52 -07:00
Tom Hudson
0f6cb32c75 am a5e2946f: am b9d7bba5: am 434b577f: am 8ac76504: am 9613e9b7: Merge "New setLocalMatrix() operation for HWUI" into mnc-dev
* commit 'a5e2946f5ab7618997fb317ad9f5f56c160ebee5':
  New setLocalMatrix() operation for HWUI
2015-07-10 13:35:27 +00:00
Tom Hudson
9613e9b764 Merge "New setLocalMatrix() operation for HWUI" into mnc-dev 2015-07-10 12:35:12 +00:00
Tom Hudson
ac7b6d33d2 New setLocalMatrix() operation for HWUI
Concats any matrix passed through from DisplayListCanvas with the
initialTransform of the containing RenderNode.

BUG:22189925

Change-Id: I5ea54a6e2a29520c79a8860bde7682694e8595d2
2015-07-09 16:15:31 -04:00
Chris Craik
43b42d8bdb am 41e4d8b3: am 0c218e43: am 9ca926ad: am fdb87b76: am 127b478a: Merge "Remove all usage of fmin and fmax" into mnc-dev
* commit '41e4d8b3ed044ed724bc340b77d3f9ca60105407':
  Remove all usage of fmin and fmax
2015-07-08 03:15:47 +00:00
Chris Craik
e6a15ee3d0 Remove all usage of fmin and fmax
bug:22208220

Removes needless call, and upconversion to doubles in multiple places.

Change-Id: I1b949fa5f206446ac34de800154c0147d6bd8034
2015-07-07 18:42:42 -07:00
Chris Craik
7b293b5556 am c3988e0a: am b4c02e8f: am d3ecb3e6: Merge "Switch from fminf/fmaxf to std::min/max" into mnc-dev
* commit 'c3988e0aa337b74693feb0abb898eb87fbb61b58':
  Switch from fminf/fmaxf to std::min/max
2015-07-03 20:35:50 +00:00
Chris Craik
df72b63928 Switch from fminf/fmaxf to std::min/max
bug:22208220

Shows considerable improvement in performance, especially in tight
loops.

Change-Id: I4bcf6584a3c145bfc55e73c9c73dcf6199290b3c
2015-06-30 17:58:21 -07:00
Chris Craik
d739b5f39c am ee6d943b: am 46de9f56: am 6659ac77: Merge "Avoid over-damaging layer area for multidraws" into mnc-dev
* commit 'ee6d943b9e13cde263ccb622dd529922dfa1f3b3':
  Avoid over-damaging layer area for multidraws
2015-06-24 18:40:14 +00:00
Tom Hudson
02a26300fb Switch framework to new Skia enums
Allow Skia to finish deprecating old path operation enumerations.

Change-Id: I61e4489e639043acb78d47994ab62a31f18bd878
2015-06-24 16:56:43 +00:00
Chris Craik
3375f8ad30 Avoid over-damaging layer area for multidraws
bug:19608961

Change-Id: Ib7495f155da62a352e9a010a362fd40ec0acad21
2015-06-24 09:43:54 -07:00
Chris Craik
b1f990de40 Fix roundrect clipping / blending ordering
bug:21803918

Also, don't consider rr clipped ops opaque, and put stage
checking behind a debug flag.

Change-Id: I9304ae571337a7cf835524682d1a590a21d30fa4
2015-06-12 13:20:37 -07:00
Chris Craik
53e51e4aa9 Handle shader matrix correctly when ignoring canvas transform
bug:20063841

Restores old SkShader matrix behavior from before the Glop refactor.

Many drawing operations draw without sending the canvas transform to
the GL shader. In such cases, we need to adapt the matrix sent to the
SkShader logic to invert the canvas transform that's built into
the mesh.

Change-Id: I42b6f59df36ce46436322b95bf9ad2140795ee58
2015-06-02 16:28:39 -07:00
Chris Craik
1cd7e4c3d0 Merge "Use path intersection instead of saveLayer+mesh to mask projected ripples" into mnc-dev 2015-05-28 22:03:08 +00:00
Chris Craik
fca52b7583 Use path intersection instead of saveLayer+mesh to mask projected ripples
bug:14297149

SaveLayer's performance cost is high, and proportional to the surface
being projected onto. Since ripples (even unbounded ones) are now
always projected to the arbitrary background content behind them, this
cost is especially important to avoid.

This removes the last semi-secret, saveLayer from the projected
ripple implementation.

Also fixes the HW test app to correctly demonstrate this projection
masking behavior.

Additionaly, alters PathTessellator to gracefully handle
counter-clockwise paths, and simplifies the work done by
ShadowTessellator to ensure all of its paths are counterclockwise.

Change-Id: Ibe9e12812bd10a774e20b1d444a140c368cbba8c
2015-05-26 17:53:16 -07:00
Chris Craik
1e4c8074fa Fix position snapping for drawBitmap(rect, rect)
bug:20669049
Change-Id: Ied5f1d7e681409b6b7f6f582ed344b479df4c6d7
2015-05-26 15:04:27 -07:00
Alan Viverette
50210d9129 Adjust light source for window position
Bug: 16523629
Change-Id: I2f3fed1edcac0a3cfd5034aded45e08ececfebaf
2015-05-14 18:05:36 -07:00
Chris Craik
2507c34d91 Cleanup properties
bug:19967854

Separate properties from Caches, into static, RenderThread-only class.

Also rewrites the means for java to set properties to correctly handle
threading, and adds an override for profile bars so that SysUi doesn't clutter
the screen with them.

Change-Id: I6e21a96065f52b9ecc49d1a126244804ba106fa9
2015-05-05 10:36:09 -07:00
Chris Craik
e74ff81e05 Merge "Remove concept of layer alpha override" into mnc-dev 2015-04-29 22:16:11 +00:00
Chris Craik
e145013153 Require minimum 4 bit stencil for layers.
bug:19270131
Change-Id: I81367179d268e7c1642259c456c1f3d0018f6c0d
2015-04-29 13:04:02 -07:00
Chris Craik
8df5ffa9ae Remove concept of layer alpha override
bug:19412691
Change-Id: I9e150fe4a1b2c0cf140519a33c02fd4771ef1c50
2015-04-28 17:47:20 -07:00
Chris Craik
db663fe83f Rename native DisplayListRenderer to DisplayListCanvas
Change-Id: I33e6f8cc85da1e7da7ff7bf18d4ebde64222067a
2015-04-20 14:20:47 -07:00
Tom Hudson
040b6d8baf Fix offset of composeLayerRegion
composeLayerRect() pays attention to the offset of the layer, but
composeLayerRegion() ignores it. This patch makes the behavior of
the region case match the behavior of the rect case.

The difference will only be shown by tests which do not position
the saved layer at the origin.

BUG=20288561
R=ccraik@google.com,djsollen@google.com

Change-Id: Ie22737a8614c508cbffe39aa4c55f7d5434277aa
2015-04-16 13:39:51 -04:00
Chris Craik
828407356d Delete pre-glop path
bug:19014311

Change-Id: I06376b6f625455892d8eafe2727b78025a64c4bf
2015-04-03 13:01:18 -07:00