aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* SkPDF: SkBitSet gets reset() to make drop() better.Gravatar halcanary2016-09-19
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2354583002 Review-Url: https://codereview.chromium.org/2354583002
* Move vulkan spir-v compile call to GrVkUtilGravatar egdaniel2016-09-19
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2355493002 Review-Url: https://codereview.chromium.org/2355493002
* Refactor vulkan buffer mapping and unmappingGravatar egdaniel2016-09-19
| | | | | | | | | | | | | | A lot of this is so we don't have duplicated code in both the map/unmap and updateData functions of GrVkBuffer. Also there were slightly differences in how we handled various things in the two cases that this now unifies. Also I added a barrier after the vkUpdateBuffer call which I believe was missing. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2344323002 Review-Url: https://codereview.chromium.org/2344323002
* Revert of Stop flattening GrCoordTransforms in parent GrFragmentProcessors. ↵Gravatar bsalomon2016-09-19
| | | | | | | | | | | | | | | | | | | | | | | | (patchset #3 id:40001 of https://codereview.chromium.org/2339203002/ ) Reason for revert: Crashing blink https://codereview.chromium.org/2351743002/ Original issue's description: > Stop flattening GrCoordTransforms in parent GrFragmentProcessors. > > This changes moves to a model that iterates over GrCTs in a GrFP hierarchy when inserting transformations by GrGLSLPrimitiveProcessors. > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339203002 > > Committed: https://skia.googlesource.com/skia/+/d91237ee051523f439238042674ade99207fe4a6 TBR=egdaniel@google.com,robertphillips@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/2351753002
* Stop flattening GrCoordTransforms in parent GrFragmentProcessors.Gravatar bsalomon2016-09-19
| | | | | | | This changes moves to a model that iterates over GrCTs in a GrFP hierarchy when inserting transformations by GrGLSLPrimitiveProcessors. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339203002 Review-Url: https://codereview.chromium.org/2339203002
* Add F16 to the list of allowed formats in GaussianBlurGravatar brianosman2016-09-19
| | | | | | | | | Fixes asserts that fire in some GMs for gpuf16 config BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2350723002 Review-Url: https://codereview.chromium.org/2350723002
* Remove release asserts.Gravatar cblume2016-09-19
| | | | | | | | | | A handful of changes were added to investigate a bug occurring rarely. The bug has been found and those changes can be reverted. BUG=643845 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2347423002 Review-Url: https://codereview.chromium.org/2347423002
* fix fuzzer bugsGravatar caryclark2016-09-19
| | | | | | | | | | | | Add a couple more cases where Op() fails and returns false when the out of range input values make the internal numeric unstable. TBR=reed@google.com BUG=647834, 648068 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2348263002 Review-Url: https://codereview.chromium.org/2348263002
* Fix filling of incomplete images in SkSampledCodecGravatar msarett2016-09-16
| | | | | | | | | | | | The bug occurs when filling after an incomplete sampled/subset incremental decode. I'm also adding many truncated test pngs. BUG=skia:5769 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2343153003 Review-Url: https://codereview.chromium.org/2343153003
* SkPDF: Implement /ActualText to make text extraction correct.Gravatar halcanary2016-09-16
| | | | | | | | | | | | | For old API: no change. For new API: LTR text is perfectly extracted, RTL needs better testing. CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot,Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot BUG=skia:5434 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2322403002 Review-Url: https://codereview.chromium.org/2322403002
* Improve ColorStopOptimizer safetyGravatar tomhudson2016-09-16
| | | | | | | | | | Could potentially access uninitialized memory. BUG=647481 R=brianosman@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2345343002 Review-Url: https://codereview.chromium.org/2345343002
* Revert of SkPDF: Implement /ActualText to make text extraction correct. ↵Gravatar halcanary2016-09-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #11 id:220001 of https://codereview.chromium.org/2322403002/ ) Reason for revert: MSAN, ASAN errors Original issue's description: > SkPDF: Implement /ActualText to make text extraction correct. > > For old API: no change. > > For new API: LTR text is perfectly extracted, RTL needs better testing. > > BUG=skia:5434 > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2322403002 > > Committed: https://skia.googlesource.com/skia/+/dbd16345a5b2b824f2696af791bb0f01304cf549 TBR=tomhudson@google.com,bungeman@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:5434 Review-Url: https://codereview.chromium.org/2338213008
* Sane use of FcPatternGetXXX in SkFontConfigInterface.Gravatar bungeman2016-09-16
| | | | | | | | | | This renames get_name to get_string to better reflect what it does, uses get_int where appropriate, and removes the no longer used code that uses FcPatternGetBool. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2345053005 Review-Url: https://codereview.chromium.org/2345053005
* SkPDF: Implement /ActualText to make text extraction correct.Gravatar halcanary2016-09-16
| | | | | | | | | | | For old API: no change. For new API: LTR text is perfectly extracted, RTL needs better testing. BUG=skia:5434 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2322403002 Review-Url: https://codereview.chromium.org/2322403002
* Support Float32 output from SkColorSpaceXformGravatar msarett2016-09-16
| | | | | | | | | | | | | | | * Adds Float32 support to SkColorSpaceXform * Changes API to allows clients to ask for F32, updates clients to new API * Adds Sk4f_load4 and Sk4f_store4 to SkNx * Make use of new xform in SkGr.cpp BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339233003 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Committed: https://skia.googlesource.com/skia/+/43d6651111374b5d1e4ddd9030dcf079b448ec47 Review-Url: https://codereview.chromium.org/2339233003
* Improve join between the two RRects in SkRRectsGaussianEdgeShaderGravatar robertphillips2016-09-16
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2345203003 Review-Url: https://codereview.chromium.org/2345203003
* Clear stencil buffer before using it for drawingGravatar stani2016-09-16
| | | | | | | | Clear stencil buffer before using it for drawing. This is resolving an issue with a failing android CTS test in drawArc. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2342873004 Review-Url: https://codereview.chromium.org/2342873004
* Revert of Support Float32 output from SkColorSpaceXform (patchset #7 ↵Gravatar msarett2016-09-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:140001 of https://codereview.chromium.org/2339233003/ ) Reason for revert: Hitting an assert Original issue's description: > Support Float32 output from SkColorSpaceXform > > * Adds Float32 support to SkColorSpaceXform > * Changes API to allows clients to ask for F32, updates clients to > new API > * Adds Sk4f_load4 and Sk4f_store4 to SkNx > * Make use of new xform in SkGr.cpp > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339233003 > CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot > > Committed: https://skia.googlesource.com/skia/+/43d6651111374b5d1e4ddd9030dcf079b448ec47 TBR=brianosman@google.com,mtklein@google.com,scroggo@google.com,mtklein@chromium.org,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/2347473007
* Keeping asserts in release.Gravatar cblume2016-09-16
| | | | | | | | | | | We have a bug that is showing up occasionally in Canary. I want to see if these asserts could provide insight into why the bug happens. BUG=643845 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2342903003 Review-Url: https://codereview.chromium.org/2342903003
* Support Float32 output from SkColorSpaceXformGravatar msarett2016-09-16
| | | | | | | | | | | | | | * Adds Float32 support to SkColorSpaceXform * Changes API to allows clients to ask for F32, updates clients to new API * Adds Sk4f_load4 and Sk4f_store4 to SkNx * Make use of new xform in SkGr.cpp BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339233003 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/2339233003
* Remove old SkGaussianEdgeShader codeGravatar jvanverth2016-09-16
| | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2345673003 TBR=bsalomon@google.com Review-Url: https://codereview.chromium.org/2345673003
* Make SkPngCodec decode progressively.Gravatar scroggo2016-09-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a step towards using SkCodec in Chromium, where progressive decoding is necessary. Switch from using png_read_row (which expects all the data to be available) to png_process_data, which uses callbacks when rows are available. Create a new API for SkCodec, which supports progressive decoding and scanline decoding. Future changes will switch the other clients off of startScanlineDecode and get/skip-Scanlines to the new API. Remove SkCodec::kNone_ScanlineOrder, which was only used for interlaced PNG images. In the new API, interlaced PNG fits kTopDown. Also remove updateCurrScanline(), which was only used by the old implementation for interlaced PNG. DMSrcSink: - In CodecSrc::kScanline_Mode, use the new method for scanline decoding for the supported formats (just PNG and PNG-in-ICO for now). fuzz.cpp: - Remove reference to kNone_ScanlineOrder SkCodec: - Add new APIs: - startIncrementalDecode - incrementalDecode - Remove kNone_SkScanlineOrder and updateCurrScanline() - Set fDstInfo and fOptions in getPixels(). This may not be necessary for all implementations, but it simplifies things for SkPngCodec. SkPngCodec: - Implement new APIs - Switch from sk_read_fn/png_read_row etc to png_process_data - Expand AutoCleanPng's role to decode the header and create the SkPngCodec - Make the interlaced PNG decoder report how many lines were initialized during an incomplete decode SkIcoCodec: - Implement the new APIs; supported for PNG in ICO SkSampledCodec: - Call the new method for decoding scanlines, and fall back to the old method if the new version is unimplemented - Remove references to kNone_SkScanlineOrder tests/CodecPartial: - Add a test which decodes part of an image, then finishes the decode, and compares it to the straightforward method tests/CodecTest: - Add a test which decodes all scanlines using the new method - Repurpose the Codec_stripes test to decode using the new method in sections rather than all at once - In the method check(), add a parameter for whether the image supports the new method of scanline decoding, and be explicit about whether an image supports incomplete - Test incomplete PNG decodes. We should have been doing it anyway for non-interlaced (except for an image that is too small - one row), but the new method supports interlaced incomplete as well - Make test_invalid_parameters test the new method - Add a test to ensure that it's safe to fall back to scanline decoding without rewinding BUG=skia:4211 The new version was generally faster than the old version (but not significantly so). Some raw performance differences can be found at https://docs.google.com/a/google.com/spreadsheets/d/1Gis3aRCEa72qBNDRMgGDg3jD-pMgO-FXldlNF9ejo4o/ Design doc can be found at https://docs.google.com/a/google.com/document/d/11Mn8-ePDKwVEMCjs3nWwSjxcSpJ_Cu8DF57KNtUmgLM/ GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1997703003 Review-Url: https://codereview.chromium.org/1997703003
* SkPDF: fix unembeddable text drawn with positioning (broken in 6059dc3)Gravatar halcanary2016-09-16
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2347183002 Review-Url: https://codereview.chromium.org/2347183002
* Make Sk2DPathEffect thread safe.Gravatar bungeman2016-09-16
| | | | | | | | | | | | | | SkPathEffects must be thread safe, but SkMatrix is only thread safe if the type mask has already been computed. The constructor for Sk2DPathEffect is currently making the call to 'invert' which sets the type mask, but it is being called with the passed matrix as opposed to the local copy. BUG=skia:5765 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2340133004 Review-Url: https://codereview.chromium.org/2340133004
* SkFontData to use smart pointers.Gravatar bungeman2016-09-16
| | | | | | | | | | | | | | | | | The SkFontData type is not exposed externally, so any method which uses it can be updated to use smart pointers without affecting external users. Updating this first will make updating the public API much easier. This also updates SkStreamAsset* SkStream::NewFromFile(const char*) to std::unique_ptr<SkStreamAsset> SkStream::MakeFromFile(const char*). It appears that no one outside Skia is currently using SkStream::NewfromFile so this is a good time to update it as well. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339273002 Committed: https://skia.googlesource.com/skia/+/d8c2476a8b1e1e1a1771b17e8dd4db8645914f8c Review-Url: https://codereview.chromium.org/2339273002
* Add staging for removal of SkRRectsGaussianEdgeShader::Make (for Android)Gravatar robertphillips2016-09-16
| | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2347853002 TBR=bsalomon@google.com Review-Url: https://codereview.chromium.org/2347853002
* test/fix/tweak writePicture/readPictureGravatar reed2016-09-15
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2347593004 Review-Url: https://codereview.chromium.org/2347593004
* Fix key computation for GrPathsGravatar bsalomon2016-09-15
| | | | | | | Improve tests to ensure paths are receiving valid keys GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2342873002 Review-Url: https://codereview.chromium.org/2342873002
* Add GrContextOptions flag to disable distance field path renderer.Gravatar bsalomon2016-09-15
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339213002 Review-Url: https://codereview.chromium.org/2339213002
* Fix color bug in SkRRectsGaussianEdgeShaderGravatar robertphillips2016-09-15
| | | | | | | | | | | | Due to the code at the end of emitCode this shader was darker than the SkGaussianEdgeShader on Android. This CL also removes the unused "pad" parameter. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2344963002 NOTREECHECKS=true TBR=bsalomon@google.com Review-Url: https://codereview.chromium.org/2344963002
* Add storage and computation of SkColor4f version of gradient stops.Gravatar brianosman2016-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For now, we still only have the SkColor factory, but the Descriptor can now carry either an SkColor or SkColor4f specified gradient. Base class constructor automatically populates both forms of color, so that legacy raster backend will continue to work, and new backend work can operate directly from the float4 version. On the GPU side, we have similar logic, but GrGradientEffect only keeps one version of colors around: SkColor if the destination is legacy, and SkColor4f (with an optional gamut xform) if the destination is gamma correct. The 4f colors are already linear, and we gamut xform them in setData, so gradients are now fully color-correct in sRGB and F16 modes... ... unless there are more than three stops. Then we use a texture, and that code path isn't handled yet. We have a few choices here (do we use an 8-bit sRGB atlas, or just always use F16 linear atlas so we can share it among both sRGB and wide-gamut rendering). In any case, I'd like to defer that to a second CL. This change does fix the non-texture gradients in the gamut GM. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2337313002 Review-Url: https://codereview.chromium.org/2337313002
* Revert of SkFontData to use smart pointers. (patchset #3 id:40001 of ↵Gravatar bungeman2016-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/2339273002/ ) Reason for revert: Killing Mac Original issue's description: > SkFontData to use smart pointers. > > The SkFontData type is not exposed externally, so any method which uses > it can be updated to use smart pointers without affecting external > users. Updating this first will make updating the public API much > easier. > > This also updates SkStreamAsset* SkStream::NewFromFile(const char*) to > std::unique_ptr<SkStreamAsset> SkStream::MakeFromFile(const char*). It > appears that no one outside Skia is currently using SkStream::NewfromFile > so this is a good time to update it as well. > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339273002 > > Committed: https://skia.googlesource.com/skia/+/d8c2476a8b1e1e1a1771b17e8dd4db8645914f8c TBR=mtklein@chromium.org,halcanary@google.com,mtklein@google.com,reed@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/2343933002
* SkFontData to use smart pointers.Gravatar bungeman2016-09-15
| | | | | | | | | | | | | | | | The SkFontData type is not exposed externally, so any method which uses it can be updated to use smart pointers without affecting external users. Updating this first will make updating the public API much easier. This also updates SkStreamAsset* SkStream::NewFromFile(const char*) to std::unique_ptr<SkStreamAsset> SkStream::MakeFromFile(const char*). It appears that no one outside Skia is currently using SkStream::NewfromFile so this is a good time to update it as well. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339273002 Review-Url: https://codereview.chromium.org/2339273002
* simple fix?Gravatar mtklein2016-09-15
| | | | | | | | | Scope cmdInfo more tightly to where it's not a null reference. BUG=skia:5759 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2342063002 Review-Url: https://codereview.chromium.org/2342063002
* Remove the unused 16-bit gradient cacheGravatar brianosman2016-09-15
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2343863002 Review-Url: https://codereview.chromium.org/2343863002
* quad and conic do not intersectGravatar caryclark2016-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a quad a conic intersect only where the end of one is contained by the convex hull of the other, and the curve contained by the hull is nearly a straight line, treating it as a line may move the end point to the other side of the curve. Detect this by checking to see if the end point is in the hull, and if so, continue to subdivide the curve rather than treating it as a line. This fixes several existing tests that were disabled earlier this year. A typo in SkDCurve::nearPoint() prevented detecting when the end of a line was nearly touching a curve. Also fixed concidence a bit to get the second half of tiger further along. All existing tests, including extended testing in Release and the first half of tiger, work. TBR=reed@google.com BUG=skia:5131 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2338323002 Review-Url: https://codereview.chromium.org/2338323002
* Remove "f" suffix from literal in LCD DF text shader.Gravatar bsalomon2016-09-15
| | | | | | | Also improve DF GP names GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2340603003 Review-Url: https://codereview.chromium.org/2340603003
* add helpers for using SkData with picture serializationGravatar reed2016-09-15
| | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2341693004 TBR= Review-Url: https://codereview.chromium.org/2341693004
* Bundle common arguments to GrGradientEffect creationGravatar brianosman2016-09-15
| | | | | | | | | | | I'm going to be adding more (to deal with color spaces), so trying to fix this before it gets out of control. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2332213007 Committed: https://skia.googlesource.com/skia/+/f605c16a030d791a37f589e6bddd7158ba5d62cd Review-Url: https://codereview.chromium.org/2332213007
* Clean up unused SkPictureRecorder::optimizeFor()Gravatar mtklein2016-09-15
| | | | | | | | | | | Don't worry about the failing Shield bot... unrelated experiment. It's failing at head. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2340133002 NOTREECHECKS=true Review-Url: https://codereview.chromium.org/2340133002
* Revert of Bundle common arguments to GrGradientEffect creation (patchset #2 ↵Gravatar djsollen2016-09-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:20001 of https://codereview.chromium.org/2332213007/ ) Reason for revert: This seems to be causing the autoroll into Chromium to fail. https://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/69618/steps/compile/logs/stdio Original issue's description: > Bundle common arguments to GrGradientEffect creation > > I'm going to be adding more (to deal with color spaces), so trying to fix > this before it gets out of control. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2332213007 > > Committed: https://skia.googlesource.com/skia/+/f605c16a030d791a37f589e6bddd7158ba5d62cd TBR=bsalomon@google.com,robertphillips@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/2343703003
* Don't let the compiler complain that |a| is uninitGravatar msarett2016-09-14
| | | | | | | | | TBR=mtklein@google.com NOTRY=true BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339793003 Review-Url: https://codereview.chromium.org/2339793003
* Disable ignore discard optimization in VulkanGravatar egdaniel2016-09-14
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2346553002 Review-Url: https://codereview.chromium.org/2346553002
* Store SkColorSpaceXform gamma LUTs in a malloced fieldGravatar msarett2016-09-14
| | | | | | | | | | | | | | | | | | In order of likelihood: (1) Tables are never used, since gamma is recognized and named. (2) Only use one table, since all three gammas are the same. (3) Actually need three tables. No reason to waste a bunch of space for these tables on SkColorSpaceXform, when it will likely be unused. This will be more efficient in lots of cases, but is particularly useful when the client really only wants a gamut xform. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2336913005 Review-Url: https://codereview.chromium.org/2336913005
* Convert back to 0-255 scale before storing linear bytesGravatar msarett2016-09-14
| | | | | | | | TBR=mtklein@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2338203005 Review-Url: https://codereview.chromium.org/2338203005
* Improved optional command handling in SkParsePath::FromSVGString()Gravatar fmalita2016-09-14
| | | | | | | | | | | | | | | | Repeating command letters are optional in SVG path data strings: https://www.w3.org/TR/SVG/paths.html#PathData FromSVGString() already supports this feature, but only checks for scalars prefixes == (digit | '-' | '+'). A decimal point is also a valid scalar prefix though, so it should be included in the test. R=caryclark@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339813003 Review-Url: https://codereview.chromium.org/2339813003
* Bundle common arguments to GrGradientEffect creationGravatar brianosman2016-09-14
| | | | | | | | | | I'm going to be adding more (to deal with color spaces), so trying to fix this before it gets out of control. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2332213007 Review-Url: https://codereview.chromium.org/2332213007
* Rewriting path writerGravatar caryclark2016-09-14
| | | | | | | | | | | | | | | | | | | | | | | | | The path writer takes constructs the output path out of curves that satisfy the pathop operation. Curves contain lists of t/point pairs that may not be comparable to each other. To match up curve ends in the output path, look for adjacent curves to have a shared membership rather than comparing point values. Use path utilities to connect partial curve lists into closed contours. Share the angle code that determines if a curve has become a degenerate line with the path writer. Clean up some code on the way, and delete some unused functions. TBR=reed@google.com BUG=5188 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2321973005 Review-Url: https://codereview.chromium.org/2321973005
* Reduce overhead for linear color xformsGravatar msarett2016-09-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to build src and dst transfer fn tables every time a new xform was created with linear src and dst. Now we don't compute them because we don't need them. This will make SkColorSpaceXform a far better option for any xforms with float or half-float inputs or outputs, particularly on a small number of pixels. This CL also moves SkColorSpaceXform closer to what I anticipate will be the eventual 'API design'. I think apply() will want to take a SrcColorType enum (not created yet because it's not necessary yet) and a DstColorType enum (still using SkColorType because there's not yet a reason not to). Performance changes: toSRGB 341us -> 366us to2Dot2 404us -> 403us toF16 318us -> 304us There's no reason for toSRGB or to2Dot2 to change. The refactor seems to have caused the compiler to order the instructions a little differently... This is something to come back to if we need to squeeze more performance out of sRGB. For now, let's not be held up by something we don't control. F16 likely improves because we are no longer (unnecessarily) building the linear tables. Code size gets a little bigger. Measuring SkColorSpaceXform size as a percentage of src/ size, we go from 0.8% to 1.4%. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2335723002 Review-Url: https://codereview.chromium.org/2335723002
* change write-image to use pipeverbs like everyone else, and add testGravatar reed2016-09-13
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2335973003 Review-Url: https://codereview.chromium.org/2335973003