aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/opts
Commit message (Collapse)AuthorAge
* arm: dynamic NEON support for SkBlitRow_opts_arm.cppGravatar digit@google.com2012-08-08
| | | | | | | | | This patch moves all NEON-specific code from the source src/opts/SkBlitRow_opts_arm.cpp into a new file that is built as part of the 'opts_arm_neon' static library. Review URL: https://codereview.appspot.com/6449110 git-svn-id: http://skia.googlecode.com/svn/trunk@5016 2bbb7eff-a529-9590-31e7-b0007b416f81
* #include "SkMathPriv.h"Gravatar reed@google.com2012-08-07
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4999 2bbb7eff-a529-9590-31e7-b0007b416f81
* arm: dynamic NEON support for SkBitmapProcState matrix operations.Gravatar digit@google.com2012-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements dynamic ARM NEON support for the functions implemented by src/core/SkBitmapProcState_matrixProcs.cpp. - Because the SkBitmapProcState_matrix_{clamp,repeat}.h headers are NEON-specific, they are renamed with a _neon.h suffix, and moved to src/opts/ (from src/core/) - Add a new file src/opts/SkBitmapProcState_matrixProcs_neon.cpp which implements the NEON code paths for all builds, and add it to the 'opts_neon' static library. - Modify SkBitmapProcState_matrixProcs.cpp to select the right code-path depending on our build configuration. Note that in the case where 'arm_neon == 1', we do not embed regular ARM code paths in the final binary. Only 'arm_neon_optional == 1' builds will contain both regular and NEON code paths at the same time. Note that there doesn't seem to be a simple way to put the NEON-specific selection from that currently is in SkBitmapProcState_matrixProcs.cpp into src/opts/. Doing so would require much more drastic restructuring. This is also true of the other SkBitmapProcState source files that will be touched in a future patch. Review URL: https://codereview.appspot.com/6453065 git-svn-id: http://skia.googlecode.com/svn/trunk@4888 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove outdated test code for TEST_SRC_ALPHAGravatar reed@google.com2012-07-30
| | | | | | Review URL: https://codereview.appspot.com/6457056 git-svn-id: http://skia.googlecode.com/svn/trunk@4840 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add support for ARM without EDSP and ARMv6+Gravatar george@mozilla.com2012-07-27
| | | | | | | | Original Mozilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=751814 Review URL: https://codereview.appspot.com/6405065 git-svn-id: http://skia.googlecode.com/svn/trunk@4818 2bbb7eff-a529-9590-31e7-b0007b416f81
* revert 4799-4801 -- red and blue are reversed on windows and linuxGravatar reed@google.com2012-07-27
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4803 2bbb7eff-a529-9590-31e7-b0007b416f81
* use SK_RESTRICT instead of __restrict__Gravatar reed@google.com2012-07-27
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4801 2bbb7eff-a529-9590-31e7-b0007b416f81
* use intptr_t to cast from ptr to int for masking low bitsGravatar reed@google.com2012-07-27
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4800 2bbb7eff-a529-9590-31e7-b0007b416f81
* land http://codereview.appspot.com/6327044/Gravatar reed@google.com2012-07-27
| | | | | | | | SSE optimization for 565 pixel format -- by Lei git-svn-id: http://skia.googlecode.com/svn/trunk@4799 2bbb7eff-a529-9590-31e7-b0007b416f81
* Windows compiler complaint cleanupGravatar robertphillips@google.com2012-07-26
| | | | | | | | http://codereview.appspot.com/6441055/ git-svn-id: http://skia.googlecode.com/svn/trunk@4796 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implementing Color32 functions for Neon platforms.Gravatar borenet@google.com2012-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | Besides the raw processing improvement provided by Neon, the code uses memory preteches (pld) which seem to improve performance greatly when dealing with very large counts. This was tested using bench where color32 accounts for the majority of the workload: bench -match rects_1 -config 8888 -repeat 500 -forceBlend 1 (the forceBlend is there so that the Color32 code does not go through the special cases where alpha == 0xFF as it would transform color32 into a sk_memset32. Numbers averaged over 3 runs: bench name | Before | Neon, no pld | Neon with pld | full boost rrects_1 | 153.9 | 128.3 | 92 | 1.66x rects_1_stroke_4| 32.8 | 31.4 | 28.45 | 1.15x rects_1 | 125.35 | 97.2 | 63.59 | 1.97x Credits: various googletv team members. Committed on behalf of evannier. Review URL: http://codereview.appspot.com/5569077/ git-svn-id: http://skia.googlecode.com/svn/trunk@4779 2bbb7eff-a529-9590-31e7-b0007b416f81
* land http://codereview.appspot.com/6353063/ by LeiGravatar reed@google.com2012-07-24
| | | | | | | | | | | | | | | | | | | | | | | optimizations for D16 using SSE2 skia_bench -config 565 -match bitmap_8888_scale_filter -forceFilter 1 -repeat 30 The result I got on Android platform was below: w/o this optimization routine: D/skia ( 1868): running bench [640 480] bitmap_8888_scale_filter D/skia ( 1868): 565: cmsecs = 286.50 w/ with optimization: D/skia ( 1463): running bench [640 480] bitmap_8888_scale_filter D/skia ( 1463): 565: cmsecs = 186.80 The net gain is 34.80%. git-svn-id: http://skia.googlecode.com/svn/trunk@4729 2bbb7eff-a529-9590-31e7-b0007b416f81
* land http://codereview.appspot.com/6325044/ by LeiGravatar reed@google.com2012-07-16
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4622 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix SkBlendLCD16_SSE2 for non ARGB platforms.Gravatar bungeman@google.com2012-07-09
| | | | | | | http://codereview.appspot.com/6356062/ git-svn-id: http://skia.googlecode.com/svn/trunk@4481 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix warnings on Mac in src/optsGravatar caryclark@google.com2012-06-06
| | | | | | | | | | | | | | | | | | Fix these class of warnings: - unused functions - unused locals - sign mismatch - missing function prototypes - missing newline at end of file - 64 to 32 bit truncation The changes prefer to link in dead code in the debug build with 'if (false)' than to comment it out, but trivial cases are commented out or sometimes deleted if it appears to be a copy/paste error. Review URL: https://codereview.appspot.com/6303045 git-svn-id: http://skia.googlecode.com/svn/trunk@4184 2bbb7eff-a529-9590-31e7-b0007b416f81
* arm: First step towards dynamic NEON support.Gravatar digit@google.com2012-05-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Use intrinsics instead of inline assembly for detecting CPU ID & SSE2/3 supportGravatar tomhudson@google.com2012-05-17
| | | | | | | | | | | on 64-bit builds in MS Visual Studio 2010. Original code provided by jianliang79. http://code.google.com/p/skia/issues/detail?id=600 git-svn-id: http://skia.googlecode.com/svn/trunk@3991 2bbb7eff-a529-9590-31e7-b0007b416f81
* Disable SSSE3 for Android x86 *ONLY*.Gravatar tomhudson@google.com2012-05-16
| | | | | | | | | | | | First attempt to do this inadvertently turned it off for everyone; watch performance numbers. New benchmarks from r3963 should give us coverage. http://codereview.appspot.com/6198069/ git-svn-id: http://skia.googlecode.com/svn/trunk@3970 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reactivate SSSE3 optimizations, undoing r3770.Gravatar tomhudson@google.com2012-05-10
| | | | | | | | | | | | This will break Android x86 clients; they will need to work around, and hopefully can resubmit a patch to do so that doesn't disable SSSE3 on all other platforms (20-30% performance penalty). http://codereview.appspot.com/6201070/ git-svn-id: http://skia.googlecode.com/svn/trunk@3901 2bbb7eff-a529-9590-31e7-b0007b416f81
* Switch memset.arm.S to unified syntax.Gravatar djsollen@google.com2012-05-02
| | | | | | https://codereview.appspot.com/6108046/ git-svn-id: http://skia.googlecode.com/svn/trunk@3816 2bbb7eff-a529-9590-31e7-b0007b416f81
* Allow building on platforms with SSE2 but not SSSE3 by adding an #ifdef.Gravatar tomhudson@google.com2012-04-27
| | | | | | | | | | | Patch from Wei James (wistoch@gmail). http://codereview.appspot.com/6124050/ git-svn-id: http://skia.googlecode.com/svn/trunk@3770 2bbb7eff-a529-9590-31e7-b0007b416f81
* Landing arm patch from contributor.Gravatar djsollen@google.com2012-03-29
| | | | | | http://codereview.appspot.com/5649055 git-svn-id: http://skia.googlecode.com/svn/trunk@3541 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix Android, too, by providing cross-platform NULL version of new factory.Gravatar tomhudson@google.com2012-03-19
| | | | | | | | Another cowboy build fix. git-svn-id: http://skia.googlecode.com/svn/trunk@3425 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove stale #include.Gravatar tomhudson@google.com2012-03-19
| | | | | | | | Unreviewed cowboy commit to fix build. git-svn-id: http://skia.googlecode.com/svn/trunk@3424 2bbb7eff-a529-9590-31e7-b0007b416f81
* (SSE2) acceleration for rectangular opaque erases.Gravatar tomhudson@google.com2012-03-19
| | | | | | | | | | 15% speedup for rectangles < 31 px wide, 5% for larger. http://codereview.appspot.com/5843050/ git-svn-id: http://skia.googlecode.com/svn/trunk@3423 2bbb7eff-a529-9590-31e7-b0007b416f81
* need to pack the two values into a 32bit longGravatar mike@reedtribe.org2012-03-14
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3377 2bbb7eff-a529-9590-31e7-b0007b416f81
* SSSE3 code for drawing rotated bitmaps; produces 25-30% speedup.Gravatar tomhudson@google.com2012-03-06
| | | | | | | | | | Courtesy of Jin Yang. http://codereview.appspot.com/5704055/ git-svn-id: http://skia.googlecode.com/svn/trunk@3331 2bbb7eff-a529-9590-31e7-b0007b416f81
* Improve SSE2 code for Blending BlitRow functions, producing 10% speedup.Gravatar tomhudson@google.com2012-02-28
| | | | | | | | | | Courtesy of Evan Nier. http://codereview.appspot.com/5518045/ git-svn-id: http://skia.googlecode.com/svn/trunk@3273 2bbb7eff-a529-9590-31e7-b0007b416f81
* SSE2 version of ClampX_ClampY_{no}filter_affine, courtesy of Jin Yang.Gravatar tomhudson@google.com2012-02-28
| | | | | | | | | | Speeds up drawing rotated bitmaps by 20-30%. http://codereview.appspot.com/5700076/ git-svn-id: http://skia.googlecode.com/svn/trunk@3272 2bbb7eff-a529-9590-31e7-b0007b416f81
* SSE2 version of ClampX_ClampY_{no}filter_scale; yields 10-20% speedup inGravatar tomhudson@google.com2012-02-22
| | | | | | | | | | | bitmap_8888 benchmarks on top of last week's SSSE3 patch. Thanks to Jin Yang. http://codereview.appspot.com/5685055/ git-svn-id: http://skia.googlecode.com/svn/trunk@3227 2bbb7eff-a529-9590-31e7-b0007b416f81
* Merge changes from the android repo upstream to SkiaGravatar djsollen@google.com2012-02-15
| | | | | | Review URL: https://codereview.appspot.com/5545070 git-svn-id: http://skia.googlecode.com/svn/trunk@3199 2bbb7eff-a529-9590-31e7-b0007b416f81
* Attempt to make Windows and Mac compilers happy after breakage in r3193.Gravatar tomhudson@google.com2012-02-14
| | | | | | | | Verified that changes in parameter signatures git-svn-id: http://skia.googlecode.com/svn/trunk@3194 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SSSE3 acceleration for S32_{opaque,alpha}_D32_filter_DX; should yieldGravatar tomhudson@google.com2012-02-14
| | | | | | | | | | | | | 25% speedup on 64b architectures, something smaller but still valuable on 32b. Adds new files, breaking client gyps. http://codereview.appspot.com/5515044/ git-svn-id: http://skia.googlecode.com/svn/trunk@3193 2bbb7eff-a529-9590-31e7-b0007b416f81
* SSE2 version of blit_lcd16, courtesy of Jin Yang.Gravatar tomhudson@google.com2012-02-14
| | | | | | | | | | | | | | | Yields 25-30% speedup on Windows (32b), 4-7% on Linux (64b, less register pressure), not invoked on Mac (lcd text is 32b instead of 16b). Followup: GDI system settings on Windows can suppress LCD text for small fonts, interfering with our benchmarks. (http://code.google.com/p/skia/issues/detail?id=483) http://codereview.appspot.com/5617058/ git-svn-id: http://skia.googlecode.com/svn/trunk@3189 2bbb7eff-a529-9590-31e7-b0007b416f81
* Prevent the memset16 ARM opt from failing when count is 0.Gravatar djsollen@google.com2012-02-13
| | | | | | Review URL: http://codereview.appspot.com/5639051 git-svn-id: http://skia.googlecode.com/svn/trunk@3173 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add ARM optimizations to the build.Gravatar djsollen@google.com2012-01-09
| | | | | | | | Also had to fix a problem in the ARM memset code that was causing some tests and bench to fail. Review URL: http://codereview.appspot.com/5522052 git-svn-id: http://skia.googlecode.com/svn/trunk@2989 2bbb7eff-a529-9590-31e7-b0007b416f81
* update ARM platform procs for blitmaskGravatar reed@google.com2011-11-16
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2695 2bbb7eff-a529-9590-31e7-b0007b416f81
* support blitMask+shader natively (1.75x faster for AA, and now we can supportGravatar reed@google.com2011-11-15
| | | | | | | | LCD at all with a shader.) git-svn-id: http://skia.googlecode.com/svn/trunk@2689 2bbb7eff-a529-9590-31e7-b0007b416f81
* rename/refactor in preparation for supporting accelerated blits of shader-outputGravatar reed@google.com2011-11-14
| | | | | | | | through a mask. git-svn-id: http://skia.googlecode.com/svn/trunk@2684 2bbb7eff-a529-9590-31e7-b0007b416f81
* Update files to use SK_BUILD_FOR_ANDROID.Gravatar djsollen@google.com2011-11-08
| | | | | | | | This CL also removes any unecessary references to the ANDROID definition. Review URL: http://codereview.appspot.com/5354049 git-svn-id: http://skia.googlecode.com/svn/trunk@2629 2bbb7eff-a529-9590-31e7-b0007b416f81
* don't blend with zero in colorproc (forgot to return after memcpy check).Gravatar reed@google.com2011-10-25
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2527 2bbb7eff-a529-9590-31e7-b0007b416f81
* don't mention the neon functions if no neon is availableGravatar reed@google.com2011-10-21
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2514 2bbb7eff-a529-9590-31e7-b0007b416f81
* move LCD blits into opts, so they can have assembly versionsGravatar reed@google.com2011-10-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2484 2bbb7eff-a529-9590-31e7-b0007b416f81
* separate SkBlitMask decl into its own headerGravatar reed@google.com2011-10-12
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2461 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove bogus (probably copy/paste err) assert. Alpha need not be opaque here,Gravatar reed@google.com2011-08-09
| | | | | | | | in fact it is expected (though not required) to be non-opaque. git-svn-id: http://skia.googlecode.com/svn/trunk@2081 2bbb7eff-a529-9590-31e7-b0007b416f81
* Automatic update of all copyright notices to reflect new license terms.Gravatar epoger@google.com2011-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have manually examined all of these diffs and restored a few files that seem to require manual adjustment. The following files still need to be modified manually, in a separate CL: android_sample/SampleApp/AndroidManifest.xml android_sample/SampleApp/res/layout/layout.xml android_sample/SampleApp/res/menu/sample.xml android_sample/SampleApp/res/values/strings.xml android_sample/SampleApp/src/com/skia/sampleapp/SampleApp.java android_sample/SampleApp/src/com/skia/sampleapp/SampleView.java experimental/CiCarbonSampleMain.c experimental/CocoaDebugger/main.m experimental/FileReaderApp/main.m experimental/SimpleCocoaApp/main.m experimental/iOSSampleApp/Shared/SkAlertPrompt.h experimental/iOSSampleApp/Shared/SkAlertPrompt.m experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig gpu/src/android/GrGLDefaultInterface_android.cpp gyp/common.gypi gyp_skia include/ports/SkHarfBuzzFont.h include/views/SkOSWindow_wxwidgets.h make.bat make.py src/opts/memset.arm.S src/opts/memset16_neon.S src/opts/memset32_neon.S src/opts/opts_check_arm.cpp src/ports/SkDebug_brew.cpp src/ports/SkMemory_brew.cpp src/ports/SkOSFile_brew.cpp src/ports/SkXMLParser_empty.cpp src/utils/ios/SkImageDecoder_iOS.mm src/utils/ios/SkOSFile_iOS.mm src/utils/ios/SkStream_NSData.mm tests/FillPathTest.cpp Review URL: http://codereview.appspot.com/4816058 git-svn-id: http://skia.googlecode.com/svn/trunk@1982 2bbb7eff-a529-9590-31e7-b0007b416f81
* Manually update copyright notices in files that defied the automated processGravatar epoger@google.com2011-07-28
| | | | | | | | | | | | | | | | | | | used in http://codereview.appspot.com/4816058/ ('Automatic update of all copyright notices to reflect new license terms.') Note that the following files have been left alone, because they name copyright holders outside of Google. Please let me know if we need to update these files: experimental/CiCarbonSampleMain.c src/opts/memset16_neon.S src/opts/memset32_neon.S src/opts/opts_check_arm.cpp src/ports/SkDebug_brew.cpp src/ports/SkMemory_brew.cpp src/ports/SkOSFile_brew.cpp Review URL: http://codereview.appspot.com/4806054 git-svn-id: http://skia.googlecode.com/svn/trunk@1981 2bbb7eff-a529-9590-31e7-b0007b416f81
* re-enable SSE2 blitmask procs, only excluding if we're black (in which caseGravatar reed@google.com2011-07-07
| | | | | | | | the protable version is still faster) git-svn-id: http://skia.googlecode.com/svn/trunk@1819 2bbb7eff-a529-9590-31e7-b0007b416f81
* delete all old (non-Gyp) buildfilesGravatar epoger@google.com2011-06-14
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1583 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix arm compile problem on Lucid.Gravatar vandebo@chromium.org2011-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch from Jeff Bailey <jeffbailey@google.com> These functions on ARM both are doing something weird where, when optimization is not enable, there aren't enough low registers available for the compiler to handle the asm. My ARM-fu is pretty weak, so I have forced the functions to -O1, which allows them to compile. It would be reasonable to set them to O2 as I expect anyone debugging this will just tweak it as appropriate. The error that this is solving: third_party/skia/src/opts/SkBitmapProcState_opts_arm.cpp: In function 'void SI8_D16_nofilter_DX_arm(const SkBitmapProcState&, const uint32_t*, int, uint16_t*)': third_party/skia/src/opts/SkBitmapProcState_opts_arm.cpp:101:24: error: can't find a register in class 'LO_REGS' while reloading 'asm' third_party/skia/src/opts/SkBitmapProcState_opts_arm.cpp:101:24: error: 'asm' operand has impossible constraints However, it has to be set on both functions, as after the first error is cleared, it triggers a second time. Review URL: http://codereview.appspot.com/4452044 git-svn-id: http://skia.googlecode.com/svn/trunk@1228 2bbb7eff-a529-9590-31e7-b0007b416f81