aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* Make global use-analytic-AA bit threadsafe.Gravatar Mike Klein2016-10-04
| | | | | | | | | | | | | | | | I also had to cut it down to just a global atomic bool... as a field in a global singleton accessed through instance(), it's very hard to make threadsafe. CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-TSAN-Trybot BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2937 Change-Id: If80be987906dd521fbe644d1d0d577009f06d0e3 Reviewed-on: https://skia-review.googlesource.com/2937 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* 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>
* disallow -4 pointerGravatar caryclark2016-10-04
| | | | | | | | | | | | | | A user's homegrown unsigned integer overflow tool complains if a nullptr is decremented. The conicWeight pointer likes to predecrement before walking, but this is unnecessary if its value is nullptr. R=reed@google.com BUG=skia:5415 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2061833005 Review-Url: https://codereview.chromium.org/2061833005
* ensure we always set the pictinfo.fVersionGravatar Mike Reed2016-10-04
| | | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2932 Change-Id: I8864a60f629e0f68b7871e0c388b42f4b6d78dbe Reviewed-on: https://skia-review.googlesource.com/2932 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Remove SkFontConfigInterface_direct_google3.Gravatar Ben Wagner2016-10-04
| | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2931 Change-Id: I4aa4e94453601e566e30d61ad286f58786477cfb Reviewed-on: https://skia-review.googlesource.com/2931 Reviewed-by: Ben Wagner <bungeman@google.com>
* fix fuzz with null checkGravatar Cary Clark2016-10-04
| | | | | | | | | | | | TBR=reed@google.com BUG=skia:5819 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2925 Change-Id: I1957d3f8f5c78bed41bb7fe413ae870df24f7c50 Reviewed-on: https://skia-review.googlesource.com/2925 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* Make all SkRasterPipeline stages stock stages in SkOpts.Gravatar Mike Klein2016-10-04
| | | | | | | | | | | | | | | | | If we want to support VEX-encoded instructions (AVX, F16C, etc.) without a ridiculous slowdown, we need to make sure we're running either all VEX-encoded instructions or all non-VEX-encoded instructions. That means we cannot mix arbitrary user-defined SkRasterPipeline::Fn (never VEX) with those living in SkOpts (maybe VEX)... it's SkOpts or bust. This ports the existing user-defined SkRasterPipeline::Fn use cases over to use stock stages from SkOpts. I rewrote the unit test to use stock stages, and moved the SkXfermode implementations to SkOpts. The code deleted for SkArithmeticMode_scalar should already be dead. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2940 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: I94dbe766b2d65bfec6e544d260f71d721f0f5cb0 Reviewed-on: https://skia-review.googlesource.com/2940 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Resubmit issue 2221103002 to fix the iOS build by declaring the flag inGravatar liyuqian2016-10-04
| | | | | | | | | | | SkCommonFlags.h TBR=reed@google.com,caryclark@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2393643002 Review-Url: https://codereview.chromium.org/2393643002
* Revert of Analytic AntiAlias for Convex Shapes (patchset #14 id:260001 of ↵Gravatar stephana2016-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/2221103002/ ) Reason for revert: Breaks iOS build. Original issue's description: > Implement AnalyticAA for convex shapes. > > Design doc: go/analyticAA > > A performance test can be found here: https://docs.google.com/a/google.com/spreadsheets/d/1n9LSjFzrQzx0hovFddWey0GSMXNRjl1oFuSypMlHWZk/edit?usp=sharing > > Our best case is filling big triangles, which according to our experiment has ~2.9x speedup. Our worst case is filling small ovals/circles, which has a ~1.06x slowdown. > > To see how our new algorithm changes the DM images, see: https://x20web.corp.google.com/~liyuqian/dmdiff/index.html > The most significant changes are in convexpaths and analytic_antialias_convex > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2221103002 > > Committed: https://skia.googlesource.com/skia/+/7795822807478143120c33228b68d2ab3918af2c TBR=reed@google.com,caryclark@google.com,liyuqian@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/2388213003
* Implement AnalyticAA for convex shapes.Gravatar liyuqian2016-10-04
| | | | | | | | | | | | | | | | Design doc: go/analyticAA A performance test can be found here: https://docs.google.com/a/google.com/spreadsheets/d/1n9LSjFzrQzx0hovFddWey0GSMXNRjl1oFuSypMlHWZk/edit?usp=sharing Our best case is filling big triangles, which according to our experiment has ~2.9x speedup. Our worst case is filling small ovals/circles, which has a ~1.06x slowdown. To see how our new algorithm changes the DM images, see: https://x20web.corp.google.com/~liyuqian/dmdiff/index.html The most significant changes are in convexpaths and analytic_antialias_convex BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2221103002 Review-Url: https://codereview.chromium.org/2221103002
* SkLiteDL: much simpler to eliminate bitmaps in recorder.Gravatar Mike Klein2016-10-04
| | | | | | | | | | | | | | This shouldn't be any significant change in behavior or performance, but it leaves the code in SkLiteDL a bit simpler. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2863 Change-Id: Ifb0023d56f7e9dae172d8021fb956b8fc9281b15 Reviewed-on: https://skia-review.googlesource.com/2863 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* sk_linear_from_srgb_mathGravatar Mike Klein2016-10-04
| | | | | | | | | | | | | | | | | Looks great (imperceptibly different) but ~10% slower on both ARMv8 and x86-64. Probably need to hide the table-or-math logic behind Sk4f/Sk8f unless we find faster math. I do like the new look of the pipeline stages though. A lot clearer. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2880 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: I44952237d56ba167445b07d4830eb8959c4d47b7 Reviewed-on: https://skia-review.googlesource.com/2880 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Matt Sarett <msarett@google.com>
* coin debugging runs all tests in extendedGravatar Cary Clark2016-10-04
| | | | | | | | | | | | | | | | | | | This extends path ops concidence debugging to find unused algorithms and determine the extent of loops. This verifies that all 140M tests run without error in release and debug. TBR=reed@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2391733002 patch from issue 2391733002 at patchset 1 (http://crrev.com/2391733002#ps1) Change-Id: I02ca29764405c5ac3e7ca3b2621fba28dbaaffc2 Reviewed-on: https://skia-review.googlesource.com/2923 Reviewed-by: Cary Clark <caryclark@google.com>
* 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>
* Revert of add cast for tostring (patchset #1 id:1 of ↵Gravatar reed2016-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/2385353002/ ) Reason for revert: base CL has legacy skp bug, so have to revert it Original issue's description: > add cast for tostring to fix google3 > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2385353002 > > TBR=True > NOTRY=True > > Committed: https://skia.googlesource.com/skia/+/4cfd5af26e5fab1699cfa2ab40d49c24cededd72 TBR= # 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/2384303002
* add cast for tostring to fix google3Gravatar reed2016-10-03
| | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2385353002 TBR=True NOTRY=True Review-Url: https://codereview.chromium.org/2385353002
* 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
* Avoid unneeded paint copies in SkDraw::drawBitmapGravatar fmalita2016-10-03
| | | | | | | | | Use SkTCopyOnFirstWrite to only copy when needed. R=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2389973003 Review-Url: https://codereview.chromium.org/2389973003
* Remove unused resolve parameters for vulkan render passesGravatar Greg Daniel2016-10-03
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2874 Change-Id: Ie8ad608c02e824ba5af2a81ada724dca22ac92e5 Reviewed-on: https://skia-review.googlesource.com/2874 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* 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>
* Add color space xform to GrAlphaThresholdFragmentProcessorGravatar Brian Osman2016-10-03
| | | | | | | | | | | | | Fix imagealphathreshold_surface GM to test gamut conversion. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2867 Change-Id: Id9aaebe72d1dadc613ef1a8d17d066b51049300f Reviewed-on: https://skia-review.googlesource.com/2867 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove exec bit from source file.Gravatar Ben Wagner2016-10-03
| | | | | | | | | | | | | Exec bit added in https://skia.googlesource.com/skia/+/40ff5fe59b77b0b3e34467cc2f8666e4e88356f9 BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2869 Change-Id: I238f75fe2a865923568ac8f63ee1978df6c89f6c Reviewed-on: https://skia-review.googlesource.com/2869 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* remove quickreject for drawablesGravatar reed2016-10-03
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2388873002 Review-Url: https://codereview.chromium.org/2388873002
* 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>
* Avoid unnecessary GrShape->SkPath conversion in GrStencilAndCoverPathRendererGravatar bsalomon2016-10-03
| | | | | | | Also remove redundant param to the path batch constructor. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2348543002 Review-Url: https://codereview.chromium.org/2348543002
* Fix precision issues in SkRRectsGaussianEdgeShader.cppGravatar robertphillips2016-10-03
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2383863002 Review-Url: https://codereview.chromium.org/2383863002
* 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
* SkPDF: de-duplicate text-as-pathsGravatar Hal Canary2016-09-30
| | | | | | | | | | | TBR= GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2851 Change-Id: I0accbca13945587cd5ef903cbd4127f1f6a3fb13 Reviewed-on: https://skia-review.googlesource.com/2851 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkRWBuffer: preallocate 'initialCapacity'Gravatar fmalita2016-09-30
| | | | | | | | | | | We're currently ignoring the hint, resulting in multiple unneeded allocations later. BUG=chromium:651698 R=scroggo@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2384763002 Review-Url: https://codereview.chromium.org/2384763002
* 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
* SkPDF: subset drawImageRect while still dedupingGravatar Hal Canary2016-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | - Replace SkImageBitmap with SkImageSubset - SkBitmapKey becomes trivial for simplicity. - SkPDFCanvas::onDraw(Bitmap|Image)Rect now clip and call SkCanvas::onDraw(Bitmap|Image)Rect. - SkPDFDevice::draw(Bitmap|BitmapRect|Sprite) now convert bitmap into SkImageSubset via make_image_subset function. - SkPDFDevice::draw(Image|Bitmap)Rect now implemented again. - SkPDFDevice::internalDrawImage now performs image subsetting as needed, while still deduping properly. BUG=633528 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2785 Change-Id: I063346d12b0e9c6b6c0c4943ee25400c88aa1a44 Reviewed-on: https://skia-review.googlesource.com/2785 Reviewed-by: Ben Wagner <bungeman@google.com>
* Add an SkOpts target for Haswell+ Intel chips.Gravatar Mike Klein2016-09-30
| | | | | | | | | | | | | | | | Haswell brought a whole slew of handy new instructions for us (AVX2, FMA, BMI1+BMI2) and also feature F16C, which came one generation earlier on Ivybridge. We work with integers often enough that we really want to target AVX2 instead of AVX, and this means it's pretty practical to ask for all those other goodies along with it. Chrome's GN files and Google3's BUILD file will need an update, before or after this CL. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2840 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: I826daf77b5104664c5d31ddaabee347e287b87a2 Reviewed-on: https://skia-review.googlesource.com/2840 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* Revert of Turned on SkSL->GLSL compiler (patchset #41 id:880001 of ↵Gravatar fmalita2016-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/2288033003/ ) Reason for revert: 1) Chromium roll failures: https://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/307297/steps/screenshot_sync_tests%20on%20NVIDIA%20GPU%20on%20Linux%20%28with%20patch%29%20on%20Linux/logs/stdio 2) G3 roll failures 3) iOS failures: https://uberchromegw.corp.google.com/i/client.skia/builders/Perf-iOS-Clang-iPad4-GPU-SGX554-Arm7-Release/builds/7177/steps/perf_skia%20on%20iOS-9.2/logs/stdio Original issue's description: > Turned on SkSL->GLSL compiler > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2288033003 > > Committed: https://skia.googlesource.com/skia/+/9b0fe3d125f237d9884732a48414fa85fc71b4e3 > Committed: https://skia.googlesource.com/skia/+/b12b3c6908c62c908b3680be01e3b5bfd30de310 > Committed: https://skia.googlesource.com/skia/+/f008b0a59f45c0d4bea3e66faf3b01805009ec89 TBR=benjaminwagner@google.com,bsalomon@google.com,egdaniel@google.com,ethannicholas@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/2387643003
* Turned on SkSL->GLSL compilerGravatar ethannicholas2016-09-30
| | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2288033003 Committed: https://skia.googlesource.com/skia/+/9b0fe3d125f237d9884732a48414fa85fc71b4e3 Committed: https://skia.googlesource.com/skia/+/b12b3c6908c62c908b3680be01e3b5bfd30de310 Review-Url: https://codereview.chromium.org/2288033003
* 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
* Add skstd version of std::exchangeGravatar csmartdalton2016-09-29
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2381793004 Review-Url: https://codereview.chromium.org/2381793004
* Fixed invalid memory access issue in SkColorSpaceXform::apply()Gravatar raftias2016-09-29
| | | | | | | | | | | | | | | | | Passing in a large buffer along with a source colour space that used a CLUT would cause apply() to read freed heap memory, or for smaller buffers read possibly re-used stack memory. The code previously likely lucked out due to optimizations removing most or all of the subsequent stack allocations. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2759 Change-Id: I39f357bce080c4d737a83dd019f0d1ccbc56f995 Reviewed-on: https://skia-review.googlesource.com/2759 Commit-Queue: Robert Aftias <raftias@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Add an enum layer of indirection for stock raster pipeline stages.Gravatar Mike Klein2016-09-29
| | | | | | | | | | | | | | | | | | This is handy now, and becomes necessary with fancier backends: - most code can't speak the type of AVX pipeline stages, so indirection's definitely needed there; - if the pipleine is entirely composed of stock stages, these enum values become an abstract recipe that can be JITted. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2782 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: Iedd62e99ce39e94cf3e6ffc78c428f0ccc182342 Reviewed-on: https://skia-review.googlesource.com/2782 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Recent image filter work now allows this check to be enabled.Gravatar brianosman2016-09-29
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2379053002 Review-Url: https://codereview.chromium.org/2379053002
* Revert of Add SK_SUPPORT_LEGACY_HAIRLINE_END_CAP to work around dependent ↵Gravatar benjaminwagner2016-09-29
| | | | | | | | | | | | | | | | | | | | | | | | test failure. (patchset #1 id:1 of https://codereview.chromium.org/2379843002/ ) Reason for revert: Dependent test has been fixed. Original issue's description: > Add SK_SUPPORT_LEGACY_HAIRLINE_END_CAP to work around dependent test failure. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2379843002 > > Committed: https://skia.googlesource.com/skia/+/aa6ef3ebc60e0f70db0e599f4cd34d5be06486c9 TBR=caryclark@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/2379993004
* Start moving SkRasterPipeline stages to SkOpts.Gravatar Mike Klein2016-09-29
| | | | | | | | | | | | | | | | | | | | This lets them pick up runtime CPU specializations. Here I've plugged in SSE4.1. This is still one of the N prelude CLs to full 8-at-a-time AVX. I've moved the union of the stages used by SkRasterPipelineBench and SkRasterPipelineBlitter to SkOpts... they'll all be used by the blitter eventually. Picking up SSE4.1 specialization here (even still just 4 pixels at a time) is a significant speedup, especially to store_srgb(), so much that it's no longer really interesting to compare against the fused-but-default-instruction-set version in the bench. So that's gone now. That left the SkRasterPipeline unit test as the only other user of the EasyFn simplified interface to SkRasterPipeline. So I converted that back down to the bare-metal interface, and EasyFn and its friends became SkRasterPipeline_opts.h exclusive abbreviations (now called Kernel_Sk4f). This isn't really unexpected: SkXfermode also wanted to build up its own little abstractions, and once you build your own abstraction, the value of an additional EasyFn-like layer plummets to negative. For simplicity I've left the SkXfermode stages alone, except srcover() which was always part of the blitter. No particular reason except keeping the churn down while I hack. These _can_ be in SkOpts, but don't have to be until we go 8-at-a-time. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2752 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: I3b476b18232a1598d8977e425be2150059ab71dc Reviewed-on: https://skia-review.googlesource.com/2752 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>