aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
Commit message (Collapse)AuthorAge
* Make SkColorSpaceXform an SK_APIGravatar Matt Sarett2016-10-18
| | | | | | | | | | | | TBR=reed@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3585 Change-Id: I8efaf7c46e0d600bb1bb92e39014db8c4a8d25d1 Reviewed-on: https://skia-review.googlesource.com/3585 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Avoid integer overflow in SkIcoCodec and SkImageInfoGravatar Matt Sarett2016-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Original Commit Message: """ Avoid integer overflow in SkIcoCodec Definitely good to avoid overflow here. FWIW, this looks to be harmless for Android's current use. They will just fail later on when trying to allocate the bitmap. BUG=skia:5857 """ With the new test, ASAN also caught an integer overflow bug in SkImageInfo. Fix this as well. CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN;master.client.skia.android:Test-Android-Clang-AndroidOne-CPU-MT6582-arm-Debug-GN_Android BUG=skia:5857 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3568 Change-Id: I0d777a547850474ea6cea87e36efa05434e33635 Reviewed-on: https://skia-review.googlesource.com/3568 Reviewed-by: Kevin Lubick <kjlubick@google.com>
* Re-enable overdraw mode in debugger.Gravatar Ben Wagner2016-10-17
| | | | | | | | | | | | Debugger is the last user of the deprecated SkPaintFilterCanvas constructor. Stop using it and remove the constructor. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3268 Change-Id: I3e9180d48abdf86cb2c05bd8d95acabcdaa70427 Reviewed-on: https://skia-review.googlesource.com/3268 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Modify deferred texture image API's handling of gammaGravatar Brian Osman2016-10-17
| | | | | | | | | | | | | | | | | This tries to match the behavior you would see if you rendered directly to a canvas without going through this round-trip. Specifically, mips are built in the same way that they would be according to the context's internal logic. To make things clearer, the user passes in the color space of the destination surface, not our (internal) enum. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3526 Change-Id: If8c61500d34ae712227da0284f3a80cacf84113a Reviewed-on: https://skia-review.googlesource.com/3526 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* 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>
* Always use RGBA textures for color font atlasesGravatar Brian Osman2016-10-14
| | | | | | | | | | | | | This is the last use of kSkiaGamma8888_GrPixelConfig BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3417 Change-Id: I307479c41f1ca437733dfafd044bb1baeb42f31d Reviewed-on: https://skia-review.googlesource.com/3417 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* 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>
* 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
* Remove SK_SUPPORT_LEGACY_TEXTBLOB_BUILDER.Gravatar Ben Wagner2016-10-13
| | | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2988 Change-Id: Ib39913a67cdd05662e7a91b4f05fbe5429eb0c42 Reviewed-on: https://skia-review.googlesource.com/2988 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <benjaminwagner@google.com>
* Revert of leave pixel memory uninitialized for opaque alpha type in ↵Gravatar mtklein2016-10-13
| | | | | | | | | | | | | | | | | | | | | | | | SkSurface::MakeRaster (patchset #1 id:1 of https://codereview.chromium.org/2412633002/ ) Reason for revert: Reverting while we think about skia:5854 so the bot doesn't regress further. Original issue's description: > leave pixel memory uninitialized for opaque alpha type in SkSurface::MakeRaster > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2412633002 > > Committed: https://skia.googlesource.com/skia/+/c64ef3563dc8badac3d64544513b03df826cf8c3 TBR=mtklein@chromium.org,bsalomon@google.com,reed@google.com,lsalzman@mozilla.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:5854 Review-Url: https://codereview.chromium.org/2421473003
* leave pixel memory uninitialized for opaque alpha type in SkSurface::MakeRasterGravatar lsalzman2016-10-12
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2412633002 Review-Url: https://codereview.chromium.org/2412633002
* Remove hack allowing fRefCnt of 0.Gravatar Ben Wagner2016-10-12
| | | | | | | | | | | | | | In some legacy situations users of SkRefCnt subclasses were keeping the objects alive with a reference count of 0. Now that these users are cleaned up, remove the hack which allowed such code to keep functioning. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3264 Change-Id: I22f63d87b6d995cad6326998284930ad9eaa2983 Reviewed-on: https://skia-review.googlesource.com/3264 Reviewed-by: Derek Sollenberger <djsollen@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Fix interface validation in Vulkan.Gravatar Greg Daniel2016-10-12
| | | | | | | | | | | | | TBR=bsalomon@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3176 Change-Id: Ifad3249e6839e9b4aa34792646b2d54ff9304da7 Reviewed-on: https://skia-review.googlesource.com/3176 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* 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>
* 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
* fix 'GrClip::quickContains was hidden' warning in GrNoClipGravatar lsalzman2016-10-10
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2394113002 Review-Url: https://codereview.chromium.org/2394113002
* Fix iOS surface creation for SampleAppGravatar jvanverth2016-10-10
| | | | | | | | BUG=skia:5810 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2394843003 TBR=bsalomon@google.com Review-Url: https://codereview.chromium.org/2394843003
* Fix SkDeferredCanvas for use on android.Gravatar Herb Derby2016-10-06
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3030 Change-Id: Ie55023257736a12360a233d01096462ba2eb3e74 Reviewed-on: https://skia-review.googlesource.com/3030 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar reed2016-10-05
| | | | | | | | | | | This reverts commit c245574ba3d0e2ade6c94b2812de3baa383bf4c4. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2396953002 TBR= Review-Url: https://codereview.chromium.org/2396953002
* Revert[7] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8. Reason for revert: new assert from 100K bot Original change's description: > Revert[6] "replace SkXfermode obj with SkBlendMode enum in paints" > > - perform version check in CreateProc for XfermodeImageFilter and ArithmeticImageFilter > This reverts commit 3ed485f4249e17abb4b11f5018d03175fd1afb44. > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2992 > > Change-Id: Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8 > Reviewed-on: https://skia-review.googlesource.com/2992 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I848e5a69c5cd67f2c14889f4f0a346652578c4ff Reviewed-on: https://skia-review.googlesource.com/3023 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert[6] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-05
| | | | | | | | | | | | | | - perform version check in CreateProc for XfermodeImageFilter and ArithmeticImageFilter This reverts commit 3ed485f4249e17abb4b11f5018d03175fd1afb44. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2992 Change-Id: Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8 Reviewed-on: https://skia-review.googlesource.com/2992 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Harden degenerate gradient context handlingGravatar fmalita2016-10-05
| | | | | | | | | | | | | Certain inputs produce degenerate values at context creation time only. Detect such cases after context creation, and abort drawing by returning a null shader context instead. BUG=skia:5821 R=reed@google.com,brianosman@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2397473003 Review-Url: https://codereview.chromium.org/2397473003
* Revert[5] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit I0fa5c58af428f3da8565465d1219a34ef8417d9a. Reason for revert: failing to deserialize some of the 100K Original change's description: > Revert[4] "replace SkXfermode obj with SkBlendMode enum in paints" > > This reverts commit 2cbcd12281ee807214df094964c584c78932e10b. > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2924 > > Change-Id: I0fa5c58af428f3da8565465d1219a34ef8417d9a > Reviewed-on: https://skia-review.googlesource.com/2924 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I1805a57eef5ebcac203da5989c8539345ecf806f Reviewed-on: https://skia-review.googlesource.com/2962 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert[4] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-04
| | | | | | | | | | | | | This reverts commit 2cbcd12281ee807214df094964c584c78932e10b. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2924 Change-Id: I0fa5c58af428f3da8565465d1219a34ef8417d9a Reviewed-on: https://skia-review.googlesource.com/2924 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Move GPU fences into sk_gpu_testGravatar csmartdalton2016-10-04
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2383383002 Review-Url: https://codereview.chromium.org/2383383002
* Revert of Make GrResourceCache dynamically change between LRU and random ↵Gravatar robertphillips2016-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | replacement strategies. (patchset #8 id:140001 of https://codereview.chromium.org/2321563006/ ) Reason for revert: Causing problems on Mac & Windows bots. Original issue's description: > Make GrResourceCache dynamically change between LRU and random replacement strategies. > > Random performs significantly better when each frame exceeds the budget by a small margin whereas LRU has worst case behavior. > > The decision of which to use is made based on the history from a few frames of the ratio of total unique key cache misses to unique key cache misses of resources purged in the last 2 frames. > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2321563006 > > Committed: https://skia.googlesource.com/skia/+/0f147ac2ae575bbad3515a526f13700bc5c8e9d7 TBR=bsalomon@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/2386993004
* Remove option to make GrCoordTransforms apply to device positions.Gravatar Brian Salomon2016-10-03
| | | | | | | | | | | Adds a device space texture decal effect to use for clipping. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2870 Change-Id: Ifcc7617ea87f5a86e301995cba9dfc30a4b0e2c5 Reviewed-on: https://skia-review.googlesource.com/2870 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "Revert "Revert "replace SkXfermode obj with SkBlendMode enum in ↵Gravatar Mike Reed2016-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | paints""" This reverts commit I86875511a13497112827cbaed1dbd7639e9e3d10. legacy (100K) skp failure Original change's description: > Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints"" > > This reverts commit ce02e7175872abde3721df9e5d3ec0ab8384cd8e. > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2878 > > Change-Id: I86875511a13497112827cbaed1dbd7639e9e3d10 > Reviewed-on: https://skia-review.googlesource.com/2878 > Reviewed-by: Matt Sarett <msarett@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=msarett@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ife6f0cf3a22b3e8cf885a188f7f44e1ff62e06a5 Reviewed-on: https://skia-review.googlesource.com/2881 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Make GrResourceCache dynamically change between LRU and random replacement ↵Gravatar bsalomon2016-10-03
| | | | | | | | | | | strategies. Random performs significantly better when each frame exceeds the budget by a small margin whereas LRU has worst case behavior. The decision of which to use is made based on the history from a few frames of the ratio of total unique key cache misses to unique key cache misses of resources purged in the last 2 frames. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2321563006 Review-Url: https://codereview.chromium.org/2321563006
* Supply random dst color space to asFP in unit testsGravatar Brian Osman2016-10-03
| | | | | | | | | | | | | | | TBR=bsalomon@google.com (Testing-only API change) BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2876 Change-Id: I0ca26da0307848cdfc8ffaac2d042601663ab00b Reviewed-on: https://skia-review.googlesource.com/2876 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints""Gravatar Mike Reed2016-10-03
| | | | | | | | | | | | | This reverts commit ce02e7175872abde3721df9e5d3ec0ab8384cd8e. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2878 Change-Id: I86875511a13497112827cbaed1dbd7639e9e3d10 Reviewed-on: https://skia-review.googlesource.com/2878 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Move clip CTM application to SkRasterClip and SkClipStackGravatar Brian Salomon2016-10-03
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2866 Change-Id: I914a57d6ba128acc457e12586c99ba6766eb940c Reviewed-on: https://skia-review.googlesource.com/2866 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Start supplying random color space xforms to FP testsGravatar Brian Osman2016-10-03
| | | | | | | | | | | | | | Added helper to create random GrColorSpaceXforms in unit tests, and hooked it up for the FPs that currently accept one. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2873 Change-Id: Iaf93e379e405fbf745f5e0fd23b4daf017355966 Reviewed-on: https://skia-review.googlesource.com/2873 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit I4fb489ba6b3f77b458f7e4a99f79c7ad10859135. Reason for revert: <INSERT REASONING HERE> Original change's description: > replace SkXfermode obj with SkBlendMode enum in paints > > BUG=skia:5814 > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2714 > > Change-Id: I4fb489ba6b3f77b458f7e4a99f79c7ad10859135 > Reviewed-on: https://skia-review.googlesource.com/2714 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=bsalomon@google.com,fmalita@chromium.org,fmalita@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I3e43f79ef5c1709929663fe63cc1f67cd78270b7 Reviewed-on: https://skia-review.googlesource.com/2871 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* replace SkXfermode obj with SkBlendMode enum in paintsGravatar Mike Reed2016-10-03
| | | | | | | | | | | | BUG=skia:5814 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2714 Change-Id: I4fb489ba6b3f77b458f7e4a99f79c7ad10859135 Reviewed-on: https://skia-review.googlesource.com/2714 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Add a SkRWBuffer reserve mechanismGravatar fmalita2016-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | Currently, Chromium stores segmented data in a SharedBuffer and appends to SkRWBuffer one segment at a time: const char* segment = 0; for (size_t length = data->getSomeData(segment, m_rwBuffer->size()); length; length = data->getSomeData(segment, m_rwBuffer->size())) { m_rwBuffer->append(segment, length, remaining); } This can yield a bunch of just-above-4k allocations => wasted RAM due to internal fragmentation. Ideally, we'd want a SkRWBuffer::reserve(size_t bytes) API, but the current internals don't support that trivially. Alternatively, the caller can pass a reserve hint at append() time. BUG=chromium:651698 R=scroggo@google.com,reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2385803002 Review-Url: https://codereview.chromium.org/2385803002
* Add a src rect to drawImageLattice() APIGravatar msarett2016-09-30
| | | | | | | | | | This will allow us to draw ninepatches directly from an asset texture without having to upload them individually. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2382893002 Review-Url: https://codereview.chromium.org/2382893002
* Helper functions to do SkColor -> GrColor4fGravatar Brian Osman2016-09-30
| | | | | | | | | | | | | | | | | | I started fixing more effects and realized I needed something like this. Wanted to land it separately. After this, I'll add the DC's cached xform from sRGB to AsFPArgs, so that we can easily leverage this code in more places (mostly GrConstColorProcessor, or any effect that falls back to that based on invariants, etc...) BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2844 Change-Id: I335546f02a6c49620494d736140a72c14441b35d Reviewed-on: https://skia-review.googlesource.com/2844 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Propagate validation errors from inner readbuffer when deserializing ↵Gravatar reed2016-09-30
| | | | | | | | | picture. Also allow null paints. BUG=skia:5812 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2379383002 Review-Url: https://codereview.chromium.org/2379383002
* Add fence support for TransferBuffersGravatar jvanverth2016-09-30
| | | | | | | BUG=skia:4604 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2384463003 Review-Url: https://codereview.chromium.org/2384463003
* Remove soft clip bool from SkCanvasGravatar bsalomon2016-09-29
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2380163002 Review-Url: https://codereview.chromium.org/2380163002
* *SkTCast<int*>(float*) -> memcpyGravatar Mike Klein2016-09-29
| | | | | | | | | | | | | | | In some build configurations (I think, GN, GCC 6, Debug) I get a warning that i is used unintialized. This likely has something to do with GCC correctly seeing that the SkTCast construction there is illegal aliasing, and perhaps thus "doesn't happen". Might be that if the SkTCast gets inlined, it decides its implementation is secretly kosher, and so Release builds don't see this. None of this happens with the GCCs we have on the bots... too old? Instead use memcpy() here, which is well defined to do what we intended. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2758 Change-Id: Iaf5c75fbd852193b0b861bf5e71450502511d102 Reviewed-on: https://skia-review.googlesource.com/2758 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* isABitmap is deprecated, use isAImageGravatar Mike Reed2016-09-28
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2748 Change-Id: I7006a3231ff0e9e39b187deae550364bc97f49d6 Reviewed-on: https://skia-review.googlesource.com/2748 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Gradients are serialized (and can be constructed) as SkColor4f + SkColorSpaceGravatar brianosman2016-09-28
| | | | | | | | | | | | | | | | | | | | Added gradient shader factories that take SkColor4f + SkColorSpace. Modified Descriptor to only store SkColor4f + SkColorSpace. Existing factories make use of helper code to convert SkColor and forward to the new factories. Bumped SKP version to handle new gradient serialization format. I was toying with using half-float when serializing SkColor4f, despite my aggressive packing of flags, this format is significantly bigger. Also added GM to use 4f factories. This GM should (and does) look identical to the existing gradients GM. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2370063002 Review-Url: https://codereview.chromium.org/2370063002
* Move toXYZD50() to SkColorSpace_BaseGravatar msarett2016-09-28
| | | | | | | | | | | | SkColorSpace needs to become more versatile, in order to support profiles that cannot specified with just a "to XYZ D50" matrix. This a just first step to clean up the public API. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2381553002 Review-Url: https://codereview.chromium.org/2381553002
* Added kSRGBLinear_Named color space, along with testsGravatar brianosman2016-09-27
| | | | | | | | | | | | Gradients (and other shaders) are going to end up serializing this particular color space very frequently, so we want a shorthand way of writing it out. I think it's also helpful to have a clearer way of creating it (vs. NewNamed(kSRGB_Named)->makeLinearGamma()). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2377763002 Review-Url: https://codereview.chromium.org/2377763002
* Remove stray semicolons.Gravatar Mike Klein2016-09-27
| | | | | | | | | | | | | | | | Turns out function declarations don't end in semicolons... BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2720 No public API changes. TBR=reed@google.com Change-Id: I72b56d52e1ff7fa6e89c295b0de8c46599791ebb Reviewed-on: https://skia-review.googlesource.com/2720 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Remove outdated comments about pre-sk_sp semanticsGravatar brianosman2016-09-27
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2371603003 Review-Url: https://codereview.chromium.org/2371603003