aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
Commit message (Collapse)AuthorAge
* Move when swapping, if possible.Gravatar bungeman2016-10-26
| | | | | | | | | | | | | This change was avoided in the past because vc++ 2013 (12.0) did not properly create default move constructors and move assignment operators. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2454763002 TBR=reed Verbal lgtm Review-Url: https://codereview.chromium.org/2454763002
* Convert SkRasterPipeline loads and stores to indirect.Gravatar Mike Klein2016-10-26
| | | | | | | | | | | | | | | This allows us to change the underlying pointer without rebuilding the pipeline, e.g. when moving the blitter from scanline to scanline. The extra overhead when not needed is measurable but small, <2%. We can always add back direct stages later for cases where we know the context pointer will not change. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3943 Change-Id: I827d7e6e4e67d02dd2802610f898f98c5f36f8cb Reviewed-on: https://skia-review.googlesource.com/3943 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Add GrOpList and rename GrDrawTarget to GrRenderTargetOpListGravatar Robert Phillips2016-10-26
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3910 Change-Id: I026aa26ecc61a0d002e98892dca728536259e8b1 Reviewed-on: https://skia-review.googlesource.com/3910 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* GrConstColorProcessor uses 4f colors in the destination spaceGravatar Brian Osman2016-10-26
| | | | | | | | | | | | | | | | | | | | Many places that construct one are explicitly specifying opaque white or transparent black, which we can assume (based on the semantics of the operation) should remain (0,0,0,0) or (1,1,1,1), so that's simple. In other cases, we convert our source color to destination space. One wrinkle is tht SkColorFilter now needs to know the destination color space, due to SkModeColorFilter. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3903 Change-Id: I4969c0260588f4021300733f601b47dc606adf79 Reviewed-on: https://skia-review.googlesource.com/3903 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* SkRasterPipeline::compile().Gravatar Mike Klein2016-10-25
| | | | | | | | | | | I'm not yet caching these in the blitter, and speed is essentially unchanged in the bench where I am now building and compiling the pipeline only once. This may not be able to stay a simple std::function after I figure out caching, but for now it's a nice fit. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3911 Change-Id: I9545af589f73baf9f17cb4e6ace9a814c2478fe9 Reviewed-on: https://skia-review.googlesource.com/3911 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Move SkRasterPipeline further into SkOpts.Gravatar Mike Klein2016-10-25
| | | | | | | | | | | | | | | | | | The portable code now becomes entirely focused on enum+ptr descriptions, leaving the concrete implementation of the pipeline to SkOpts::run_pipeline(). As implemented, the concrete implementation is basically the same, with a little more type safety. Speed is essentially unchanged on my laptop, and that's having run_pipeline() rebuild its concrete state every call. There's room for improvement there if we split this into a compile_pipeline() / run_pipeline() sort of thing, which is my next planned CL. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3920 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: Ie4c554f51040426de7c5c144afa5d9d9d8938012 Reviewed-on: https://skia-review.googlesource.com/3920 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* remove discardablepixelrefGravatar Mike Reed2016-10-25
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3883 Change-Id: Ica284be78563a4ccd6e0cb07404064fb5511ba57 Reviewed-on: https://skia-review.googlesource.com/3883 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Help msvs compile SkColorSpaceXform fasterGravatar Matt Sarett2016-10-24
| | | | | | | | | | | | | | Allowing MSVS to choose to not inline color_xform_RGBA will prevent the complexity from exploding. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3884 Change-Id: I31ab0754c6cc375d6d0e71ceb16afef1927bb4e3 Reviewed-on: https://skia-review.googlesource.com/3884 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* Use SK_ALWAYS_INLINE in SkColorSpaceXformGravatar Matt Sarett2016-10-24
| | | | | | | | | | | | | | | | | | | Two reasons for this: (1) We care about the performance of this code, and Windows isn't very good at inlining. Let's make sure we isntruct the compiler to inline. (2) Since landing uses of this in Chrome, we're seeing flaky LayoutTests that appear to be timing related. I'm (very optimistically) hoping that this will help. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3744 Change-Id: Ibb6d9c4252c0b8ce62203fe65c7dd296248982c8 Reviewed-on: https://skia-review.googlesource.com/3744 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Refactored SkColorSpace_A2B to allow arbitrary ordering of elementsGravatar raftias2016-10-24
| | | | | | | | | | | | | | | This is essential for representing non-lutAtoBType A2B tags such as lut16Type, lut8Type, mpet. Parsing of A2B0 tags was also moved ahead of the TRC/XYZ-matrix parsing, as profiles examined with both tags either had the TRC/XYZ tags as a fall-back or were incorrectly displayed if only the TRC/XYZ tags were used. This was submitted alone to reduce CL size. Tests that will use these changes will be introduced in the subsequent CLs that add on lut8/16Type A2B0 parsing. We already have lut16Type test images and these have been tested locally, but require additional code not submitted yet for lut16Type ICC profile parsing and A2B colorspace xforms. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2444553002 Review-Url: https://codereview.chromium.org/2444553002
* SkShader* refAs... to sk_sp<SkShader> makeAs...Gravatar Ben Wagner2016-10-24
| | | | | | | | | | | There appear to be no existing overriders of the refAs.. method outside Skia. Change-Id: Iab174e83023093b4d7fc0bd8907666b66ddb1eea Reviewed-on: https://skia-review.googlesource.com/3746 Reviewed-by: Ben Wagner <benjaminwagner@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Rename all color space factories from New* to Make*Gravatar Brian Osman2016-10-24
| | | | | | | | | | | | | | | | | | | | | Matches our naming convention for all other types - factories that return sk_sp (or any type that intelligently manages its own lifetime) are named Make. Previous factories are still around, assuming SK_SUPPORT_LEGACY_COLOR_SPACE_FACTORIES is defined. Enable that define for Android, etc. See also: https://codereview.chromium.org/2442053002/ BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3822 Change-Id: Iaea9376490736b494e8ffc820831f052bbe1478d Reviewed-on: https://skia-review.googlesource.com/3822 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Fall back from analytic to sampling earlierGravatar liyuqian2016-10-21
| | | | | | | | | | This magically fixes some strange js unit tests in Chrome. Those tests only fail in virtual/gpu which somehow interacts with my cpu rasterizer? BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2439973004 Review-Url: https://chromiumcodereview.appspot.com/2439973004
* Another forgotten forceRLEGravatar liyuqian2016-10-21
| | | | | | | | BUG=skia: TBR=reed@google.com,caryclark@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2438163003 Review-Url: https://chromiumcodereview.appspot.com/2438163003
* Fix for Chrome MSANGravatar Matt Sarett2016-10-21
| | | | | | | | | | | | | | | | | | I believe that the complaints are occurring because the |a| vector might be uninitialized where it is used here. It doesn't actually matter because we won't use or store that value - it's just a placeholder. But we need to make the bot happy. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3800 Change-Id: I1891da9d1d2708008e4606daebf9bb6f96e92fc0 Reviewed-on: https://skia-review.googlesource.com/3800 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* SkScalerContext to use smart pointers.Gravatar bungeman2016-10-20
| | | | | | | | | CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot;master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot Change-Id: I27a714388b8ded7dfc968e322b0a587205f575f1 Reviewed-on: https://skia-review.googlesource.com/3731 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Ben Wagner <bungeman@google.com>
* remove 4 legacy flags (clients already updated)Gravatar Mike Reed2016-10-20
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3785 Change-Id: I187e50e09ed7a3316719fae51af770259928fdf9 Reviewed-on: https://skia-review.googlesource.com/3785 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Quickly fix the forgotten forceRLEGravatar liyuqian2016-10-20
| | | | | | | | BUG=skia: TBR=reed@google.com,caryclark@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2436593004 Review-Url: https://chromiumcodereview.appspot.com/2436593004
* Hash the gamut of XYZ color spaces, to speed up comparisonGravatar Brian Osman2016-10-20
| | | | | | | | | | | | | | Also going to use this to allow caching of GrColorSpaceXforms BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3670 Change-Id: I56ed2dcbdddc22046263f56d68f2d6aea55547c8 Reviewed-on: https://skia-review.googlesource.com/3670 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add query to imagegenerator if it can efficiently generate a textureGravatar Mike Reed2016-10-20
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3780 Change-Id: If5fb6ee82e47f0d007b4ad7c46ac73574eccd8c5 Reviewed-on: https://skia-review.googlesource.com/3780 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Use Analytic AA in SkAAClip.Gravatar liyuqian2016-10-20
| | | | | | | | | | | | | This will fix some Chrome ref tests. The main issue here is that the SkAAClip requires: (1) we blit in order, and (2) we must forceRLE. Note that this still depends on the global gSkUseAnalyticAA to turn on the Analytic AA. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2430343003 Review-Url: https://chromiumcodereview.appspot.com/2430343003
* Fixed potential read-out-of-bounds issue in ICC profile loadingGravatar raftias2016-10-20
| | | | | | | | | | | | For 8-bit precision color LUT in A2B0 ICC color space profiles it was skipping every 2nd CLUT value and then reading past the end of the CLUT data table. Now it properly increments through 8-bit precision color LUT tables in profiles. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2434563007 Review-Url: https://chromiumcodereview.appspot.com/2434563007
* SkRasterPipeline refactorGravatar Mike Klein2016-10-20
| | | | | | | | | | | | | | | | | | | | | | - Give body and tail functions separate types. This frees a register in body functions, especially important for Windows. - Fill out default, SSE4.1, and HSW versions of all functions. This means we don't have to mess around with SkNf_abi... all functions come from the same compilation unit where SkNf is a single consistent type. - Move Stage::next() into SkRasterPipeline_opts.h as a static inline function. - Remove Stage::ctx() entirely... fCtx is literally the same thing. This is a step along the way toward building the entire pipeline in src/opts, removing the need for all the stages to be functions living in SkOpts. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3680 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot,Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot Change-Id: I7de78ffebc15b9bad4eda187c9f50369cd7e5e42 Reviewed-on: https://skia-review.googlesource.com/3680 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* use 'real' SkImageDeserializerGravatar Mike Reed2016-10-20
| | | | | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3727 Change-Id: Ic07ea6bd2756f1be08e80075c236a70ce6c08a3b TBR=mtklein Reviewed-on: https://skia-review.googlesource.com/3727 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Class delete call unsized delete when size not known.Gravatar Ben Wagner2016-10-19
| | | | | | | | | | | | | | | | | | Some classes directly call global operator new to reserve space in addition to the space the class will occupy. These clases must be deleted with the unsized global operator new. If a build is configured such that sized global operator new is called from a delete expression, this must be overridden by such classes. TBR=reed Only affects private bits of SkData. Change-Id: I797935db17a37aa8c2ca7b562a4ea65a7978a9f0 Reviewed-on: https://skia-review.googlesource.com/3678 Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Correct a small mistake in SkPath::build_arc_conicsGravatar xidachen2016-10-19
| | | | | | | | | | | | | | | In this function, when count is 0, it maps the dst point to start, where it should really be stop. A test case is also added. In the test case, it should be drawing three lines, without the change in SkPath class, it will draw 2 lines only with the top horizontal line missing because it maps the dst point to the start point, and hence the horizontal line is not drawn. BUG=640031 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2409983004 Review-Url: https://chromiumcodereview.appspot.com/2409983004
* SkNx: use SK_ALWAYS_INLINE thoroughly.Gravatar Mike Klein2016-10-19
| | | | | | | | | | | | | | | | | | MSVC's not so good at inlining. So tell it where to. It won't hurt the others. This has nothing directly to do with ODR safety. The anonymous namespaces and 'static' on freestanding functions provide the correctness we need there. But this change can help to mechanically prevent the sort of problems ODR violations can lead to. I may follow up by extending this strategy further to Sk4px, which is used to implement a lot of the legacy xfermodes. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3608 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: I927334c40910ce43da1fbabdf243c9cd5438bea6 Reviewed-on: https://skia-review.googlesource.com/3608 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* SkDescriptors to be held in unique_ptr.Gravatar bungeman2016-10-19
| | | | | | | | | | | | This also removes the class operator new override along with directly calling malloc in SkData, since it has a similar requirements. CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot;master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot Change-Id: Ic68aacf2028d6964d9735a55558862afc9edd19b Reviewed-on: https://skia-review.googlesource.com/3541 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Ben Wagner <bungeman@google.com>
* image serialize/deserialize callbacks in pipeGravatar Mike Reed2016-10-18
| | | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3607 Change-Id: I403fec72cacfc6a821f676f0afef390c89749a8b Reviewed-on: https://skia-review.googlesource.com/3607 Commit-Queue: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Refactored SkColorSpace and added in a Lab PCS GMGravatar raftias2016-10-18
| | | | | | | | | | | | | | | | | | | | The refactoring breaks off A2B0 tag support into a separate subclass of SkColorSpace_Base, while keeping the current (besides CLUT) functionality in a XYZTRC subclass. ICC profile loading is now aware of this and creates the A2B0 subclass when SkColorSpace::NewICC() is called on a profile in need of the A2B0 functionality. The LabPCSDemo GM loads a .icc profile containing a LAB PCS and then runs a Lab->XYZ conversion on an image using it so we can display it and test out the A2B0 SkColorSpace functionality, sans a/b/m-curves, as well as the Lab->XYZ conversion code. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2389983002 Review-Url: https://codereview.chromium.org/2389983002
* Remove aux procs from SkGlyphCache.Gravatar Ben Wagner2016-10-17
| | | | | | | | | | | Doesn't appear that anyone is using these anymore. The last user was removed with https://codereview.chromium.org/1985163002/ landed as https://skia.googlesource.com/skia/+/c2878e23d405e7ae77f6110602ad75ce1f6b941c Change-Id: I224354cd0d1ecbbb1100aa1e4b415d48637a51f3 Reviewed-on: https://skia-review.googlesource.com/3582 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Herb Derby <herb@google.com>
* Apply correct sRGB->Linear4f conversion in SkModeColorFilterGravatar Matt Sarett2016-10-17
| | | | | | | | | | | | | | | This fixes a software rendering bug in Android. Vector drawable icons were being drawn "too light" because they were missing this step. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3563 Change-Id: I9b9c0dc571244dab17ee125ecb7814d7f85181e2 Reviewed-on: https://skia-review.googlesource.com/3563 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Avoid SkImage ref churn in short lived SkBitmapProviderGravatar fmalita2016-10-17
| | | | | | | | | | SkBitmapProvider is always stack-allocated and tightly-scoped. It should be safe to store a SkImage rawptr instead of a ref object. R=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2424813002 Review-Url: https://codereview.chromium.org/2424813002
* Cache dst LUTs in SkColorSpaceXformGravatar Matt Sarett2016-10-16
| | | | | | | | | | | | | | | | | | | | | | This is only useful in the rare case that the dst does not fall into one of our main paths. But it's a good optimization, since this does happen, and typically, the dst won't change. ColorCodecBench z620 --nonstd --xform_only Without Patch 511us With Patch 348us BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3400 Change-Id: Ibf68d9ce7072680465662922f4aa15630545e3d6 Reviewed-on: https://skia-review.googlesource.com/3400 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* SkNx_abi for passing Sk4f as function arguments, etc.Gravatar Mike Klein2016-10-15
| | | | | | | | | | | | CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot,Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3422 Change-Id: Idc0a192faa7ff843aef023229186580c69baf1f7 Reviewed-on: https://skia-review.googlesource.com/3422 Reviewed-by: Mike Klein <mtklein@chromium.org>
* Wrap SkNx types in anonymous namespace again.Gravatar Mike Klein2016-10-14
| | | | | | | | | | | | | | | | | | | | | This should make each compilation unit's SkNx types distinct from each other's as far as C++ cares. This keeps us from violating the One Definition Rule with different implementations for the same function. Here's an example I like. Sk4i SkNx_cast(Sk4b) has at least 4 different sensible implementations: - SSE2: punpcklbw xmm, zero; punpcklbw xmm, zero - SSSE3: load mask; pshufb xmm, mask - SSE4.1: pmovzxbd - AVX2: vpmovzxbd We really want all these to inline, but if for some reason they don't (Debug build, poor inliner) and they're compiled in SkOpts.cpp, SkOpts_ssse3.cpp, SkOpts_sse41.cpp, SkOpts_hsw.cpp... boom! BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3461 Change-Id: I0088ebfd7640c1b0de989738ed43c81b530dc0d9 Reviewed-on: https://skia-review.googlesource.com/3461 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Refactor color_xform_RGBA() to improve performanceGravatar Matt Sarett2016-10-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we've identified this as the "fast path", it has become (somewhat) stable, and I'm ready to ship it, I feel comfortable playing games with clang to get the behavior we want. toSRGB Performance on HP z620: Before: 370us or 470us (depending on the mood of my computer) After: 345us (or better, always) My guess is that clang optimizers do a better job of interleaving instructions effectively when we put everything into one function. Regardless of being silly about performance, I also acutally prefer how the code reads this way. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3440 Change-Id: Id7a40fb9966341ab184a5331b3e4da19b3af3344 Reviewed-on: https://skia-review.googlesource.com/3440 Commit-Queue: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Add NewRGB() with float gamma to SkColorSpace public APIGravatar Matt Sarett2016-10-14
| | | | | | | | | | | | | Necessary because PNGs like to specify their gamma this way. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3402 Change-Id: I399984d611db907b115b345df1afc88d39326fbb Reviewed-on: https://skia-review.googlesource.com/3402 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Add support for Atrace and hook into SkEventTracer framework.Gravatar Greg Daniel2016-10-14
| | | | | | | | | | | | | | | This change is a different version of: https://skia-review.googlesource.com/c/3269/ BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3345 Change-Id: I49d4f2987740d3ad1307f6aba3add0d63a46b22d Reviewed-on: https://skia-review.googlesource.com/3345 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Allow F16 color type on direct raster canvasesGravatar junov2016-10-13
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2416063002 Review-Url: https://codereview.chromium.org/2416063002
* remove SkErrorGravatar Mike Klein2016-10-13
| | | | | | | | | | | | | It has not caught on. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3321 Change-Id: Ib2ee4ef99bc89c8f4b7504e42a9d7d9dfc483015 Reviewed-on: https://skia-review.googlesource.com/3321 Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Removed makeLinearGamma() from the public API for SkColorSpaceGravatar raftias2016-10-13
| | | | | | | | | | | | | | | It will now reside in SkColorSpace_Base. Future work for SkColorSpace will cause this function to not be desirable or sensible to call on all SkColorSpaces. Call sites were changed to make a kSRGBLinear_Named instead of kSRGB_Named -> makeLinearGamma() (the majority of cases), and if that was not possible, SkColorSpace_Base::makeLinearGamma() was called instead. TBR=reed@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2412613005 Review-Url: https://codereview.chromium.org/2412613005
* Fix double-accounting of SkPictureShader bitmap memoryGravatar fmalita2016-10-12
| | | | | | | | | | | The pixels RAM is accounted via SkImageGenerator/SkImageCacherator, we don't need to report it as part of SkPictureShader's BitmapShaderRec. R=reed@google.com BUG=chromium:619929 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2415673002 Review-Url: https://codereview.chromium.org/2415673002
* Add SkRasterPipeline support to SkModeColorFilter.Gravatar Mike Klein2016-10-12
| | | | | | | | | | | | | | | | The shader leaves its color in r,g,b,a, so to implement this color filter, we move {r,g,b,a} into {dr,dg,db,da}, then load the filter's color in {r,g,b,a}, then apply the xfermode as usual. I've left a note about how we could sometimes cut a stage for some xfermodes. Similarly we really only need to move_src_dst instead of swap_src_dst, but it seemed handy and less error prone to do a full two way swap. As usual, we can always circle back and fine-tune these things if we want. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3243 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: I928c0fb25236eb75cf238134c6bebb53af5ddf07 Reviewed-on: https://skia-review.googlesource.com/3243 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Matt Sarett <msarett@google.com>
* SkRasterPipeline: 8x pipelines, without any 8x code enabled.Gravatar Mike Klein2016-10-12
| | | | | | | | | | | | | | | | | Original review here: https://skia-review.googlesource.com/c/2990/ Second attempt here: https://skia-review.googlesource.com/c/3064/ This is the same as the second attempt, but with the change to SkOpts_hsw.cpp left out. That omitted part is the key piece... this just lands the refactoring. CQ_INCLUDE_TRYBOTS=master.client.skia:Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot,Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-GN,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Fast-Trybot;master.client.skia.compile:Build-Win-MSVC-x86_64-Debug-Trybot GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3242 Change-Id: Iaafa793a4854c2c9cd7e85cca3701bf871253f71 Reviewed-on: https://skia-review.googlesource.com/3242 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Add SkColorSpaceTransferFn to SkColorSpaceGravatar Matt Sarett2016-10-11
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3178 Change-Id: I354342d4469cee0e25a7b0d189e925e431da623c Reviewed-on: https://skia-review.googlesource.com/3178 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* implement A8 destination fast-path for SkPixelInfo::CopyPixelsGravatar lsalzman2016-10-11
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2407093002 Review-Url: https://codereview.chromium.org/2407093002
* Add AA Analytic Compile Flag (and small fixes)Gravatar liyuqian2016-10-11
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2410303002 Review-Url: https://codereview.chromium.org/2410303002
* Add SkColorSpaceXform to the public APIGravatar msarett2016-10-11
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2390263002 Review-Url: https://codereview.chromium.org/2390263002
* Add SkColorSpacePrimaries to help with making D50 matricesGravatar msarett2016-10-11
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2304753002 Review-Url: https://codereview.chromium.org/2304753002