aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench
Commit message (Collapse)AuthorAge
* Correct sRGB <-> linear everywhere.Gravatar mtklein2016-07-20
| | | | | | | | | | | | | | | | | | | | | | This trims the SkPM4fPriv methods down to just foolproof methods. (Anything trying to build these itself is probably wrong.) Things like Sk4f srgb_to_linear(Sk4f) can't really exist anymore, at least not efficiently, so this refactor is somewhat more invasive than you might think. Generally this means things using to_4f() are also making a misstep... that's gone too. It also does not make sense to try to play games with linear floats with 255 bias any more. That hack can't work with real sRGB coding. Rather than update them, I've removed a couple of L32 xfermode fast paths. I'd even rather drop it entirely... BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2163683002 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2163683002
* Tune linear->sRGB constants to round-trip all bytes.Gravatar mtklein2016-07-20
| | | | | | | | | | | | I basically just ran a big 5-deep for-loop over the five constants here. This is the first set of coefficients I found that round trips all bytes. I suspect there are many such sets. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2162063003 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2162063003
* Fix master-skia buildGravatar msarett2016-07-19
| | | | | | | | TBR=djsollen@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2159223003 Review-Url: https://codereview.chromium.org/2159223003
* Improve naive SkColorXform to half floatsGravatar msarett2016-07-19
| | | | | | | | | | | | | | | | | | | | | | | | This should give us a good baseline to explore using SkRasterPipeline. A particular colorxform to half float drops from 425us to 282us on my desktop. Color Xform to Half Float (HP z620) Original 425us Trans16 (not 32) 355us Vector Trans16 378us Trans16 + Keep Halfs in Vector 335us Vector Trans16 + Keep Halfs in Vector 282us Final 282us Color Xform to Half Float (Nexus 5X) Original 556us Final 472us BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2159993003 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2159993003
* Add capability for SkColorXform to output half floatsGravatar msarett2016-07-15
| | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2147763002 CQ_INCLUDE_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot;master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2147763002
* SkPdf: smaller color serializationGravatar halcanary2016-07-15
| | | | | | | | | | | | | | SkPDFUtils now has a special function (SkPDFUtils::AppendColorComponent) just for writing out (color/255) as a decimal with three digits of precision. SkPDFUnion now has a type to represent a color component. It holds a utint_8, but calls into AppendColorComponent to serialize. Added a unit test that tests all possible input values. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2151863003 Review-Url: https://codereview.chromium.org/2151863003
* Add a bench to measure the best way to pack from int to uint16_t with SSE.Gravatar mtklein2016-07-15
| | | | | | | | | | | | | | | | | | | | | | | I measured relative runtimes on my laptop: pack_int_uint16_t_ss… 1036 …e41 1x …se3 1.01x …e2_b 3.01x …e2_a 3.02x I've run into Clang problems with the actual _mm_packus_epi32 instruction, I think, so I'm going to exercise a little cowardice and leave that option disabled for now. The ssse3 version probably looks a little faster than it will be in practice. We'll usually need to load its mask, which here is hoisted out of the bench loop. The two sse2 variants are close enough in speed that I'm tie breaking them on other concerns: the <<16, >>16 version doesn't need any scratch registers or to load any constants, so it wins. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2150343002 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Fast-Trybot Review-Url: https://codereview.chromium.org/2150343002
* Remove bulk float <-> half routines. These are dead code.Gravatar mtklein2016-07-13
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2152583002 Review-Url: https://codereview.chromium.org/2152583002
* Remove GrLayerHoisterGravatar robertphillips2016-07-13
| | | | | | | | This relies on https://codereview.chromium.org/1944013002/ (Add legacy flag to allow Skia to remove Ganesh layer hoister) landing first so as to not break the DEPS roll. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1950523002 Review-Url: https://codereview.chromium.org/1950523002
* Update SkOpts namespaces.Gravatar mtklein2016-07-13
| | | | | | | | | | | | | | | | | | | | | | | | | If we make sure all SkOpts functions are static, we can give the namespaces any name we like. This lets us drop the sk_ prefix and give a real indication of the default SIMD instruction set rather than just saying sk_default. Both of these changes help debugger, profiler, and crash report readability. Perhaps more importantly, keeping these functions static helps prevent accidentally linking in unused versions of functions, as you see here with sk_avx::srcover_srgb_srgb(). This requires we update SkBlend_opts tests and benches to call SkOpts functions through SkOpts rather than declaring the methods externally. In practice this drops testing of the SSE2 version on machines with SSE4. If we still really need to test/bench the compile time best SIMD level version of this method against the runtime detected best, we can include SkBlend_opts.h into the tests or benches directly, similar to what we do for the trivial, brute-force, or best non-SIMD versions. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2145833002 CQ_INCLUDE_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2145833002
* SkRasterPipeline preliminariesGravatar mtklein2016-07-12
| | | | | | | | | | | | | | Re-uploading to see if I can get a CL number < 2^31. patch from issue 2147533002 at patchset 240001 (http://crrev.com/2147533002#ps240001) Already reviewed at the other crrev link. TBR= BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2147533002 CQ_INCLUDE_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2144573004
* Factor code to rotate a canvas about a point.Gravatar bungeman2016-07-12
| | | | | | | | | | | SkMatrix::scale and ::rotate take a point around which to scale or rotate. Canvas lacks these helpers, so the code to rotate a canvas around a point has been duplicated many times. Factor all of these implementations into SkCanvas::rotate. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2142033002 Review-Url: https://codereview.chromium.org/2142033002
* Remove bloat from SkBlend_opts.Gravatar herb2016-07-12
| | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2130183003 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2130183003
* Add benchmarks for 3 and 4 colors (most common)Gravatar fmenozzi2016-07-12
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2143653002 Review-Url: https://codereview.chromium.org/2143653002
* Revert of try to speed-up maprect + round2i + contains (patchset #8 ↵Gravatar msarett2016-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:140001 of https://codereview.chromium.org/2133413002/ ) Reason for revert: Breaking the roll... https://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/253294/steps/compile%20%28with%20patch%29/logs/stdio Original issue's description: > try to speed-up maprect + round2i + contains > > We call roundOut in a few places. If we can get SkNx::Ceil we could efficiently implement that as well. > > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2133413002 > CQ_INCLUDE_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot > > Committed: https://skia.googlesource.com/skia/+/b42b785d1cbc98bd34aceae338060831b974f9c5 TBR=mtklein@google.com,reed@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2136343002
* try to speed-up maprect + round2i + containsGravatar reed2016-07-11
| | | | | | | | | | We call roundOut in a few places. If we can get SkNx::Ceil we could efficiently implement that as well. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2133413002 CQ_INCLUDE_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2133413002
* Remove obsolete bench analysis scriptsGravatar tomhudson2016-07-11
| | | | | | | | R=bungeman@google.com BUG=skia:5459 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2125953002 Review-Url: https://codereview.chromium.org/2125953002
* Add HardStopGradientBench.cppGravatar fmenozzi2016-07-11
| | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2131643002 Committed: https://skia.googlesource.com/skia/+/d0d652e0e0cb4bcecb7ccac9f4f4831fcaccdc45 Review-Url: https://codereview.chromium.org/2131643002
* Revert of Add HardStopGradientBench.cpp (patchset #3 id:40001 of ↵Gravatar fmenozzi2016-07-11
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/2131643002/ ) Reason for revert: Segfaulting on HardStopGradientBench; didn't allocate enough stack memory for color/position arrays. Original issue's description: > Add HardStopGradientBench.cpp > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2131643002 > > Committed: https://skia.googlesource.com/skia/+/d0d652e0e0cb4bcecb7ccac9f4f4831fcaccdc45 TBR=bsalomon@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2140603003
* Add HardStopGradientBench.cppGravatar fmenozzi2016-07-11
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2131643002 Review-Url: https://codereview.chromium.org/2131643002
* Revert of change mapRectScaleTranslate to pass args/ret by value (patchset ↵Gravatar reed2016-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #1 id:1 of https://codereview.chromium.org/2137853002/ ) Reason for revert: Triggered a compiler bug on Android? FAILED: /usr/bin/ccache /b/work/skia/platform_tools/android/bin/../toolchains/arm-r11c-14/bin/arm-linux-androideabi-g++ -MMD -MF obj/src/core/core.SkMatrix.o.d -DSK_INTERNAL -DSK_GAMMA_APPLY_TO_A8 -DQT_NO_KEYWORDS -DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0 -DSK_SUPPORT_GPU=1 -DSK_FORCE_DISTANCE_FIELD_TEXT=0 -DSK_HAS_GIF_LIBRARY -DSK_HAS_JPEG_LIBRARY -DSK_HAS_PNG_LIBRARY -DSK_HAS_WEBP_LIBRARY -DSK_TEST_QCMS -DSK_IS_BOT -DSK_CODEC_DECODES_RAW -DSK_ARM_HAS_NEON -DSK_BUILD_FOR_ANDROID -DSK_GAMMA_EXPONENT=1.4 -DSK_GAMMA_CONTRAST=0.0 -DSKIA_DLL -DSKIA_IMPLEMENTATION=1 -DSK_SUPPORT_LEGACY_CLIPTOLAYERFLAG -DNDEBUG -I../../../include/c -I../../../include/config -I../../../include/core -I../../../include/pathops -I../../../include/ports -I../../../include/private -I../../../include/utils -I../../../include/images -I../../../src/core -I../../../src/sfnt -I../../../src/image -I../../../src/opts -I../../../src/utils -I../../../include/gpu -I../../../src/gpu -I../../../platform_tools/android/third_party/cpufeatures -fPIC -g -fno-exceptions -fstrict-aliasing -Wall -Wextra -Winit-self -Wpointer-arith -Wsign-compare -Wvla -Wno-unused-parameter -Werror -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=softfp -fuse-ld=gold -O2 -std=c++11 -fno-rtti -fno-threadsafe-statics -Wnon-virtual-dtor -c ../../../src/core/SkMatrix.cpp -o obj/src/core/core.SkMatrix.o ../../../src/core/SkMatrix.cpp: In member function 'SkRect SkMatrix::mapRectScaleTranslate(SkRect) const': ../../../src/core/SkMatrix.cpp:1120:1: error: unrecognizable insn: } ^ (insn 32 31 33 2 (set (reg:V4SF 115 [ D.83077 ]) (unspec:V4SF [ (mem/c:V4SF (reg/f:SI 104 virtual-incoming-args) [0 MEM[(const __builtin_neon_sf[4] *)&src]+0 S16 A32]) ] UNSPEC_VLD1)) /b/work/skia/platform_tools/android/toolchains/arm-r11c-14/lib/gcc/arm-linux-androideabi/4.9/include/arm_neon.h:8693 -1 (nil)) ../../../src/core/SkMatrix.cpp:1120:1: internal compiler error: in extract_insn, at recog.c:2202 Please submit a full bug report, with preprocessed source if appropriate. See <http://source.android.com/source/report-bugs.html> for instructions. Original issue's description: > change mapRectScaleTranslate to pass args/ret by value > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2137853002 > > TBR=mtklein > > Committed: https://skia.googlesource.com/skia/+/14dce6ed5934d7a6e1fac79f8e76e12f5670aae2 TBR=msarett@google.com,mtklein@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2139523002
* change mapRectScaleTranslate to pass args/ret by valueGravatar reed2016-07-10
| | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2137853002 TBR=mtklein Review-Url: https://codereview.chromium.org/2137853002
* Begin instanced rendering for simple shapesGravatar csmartdalton2016-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a module that performs instanced rendering and starts using it for a select subset of draws on Mac GL platforms. The instance processor can currently handle rects, ovals, round rects, and double round rects. It can generalize shapes as round rects in order to improve batching. The instance processor also employs new drawing algorithms, irrespective of instanced rendering, that improve GPU-side performance (e.g. sample mask, different triangle layouts, etc.). This change only scratches the surface of instanced rendering. The majority of draws still only have one instance. Future work may include: * Passing coord transforms through the texel buffer. * Sending FP uniforms through instanced vertex attribs. * Using instanced rendering for more draws (stencil writes, drawAtlas, etc.). * Adding more shapes to the instance processor’s repertoire. * Batching draws that have mismatched scissors (analyzing draw bounds, inserting clip planes, etc.). * Bindless textures. * Uber shaders. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2066993003 Committed: https://skia.googlesource.com/skia/+/42eafa4bc00354b132ad114d22ed6b95d8849891 Review-Url: https://codereview.chromium.org/2066993003
* speed up maprect for scale+trans caseGravatar reed2016-06-30
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2111703002 Review-Url: https://codereview.chromium.org/2111703002
* SkPDF: alloc less memory for stringsGravatar halcanary2016-06-23
| | | | | | | | | | | | | | | | | before: micros bench 250.98 WritePDFText nonrendering after: micros bench 107.10 WritePDFText nonrendering Also, be slightly more space-efficient in encoding strings. Also, add a bench. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2099463002 Review-Url: https://codereview.chromium.org/2099463002
* update callers to not use SkColorProfileTypeGravatar reed2016-06-21
| | | | | | | | | Requires https://codereview.chromium.org/2087833002/ to land first. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2086583002 Review-Url: https://codereview.chromium.org/2086583002
* Fix Mac clang linkerGravatar msarett2016-06-21
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2077353006 Review-Url: https://codereview.chromium.org/2077353006
* Add --simpleCodec to nanobench flags to run a smaller set of benchmarksGravatar msarett2016-06-21
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2084683002 Review-Url: https://codereview.chromium.org/2084683002
* Benchmark rotated rect with AA/noAAGravatar liyuqian2016-06-20
| | | | | | | | | | | Using this benchmark, we verify that AA is about 4x slower than noAA in path_fill_big_rotated_rect. This is what I aim to improve in the next CL. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087453003 Review-Url: https://codereview.chromium.org/2087453003
* Respect color type and gamma settings in nanobench GPU configsGravatar brianosman2016-06-20
| | | | | | | | | | We were ignoring the requested properties in things like gpuf16 and gpusrgb. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2075133003 Review-Url: https://codereview.chromium.org/2075133003
* More removal of SkColorProfileType...Gravatar brianosman2016-06-20
| | | | | | | | | | | Scrub GMs. Remove the gDefaultProfile thing (it's unused now), along with the command line flag that was setting it in DM and nanobench. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2071393002 Committed: https://skia.googlesource.com/skia/+/944876f2745a62a839e49275daf93a0329372e67 Review-Url: https://codereview.chromium.org/2071393002
* Support sRGB dsts in opt codeGravatar msarett2016-06-20
| | | | | | | | | | | | | | | 201295.jpg on HP z620 (300x280) QCMS Xform 0.418 ms Skia NEW Xform 0.378 ms Vs QCMS 1.11x BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2078623002 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2078623002
* Revert of More removal of SkColorProfileType... (patchset #2 id:20001 of ↵Gravatar egdaniel2016-06-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/2071393002/ ) Reason for revert: This was still used in chrome Original issue's description: > More removal of SkColorProfileType... > > Scrub GMs. Remove the gDefaultProfile thing (it's unused now), along with > the command line flag that was setting it in DM and nanobench. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2071393002 > > Committed: https://skia.googlesource.com/skia/+/944876f2745a62a839e49275daf93a0329372e67 TBR=msarett@google.com,reed@google.com,bsalomon@google.com,brianosman@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2074103004
* More removal of SkColorProfileType...Gravatar brianosman2016-06-17
| | | | | | | | | | Scrub GMs. Remove the gDefaultProfile thing (it's unused now), along with the command line flag that was setting it in DM and nanobench. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2071393002 Review-Url: https://codereview.chromium.org/2071393002
* Lots of progress on switching to SkColorSpace rather than SkColorProfileTypeGravatar brianosman2016-06-16
| | | | | | | | | | Fixed a bunch of code in Ganesh, as well as usage of SkColorProfileType in most of our tools (DM, SampleApp, Viewer, nanobench, skiaserve, HelloWorld). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2069173002 Committed: https://skia.googlesource.com/skia/+/6a61a875467646f8dbc37cfecf49e12d1f475170 Review-Url: https://codereview.chromium.org/2069173002
* Revert of Lots of progress switching to SkColorSpace rather than ↵Gravatar brianosman2016-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | SkColorProfileType (patchset #10 id:180001 of https://codereview.chromium.org/2069173002/ ) Reason for revert: Mac crashes in GrUploadPixmapToTexture Original issue's description: > Lots of progress on switching to SkColorSpace rather than SkColorProfileType > > Fixed a bunch of code in Ganesh, as well as usage of SkColorProfileType in most of our tools (DM, SampleApp, Viewer, nanobench, skiaserve, HelloWorld). > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2069173002 > > Committed: https://skia.googlesource.com/skia/+/6a61a875467646f8dbc37cfecf49e12d1f475170 TBR=reed@google.com,herb@google.com,msarett@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2072813002
* Lots of progress on switching to SkColorSpace rather than SkColorProfileTypeGravatar brianosman2016-06-16
| | | | | | | | | Fixed a bunch of code in Ganesh, as well as usage of SkColorProfileType in most of our tools (DM, SampleApp, Viewer, nanobench, skiaserve, HelloWorld). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2069173002 Review-Url: https://codereview.chromium.org/2069173002
* Implement fast, correct gamma conversion for color xformsGravatar msarett2016-06-16
| | | | | | | | | | | | | | | | | | | | | | 201295.jpg on HP z620 (300x280, most common form of sRGB profile) QCMS Xform 0.495 ms Skia Old Xform 0.235 ms Skia NEW Xform 0.423 ms Vs Old Code 0.56x Vs QCMS 1.17x So to summarize, we are now much slower than before, but still a bit faster than QCMS. And now we are also far more accurate than QCMS :). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2060823003 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2060823003
* respect srgb gamma when building mipsGravatar reed2016-06-10
| | | | | | | | | | | Proposed policy: - If the target is *legacy* (e.g. L32/PMColor) ignore gamma - If the target is S32/F16 respect gamma BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2029373004 Review-Url: https://codereview.chromium.org/2029373004
* Optimize color xforms with 2.2 gammas for SSE2Gravatar msarett2016-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because we recognize commonly used gamma tables and parameters as 2.2f, about 98% of jpegs with color profiles will pass through this xform (assuming the dst is also 2.2f). Sample size is 10,322 jpegs. I won't go crazy with performance numbers because this is a work in progress, particularly in terms of correctness. 201295.jpg on HP z620 (300x280, most common form of sRGB profile) Decode Time + QCMS Xform 1.28 ms QCMS Xform Only 0.495 ms Decode Time + Skia Opt Xform 1.01 ms Skia Opt Xform Only 0.235 ms Decode Time + Xform Speed-up 1.27x Xform Only Speed-up 2.11x FWIW, Skia xform time before these optimizations was 41.1 ms. But we expected that code to be slow. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2046013002 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2046013002
* SkLeanWindows.h: #include "Windows.h" fewer placesGravatar halcanary2016-06-07
| | | | | | | | | | | | | | | | | | | | | | | | $ git grep -l '<windows.h>' include src include/private/SkLeanWindows.h $ git grep -l SkLeanWindows.h | grep '\.h$' include/ports/SkTypeface_win.h include/utils/win/SkHRESULT.h include/utils/win/SkTScopedComPtr.h include/views/SkEvent.h src/core/SkMathPriv.h src/ports/SkTypeface_win_dw.h src/utils/SkThreadUtils_win.h src/utils/win/SkWGL.h The same for `#include <intrin.h>` that was found in SkMath.h. Those functions that needed it are moved to SkMathPriv.h. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2041943002 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_chromium_compile_dbg_ng,win_chromium_compile_rel_ng Review-Url: https://codereview.chromium.org/2041943002
* Use SK_TEST_QCMS to mark qcms test codeGravatar msarett2016-06-06
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2031053005 Review-Url: https://codereview.chromium.org/2031053005
* Add color correction benchmark - with comparison to qcmsGravatar msarett2016-06-03
| | | | | | | | | | | | | | | | --colorImages is empty by default so this won't affect the runtime of the bots. To run locally, use --colorImages <path> and --benchType skcolorcodec. Two takeaways so far: Color correction is (currently) slower than jpeg decodes. Our reference solution is slower than qcms. TBR=reed@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2035793002 Review-Url: https://codereview.chromium.org/2035793002
* Fix incorrect parameter in new benchmark.Gravatar brianosman2016-06-02
| | | | | | | | | An old value for one of the dimensions slipped in with the original CL. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2033713003 Review-Url: https://codereview.chromium.org/2033713003
* Release surface between runs to avoid seg faultGravatar brianosman2016-06-01
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2032693002 Review-Url: https://codereview.chromium.org/2032693002
* New benchmark to measure GPU mip-mapping performanceGravatar brianosman2016-06-01
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2030673002 Review-Url: https://codereview.chromium.org/2030673002
* [GN] Add support for disabling opts via SK_BUILD_NO_OPTS define.Gravatar sdefresne2016-06-01
| | | | | | | | | | | | | | | | | | | | | When targetting iOS and using gyp to generate the build files, it is not possible to select files to build depending on the architecture. Due to that, the skia code was disabling all optimisation when SK_BUILD_FOR_IOS was defined. Since it is possible to select the correct optimised version when using gn, this pessimisation is hurting the build. Introduce a new define to disable the optimisation SK_BUILD_NO_OPTS. It will be used by Chromium when building skia for iOS with gyp but not gn. Define SK_BUILD_NO_OPTS along-side SK_BUILD_FOR_IOS for all files that look like build configuration (Xcode projects, gyp configuration files, public.bzl) in order to avoid introducing breakage on those builds. BUG=607933 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2002423002 Review-Url: https://codereview.chromium.org/2002423002
* SkTypeface::MakeFromName to take SkFontStyle.Gravatar mboc2016-05-31
| | | | | | | | | | | | | SkTypeface::MakeFromName currently takes SkTypeface::Style, which is quite limited. This starts the transition to this function taking SkFontStyle instead. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1818043002 TBR=reed He said it sounded like a good idea. Review-Url: https://codereview.chromium.org/1818043002
* Move forceSRGB to SkCommonFlags.Gravatar herb2016-05-27
| | | | | | | | | | | This fixes a duplicate symbol problem with the iOS build. Add common forceSRGB flag. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2019073002 Review-Url: https://codereview.chromium.org/2019073002
* Clean up SkFloatBitsGravatar mtklein2016-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - remove dead code - rewrite float -> int converters The strategy for the new converters is: - convert input to double - floor/ceil/round in double space - pin that double to [SK_MinS32, SK_MaxS32] - truncate that double to int32_t This simpler strategy does not work: - floor/ceil/round in float space - pin that float to [SK_MinS32, SK_MaxS32] - truncate that float to int32_t SK_MinS32 and SK_MaxS32 are not representable as floats: they round to the nearest float, ±2^31, which makes the pin insufficient for floats near SK_MinS32 (-2^31+1) or SK_MaxS32 (+2^31-1). float only has 24 bits of precision, and we need 31. double can represent all integers up to 50-something bits. An alternative is to pin in float to ±2147483520, the last exactly representable float before SK_MaxS32 (127 too small). Our tests test that we round as floor(x+0.5), which can return different numbers than round(x) for negative x. So this CL explicitly uses floor(x+0.5). I've updated the tests with ±inf and ±NaN, and tried to make them a little clearer, especially using SK_MinS32 instead of -SK_MaxS32. I have not timed anything here. I have never seen any of these methods in a profile. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2012333003 Review-Url: https://codereview.chromium.org/2012333003