56 Commits

Author SHA1 Message Date
Derek Sollenberger
f209c06d36 Don't crash when presented with non-roundRect clipping outline.
We still won't clip to the outline to match existing HWUI behavior.

Test: CTS Graphics and hwui_unit_tests pass
Bug: 38411077
Change-Id: Ia3161df77a4ccaf0e714d2fe1ac12396d1c8f9e9
2017-05-26 12:11:34 -04:00
John Reck
576b6a8a79 Revert "Fix recent apps in system UI for Skia pipeline"
This reverts commit 625dd56a45bfe95c5f1baa1891529503ff3374a9.

Reason for revert: Caused a memory leak, b/38330767
Bug: 38136140
Bug: 38330767
Test: manual, verified memory isn't leaking doing the steps in b/38330767

Change-Id: I998bea04788d58ba6bad71c1691d5a3b33190c1b
Merged-In: I98b2dfd750be57a15785808e2d5723616e2ce20a
2017-05-17 00:32:09 +00:00
Stan Iliev
625dd56a45 Fix recent apps in system UI for Skia pipeline
Enable HW Bitmaps for Skia pipeline just enough to make
recent apps list working by adding support for BitmapShader.
Drawing HW bitmaps in a canvas is also supported.

Test: recent apps work, HWUI unit tests pass, CTS tests pass.
bug: 38136140
Change-Id: Ibd06c859c86dc213310d5ce5272497e1882d0cc6
Merged-In: Ibd06c859c86dc213310d5ce5272497e1882d0cc6
2017-05-12 19:42:33 -04:00
Jim Van Verth
5745a0a37f Add uncached and perspective shadows to Skia renderer
Test: manual - looked at FrameworkShadow app

Bug: 37300468
Change-Id: I72d820479141db2d83363747d9f76abbaca70d98
2017-04-13 13:15:12 +00:00
Stan Iliev
d7410f7829 Fix pop-up shadow drawn in the wrong place with Skia pipeline
Fix a bug in DrawShadow matrix calculation. Recorded matrix does
not need to be applied, because parent display lists have already
replayed matrix transformations.

Test: added a new HWUI unit test that is passing only after this fix
Bug: 33103723
Change-Id: I7a47dbe879df6b9e5920a47c0e1168d9902a3e70
2017-04-04 16:24:55 -04:00
Ben Wagner
3aeda5c5c4 Use access directly instead of sk_exists.
Skia would like to move SkOSFile and make it private spi. This appears
to be the only place SkOSFile is used outside Skia, and using access
here directly is more apropriate.

Test: Simple inline refactor, built and ran. Changes test code only.
Change-Id: Ib76c180bb3bccc54c20dcadc842837e3e8270929
2017-03-17 17:22:01 -04:00
TreeHugger Robot
4f357c0812 Merge "Fix potential use-after-free in LayerUpdateQueue" 2017-03-02 23:16:27 +00:00
John Reck
fc29f7acd1 Fix potential use-after-free in LayerUpdateQueue
Change-Id: I090af2191576175b165a9db574a80123c16f0778
Fixes: 26548204
Test: Builds & hwui unit tests pass
2017-03-02 13:30:15 -08:00
Derek Sollenberger
ea1fe9b9d6 Update SkiaDisplayList to use the modified SkLiteDL
SkLiteDL is no longer refcounted or a subclass of SkDrawable.

Test: on device testing in SkiaGL mode
Change-Id: I9ad53d764a26ab382d80d54908325962f2075802
2017-03-02 15:28:19 -05:00
Mathias Agopian
fee4a985fd fallout of libandroid.so split
Test: compiled & booted
Bug: 35164655
Change-Id: I786167a21453e17493969cdacfc9d31bdb781d98
2017-02-23 23:28:20 +00:00
Chris Craik
2f1aaf7e24 updateTexImage before bitmap readback of DeferredLayerUpdaters
Bug: 34206215
Test: hwui unit tests passing

Change-Id: I4360c0d94a831b4d2ebfd4020e4241658bfa190a
2017-02-15 17:22:26 +00:00
Stan Iliev
d217237045 Implement "dump displaylist" button for skia pipelines
Implement "dump displaylist" button in hierarchyviewer for skia
pipelines.

Test: ran hierarchyviewer for all pipelines.
bug: 34819877
Change-Id: Ifeb578260f636cb67268f9f9259e7318bf7de453
2017-02-09 17:09:03 -05:00
Stan Iliev
30a75debb1 Use new Skia DrawShadow API
Use new Skia DrawShadow API to draw shadows and remove unused code
from HWUI.

Test: Built and ran shadow macrobench tests.
Change-Id: Ief86b03b7348367f8bae8c212d64d5a545eebaeb
2017-02-06 11:36:33 -05:00
sergeyv
3e9999bd86 Explicitly destroy Layer in DeferredLayerUpdater on destroyHardwareResources()
Change-Id: I0987104eabda9a2a302b9e765213aad48f93aea4
Test: refactoring CL. Existing tests still pass
bug:33753499
2017-01-30 16:42:41 -08:00
John Reck
2de950d5a8 Overhaul RenderNode's DisplayList management
* Move mValid to native
* Have destroyHardwareResources destroy everything
* Remove flaky mParentCount checks in setStaging
* All tree updates have an internal observer to
  ensure onRemovedFromTree() is a reliable signal
* onRemovedFromTree() immediately releases resources
  to avoid displaylist "leaks"

Test: Unit tests for validity added & pass, manually
verified that b/34072929 doesn't repro

Bug: 34072929

Change-Id: I856534b4ed1b7f009fc4b7cd13209b97fa42a71c
2017-01-25 12:24:40 -08:00
Mike Reed
5e43898231 use new clipbounds api
Allows us to remove SK_SUPPORT_LEGACY_GETCLIPBOUNDS flag

Change-Id: I7c6665b4eb67c58fe747c07b8b87d58fe9b10120
2017-01-25 13:26:41 +00:00
Stan Iliev
98d251b10e Refactor GLFunctorDrawable to use new SkCanvas API for clip region
Refactor GLFunctorDrawable::onDraw to get SkCanvas clip region
with new Skia API (getClipStack is going to be deprecated).

Test: Built and ran angler-userdebug. Ran CTS WebView clip tests.
Change-Id: Ia11e3f3d64d5c33802b7a8f296f213ef39a69905
2017-01-19 18:08:38 -05:00
Greg Daniel
45ec62ba72 Add support for dummy draws for Vulkan webview and texture views.
Test: manual testing
Change-Id: Iaec8c3a34367673c281665ff6c6e97d1ce532265
2017-01-10 15:54:14 -05:00
Greg Daniel
8cd3edfa15 Break Layer class into Gl and Vulkan subclasses
Test: manual testing
Change-Id: Ibd2beed39de3ac6da7448e96496253cfe427dfbb
2017-01-10 15:05:07 -05:00
Stan Iliev
b66b8bb4a0 Ensure root render node clip cannot expand beyond dirty area
Use new Skia API to enfore clip restriction for root render node.
This brings Skia pipeline in line with HWUI. Unit test is
updated to reflect the new behaviour.

Test: Built and ran angler-eng, ran HWUI unit tests.

Change-Id: Iffce70fd37b6aff45eb6a23c8b1a64f45b5f1463
2016-12-16 14:42:33 -05:00
Chris Craik
66b9d4486a Revert "try to stop using exotic clipps"
This reverts commit 834653bcf80a3879c4d80004469053f205d45b69.

Change-Id: Ie8cb787490832a0be154ec1263313982157faa81
2016-12-16 17:49:48 +00:00
Mike Reed
834653bcf8 try to stop using exotic clipps
Change-Id: Id11d7744daa69c19fdc9b7723862b3d71ad21384
2016-12-15 16:01:42 -05:00
Mike Reed
6c67f1d045 SkClipOp is now an enum class
Change-Id: If423dd013a264162ae0b7674a0eeef34bc2cdaae
2016-12-14 10:29:54 -05:00
Leon Scroggins III
ee708facf1 Remove unnecessary dependency, and fix the chain
Test: No new tests. This should not affect behavior; only dependencies.

Font.h does not need to include SkGlyphCache.h, and doing so requires
a transitive dependency on external/skia/src/utils, which was not
intended. Forward declare it instead, and fix the build errors that
resulted.

Change-Id: Ifd09430bb848d51b139df0f0c06c63e7e48711eb
2016-12-13 08:27:19 -05:00
Stan Iliev
52771272f4 Add more Skia pipeline unit tests.
Add more Skia pipeline unit tests and fix an issue
in backdrop/content bounds clip logic.

Test: built and run angler-eng and HWUI unit tests.
Change-Id: Ie41f80ff7ce9802a4d76e8b14f1695dbc9771a2b
2016-12-12 14:13:16 -05:00
Greg Daniel
cd55852fcd Make buffer age work in Vulkan
Test: manual testing in skiavk mode

Change-Id: I5b9d8af7d9cecf2f022ef104ec33a5b7477e9e0c
2016-12-09 15:45:15 +00:00
Mike Reed
9a648a1c74 Merge "switch over clip calls to use SkClipOp instead of SkRegion::Op" 2016-12-07 20:54:59 +00:00
Mike Reed
6e49c9f007 switch over clip calls to use SkClipOp instead of SkRegion::Op
Change-Id: I67d23c487b5249bc31d96e3b2393f693c0b2bcff
2016-12-07 10:34:39 -05:00
Hal Canary
10219fb261 SkImageEncoder->SkEncodeImage
Test: none
Change-Id: I15630d2852d12840329181f135852e28d287bbcf
(cherry picked from commit 8c6bac4c77caeefb667bec90d16b5384fd2b2b31)
2016-12-07 13:29:42 +00:00
Stan Iliev
347691f8d8 Fix a crash in skia pipeline, when empty reorder block is first
Fix a crash in skia pipeline, which happens if an empty reorder
barrier is inserted at index 0 in a SkiaDisplayList.
Add a unit test that repro the bug (unit test is crashing wihtout
the fix and passing with the fix).

Test: built and ran skia pipeline with angler-eng and run HWUI unit
tests.

Change-Id: I4aded15021c70cc0ae8daa83bbe8ed0e10a41eef
2016-12-01 12:25:07 -05:00
Matt Sarett
711b6aec9a Merge "Add overdraw debugging feature to Skia pipelines" 2016-11-30 16:51:24 +00:00
Matt Sarett
f58cc92066 Add overdraw debugging feature to Skia pipelines
Test: Compared to OpenGL pipeline and sanity checked
with understanding of the drawing pipeline.  Also
wrote a unit test.

BUG:32370375

Change-Id: Iab397d21f0def725fa89551d48c764c67fd2bda8
2016-11-29 18:03:40 -05:00
Stan Iliev
88e0891f66 Fix draw order for non-RenderNode draw commands
Fix a drawing order issue in Skia pipeline. Add unit test in both
HWUI and Skia to test the fix.

Test: built and ran on angler-eng and HWUI unit tests passed.
Bug: 32506749
Change-Id: I7f13457726a8664f18a46aca2279b876acec2944
2016-11-28 15:14:42 -05:00
Stan Iliev
db45a4bfaf Fix Skia render node projection to match HWUI
Fix Skia render node projection to match HWUI. Port
FrameBuilderTests_projectionReorder test for Skia pipeline.
Add new tests in both HWUI and Skia to cover more projection
use cases.

Test: built and run on angler-eng
Change-Id: Ibf27af211452ae95d595aca7723ea63f48b0b282
2016-11-22 16:38:20 -05:00
Derek Sollenberger
e92d4045eb Merge "Update pinImages to report when GPU resource limits are exceeded." 2016-11-17 19:08:50 +00:00
TreeHugger Robot
6acb4efca3 Merge "Support Surface and Layer Readback in the SkiaPipelines." 2016-11-17 16:17:59 +00:00
Derek Sollenberger
189e87498f Update pinImages to report when GPU resource limits are exceeded.
Bug: 32691999
Test: proposed CTS test (ag/1500396) and existing UiRendering tests
Change-Id: I190f888ae5499ac048569af8256fdd31d19d1285
2016-11-17 09:56:53 -05:00
TreeHugger Robot
c4428c1e1a Merge "Add layer updates debugging feature to Skia pipelines" 2016-11-16 22:13:45 +00:00
Matt Sarett
79756be175 Add layer updates debugging feature to Skia pipelines
When this property is turned on, we flash green
every time a hardware layer is updated.

Test: Matches the behavior in OpenGLPipeline

BUG:32370375

Change-Id: I916f94eee644c185d8a3f9fa4cd69e087ed1e92d
2016-11-16 15:17:04 -05:00
Derek Sollenberger
c4fbada76a Support Surface and Layer Readback in the SkiaPipelines.
Test: CTS TextureViewTests and UIRendering
Change-Id: I2969c8f5a975bfd9aebcbb585c64d1fcbb2487c2
2016-11-16 13:30:00 -05:00
Derek Sollenberger
af9dc4dc30 Merge "Handle vulkan windowing directly in SkiaVulkanPipeline" 2016-11-14 13:26:05 +00:00
Derek Sollenberger
e547dd0b80 Cleanup asserts and remove usage of deprecated data structure.
Test: compile only
Change-Id: I9e9f1a3fb37db043d76a98a9568679e7e531e283
2016-11-09 18:04:44 +00:00
Derek Sollenberger
0e3cba3146 Handle vulkan windowing directly in SkiaVulkanPipeline
Test: manual testing in skiavk mode
Change-Id: I2fab80bae2787bfdacbc70d0402e98450e59406d
2016-11-09 11:58:36 -05:00
TreeHugger Robot
e3d281ea18 Merge "Add debug memory tracking to SkiaGLPipeline" 2016-11-08 01:15:33 +00:00
Matt Sarett
4bda6bfaa6 Add debug memory tracking to SkiaGLPipeline
Test: Sample output is below

D/OpenGLRenderer: Resource Cache Usage:
D/OpenGLRenderer:       32 items out of 8192 maximum items
D/OpenGLRenderer:  4635572 bytes (4.42 MB) out of 96.00 MB maximum

This is less verbose than OpenGL memory debug output for
two reasons:
(1) SkiaGL has less caches.
(2) SkiaGL does not support printing on cache additions/evictions.
    This seems like more of an internal debugging tool rather than
    a user-facing debug feature.  I think it's best to leave this
    unimplemented until we find that it might be useful.

BUG:32370375

Change-Id: Ib063f1c2a7f88e9840341b1001d227f556d88f26
2016-11-07 16:35:06 -05:00
TreeHugger Robot
9310f59cac Merge "Fix bug with displaying visual profile bars" 2016-11-07 21:32:28 +00:00
Matt Sarett
4c9bbf4eef Fix bug with displaying visual profile bars
Test: Used debugging feature.

BUG:32370375

Change-Id: I56e4e2155566a219ce43882e48b327123edccfe2
2016-11-07 14:23:33 -05:00
Derek Sollenberger
b7d34b64dd Refactor pin/unpinImages to work across pipelines.
Test: existing CTS tests still pass
Change-Id: Ib2607e9853396bad42f298829b5c5da0d210af32
2016-11-07 10:05:56 -05:00
TreeHugger Robot
3d36fac235 Merge "Add SkiaProfileRenderer to draw visual debugging info" 2016-11-04 12:53:40 +00:00
Matt Sarett
cf2c05c652 Add SkiaProfileRenderer to draw visual debugging info
This adds support for debug.hwui.profile and
debug.hwui.show_dirty_regions to the Skia pipelines.

There still may be some follow up work for profiling
with visual bars.  The speed at which the renderer
is able to draw the rects in the graph is having a
noticeable effect on the actual data in the graphs.

Test: Verified that the features work as expected.

BUG:32370375

Change-Id: I24430da2bab3eb54f6a771f9c984f8ae0008a5a7
2016-11-03 21:42:58 -04:00