3798 Commits

Author SHA1 Message Date
Seigo Nonaka
9ff994d988 Introduce set/getFontVariationSettings.
This is 2nd attempt of I249d464f8cdaa56017a987588b94ed685aadeb58.
The original CL was reverted due to conflicting with another CL submitted
before.
Nothing has changed except for following class name changes.

Here is the original commit message of reverted change.

This CL enables developers to specify axis values to the underlying
font collection. The specification of the font variation settings is
the same as the CSS font-variation-settings attribute in CSS working
draft as of 2016-11-30.

Code example: Here is an example to set width 100 and weight 1.5.

  TextView tv = (TextView) findViewById(R.id.textView);
  tv.setFontVariationSettings("'wdth' 100, 'wght' 1.5");

Bug: 33062398
Test: Manually done. Ran FrameworksGraphicsTests, CtsGraphicsTestCases
      and CtsWidgetTestCases

Change-Id: I9cdfbdecc87c995d805096883ef2652768c6c21e
2017-01-30 20:22:41 +09:00
Chris Craik
a0428f8dae Merge "Temporarily enable GL validation" 2017-01-27 00:13:20 +00:00
John Reck
b5544d0308 Temporarily enable GL validation
Bug: 34206215
Test: none
Change-Id: Ifc2855ca399f4ae42376349dd5c660f60b327c04
2017-01-25 15:09:37 -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
TreeHugger Robot
f54c76399a Merge "use new clipbounds api" 2017-01-25 16:40:37 +00: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
TreeHugger Robot
68eb1ac342 Merge "Follow minikin::FontFamily constructor signature change." 2017-01-25 07:05:50 +00:00
Matt Sarett
02b0d40547 Merge "Fix renderOverdraw() test" 2017-01-24 22:49:43 +00:00
TreeHugger Robot
4f2a40ac9f Merge "Revert "Workaround libmemunreachable lockup"" 2017-01-24 19:49:55 +00:00
John Reck
efa38e38fb Revert "Workaround libmemunreachable lockup"
This reverts commit 553ae6ab071b1db5e783c8c02f9311b4969729f6.

Change-Id: I593b78f7073d84a5e16372849d27e943af65694c
Fixes: 34586922
2017-01-24 18:13:03 +00:00
Matt Sarett
341480bef5 Fix renderOverdraw() test
I'm not sure why this test was modifies, but this
restores the test to the original version, which passes.

Test: Passes unit test

BUG:34467659

Change-Id: I6699cf13d4b69301d57fa0cec9b24093e8263ba7
2017-01-24 09:05:39 -05:00
Seigo Nonaka
8b48e62445 Follow minikin::FontFamily constructor signature change.
This is 2nd attempt of Id10ca97f6f6f5bbe4999c1ad2736423a204d6e87.
The root caus of crash is due touching null pointer in nUnrefFamily.
After above change, native object may not be created on error case.
In that case, nUnrefFamily can not be called. In addition to this issue
there is also memory leak on error case. This fixes it by introducing
abortCreation method.

Also this contains fix of layout lib breakage done by jgaillard@.
Originally submitted by Ic8872a43993bcb0a157c5e3f0ce423af9b47f606

Here is original commit message of reverted change.

minikin::FontFamily no longer has addFont function, instead it accept
vector of Fonts in its constructor. To follow this signature change,
holding minikin::Font instance in native and build minikin::FontFamily
instance in FontFamily.freeze() method.

Bug: 34042446
Bug: 28119474
Bug: 34378805
Test: hwui test has passed
Test: m layoutlib layoutlib-tests
Change-Id: Ic34ebaa8191273d4c9f49c43124f15a1da5f7b78
2017-01-24 15:10:29 +09:00
TreeHugger Robot
2ba96eced0 Merge "Add tests for b/34598346" 2017-01-23 23:46:00 +00:00
John Reck
47aa8d1477 Add tests for b/34598346
Test: unit test passes
Bug: 34598346
Change-Id: I7e5144aa875e42487718059cc06b86e32db28702
2017-01-23 14:07:53 -08:00
TreeHugger Robot
65e8f0adf3 Merge "Workaround libmemunreachable lockup" 2017-01-23 21:16:55 +00:00
TreeHugger Robot
2d31375d94 Merge "Remove all calls to SkCanvas::getClipStack from HWUI unit tests" 2017-01-23 20:37:16 +00:00
John Reck
553ae6ab07 Workaround libmemunreachable lockup
Bug: 34586922
Test: hwui_unit_tests completes
Change-Id: Ia55f7bc49faf8a32624e2f16e2477eb12a261b07
2017-01-23 11:06:46 -08:00
Stan Iliev
c1db0e0ff7 Remove all calls to SkCanvas::getClipStack from HWUI unit tests
Refactor HWUI unit tests to not invoke SkCanvas::getClipStack,
because this Skia API is going to be deprecated.

Test: Build and ran sailfish-eng. Ran HWUI unit tests.
Change-Id: Iac277aa26fbe9e2a0860cde2dd43732ed1c4c4e3
2017-01-23 13:47:35 -05:00
John Reck
51c51df46c Add missing nothingToDraw() check
Fixes: 34598346

Prior to 2874daa4d38bddd3a5f0edb3774d5e5884dd9554 we
never freed the resources of root nodes. Now that this is being
done we need to ensure that the backdrop has content before
we try to draw that content. All other nodes passed in
deferRenderNodeScene check that nothingToDraw() returns false
before drawing them, but that check was missed on the backdrop
node.

Test: manual. open calculator then long-press on recents
Change-Id: I495749161b38b57278bdb60d5f872eeeb2b218d0
2017-01-23 10:26:28 -08:00
TreeHugger Robot
27be018934 Merge "Refactor GLFunctorDrawable to use new SkCanvas API for clip region" 2017-01-20 14:31:41 +00:00
Siyamed Sinir
c0d685b87a Revert "Follow minikin::FontFamily constructor signature change."
This reverts commit a0a4828614edfd633ab86f04408e7f4e55b491dd.

Bug: 34378805
Change-Id: Icbdbfbde2efe8eaebbe4334a679e3b3247057388
2017-01-20 02:01:25 +00:00
Siyamed Sinir
24fac986ec Merge "Revert "Introduce set/getFontVariationSettings."" 2017-01-20 01:59:52 +00:00
Siyamed Sinir
a3b9f2e3c6 Revert "Introduce set/getFontVariationSettings."
This reverts commit ba3028c1fc9fca2d45acc841557da2c9a83923bf.

Bug: 34378805
Change-Id: I8250c87af5d65fb45789632580be4ae1b8711372
2017-01-20 01:13:23 +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
57b8eb3da0 Merge "Update hwui_unit_tests to support running with Vulkan backend." 2017-01-18 16:13:04 +00:00
Greg Daniel
98c78dad19 Update hwui_unit_tests to support running with Vulkan backend.
Added Macros for RENDERTHREAD_TESTS which run these tests using specific backends.
RENDERTHREAD_TESTS - Runs OpenGL, SkiaGL, and SkiaVulkan
RENDERTHREAD_SKIA_TESTS - Runs SkiaGL and SkiaVulkan
RENDERTHREAD_OPENGL_TESTS - Runs OpenGL

Test: manual running of hwui_unit_tests

Change-Id: Ia7420ee7a38803a15e2d58394d14b38cae8208d3
2017-01-18 09:12:31 -05:00
Ben Wagner
c2d9470aa9 Remove SkDevice.h includes.
SkDevice.h is being removed from Skia. This removes these already unused
includes which mention this file.

Test: refactoring CL. Existing unit tests still pass.

Change-Id: I8340a5822ad2b75c54fe0dca1303ceab9bbee805
2017-01-13 17:03:13 -05:00
Mark Salyzyn
6f773a0d87 Replace cutils/log.h and android/log.h with log/log.h
Test: compile
Bug: 34250038
Change-Id: I42185a879beaa9bb244f53a968800392b854ac45
2017-01-12 20:29:11 +00:00
Ben Wagner
610fbb3afd Merge "Use FatVector instead of SkAutoMalloc in VulkanManager." 2017-01-12 18:41:51 +00:00
Mark Salyzyn
22221f6981 Merge "resolve merge conflicts of ec7e2a164c37 to master" 2017-01-12 17:23:01 +00:00
Ben Wagner
eec27d51d2 Use FatVector instead of SkAutoMalloc in VulkanManager.
Skia is looking to make SkAutoMalloc private and will be moving it.
Using FatVector instead will make this code both less dependent on Skia
internals and more performant.

Test: refactoring CL. Existing unit tests still pass.

Change-Id: If9de10059775b75e1ab89078eacede2e20e91299
2017-01-12 11:52:31 -05:00
Mark Salyzyn
173215d1b2 resolve merge conflicts of ec7e2a164c37 to master
Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I49c6e41b79061e2b3c0352e3ac8fa5ebb152b6f5
2017-01-12 08:28:30 -08:00
Mark Salyzyn
ec7e2a164c Merge "Replace cutils/log.h and log/logger.h with android/log.h or log/log.h (part deux)" am: 2225a0640b am: d1740f0f5b
am: 6dacea63d9

Change-Id: Ife229cc450dbbb5f43941fcd1b08b86f0e41a779
2017-01-12 15:59:48 +00:00
Mark Salyzyn
6dacea63d9 Merge "Replace cutils/log.h and log/logger.h with android/log.h or log/log.h (part deux)" am: 2225a0640b
am: d1740f0f5b

Change-Id: I78430cd21cf1186ccc2b48ee4ee8a9b07decde5e
2017-01-12 15:46:20 +00:00
Seigo Nonaka
ba3028c1fc Introduce set/getFontVariationSettings.
This CL enables developers to specify axis values to the underlying
font collection. The specification of the font variation settings is
the same as the CSS font-variation-settings attribute in CSS working
draft as of 2016-11-30.

Code example: Here is an example to set width 100 and weight 1.5.

  TextView tv = (TextView) findViewById(R.id.textView);
  tv.setFontVariationSettings("'wdth' 100, 'wght' 1.5");

Bug: 33062398
Test: Manually done. Ran FrameworksGraphicsTests, CtsGraphicsTestCases
      and CtsWidgetTestCases
Change-Id: I249d464f8cdaa56017a987588b94ed685aadeb58
2017-01-12 18:11:03 +09:00
TreeHugger Robot
e4e375c749 Merge "Follow minikin::FontFamily constructor signature change." 2017-01-12 07:43:53 +00:00
Mark Salyzyn
96bf5985d5 Replace cutils/log.h and log/logger.h with android/log.h or log/log.h
(part deux)

Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I7417936c4d3666608fccfe51a312c90ecefba2fb
2017-01-11 15:30:30 -08:00
TreeHugger Robot
4a07b95746 Merge "Fix Skia merge by fixing API mismatch." 2017-01-11 21:20:02 +00:00
TreeHugger Robot
ba5124b48b Merge "Fix dirty Z prop" 2017-01-11 20:55:09 +00:00
Derek Sollenberger
624ad836ec Fix Skia merge by fixing API mismatch.
Test: compile
Change-Id: Ie524af03fd3c85cceac13abdcdd9af8ef6ca6bb9
2017-01-11 14:57:34 -05:00
John Reck
41282b7629 Fix dirty Z prop
Test: none
Change-Id: I886d50e58d6f404c6d19860a3032ca1b2854e073
2017-01-11 11:26:48 -08:00
Greg Daniel
6efc30e1b7 Merge "Add support for dummy draws for Vulkan webview and texture views." 2017-01-11 19:01:52 +00:00
Greg Daniel
63b18b3fda Merge "Break Layer class into Gl and Vulkan subclasses" 2017-01-11 19:00:34 +00:00
Mark Salyzyn
db15537e6e resolve merge conflicts of 082a1721b516 to master
Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I17f178f425975c1c0dbd48091d25b101956d505e
2017-01-11 08:30:17 -08:00
Mark Salyzyn
082a1721b5 Merge "Replace cutils/log.h and log/logger.h with log/log.h" am: e7fcbcb991 am: 6143cbf1e5
am: ef8ccc8510

Change-Id: If6673f44c7d08960f3a0a86703cebf577bd21f1b
2017-01-11 15:45:46 +00:00
Mark Salyzyn
ef8ccc8510 Merge "Replace cutils/log.h and log/logger.h with log/log.h" am: e7fcbcb991
am: 6143cbf1e5

Change-Id: Id192d8dd973fe9e70acab72bae9856bc8a62ac75
2017-01-11 15:40:24 +00:00
Mark Salyzyn
e7fcbcb991 Merge "Replace cutils/log.h and log/logger.h with log/log.h" 2017-01-11 15:24:11 +00:00
Seigo Nonaka
a0a4828614 Follow minikin::FontFamily constructor signature change.
minikin::FontFamily no longer has addFont function, instead it accept
vector of Fonts in its constructor. To follow this signature change,
holding minikin::Font instance in native and build minikin::FontFamily
instance in FontFamily.freeze() method.

Test: hwui test passed
Change-Id: Id10ca97f6f6f5bbe4999c1ad2736423a204d6e87
2017-01-11 17:57:59 +09:00
John Reck
d645ac4d10 Merge "Fix a use-of-uninitialized-value warning." am: 95ef9ec5b1 am: 44e14d0d2b am: 5f3ed9b7de
am: 68dce922af

Change-Id: Id1c35f315618663a6139c2729871cdfd02fe451f
2017-01-11 01:41:03 +00:00
John Reck
68dce922af Merge "Fix a use-of-uninitialized-value warning." am: 95ef9ec5b1 am: 44e14d0d2b
am: 5f3ed9b7de

Change-Id: I6e35191f4ddda2590eae4cfac9af5c781d0e493b
2017-01-11 01:30:59 +00:00