1) Disable SampleApp. Seems like it's totally horked? SkOSFile_iOS.mm is missing about half the functions needed, and SkOSFile_stdio.cpp is double-providing the others.
2) Drop armv6.
3) Switch from putting headers in sources to putting the corresponding directories in includes.
4) Force cast the type of glShaderSource. Something to do with GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE?
After all this,
env CC=clang CXX=clang++ GYP_DEFINES=skia_os=ios make
builds for me.
BUG=skia:2363
R=bsalomon@google.com, epoger@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/226413005
git-svn-id: http://skia.googlecode.com/svn/trunk@14069 2bbb7eff-a529-9590-31e7-b0007b416f81
Aarch64 support
This change contains the necessary modifications to have Skia build and
run properly on an ARMv8 processor in aarch64 execution state.
Here's a list of the changes:
- add an arm64 target to the build system + SK_CPU_ARM64 flag
- MatrixTest was failing when built in Release mode. Fused MAC
instructions were generated which made some intermediate results
more accurate. As the test relies on result comparison, the more
precise results when compared to others led to a gap bigger than
what was tolerated. As I don't know if some actual skia code relies
on results being comparable, I've disabled fused MAC instruction
with -ffp-contract=off for arm64.
- Modify include/core/SkOnce.h to have barriers work.
- SK_CPU_ARM64 implies SK_ARM_NEON_MODE_ALWAYS.
- use existing Xfermode optimisations with modifications that can be
removed in the future when toolchains are ready. Also save a few
instructions is two Xfermodes (will apply to ARM too).
- use existing SkBoxBlur and SkMorphology optimisations.
- use existing SkBlitMask optimisations
- use existing BitmapProcState and Convolution optimisations.
Future changes will include:
- Blitters (only partialy merged upstream)
- SkUtils (there's little value in sending asm optimisations without
having them benchmarked on real hardware).
Signed-off-by: Kevin PETIT <kevin.petit@arm.com>
BUG=skia:
Committed: http://code.google.com/p/skia/source/detail?r=13980R=djsollen@google.com, reed@google.com, mtklein@google.com, halcanary@google.com
Author: kevin.petit@arm.com
Review URL: https://codereview.chromium.org/143423004
git-svn-id: http://skia.googlecode.com/svn/trunk@14025 2bbb7eff-a529-9590-31e7-b0007b416f81
Reason for revert:
GYP's failing on most (all?) bots.
Original issue's description:
> ARM Skia NEON patches - 35 - First AArch64 support
>
> Aarch64 support
>
> This change contains the necessary modifications to have Skia build and
> run properly on an ARMv8 processor in aarch64 execution state.
>
> Here's a list of the changes:
>
> - add an arm64 target to the build system + SK_CPU_ARM64 flag
>
> - MatrixTest was failing when built in Release mode. Fused MAC
> instructions were generated which made some intermediate results
> more accurate. As the test relies on result comparison, the more
> precise results when compared to others led to a gap bigger than
> what was tolerated. As I don't know if some actual skia code relies
> on results being comparable, I've disabled fused MAC instruction
> with -ffp-contract=off for arm64.
>
> - Modify include/core/SkOnce.h to have barriers work.
>
> - SK_CPU_ARM64 implies SK_ARM_NEON_MODE_ALWAYS.
>
> - use existing Xfermode optimisations with modifications that can be
> removed in the future when toolchains are ready. Also save a few
> instructions is two Xfermodes (will apply to ARM too).
>
> - use existing SkBoxBlur and SkMorphology optimisations.
>
> - use existing SkBlitMask optimisations
>
> - use existing BitmapProcState and Convolution optimisations.
>
> Future changes will include:
>
> - Blitters (only partialy merged upstream)
>
> - SkUtils (there's little value in sending asm optimisations without
> having them benchmarked on real hardware).
>
> Signed-off-by: Kevin PETIT <kevin.petit@arm.com>
>
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=13980R=djsollen@google.com, reed@google.com, halcanary@google.com, kevin.petit@arm.comTBR=djsollen@google.com, halcanary@google.com, kevin.petit@arm.com, reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/216113005
git-svn-id: http://skia.googlecode.com/svn/trunk@13983 2bbb7eff-a529-9590-31e7-b0007b416f81
Aarch64 support
This change contains the necessary modifications to have Skia build and
run properly on an ARMv8 processor in aarch64 execution state.
Here's a list of the changes:
- add an arm64 target to the build system + SK_CPU_ARM64 flag
- MatrixTest was failing when built in Release mode. Fused MAC
instructions were generated which made some intermediate results
more accurate. As the test relies on result comparison, the more
precise results when compared to others led to a gap bigger than
what was tolerated. As I don't know if some actual skia code relies
on results being comparable, I've disabled fused MAC instruction
with -ffp-contract=off for arm64.
- Modify include/core/SkOnce.h to have barriers work.
- SK_CPU_ARM64 implies SK_ARM_NEON_MODE_ALWAYS.
- use existing Xfermode optimisations with modifications that can be
removed in the future when toolchains are ready. Also save a few
instructions is two Xfermodes (will apply to ARM too).
- use existing SkBoxBlur and SkMorphology optimisations.
- use existing SkBlitMask optimisations
- use existing BitmapProcState and Convolution optimisations.
Future changes will include:
- Blitters (only partialy merged upstream)
- SkUtils (there's little value in sending asm optimisations without
having them benchmarked on real hardware).
Signed-off-by: Kevin PETIT <kevin.petit@arm.com>
BUG=skia:
R=djsollen@google.com, reed@google.com, mtklein@google.com, halcanary@google.com
Author: kevin.petit@arm.com
Review URL: https://codereview.chromium.org/143423004
git-svn-id: http://skia.googlecode.com/svn/trunk@13980 2bbb7eff-a529-9590-31e7-b0007b416f81
Generate SkUserConfig.
Include arm64 as another build flavor.
Add tests.
gyp/common_conditions.gypi:
Add conditions for Android framework. These will get written into the generated SkUserConfig.
include/core/SkUserConfig.h:
Generated version that will ultimately be checked into Android (but not here).
platform_tools/android/bin/gyp_to_android.py:
Generate SkUserConfig.
Add arm64 (note that arm64 is not currently respected by our gyp files, so it results in use _none.cpp for the various opts).
Reset the common defines, which are now passed to the generated SkUserConfig.
platform_tools/android/gyp_gen/generate_user_config.py:
New script to generate SkUserConfig.h.
platform_tools/android/gyp_gen/gypd_parser.py:
Fix a lint error (unused import).
platform_tools/android/gyp_gen/makefile_writer.py:
Append any remaining DEFINES to LOCAL_CFLAGS (previously this was done during parsing).
Add a warning for arm64 (corresponds to downstream Android.mk).
platform_tools/android/gyp_gen/vars_dict_lib.py:
Add OrderedSet.reset().
Add DEFINES to VarsDict.
platform_tools/android/tests/expectations/:
Add and update expectations files.
platform_tools/android/tests/generate_user_config_tests.py:
New test for generate_user_config.py
platform_tools/android/tests/inputs/SkUserConfig.h:
Input to the new test, so we don't have to update the expectations each time the real SkUserConfig.h changes.
platform_tools/android/tests/makefile_writer_tests.py:
Add a way to rebaseline test_write_local_vars, which has changed.
Refactor EXPECTATIONS_DIR and compare_files into a separate file for sharing with generate_user_config_tests.py.
platform_tools/android/tests/utils.py:
Common code for tests.
platform_tools/android/tests/var_dict_tests.py:
Use a for loop to test the new key (DEFINES) and future proof this test to test any new keys in the future.
BUG=skia:1975
R=djsollen@google.com, halcanary@google.com
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/198063002
git-svn-id: http://skia.googlecode.com/svn/trunk@13975 2bbb7eff-a529-9590-31e7-b0007b416f81
Split off from https://codereview.chromium.org/140503007/.
The eventual goal is to create our Android.mk from gyp. This patch
adds an option for skia_android_framework with the right settings.
The follow-up (https://codereview.chromium.org/140503007/) will
use scripts to create the final makefile.
gyp/android_deps.gyp:
Use different dependencies for the framework than for building Skia
normally.
gyp/android_framework_lib.gyp:
Like skia_lib, specifies the minimum needed for building Skia, in this
case for the framework.
gyp/common_conditions.gypi:
Add settings specific to skia_android_framework. In some cases this
means turning off flags and defines.
gyp/common.gypi
Turn off SK_DEBUG and SK_DEVELOPER when building for the framework.
This allows the framework to create a single makefile which can be
modified to add SK_DEBUG and SK_DEVELOPER as desired.
gyp/common_variables.gypi:
Add skia_android_framework.
gyp/core.gyp:
Don't depend on cpufeatures, and add the cutils library for
skia_android_framework.
gyp/freetype.gyp:
skia_android_framework-specific options:
Don't include freetype_static as a dependency.
Include the proper folders.
Include the android library.
gyp/images.gyp:
Don't export libjpeg as a dependency for targets that include images
for the framework.
Also reorder image decoders to match the Android order, leaving our
most commonly used ones last (and therefore first in the chain for
trying them).
gyp/libwebp.gyp:
Use the system webp when building for the Android framework. Specify
the correct settings for the framework.
gyp/opts.gyp:
Specify a default set of files to compile when there are no possible
optimizations.
gyp/pdf.gyp:
Add dependencies for Android framework.
gyp/zlib.gyp:
Include the zlib folder, and undefine SK_ZLIB_INCLUDE.
BUG=skia:1975
R=djsollen@google.com
Committed: https://code.google.com/p/skia/source/detail?r=13298
Review URL: https://codereview.chromium.org/153093003
git-svn-id: http://skia.googlecode.com/svn/trunk@13304 2bbb7eff-a529-9590-31e7-b0007b416f81
Split off from https://codereview.chromium.org/140503007/.
The eventual goal is to create our Android.mk from gyp. This patch
adds an option for skia_android_framework with the right settings.
The follow-up (https://codereview.chromium.org/140503007/) will
use scripts to create the final makefile.
gyp/android_deps.gyp:
Use different dependencies for the framework than for building Skia
normally.
gyp/android_framework_lib.gyp:
Like skia_lib, specifies the minimum needed for building Skia, in this
case for the framework.
gyp/common_conditions.gypi:
Add settings specific to skia_android_framework. In some cases this
means turning off flags and defines.
gyp/common.gypi
Turn off SK_DEBUG and SK_DEVELOPER when building for the framework.
This allows the framework to create a single makefile which can be
modified to add SK_DEBUG and SK_DEVELOPER as desired.
gyp/common_variables.gypi:
Add skia_android_framework.
gyp/core.gyp:
Don't depend on cpufeatures, and add the cutils library for
skia_android_framework.
gyp/freetype.gyp:
skia_android_framework-specific options:
Don't include freetype_static as a dependency.
Include the proper folders.
Include the android library.
gyp/images.gyp:
Don't export libjpeg as a dependency for targets that include images
for the framework.
Also reorder image decoders to match the Android order, leaving our
most commonly used ones last (and therefore first in the chain for
trying them).
gyp/libwebp.gyp:
Use the system webp when building for the Android framework. Specify
the correct settings for the framework.
gyp/opts.gyp:
Specify a default set of files to compile when there are no possible
optimizations.
gyp/pdf.gyp:
Add dependencies for Android framework.
gyp/zlib.gyp:
Include the zlib folder, and undefine SK_ZLIB_INCLUDE.
BUG=skia:1975
R=djsollen@google.com
Review URL: https://codereview.chromium.org/153093003
git-svn-id: http://skia.googlecode.com/svn/trunk@13298 2bbb7eff-a529-9590-31e7-b0007b416f81
This reverts commit d234662df1ffeb1bf45b2ade16c4acfb94f89450.
This change broke the build. Will resubmit after fixing warnings.
git-svn-id: http://skia.googlecode.com/svn/trunk@12311 2bbb7eff-a529-9590-31e7-b0007b416f81
This change removes sk_stdint.h since it is only needed for vs2008 and earlier.
This change removes SK_MMAP_SUPPORT define since it is no longer used.
This change removes the stdio.h include from SkTypes.h since on many systems
this is a very large header, few Skia files actually use it, it is
available everywhere standard, and SkDebugf should be used instead.
After this change there is no need for external users to put Skia's
include/config into their own list of includes, saving the headache
of having two header files of the same name and sometimes getting the
wrong one depending on include order.
R=bsalomon@google.com, djsollen@google.com
Review URL: https://codereview.chromium.org/27044002
git-svn-id: http://skia.googlecode.com/svn/trunk@11738 2bbb7eff-a529-9590-31e7-b0007b416f81
I left the dummy value in the flattened paint. I'm hoping to do an overhaul of
the paint serialization format which will need a picture version bump anyway,
so it can all go together. If that doesn't pan out we can remove this on its
own later.
BUG=
R=reed@google.com
Review URL: https://codereview.chromium.org/23056005
git-svn-id: http://skia.googlecode.com/svn/trunk@10757 2bbb7eff-a529-9590-31e7-b0007b416f81
Re-land 9445 (reverted 9448), but add back the libs no longer provided by gyp.
git-svn-id: http://skia.googlecode.com/svn/trunk@9450 2bbb7eff-a529-9590-31e7-b0007b416f81
There were only a few warnings left, so I fixed them and enabled the unused variable warning by removing the "-Wno-unused" flag. Only the -Wno-unused-parameter remains for now (could be removed later).
Review URL: https://codereview.chromium.org/12480002
git-svn-id: http://skia.googlecode.com/svn/trunk@8030 2bbb7eff-a529-9590-31e7-b0007b416f81
Most of these issues were due to functions whose definitions appear in header files; I changed those functions to be 'static inline' instead of just 'static' or 'inline', which kills the warning for such functions.
Other functions that were static or anonymous-namespaced but were unused in cpp files were probably called at some point but are no longer; someone who knows more than I do should probably scrub all the functions I either deleted or #if 0'ed out and make sure that the right thing is happening here.
Lots of unused variables removed, and one nasty const issue handled.
There remains a single warning in thirdparty/externals/cityhash/src/city.cc on line 146 related to a signed/unsigned mismatch. I don't know if we have control over this library so I didn't fix this one, but perhaps someone could do something about that one.
BUG=
Review URL: https://codereview.appspot.com/7067044
git-svn-id: http://skia.googlecode.com/svn/trunk@7051 2bbb7eff-a529-9590-31e7-b0007b416f81
- Add nacl_make script to build Skia targets for NaCl using gyp
- Add nacl_interface for command-line apps
- Add nacl_sample as front-end for SampleApp
- Add freetype to DEPS
- Various gyp tweaks for NaCl
TODO:
- Implement GL interface
- Implement font host
- Fix plumbing so that SampleApp works properly
Review URL: https://codereview.appspot.com/6671044
git-svn-id: http://skia.googlecode.com/svn/trunk@6245 2bbb7eff-a529-9590-31e7-b0007b416f81
- Roll GYP so that we get non-thin archives on Linux
- Add merge_static_libs.py
- Add skia_core_lib target which builds core, ports, opts*, and utils
- Replace dependencies on core/ports/opts/utils with skia_core_libs
- Rename exportable libraries with "skia_"
Review URL: https://codereview.appspot.com/6619049
git-svn-id: http://skia.googlecode.com/svn/trunk@5889 2bbb7eff-a529-9590-31e7-b0007b416f81
Encountered compile errors passing 64-bit size_t to
SkIntToScalar and needed to make adjustments to
gm/gradients.cpp and bench/PicturePlaybackBench.cpp.
Verified on my local Linux, Mac, and Windows machines.
As of this change, the skia_arch_width gyp define
actually forces a 32/64-bit build on Linux, Mac, and
Windows.
Review URL: https://codereview.appspot.com/6460112
git-svn-id: http://skia.googlecode.com/svn/trunk@5195 2bbb7eff-a529-9590-31e7-b0007b416f81
Certain compilers in an effort to optimize code chop off files that are never
used. By adding a flag to common conditions and variables we can force skia to
recompile with global static initializers off. By making a call to
SkGraphics::Init we now register all those functions that had been previously
automatically excluded by the compiler.
Review URL: https://codereview.appspot.com/6443112
git-svn-id: http://skia.googlecode.com/svn/trunk@5057 2bbb7eff-a529-9590-31e7-b0007b416f81
convention for all targets, not just gpu, since effects now makes GL calls too.
Build fix; unreviewed.
git-svn-id: http://skia.googlecode.com/svn/trunk@4559 2bbb7eff-a529-9590-31e7-b0007b416f81
This patch adds minimal support for dynamic ARM NEON support,
i.e. the ability to probe the CPU at runtime for NEON and
provide alternate code paths when it is available.
- Add include/core/SkUtilsArm.h, which declares a few helper
macros (e.g. SK_NEON_ARM_IS_DYNAMIC), plus the handy
function 'sk_cpu_arm_has_neon()' which returns true if
the target CPU supports the ARM NEON instruction set.
Note that the header is in include/core/ because it will
have to be included from NEON-specific code under src/code/
It would probably be more logical to put it under include/opts/
instead, but this would require moving all the NEON-specific
stuff under src/code/ into src/opts/, which is not trivial
due to the way the code is currently architected.
- Add src/core/SkUtilsArm.cpp which implements
'sk_cpu_arm_has_neon' for ARM-based Linux systems, only
when SK_NEON_ARM_IS_DYNAMIC is true.
(For other cases, 'sk_cpu_arm_has_neon' is an inline function
that returns a constant 'true' or 'false' value).
There is no user-level accessible CPUID instruction on ARM,
so do all CPU feature probing by parsing /proc/cpuinfo.
This is Linux-specific.
For Debug build types, the CPU probing result is printed
to the Android log (or Linux command-line) for easier
debugging.
- Create a new 'opts_neon' target (static library) which shall
contain all the NEON-specific code paths for the library.
This is necessary because -mfpu=neon impacts also non-scalar
code. Just like with -mssse3 on x86, we can't build the rest
of the library with this flag.
Note that for now, we only include memset16_neon and
memset32_neon in this library.
- Modify opts_check_arm.cpp to implement SK_ARM_NEON_IS_DYNAMIC
properly.
Compared to a 'xoom' build, the only difference is the use of
NEON-optimized memset16/32 functions. Later patches will move
more NEON-specific code paths to 'opts_neon'.
Review URL: https://codereview.appspot.com/6247058
git-svn-id: http://skia.googlecode.com/svn/trunk@4069 2bbb7eff-a529-9590-31e7-b0007b416f81
Need to opt-in to have it applied to kA8 text (which chrome can't for a while)
A8 text needs to use Slight hinting to look better, but that is not forced...
git-svn-id: http://skia.googlecode.com/svn/trunk@3277 2bbb7eff-a529-9590-31e7-b0007b416f81
This patch removes static initializers related to static and
global mutexes from the final library's machine code when
building on a pthread-capable system.
We use PTHREAD_MUTEX_INITIALIZER to perform POD-style
initialization. You need a line like the following to declare
a global mutex with it:
SkBaseMutex gMutex = { PTHREAD_MUTEX_INITIALIZER };
We introduce the SK_DECLARE_STATIC_MUTEX and SK_DECLARE_GLOBAL_MUTEX
macros to be able to declare static/global mutexes in the source tree
uniformly.
SkMutex is now defined as a sub-class of SkBaseMutex, with standard
construction/destruction semantics. This is useful if the mutex
object is a member of another C++ class, or allocated dynamically.
We also modify a few places to refer to SkBaseMutex instead of a
SkMutex, where it makes sense. Generally speaking, client code
should hold and use pointers to SkBaseMutex whenever they can
now.
We defined a new built-time macro named SK_USE_POSIX_THREADS
to indicate that we're using a pthread-based SkThread.h
interface. The macro will also be used in future patches
to implement other helper thread synchronization classes.
Finally, we inline the acquire() and release() functions in the
case of Posix to improve performance a bit.
Running: 'bench -repeat 10 -match mutex' on an Android device or
a 2.4GHz Xeon Linux desktop shows the following improvements:
Before After
Galaxy Nexus 1.64 1.45
Nexus S 1.47 1.16
Xoom 1.86 1.66
Xeon 0.36 0.31
This removes 5 static mutex initializers from the library
Review URL: https://codereview.appspot.com/5501066
git-svn-id: http://skia.googlecode.com/svn/trunk@3091 2bbb7eff-a529-9590-31e7-b0007b416f81