7264 Commits

Author SHA1 Message Date
Chris Craik
07d8d59e21 Add SkiaBehaviorTests
Change-Id: Ie2983f7a0c9e8bdd8c8de507d70ecf3aefdd9425
2016-02-03 18:43:04 -08:00
Chris Craik
fdbc795e48 Merge "Remove unnecessary fence in macrobench" 2016-02-04 01:43:40 +00:00
Chris Craik
2705c983f5 Remove unnecessary fence in macrobench
bug:26882579

Change-Id: Ic2d610b5ae7e04513dc7f7fa99d355d406a73379
2016-02-03 17:39:41 -08:00
Chris Craik
d8165e863b Simplify shadow task cleanup
bug:26964750

Removes 3 news/deletes per task, as well as the waitOnTask inside destruction

Change-Id: Iec11165bcfa7f98ca41574885734c2ad39328cc8
2016-02-03 16:30:11 -08:00
Derek Sollenberger
0eef10e556 Merge "Update Canvas API with view system calls." 2016-02-03 17:59:11 +00:00
Florin Malita
777bf85c16 Remove remaining references to SkCanvas::SaveFlags
One SkCanvas save flag reference snuck back in after the last
cleanup.  Convert to the new SaveFlags enum.

Change-Id: I9ba4b01a19bbb80276c84d30fd0d7b9513892cf9
2016-02-03 10:48:55 -05:00
Derek Sollenberger
6f485569fa Update Canvas API with view system calls.
Refactor DisplayListCanvas, RecordingCanvas, and SkiaCanvas
to share a common API.

Change-Id: I0268ec2749ea5d13a3a72bb2784ed6a9911383d9
2016-02-03 09:13:04 -05:00
Chris Craik
bcda2da5fe Merge "Early kickoff of shadow tasks" 2016-02-03 01:17:37 +00:00
Chris Craik
6e068c0182 Early kickoff of shadow tasks
bug:26562703

Change-Id: I7cdf18f2c662380bd31c7ffeefd5c3f569e5c1c6
2016-02-02 17:10:25 -08:00
Chris Craik
9f19f5ae8c Merge "Fix null offscreen buffer crash" 2016-02-03 00:42:30 +00:00
Doris Liu
a72d52bbed Merge "VectorDrawable native rendering - Step 4 of MANY" 2016-02-03 00:19:22 +00:00
Chris Craik
c0f3f2f8c0 Fix null offscreen buffer crash
bug:26571145

Change-Id: I6e885fd6135c0987360275cbf5b46475c24401d4
2016-02-02 16:12:32 -08:00
Doris Liu
f276acd984 VectorDrawable native rendering - Step 4 of MANY
This CL runs VectorDrawable animation on RenderThread. The changes in this CL
include:
- Convert all the animators in AnimatorSet for AVD into a set of RenderNodeAnimators.
- Hook up the new animators with RenderThread
- Add drawOp in RecordingCanvas for drawing VD so that during the animation
  on RenderThread, all the property changes on VD can be reflected on the screen.

TODO:
- Implement reverse and reset for AVD.

Change-Id: I2df1d754f2db0ad098d9c15dde4bb2bdfafc2315
2016-02-02 15:04:01 -08:00
Zhang Dongsheng
892760008f libhwui: handle eglSwapBuffers with EGL_BAD_NATIVE_WINDOW error case
If eglSwapBuffers is called but the under surface was destroyed,
the EGL_BAD_NATIVE_WINDOW error may also be generated according
to the EGL spec 1.4.

This really shouldn't happen from the upper, but add the graceful
handling of this case also.

Change-Id: Ic0a599808b72f401d2a01c3dc40f9e6ea0e0a564
Signed-off-by: Zhang Dongsheng <dongsheng.zhang@intel.com>
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
2016-02-02 10:39:49 +08:00
Roozbeh Pournader
27953c349f Make default resources a better match for en-US requests
When locale fallback landed, resources which specified an 'English'
locale started to be considered a better match for en-US, even though
traditionally, apps tend to ship US English resources under their
default locale.

This fixes that, and makes en-US requests match default locales.

Bug: 26756573
Bug: 26789680
Bug: 26803868
Change-Id: I460c276bfc6ddba0439dcdf87497a0aece0fa05d
2016-02-01 14:56:52 -08:00
John Reck
15d21b3aca Merge "Fix TextDropShadowCache infinite loop" 2016-02-01 15:24:57 +00:00
John Reck
c3127a78b9 Fix TextDropShadowCache infinite loop
Bug: 26862239

Switch TextDropCacheShadow to use the tracked objectSize()
instead of the optional bitmapSize. A mismatch here
results in ::get() infinite looping trying to free space in
the cache since the LRU removal callback would always
decrement mSize by 0 since bitmapSize was not being set.

Also prevent the infinite loop in the future by crashing if
this scenario happens again.

Change-Id: Ib4e9fbe1c8327af2335ad650fd694a1627d9824f
2016-01-29 16:26:35 -08:00
John Reck
0b8d0677be Fix copyLayerInto
Bug: 26763945
Change-Id: I21ffbd56cf70bad0928416963e6fc254be435af9
2016-01-29 14:53:45 -08:00
Teng-Hui Zhu
28d4ea5584 Fix redundant drawPath call
Change-Id: I17dab39e0ca60f64543053381d8677f1a31507c0
2016-01-28 10:32:35 -08:00
Teng-Hui Zhu
dbee9bb342 Gradient for VectorDrawable's fill and stroke
Add ComplexColor interface for both GradientColor and ColorStateList.
Set up constant state, factory, theme attrs for GradientColor, while
refactoring the ColorStateList's similar code. (Functionality in CSL should
be the same).

Support themeing in both the root and item level in GradientColor.
For example, both startColor in <gradient> tag or color in <item> tag can
have theme color.
Add tests for both simple and complex cases with themeing etc.

Hook up the native VectorDrawable implementation using 2 extra JNI calls for
simplicity. Such calls only happen at inflate and applyTheme call.

b/22564318

Change-Id: Ibdc564ddb4a7ee0133c6141c4784782f0c93ce0e
2016-01-27 16:32:42 -08:00
Chong Zhang
c3bd568112 Restore code to draw backdrop and content nodes
bug: 26626661
Change-Id: I9e4dd41708e8ed93d3cf64242ad81815a653d269
2016-01-26 12:49:28 -08:00
John Reck
c9fd313f94 Merge "Fix tests" 2016-01-26 18:59:27 +00:00
John Reck
65182ccffc Fix tests
Disable FrameBuilder.clippedMerging as it relies on
merged bitmap ops which was disabled in b/26793764

Fix Buffer to correctly initialize mRefs count

Change-Id: I87d2fcc690a2ae14eaf751f650f522be5b622edf
2016-01-26 10:50:10 -08:00
John Reck
5f1c64ef76 Merge "Temporarily workaround merged bitmap bug" 2016-01-26 18:06:04 +00:00
John Reck
14de0415bb Temporarily workaround merged bitmap bug
Bug: 26569206

Merged bitmap ops are buggy, just turn them off for
now to unblock testing

Change-Id: Ic0151bb3f23b1843107806659a64b26fd6d6e19e
2016-01-26 09:01:30 -08:00
Florin Malita
dd93728b46 Merge "Add internal Canvas save flags" 2016-01-26 17:00:37 +00:00
John Reck
c52ac0b9e2 Merge "Add fine-grained debug layer" 2016-01-26 15:21:07 +00:00
John Reck
975591a7af Add fine-grained debug layer
Full GLES error checking layer via -include
trickery. Change DEBUG_OPENGL to a level system.

HIGH = every GL call is error checked
MODERATE = checkpointing at interesting spots
LOW = only asserts there are no errors at the end of a frame
 or when the FBO changes
NONE = AIN'T GOT NO TIME FOR ERRORS GOTTA GO FAST!

Change-Id: Ibe81aae93d942059c4ddf1cbb11c828b7ce4c10b
2016-01-25 16:15:14 -08:00
Florin Malita
eecff56fed Add internal Canvas save flags
Skia's SkCanvas::SaveFlags are being deprecated.  This CL introduces
the equivalent android::SaveFlags, converts all internal clients to
the new enum, and switches the saveLayer glue to the
SaveLayerRec-based API.

Change-Id: Icb1785f4e7c0f652b1f04b34a1e3ccb063c408f3
2016-01-25 15:48:00 -05:00
John Reck
83b09fb919 Merge "Validate Region.orSelf arguments" 2016-01-25 18:45:15 +00:00
John Reck
25f0dc440d Validate Region.orSelf arguments
Bug: 26611248

libui.so has int overflow sanitization enable, so
validate that we have "reasonable" looking floats
before trying to orSelf the Region.

Change-Id: I135ef7be82e7abaa9aa569224c2799612847cd03
2016-01-25 10:37:52 -08:00
Andres Morales
214a137209 Merge "expose hwui frame stats through FrameStatsObserver" 2016-01-25 16:51:14 +00:00
Derek Sollenberger
a3f16d4377 Replace SkALWAYSBREAK with equivalent Android macros.
Change-Id: Icb7786c789915375d7d8754fc8536302c1020858
2016-01-25 10:33:01 -05:00
Andres Morales
06f5bc70a6 expose hwui frame stats through FrameStatsObserver
Change-Id: I88884bafc8e2f6d7f67a36d3609490e83cf8afd5
2016-01-22 12:58:51 -08:00
John Reck
541b193fc4 Merge "Fix mismatch in assumed defaults vs. actual defaults" 2016-01-22 19:18:54 +00:00
John Reck
a5b2029e1b Merge "Fix accidental activateTexture(0)" 2016-01-22 19:18:43 +00:00
John Reck
48247a2956 Fix mismatch in assumed defaults vs. actual defaults
Bug: 26584230
Change-Id: Ia0271b097a40123c18f6b3540c1168cba109b5ce
2016-01-22 11:10:32 -08:00
John Reck
bd41ded590 Fix accidental activateTexture(0)
Bug: 26584230

activateTexture(0) was accidentally refactored into
Texture::upload. Only OffscreenBuffer intended for the
texture unit to change

Change-Id: I5dbfc3eab8843733084ce1ce38a0a946abf0e05b
2016-01-22 09:31:28 -08:00
John Reck
1a2d84acbd ALOGE is not ALOGV
Change-Id: I973cd7ce28bed38934aab0818e581a948a12cb42
2016-01-22 09:17:41 -08:00
Derek Sollenberger
a83c1e545e Merge "Add support for bitmaps with Grey_8 color type." 2016-01-22 14:07:37 +00:00
John Reck
c080f112b5 Merge "resolve merge conflicts of 32a95af029 to master." 2016-01-22 00:46:34 +00:00
John Reck
e5530ec0b4 resolve merge conflicts of 32a95af029 to master.
Change-Id: I35b7cea1d34cb24f431ba2b76433a5b0ef1cb602
2016-01-21 16:45:31 -08:00
Michael Wright
6cfa1cc4b0 Merge "Add choreographer API to the NDK." 2016-01-22 00:31:40 +00:00
Michael Wright
3d3fe5026a Add choreographer API to the NDK.
Change-Id: Icb8cffd3cd3bd06814466be72db3e26f6a62cbc6
2016-01-21 16:30:33 -08:00
Roozbeh Pournader
2d05094209 Merge "Implement smarter locale resource selection" 2016-01-21 22:17:31 +00:00
John Reck
32a95af029 Merge "libhwui: fix texture memory leak"
am: 550d46d9da

* commit '550d46d9dae8a4de5abd36a5e2d3c101135da696':
  libhwui: fix texture memory leak
2016-01-21 22:08:44 +00:00
Doris Liu
7f193c5b03 Merge "Create SkCanvas on the stack to avoid leaking memeory" 2016-01-21 21:49:54 +00:00
Roozbeh Pournader
b927c559e1 Implement smarter locale resource selection
* Add support for determining script from language and region.
* Add support for determining special parents of locales.
* Add support for smart comparison of locales with only a difference
  in region, using the locale parentage tree.
* Fix LocaleData.matchScore() to not fallback to old locale matching
  behavior if we can't determine a script.
* Allow four-character variant codes. (Previously, only five- to
  eight-character variant codes were allowed.)

Bug: 7296673
Bug: 26589793
Change-Id: Ibde0a48c0564ff383b41068095a5cbacfe7b94bc
2016-01-21 13:47:22 -08:00
Doris Liu
c2de46fadd Create SkCanvas on the stack to avoid leaking memeory
Bug: 26447978
Change-Id: Ied022c103c3b08e9cfc3cb775a8c95fd5461e81d
2016-01-21 13:05:48 -08:00
John Reck
66f65cb345 Ensure Texture always binds to self
Bug: 26584230

In the event that Texture decides it doesn't
need to actually call glTexImage2D/glSubTexImage2D
it needs to still activateTexture(0) and bindTexture(mId)
as this is the expected state after Texture::upload()
is called.

Change-Id: I62d689a9057907a10dda2bc8f40c3113e43b93b2
2016-01-21 09:08:42 -08:00