Commit Graph

40 Commits

Author SHA1 Message Date
Zhizhou Yang
e18b77972b Turn on PGO for Skia on Android
This patch is to turn on PGO for skia on Android, which will provide a
performance improvement of 7.6% for hwui when applied PGO for both.

The patch specified a skia.profdata file, which locates in internal
google_data/pgo_profile directory, to work as the profile to feed PGO.
This profdata can be re-collected with PGO build system support.

PGO can be turned off by setting ANDROID_PGO_NO_PROFILE_USE environment
variable or set variable to false.

Test: Build skia successfully and verified the performance improvement
on device through benchmark.

BUG=skia:

Change-Id: I826f417569b2853630f6d4fcce236b5bc36547fa
Reviewed-on: https://skia-review.googlesource.com/82880
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: John Reck <jreck@google.com>
2017-12-11 19:20:08 +00:00
Greg Daniel
afb7ec7a40 Revert "Revert "Add define to use customize vulkan header.""
This reverts commit b351817588.

Reason for revert: Relanding with android fixes

Original change's description:
> Revert "Add define to use customize vulkan header."
>
> This reverts commit a492eb0e1f.
>
> Reason for revert: Breaking Android roll (b/c builds tools?)
>
> Original change's description:
> > Add define to use customize vulkan header.
> >
> > Bug: skia:
> > Change-Id: Ia87c81a54603a02b2f8f51a735bf173a49afe6c7
> > Reviewed-on: https://skia-review.googlesource.com/81121
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com
>
> Change-Id: I80a685bf88af909865f274ffc61686be57e8c313
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/81740
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,bsalomon@google.com

Change-Id: Ia701e884bfa3799dc73002f892feb2ecafe9da12
Reviewed-on: https://skia-review.googlesource.com/81742
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-12-07 18:29:39 +00:00
Leon Scroggins III
6d892f58bf Add comments explaining use of "-Wno-over-aligned"
Follow up to I04a5b013dd0ec8f162046388e89cf08cb9476bab

Change-Id: I5ab77564fe867ad1fef48fb322ff75869c025776
Reviewed-on: https://skia-review.googlesource.com/79040
Commit-Queue: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-12-01 15:14:19 +00:00
Leon Scroggins III
74663e722e Add "-Wno-over-aligned" to Android.bp for x86 Android
Speculative fix for Android roll, broken here: ag/3293969.

We used to make an exception for this warning on Skia builds, until I
disabled it in https://skia-review.googlesource.com/c/skia/+/60530,
because it no longer seemed necessary: Turning on most warnings without
this exception in Android framework builds, as I did in
https://skia-review.googlesource.com/55703 did not break Android.

I'm not sure why Skia's waterfall did not show the problem, but this
should fix it on the Android framework side.

TBR=mtklein@chromium.org

Change-Id: I04a5b013dd0ec8f162046388e89cf08cb9476bab
Reviewed-on: https://skia-review.googlesource.com/78580
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-11-30 20:08:38 +00:00
Leon Scroggins III
981a31e6a8 Generate warning settings for Android framework
Bug: b/66996870

Android wants to build with warnings as errors. Keep the external/skia
warnings in sync with other Skia builds by pulling them from the json
generated by GN.

Fix a couple small errors that show up in the framework build.

Uploaded in response to AOSP's
https://android-review.googlesource.com/#/c/platform/external/skia/+/498211/

Change-Id: I4d791d43a9b00f9d6b79ecf16839716f241cba99
Reviewed-on: https://skia-review.googlesource.com/55703
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-10-06 16:18:34 +00:00
Derek Sollenberger
5a932166e8 Update the Android.bp to expose a static library
This CL will enable Android to statically link libskia into libhwui
while still exposing the symbols needed by other components of the
system.

Bug: b/31971097
Change-Id: Ib6c87331dbe456e247b46a34c38da4863dfe02f0
Reviewed-on: https://skia-review.googlesource.com/49766
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2017-09-25 13:29:53 +00:00
Leon Scroggins III
04be2b54ba Reland "skia: add heif decoding support"
This reverts commit db68a426b6.

Fixes errors in Android and Google3

Bug: b/64077740
Change-Id: I3d2bb1223e4d8ba912ea2b88144aeecc487fce1a
Reviewed-on: https://skia-review.googlesource.com/35701
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Chong Zhang <chz@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2017-08-18 14:40:29 +00:00
Mike Klein
db68a426b6 Revert "skia: add heif decoding support"
This reverts commit c2a954290d.

Reason for revert: both Android and Google3 rolls cannot compile.  Android cannot cast std::unique_ptr<T> to T*, Google3 cannot find HeifDecoderAPI.h.

Original change's description:
> skia: add heif decoding support
> 
> Bug: b/64077740
> Change-Id: I11e0243bcc4c21c0aa5aa29a719dd0fcba7ae6f7
> Reviewed-on: https://skia-review.googlesource.com/35123
> Reviewed-by: Chong Zhang <chz@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Chong Zhang <chz@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>

TBR=scroggo@google.com,chz@google.com

Change-Id: Id98f025e63daec50408186000453d1695170f7a8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b/64077740
Reviewed-on: https://skia-review.googlesource.com/35741
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2017-08-17 13:34:07 +00:00
Mike Klein
a26d219a92 Revert "turn exceptions on in test tools on Android"
This reverts commit c902ff8fc8.

Reason for revert: not gonna do this afterall.

Original change's description:
> turn exceptions on in test tools on Android
> 
> This is a follow-up to https://skia-review.googlesource.com/c/34982
> which did the same for locally built test tools.
> 
> Change-Id: Id97841a64521fda99cb952a1a751ffc10f636f53
> Reviewed-on: https://skia-review.googlesource.com/35162
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>

TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,scroggo@google.com

Change-Id: Iae6c817d625989e3a427dbc18328477382d892bd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/35524
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2017-08-16 21:39:27 +00:00
Chong Zhang
c2a954290d skia: add heif decoding support
Bug: b/64077740
Change-Id: I11e0243bcc4c21c0aa5aa29a719dd0fcba7ae6f7
Reviewed-on: https://skia-review.googlesource.com/35123
Reviewed-by: Chong Zhang <chz@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Chong Zhang <chz@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-08-16 20:22:55 +00:00
Mike Klein
c902ff8fc8 turn exceptions on in test tools on Android
This is a follow-up to https://skia-review.googlesource.com/c/34982
which did the same for locally built test tools.

Change-Id: Id97841a64521fda99cb952a1a751ffc10f636f53
Reviewed-on: https://skia-review.googlesource.com/35162
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2017-08-16 13:55:38 +00:00
Leon Scroggins III
f7332d3238 Build support for 32-bit armv8-a
Since both armv7-a-neon and 32-bit armv8-a have NEON, we can treat them
the same in Android.bp.

Bug: b/62895439

Corresponds to https://android-review.googlesource.com/c/423660/3
This change will generate the change to Android.bp described there.

Change-Id: Icae9b5b79093d6f2886da39771d4fbe901be237a
Reviewed-on: https://skia-review.googlesource.com/33000
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-08-10 17:31:25 +00:00
Mike Reed
e32500f064 Assume HQ is handled by pipeline, delete legacy code-path
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
Bug: skia:
Change-Id: If6f0d0a57463bf99a66d674e65a62ce3931d0116
Reviewed-on: https://skia-review.googlesource.com/24644
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-07-20 00:43:37 +00:00
Leon Scroggins III
51b2f1b64c Stop adding Android-specific defines to SkUserConfig
Remove #defines that lived in gn_to_bp.py and
android_framework_defines.gni. These have been moved into a new file
in Android, SkUserConfigManual.h, in https://googleplex-android-review.git.corp.google.com/#/c/2519600/

Update gn_to_bp.py to include SkUserConfigManual.h, so it will still
result in using the same #defines.

Lately, we've found it difficult to guard changes behind a flag. e.g.
a change to drawing causes a CTS failure in Android, so we have to do
the following:
- put the change behind a flag, and add it to gn_to_bp.py or
android_framework_defines.gni
- generate new images on Android (by running CTS with external/skia
modified to not define the flag)
- create a CL in CTS that uses the new images
- land a CL in Skia that stops defining the flag
- when the Skia change lands, wait for the auto-roller to create a CL
that includes the change, stop the auto-roller, add the topic to the CTS
CL so the two can land at the same time
- land both Android changes (with TreeHugger)
- restart the Android auto-roller

With SkUserConfigManual.h (which lives in Android), the process will
be similar to Chromium:
- land a CL in Android's external/skia that defines a flag e.g.
SK_SUPPORT_LEGACY_FEATURE. Land without TreeHugger because it isn't used
in Skia and does not do anything
- land a change in Skia that changes behavior unless
SK_SUPPORT_LEGACY_FEATURE is defined. This will safely go through the
Android roll and not change any behavior for Android
- create two Android CLs - one in CTS to use the new images, and one in
external/skia to delete SK_SUPPORT_LEGACY_FEATURE. Set them to the same
topic and land them with TreeHugger

In the new process, there is no need to mess with the Android roll.

A downside to the new process is that we cannot test the android
framework defines without checking in to Android. But given how much
we've progressed in automating Android testing, this is fine.

Bug: b/63429612
Change-Id: Idfbaef2f4cae641a75fb6e7bf70428733a441336
Reviewed-on: https://skia-review.googlesource.com/22072
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2017-07-11 20:43:35 +00:00
Brian Salomon
cf54081a09 Potentially fix definition of GR_TEST_UTILS in gn_to_bp.py
TBR=scroggo@google.com

Change-Id: I0afe43855e7ac55a0f6a9b88af16a1d7b36666a2
Reviewed-on: https://skia-review.googlesource.com/21737
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-06 21:33:07 +00:00
Brian Salomon
c19ced195a Attempt to fix Android framework build
Bug: skia:
Change-Id: I70004f5edc47d6de4e2bdb33d40467c9a6f81b48
Reviewed-on: https://skia-review.googlesource.com/21729
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-06 18:35:46 +00:00
Stan Iliev
7e910df7f1 Implement an SkImage backed by a Android hardware buffer
Create a new SkImage public API to make an image from an Android
hardware buffer. Implementation is using a SkImageGenerator
derived class GrAndroidBufferImageGenerator.
A new EGLImage texture is created, which is then wrapped with
GrTextureProxy.

Bug: skia:
Change-Id: I610a4c5a58198686ce7c03e9a0adad3f9d2342e0
Reviewed-on: https://skia-review.googlesource.com/17789
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2017-06-02 14:51:24 +00:00
Mike Reed
91b43e4fa3 remove unused etc logic
Bug: skia:
Change-Id: I913d348910db0b6ab930c4c5566ba9eb2320550e
Reviewed-on: https://skia-review.googlesource.com/15181
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-05-03 12:55:43 +00:00
Greg Daniel
5238f994bf Revert "Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h"
This reverts commit 3a3bc42b7d.

Reason for revert: still breaking android

Original change's description:
> Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
> 
> This change is needed since once we start getting support for varrying of extensions
> and newer version support in general, we need a common vulkan header to compile off of.
> Otherwise we will run into problems if clients have older headers that don't include
> functions/symbols we are trying to use.
> 
> Additionally it has the benefit of not needing to add if SK_VULKAN around code in
> include which wants to use vulkan symbols.
> 
> This is a reupload of CL: https://skia-review.googlesource.com/13651
> 
> Bug: skia:
> Change-Id: I091f526b8c4a61774c34834cd7bfb7e2c822ff5c
> Reviewed-on: https://skia-review.googlesource.com/13804
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> 

TBR=djsollen@google.com,egdaniel@google.com,mtklein@google.com,jvanverth@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ic595e32005761170156499cfb6efc1acfce96001
Reviewed-on: https://skia-review.googlesource.com/13806
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-19 14:44:47 +00:00
Greg Daniel
3a3bc42b7d Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.

Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.

This is a reupload of CL: https://skia-review.googlesource.com/13651

Bug: skia:
Change-Id: I091f526b8c4a61774c34834cd7bfb7e2c822ff5c
Reviewed-on: https://skia-review.googlesource.com/13804
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-19 13:58:52 +00:00
Mike Klein
0a64e32f39 Turn on SkJumper all the time, try 2.
Rebased on top of _win.S change, which I hope lands first.

CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel,win_chrome_official,win_chromium_dbg_ng,win_chromium_rel_ng,win_chromium_compile_dbg_ng,win_chromium_compile_rel_ng,win_clang;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Change-Id: I30e97dbb55b8a42251b46f5607096ca12bc670b9
Reviewed-on: https://skia-review.googlesource.com/10462
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
2017-03-30 20:15:11 +00:00
Mike Klein
2fcd17087e Revert "Turn on SkJumper all the time."
This reverts commit 135555101c.

Reason for revert: forgot g3, seems to break Chrome NaCl builders?

https://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20Win/builds/15969/steps/compile/logs/stdio

Original change's description:
> Turn on SkJumper all the time.
> 
> If the previous CL sticks, it's now easy to turn on SkJumper everywhere:
> I was mostly holding back because of build system complexity.
> 
> This has the main effect of turning on SkJumper in Chromium.
> It's already been on on our local test bots and on Android framework.
> 
> Change-Id: I7fbfc6aaaa7dace9c3f2cb509583c69b10997dbf
> Reviewed-on: https://skia-review.googlesource.com/9380
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> 

TBR=mtklein@chromium.org,herb@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I69747e9e75b2a8e3d78f6c150c9b6d6453e00632
Reviewed-on: https://skia-review.googlesource.com/9444
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-08 18:54:42 +00:00
Mike Klein
135555101c Turn on SkJumper all the time.
If the previous CL sticks, it's now easy to turn on SkJumper everywhere:
I was mostly holding back because of build system complexity.

This has the main effect of turning on SkJumper in Chromium.
It's already been on on our local test bots and on Android framework.

Change-Id: I7fbfc6aaaa7dace9c3f2cb509583c69b10997dbf
Reviewed-on: https://skia-review.googlesource.com/9380
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-08 14:18:57 +00:00
Derek Sollenberger
488f0d6748 Add ability to insert systrace markers for the android framework
Change-Id: I34cee8382b73f1d95fde279377f976ebad6983a7
Reviewed-on: https://skia-review.googlesource.com/9232
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2017-03-06 17:34:06 +00:00
Mike Klein
e459afd6ce Strengthen is_official_build, update docs.
This makes is_official_build turn off all development targets and
features in Skia, including building third-party dependencies from
source.

This will intentionally break some external users, who will find
themselves no longer able to find third-party headers or link against
third-party libraries.  These users have been building with our testing
third-party dependencies unknowingly.  They'll need to either explicitly
turn back on building each dependency from source
(skia_use_system_foo=false) or disable that dependency entirely
(skia_use_foo=false).

is_skia_standalone is now basically !is_official_build, so I've
propagated that through, removing is_skia_standalone.  In a few places
we were using it as a stand-in for defined(ndk), so I've just written
defined(ndk) there.  Duh.

gn_to_bp:

    is_offical_build's new strength also makes gn_to_bp.py simpler to
    write.  In spirit, Android builds are official Skia builds that also
    build DM and nanobench.

    It seems that SkJumper (src/jumper/*) is (unintentionally) enabled
    on Android.  Switching to an is_official_build would have disabled
    that.  But as that accidental launch seems to have gone fine, I've
    kept it explicitly enabled.

    In the end, no changes to Android.bp or its SkUserConfig.h.

The -Mini builder no longer needs to explicitly disable tools.
CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-Clang-x86_64-Release-Mini

Change-Id: Id06e53268a5caf55c6046ada354a0863c3031c73
Reviewed-on: https://skia-review.googlesource.com/9190
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-03 15:41:24 +00:00
Ben Wagner
e127523b4a gn_to_bp to recurse deps.
Currently gn_to_bp GrabDependentSrcs only grabs the top level deps of
a target. In a proposed change there are more levels of deps to
clarify the real dependencies. To make this work well, a number of
lists are now sets to avoid including the same file multiple times.

Change-Id: I5005718e42762fe411215920e8991ab27138c7eb
Reviewed-on: https://skia-review.googlesource.com/8936
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-02-24 14:48:22 +00:00
Matt Sarett
a3091099fa Fix client roll (part 2)
NOTRY=true

BUG=skia:

Change-Id: I0b69d0543cc710e4d06950a5a458a90cdf276d76
Reviewed-on: https://skia-review.googlesource.com/8761
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-02-20 17:53:21 +00:00
Matt Sarett
af7bbc8b04 Fix client roll
This change was made in the client master, but, since the bp file is
autogenerated, it has broken all subsequent rolls.

BUG=skia:

Change-Id: I722c020414f2700c50bf4a1b5936d993e44864a1
Reviewed-on: https://skia-review.googlesource.com/8730
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-02-20 16:13:15 +00:00
Mike Klein
f6a1a2179a Clean up SkSplicer.
SkJumper's looking promising enough that I want this further out of my face.

Change-Id: I6dbe71aeabe32f7f4258ba157460e6985733b0ce
Reviewed-on: https://skia-review.googlesource.com/8528
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-02-15 22:47:58 +00:00
Leon Scroggins III
6ccd2cabaa Generate Android build targets for dm and nanobench
Generate targets for dm and nanobench from ninja and add them to the
generated Android.bp file.

Remove nanobenchAndroid and SkAndroidSDKCanvas. These rely on HWUI
internals and are currently unused.

Update gyp file references to removed files, just in case.

Change-Id: Ic6ae18a70bfd0c33804e7996d077f2081dfdfe07
Reviewed-on: https://skia-review.googlesource.com/7635
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-01-27 20:02:23 +00:00
Mike Klein
1c471874c5 Fix Android roll
- only depend on cpu-features when we know we have an NDK
    - disable SkSplicer

Change-Id: I89e4cc70d6ddf0ebb7005d1cb453768d946cd205
Reviewed-on: https://skia-review.googlesource.com/7060
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-01-13 21:17:05 +00:00
Mike Klein
40a82bd0f4 remove MIPS DSP optimizations
There are only a couple of these, primarily focused on index8 srcs and 565 dsts.  The burden's starting to outweigh the benefit.  No one on the team knows MIPS assembly.

If we're going to try this again, I'd rather we try some sort of SkNx / compiler-intrinsic based approach, probably targeting MIPS SIMD (MSA), not this older instruction set.

We already ignore these files for 64-bit MIPS.  This just closes the loop on 32-bit MIPS.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD,Build-Ubuntu-Clang-mips64el-Debug-Android,Build-Ubuntu-Clang-mips64el-Release-Android,Build-Ubuntu-Clang-mipsel-Debug-Android,Build-Ubuntu-Clang-mipsel-Release-Android

BUG=skia:6065

Change-Id: Iecac15b56f59625b2e743ea36e7791b90bb0b422
Reviewed-on: https://skia-review.googlesource.com/6353
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-12-21 03:55:00 +00:00
Leon Scroggins III
4f8a467a47 Allow running gn_to_bp.py from another script
Use __file__ to determine where 'here' is.

Necessary for
https://chrome-internal-review.googlesource.com/313075.

Change-Id: I1b9571847c761da311012039e2c885fad0a593cb
Reviewed-on: https://skia-review.googlesource.com/6230
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2016-12-19 16:21:53 +00:00
Mike Klein
bde5d5dc2e Revert "Do not build the ktx encoder for android framework"
This reverts commit eeb7137a0b.

Reason for revert: well, duh, I guess we'd better update the GYP and Google3 builds...

Original change's description:
> Do not build the ktx encoder for android framework
> 
> Move SkKTXImageEncoder.cpp into an optional block, and disable that
> block for the android framework. Use a new define to determine whether
> to define the entry point, rather than using
> SK_BUILD_FOR_ANDROID_FRAMEWORK.
> 
> Change-Id: I41103459135af744cf5715f27783c63dc37a7ad1
> Reviewed-on: https://skia-review.googlesource.com/5982
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> 

TBR=mtklein@chromium.org,mtklein@google.com,scroggo@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I8da75db31884b5148f7f85a6a0c3e6913b71cfa8
Reviewed-on: https://skia-review.googlesource.com/6021
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-12-14 01:31:53 +00:00
Leon Scroggins III
eeb7137a0b Do not build the ktx encoder for android framework
Move SkKTXImageEncoder.cpp into an optional block, and disable that
block for the android framework. Use a new define to determine whether
to define the entry point, rather than using
SK_BUILD_FOR_ANDROID_FRAMEWORK.

Change-Id: I41103459135af744cf5715f27783c63dc37a7ad1
Reviewed-on: https://skia-review.googlesource.com/5982
Commit-Queue: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-12-13 22:13:54 +00:00
Mike Klein
ee43f6f25e Just make Android.bp bpfmt compliant to begin with.
Change-Id: I0fe833b4af4b68f97fe3feefc76503cb6473eb7b
Reviewed-on: https://skia-review.googlesource.com/5847
Reviewed-by: Leon Scroggins <scroggo@google.com>
2016-12-12 19:32:27 +00:00
Mike Klein
f44703a87f Remove dependency on NDK cpufeatures.
Instead of relying on cpu-features.c, just do what it does.

Good reading: http://man7.org/linux/man-pages/man3/getauxval.3.html

While it's nice to use the headers when possible, should either of these headers not be available, we can fall back to doing it all manually:

  extern "C" uint32_t getauxval(uint32_t)
  static const int AT_HWCAP = 16;
  static const int HWCAP_CRC32 = (1<<7);


To keep things simple I've slimmed cpu feature detection down to just the features we actually make use of.  This removes all runtime feature detection for ARMv7... we expect NEON to be globally available, and so far we haven't used the other FMA/FP16 bits on ARMv7.  ARMv8 feature dection remains the same, CRC32 before, CRC32 after.  x86 (cpuid-based detection) and MIPS (nothing) are untouched.


We need to keep //third_party/cpu-features for //third_party/libwebp.

Change-Id: I6c96df9a09ae68c8c0e54c1152aa177ba9bafc83
Reviewed-on: https://skia-review.googlesource.com/5800
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-12-12 16:16:44 +00:00
Mike Klein
c30833327f proposed gn_to_bp fixes
in response to 5784

Change-Id: I3ad34a30743e7ffbd04767668c288a4f884eb19c
Reviewed-on: https://skia-review.googlesource.com/5732
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-12-12 15:18:22 +00:00
Mike Klein
27eb22b994 gn_to_bp.py fixes
- no u"" strings
  - more pervasive sorting
  - include sources from optional Skia components (e.g. gpu, codec, pdf)
  - cosmetic nits

Change-Id: Ief0f293117dbfbc97584db185c067a8297067b74
Reviewed-on: https://skia-review.googlesource.com/5643
Reviewed-by: Leon Scroggins <scroggo@google.com>
2016-12-07 18:01:54 +00:00
Mike Klein
308b5ac681 Add gn_to_bp.py.
The general idea here is, run GN in --ide=json mode to get most information.

Then, read a couple .gni files to get the rest (platform specific source lists, Android framework defines).

For now, I'm generating Android.bp and SkUserConfig.h.  I figure we can do DM and nanobench once these work?

Change-Id: I8e7f60d6572f2d4769760cf872895518a15d841b
Reviewed-on: https://skia-review.googlesource.com/5554
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-12-06 23:10:34 +00:00