422 Commits

Author SHA1 Message Date
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
Sergei Vasilinetc
68a9dd8c88 Merge "HWUI: set correct sampler for external texture in shaders" 2016-12-13 23:19:47 +00:00
sergeyv
9c97e48fbe HWUI: set correct sampler for external texture in shaders
Test: hwuimacro hwbitmapcompositeshader
bug:30999911
Change-Id: Ic63f7109a4a7069b62c0b21efae2d4ba7e6d64be
2016-12-13 12:59:12 -08:00
TreeHugger Robot
fb1bc8bc97 Merge "SkCanvas is no longer refcnted, use SkClipOps" 2016-12-13 20:49:05 +00:00
Mike Reed
d43eaa9090 SkCanvas is no longer refcnted, use SkClipOps
Change-Id: I57469f56187f1ca8624e7a63968124ee925b4c04
2016-12-13 12:32:37 -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
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
TreeHugger Robot
4a3818ddd3 Merge "Fix a crash in skia pipeline, when empty reorder block is first" 2016-12-01 21:36:01 +00:00
TreeHugger Robot
e9bf7c8436 Merge "Introduce PathInterpolator to native animators" 2016-12-01 20:21:13 +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
TreeHugger Robot
6c670ecdd9 Merge "Add hwui test for correct refcounting of SkColorTable in Bitmap" 2016-12-01 03:35:51 +00:00
Doris Liu
9e9eeeeb78 Introduce PathInterpolator to native animators
For interpolators defined with a path, PathInterpolator is more accurate
and likely less costly for longer animations than what are currently
using as a substiute - LUTInterpolator.

Test: manual test and added a unit test
BUG: 32830741
Change-Id: I867c7a28e4261392cce9c45a2992ab4fd120c496
2016-11-30 16:03:23 -08:00
sergeyv
71c4477bee Add hwui test for correct refcounting of SkColorTable in Bitmap
Test: BitmapTests.colorTableRefCounting
bug:32561595
Change-Id: I505c735feffbac18d406b6b2f9dff51d81700cd8
2016-11-30 13:42:52 -08: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
Mike Reed
338da9c8f9 Merge "SkCanvas is no longer reference-counted" 2016-11-29 14:52:49 +00: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
Mike Reed
6acfe16b56 SkCanvas is no longer reference-counted
Change-Id: Ie821efe7c0a7d1301715e303aaf4d7ec86ac35e7
2016-11-28 15:11:22 -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
sergeyv
59eecb526a Support readback from hardware bitmaps
Test: hwuimacro readbackFromHBitmap --onscreen.
bug:30999911
Change-Id: I369c069c40cb0f9adae5a94501815f29c2d7df0f
2016-11-18 10:49:27 -08:00
Sergei Vasilinetc
5e3935eca2 Merge "Support hardware bitmaps in bitmap shaders" 2016-11-16 17:43:09 +00:00
Martijn Coenen
7b4d850187 Fix call to deprecated range_x().
Test: master builds again.
Change-Id: I0fa7627c7ec28317dd7e37cca93d2b2c90e6d1ea
2016-11-16 11:33:37 +01:00
Martijn Coenen
bbec302fcf Merge "Fix deprecated range_x calls." am: 87cafe8f33 am: d03b17c29a am: 6e2c276c78
am: f4a0f12eb7

Change-Id: Ifdec08542102cf4eba2aa9baf206272523b56894
2016-11-16 10:30:15 +00:00
Martijn Coenen
6e2c276c78 Merge "Fix deprecated range_x calls." am: 87cafe8f33
am: d03b17c29a

Change-Id: I70280eb85b9430c23f6b2681375cbcfa9da2dd38
2016-11-16 10:07:54 +00:00
Martijn Coenen
d03b17c29a Merge "Fix deprecated range_x calls."
am: 87cafe8f33

Change-Id: Idfbc4e3475cea7e56b3ac72afd61e1e981ef4e5d
2016-11-16 10:00:23 +00:00
sergeyv
554ffeb8b7 Support hardware bitmaps in bitmap shaders
Test: hwuimacro bitmapShaderEglImage --onscreen.
bug:30999911
Change-Id: I9d16a1c217a4474841794cf27ce49e3f7823678e
2016-11-15 18:43:09 -08:00
Martijn Coenen
90213f341d Fix deprecated range_x calls.
Test: builds
Change-Id: I98412e51a54ef9f9e26c72ecd810dcea77aefdbb
2016-11-15 09:07:12 +01:00
Seigo Nonaka
b6e2013975 Move test only initialization to each test setup.
Global default typeface initialization is only used by test code.
It is good to do in test and remove from production.

Test: ran hwuimicro hwui_unit_tests hwuimacro
Change-Id: I7090b1794828072112540b4e357a6d24bf8f664a
2016-11-15 10:45:01 +09: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
eea591b08e Merge "Fix RenderNodeDrawable to draw nonzero Z nodes when needed" 2016-11-03 22:30:11 +00:00
TreeHugger Robot
40800725d2 Merge "Implement Skia pipelines for OpenGL and Vulkan." 2016-11-03 19:59:46 +00:00
TreeHugger Robot
c96468b062 Merge "update callers to newer Skia APIs" 2016-11-03 19:27:47 +00:00
Stan Iliev
2f06e8ad1a Fix RenderNodeDrawable to draw nonzero Z nodes when needed
Fix RenderNodeDrawable to draw nonzero Z nodes if not in a reordering
section.
Write an unit test modeled after FrameBuilder zReorder, which
verifies the bug fix.

Test: built and run unit tests on angler-eng.
bug: 32541103
Change-Id: Ifbf2d51f4432f5de3af4abe5987c2a72fed14185
2016-11-03 13:44:41 -04:00
Stan Iliev
500a0c30d4 Implement Skia pipelines for OpenGL and Vulkan.
Implement Skia pipelines for OpenGL and Vulkan:
base SkiaPipeline, SkiaOpenGLPipeline and SkiaVulkanPipeline.
Write unit tests for SkiaPipeline.

Test: Built and run manually on angler-eng.
Change-Id: Ie02583426cb3547541ad9bf91700602a6163ff58
2016-11-03 13:28:49 -04:00
John Reck
f0503b0b6f Merge "Add benchmarks for View inflation" 2016-11-03 17:14:57 +00:00
Mike Reed
ab12c1fe73 update callers to newer Skia APIs
Test: refactoring CL. Existing unit tests still pass.

Change-Id: I47e73e00f14f78dd9d4c48a142ac9853e7e4cad7
2016-11-03 12:58:42 -04:00
John Reck
3acf0382da Add benchmarks for View inflation
Also speed up RenderNode creation:

Use finalizer() instead of NativeAllocationRegistry, this
shaves ~3us off of creation currently

Avoid instanceof, instead have SurfaceView explicitly ask
for updates.

Remove unused method call.

Test: ran benchmarks
Change-Id: I3117fdf72313a4e6a9965baca9f2a8b855c19b34
2016-11-02 14:49:51 -07:00
Mike Reed
c2f31df8b3 use SkBlendMode
skbug.com/5814

Test: compile only
Change-Id: Ibbaff43df1117b2ca77fd8f917f03d88cc476330
(cherry picked from commit 26edbcba8a2ed4cb300e7f87e679e3b73cec2772)
2016-11-02 11:36:48 -04:00
Sergei Vasilinetc
97cc85fd4b Merge "Routine to upload hardware bitmaps" 2016-11-01 19:32:19 +00:00
sergeyv
694d499662 Routine to upload hardware bitmaps
Change-Id: Id8283a0975325e6830d55fd1e33c5f292a1e9be0
Test: refactoring cl.
bug:30999911
2016-10-31 16:11:21 -07:00
Stan Iliev
021693b967 Implement SkiaRecordingCanvas, RenderNodeDrawable and other drawables.
Implement SkiaRecordingCanvas, RenderNodeDrawable, GLFunctorDrawable,
LayerDrawable, StartReorderBarrierDrawable, EndReorderBarrierDrawable.
Move AnimatedRoundRect and AnimatedCircle in a separate file.
All Skia pipeline files are moved in hwui/pipeline/skia folder.
Add unit tests for RenderNodeDrawable, StartReorderBarrierDrawable,
EndReorderBarrierDrawable and SkiaRecordingCanvas.

Test: I tested manually on 6P devices and did run the unit tests.
Change-Id: If2a347bd1fc4689953822294ce5bf98c7f3f57c7
2016-10-31 14:27:02 -04:00
Derek Sollenberger
96f4410a57 Merge "Refactor mock Functors into a common TestUtils class." 2016-10-28 20:17:56 +00:00
Derek Sollenberger
835b3a69c3 Refactor mock Functors into a common TestUtils class.
Test: refactor. existing tests still pass
Change-Id: I55258487c371869a5b91dd2dcf6bf7bd47ac1a35
2016-10-28 13:58:09 -04:00
Derek Sollenberger
c0f50362c7 Merge changes If99865cd,I5b794c94
* changes:
  Fix test breakage due to naming collision in the linker.
  Minor cleanup of unused headers and overly described functions.
2016-10-28 17:13:22 +00:00
Derek Sollenberger
5ef78a895b Fix test breakage due to naming collision in the linker.
Test: hwui_unit_tests in question now run successfully.
Change-Id: If99865cd1cfa5c819338d062f5685700380a60a6
2016-10-28 11:08:50 -04:00
Derek Sollenberger
050bb6a2b0 Minor cleanup of unused headers and overly described functions.
Test: local compile
Change-Id: I5b794c9473f6d3a9e1d4f9365c951c7ce9dade50
2016-10-28 11:08:27 -04:00
Sergei Vasilinetc
fda66672fe Merge changes I94b1c31c,Ib0b16c87
* changes:
  Add target to texture
  Use Bitmap in Texture.upload
2016-10-28 01:31:00 +00:00