Commit Graph

631 Commits

Author SHA1 Message Date
Ethan Nicholas
baf981f716 Revert "converted GrSimpleTextureEffect to sksl"
This reverts commit 46b654df9e.

Reason for revert: making Vulkan mad

Original change's description:
> converted GrSimpleTextureEffect to sksl
> 
> Bug: skia:
> Change-Id: If556c6baad75f22135f429759feabaaec095b900
> Reviewed-on: https://skia-review.googlesource.com/21720
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,ethannicholas@google.com

Change-Id: I06fac3d106435e1d58e19cc54a919c5d84784d92
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/22266
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-07-12 13:51:46 +00:00
Ethan Nicholas
46b654df9e converted GrSimpleTextureEffect to sksl
Bug: skia:
Change-Id: If556c6baad75f22135f429759feabaaec095b900
Reviewed-on: https://skia-review.googlesource.com/21720
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-07-12 13:28:25 +00:00
Mike Reed
6ee2965820 remove unreachable perspective code for imageshader
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
Bug: skia:
Change-Id: If9a7df3e1c387098b00bf1cc1a37c36c6d256ef1
Reviewed-on: https://skia-review.googlesource.com/22348
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-07-12 13:19:35 +00:00
Florin Malita
a30d407b4f Revert "Experimental blur code."
This reverts commit d96ed9d0de.

Reason for revert: dm crashing

https://luci-milo.appspot.com/swarming/task/374d82c1d1263910/steps/symbolized_dm/0/stdout

Likely culprit:
	unit test  BlurDrawing

Stack trace:
    /mnt/pd0/s/w/ir/out/Debug/dm(+0x2440eb) [0x568770eb]
    linux-gate.so.1(__kernel_sigreturn+0) [0xf7714ca0]
    /mnt/pd0/s/w/ir/out/Debug/dm(_ZNK16SkMaskBlurFilter11blurOneScanENS_10FilterInfoEPKhjS2_PhjS3_+0x236) [0x5766301e]
    /mnt/pd0/s/w/ir/out/Debug/dm(_ZNK16SkMaskBlurFilter4blurERK6SkMaskPS0_+0x285) [0x57663491]
    /mnt/pd0/s/w/ir/out/Debug/dm(_ZN10SkBlurMask7BoxBlurEP6SkMaskRKS0_f11SkBlurStyle13SkBlurQualityP8SkIPointb+0x5c) [0x5720d48e]
    /mnt/pd0/s/w/ir/out/Debug/dm(_ZNK20SkBlurMaskFilterImpl10filterMaskEP6SkMaskRKS0_RK8SkMatrixP8SkIPoint+0x67) [0x5720e427]
    /mnt/pd0/s/w/ir/out/Debug/dm(_ZNK20SkBlurMaskFilterImpl17filterRectsToNineEPK6SkRectiRK8SkMatrixRK7SkIRectPN12SkMaskFilter9NinePatchE+0x579) [0x5721a247]
    /mnt/pd0/s/w/ir/out/Debug/dm(_ZNK12SkMaskFilter10filterPathERK6SkPathRK8SkMatrixRK12SkRasterClipP9SkBlitterN11SkStrokeRec9InitStyleE+0xf6) [0x5706c2bc]
    /mnt/pd0/s/w/ir/out/Debug/dm(_ZNK6SkDraw11drawDevPathERK6SkPathRK7SkPaintbP9SkBlitterb+0x1bb) [0x57034f1b]
    /mnt/pd0/s/w/ir/out/Debug/dm(_ZNK6SkDraw8drawPathERK6SkPathRK7SkPaintPK8SkMatrixbbP9SkBlitter+0x47f) [0x57035dd3]
    /mnt/pd0/s/w/ir/out/Debug/dm(_ZN14SkBitmapDevice8drawPathERK6SkPathRK7SkPaintPK8SkMatrixb+0x6e) [0x56f937fc]
    /mnt/pd0/s/w/ir/out/Debug/dm(_ZN8SkCanvas10onDrawPathERK6SkPathRK7SkPaint+0x39d) [0x56fb12e5]
    /mnt/pd0/s/w/ir/out/Debug/dm(_ZN8SkCanvas8drawPathERK6SkPathRK7SkPaint+0x18) [0x56fad926]
    /mnt/pd0/s/w/ir/out/Debug/dm(+0x3f71b3) [0x56a2a1b3]
    /mnt/pd0/s/w/ir/out/Debug/dm(+0x2450bd) [0x568780bd]
    /mnt/pd0/s/w/ir/out/Debug/dm(+0x2450fb) [0x568780fb]
    /mnt/pd0/s/w/ir/out/Debug/dm(+0xae53e7) [0x571183e7]
    /mnt/pd0/s/w/ir/out/Debug/dm(_ZNKSt8functionIFvvEEclEv+0x20) [0x569f98de]
    /mnt/pd0/s/w/ir/out/Debug/dm(_ZN12SkThreadPool4LoopEPv+0x298) [0x57045b2f]
    /mnt/pd0/s/w/ir/out/Debug/dm(+0xbbd92c) [0x571f092c]
    /lib/i386-linux-gnu/libpthread.so.0(+0x627a) [0xf76e827a]
    /lib/i386-linux-gnu/libc.so.6(clone+0x66) [0xf70ecb56]
Segmentation fault

Original change's description:
> Experimental blur code.
> 
> This uses a new method of blurring that runs the three 
> passes of the box filter in a single pass. This implementation
> currently only does 1x1 pixel at a time, but it should be simple
> to expand to 4x4 pixels at a time.
> 
> On the  blur_10_normal_high_quality benchmark, the new is 7% faster
> than the old code. For the blur_100.50_normal_high_quality
> benchmark, the new code is 11% slower.
> 
> Change-Id: Iea37294abc7c27de5ad569adf8bc62df77eafd02
> Reviewed-on: https://skia-review.googlesource.com/21739
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Mike Reed <reed@google.com>

TBR=herb@google.com,reed@google.com

Change-Id: I9e896c548d0a4cd3308d6a311c8bd16719a08a85
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/22421
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2017-07-12 02:52:56 +00:00
Herb Derby
d96ed9d0de Experimental blur code.
This uses a new method of blurring that runs the three 
passes of the box filter in a single pass. This implementation
currently only does 1x1 pixel at a time, but it should be simple
to expand to 4x4 pixels at a time.

On the  blur_10_normal_high_quality benchmark, the new is 7% faster
than the old code. For the blur_100.50_normal_high_quality
benchmark, the new code is 11% slower.

Change-Id: Iea37294abc7c27de5ad569adf8bc62df77eafd02
Reviewed-on: https://skia-review.googlesource.com/21739
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-07-12 02:40:36 +00:00
Leon Scroggins III
51b2f1b64c Stop adding Android-specific defines to SkUserConfig
Remove #defines that lived in gn_to_bp.py and
android_framework_defines.gni. These have been moved into a new file
in Android, SkUserConfigManual.h, in https://googleplex-android-review.git.corp.google.com/#/c/2519600/

Update gn_to_bp.py to include SkUserConfigManual.h, so it will still
result in using the same #defines.

Lately, we've found it difficult to guard changes behind a flag. e.g.
a change to drawing causes a CTS failure in Android, so we have to do
the following:
- put the change behind a flag, and add it to gn_to_bp.py or
android_framework_defines.gni
- generate new images on Android (by running CTS with external/skia
modified to not define the flag)
- create a CL in CTS that uses the new images
- land a CL in Skia that stops defining the flag
- when the Skia change lands, wait for the auto-roller to create a CL
that includes the change, stop the auto-roller, add the topic to the CTS
CL so the two can land at the same time
- land both Android changes (with TreeHugger)
- restart the Android auto-roller

With SkUserConfigManual.h (which lives in Android), the process will
be similar to Chromium:
- land a CL in Android's external/skia that defines a flag e.g.
SK_SUPPORT_LEGACY_FEATURE. Land without TreeHugger because it isn't used
in Skia and does not do anything
- land a change in Skia that changes behavior unless
SK_SUPPORT_LEGACY_FEATURE is defined. This will safely go through the
Android roll and not change any behavior for Android
- create two Android CLs - one in CTS to use the new images, and one in
external/skia to delete SK_SUPPORT_LEGACY_FEATURE. Set them to the same
topic and land them with TreeHugger

In the new process, there is no need to mess with the Android roll.

A downside to the new process is that we cannot test the android
framework defines without checking in to Android. But given how much
we've progressed in automating Android testing, this is fine.

Bug: b/63429612
Change-Id: Idfbaef2f4cae641a75fb6e7bf70428733a441336
Reviewed-on: https://skia-review.googlesource.com/22072
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2017-07-11 20:43:35 +00:00
Ethan Nicholas
ceb4d48ef4 Re-land "converted GrCircleBlurFragmentProcessor to sksl"
This reverts commit 818ac5a00d.

Bug: skia:
Change-Id: I9bd8a06bd2dbb40bd261d64d6d04daf864bc00a5
Reviewed-on: https://skia-review.googlesource.com/22075
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-07-11 13:50:51 +00:00
Mike Reed
7d9f95345c Revert "remove flags for android"
This reverts commit d8ddf1bbb4.

Reason for revert: going to try moving these flags into android

Original change's description:
> remove flags for android
> 
> Needs to be coordinated with https://googleplex-android-review.git.corp.google.com/#/c/2518767/
> 
> 
> Bug: skia:
> Change-Id: If8238119b4a79bec4f816cab43935585728bb601
> Reviewed-on: https://skia-review.googlesource.com/22068
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Reed <reed@google.com>

TBR=djsollen@google.com,reed@google.com

Change-Id: I2b4965a394d3c5de6556cf620ad1f8e13a79ad51
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/22121
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-10 20:10:19 +00:00
Herb Derby
a48ae6ec2f Blur gm.
Change-Id: I47294ba47880237541dee8193df55e31b3487f24
Reviewed-on: https://skia-review.googlesource.com/22061
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2017-07-10 19:49:18 +00:00
Mike Reed
d8ddf1bbb4 remove flags for android
Needs to be coordinated with https://googleplex-android-review.git.corp.google.com/#/c/2518767/


Bug: skia:
Change-Id: If8238119b4a79bec4f816cab43935585728bb601
Reviewed-on: https://skia-review.googlesource.com/22068
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-07-10 17:58:43 +00:00
Ethan Nicholas
818ac5a00d Revert "converted GrCircleBlurFragmentProcessor to sksl"
This reverts commit 9b80ffc77b.

Reason for revert: breaking ANGLE and Android Vulkan GMs

Original change's description:
> converted GrCircleBlurFragmentProcessor to sksl
> 
> Bug: skia:
> Change-Id: I1b70ba2003c9e9de2b5b9acadaf25c9ed59b1198
> Reviewed-on: https://skia-review.googlesource.com/21727
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,ethannicholas@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:
Change-Id: Ia313013b4354b34fa5a02bdb16d007a462c5ca94
Reviewed-on: https://skia-review.googlesource.com/22028
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-07-10 13:35:25 +00:00
Ethan Nicholas
9b80ffc77b converted GrCircleBlurFragmentProcessor to sksl
Bug: skia:
Change-Id: I1b70ba2003c9e9de2b5b9acadaf25c9ed59b1198
Reviewed-on: https://skia-review.googlesource.com/21727
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-07-07 20:42:34 +00:00
Mike Reed
aa6c777f7d add guard for android (needs rebaseline)
android.graphics.drawable.cts.BitmapDrawableTest.testPreloadDensity(BitmapDrawableTest.java:556)

Bug: skia:
Change-Id: Ibc6b67c6ec82f578ffffd7461e2505713c704b8d
Reviewed-on: https://skia-review.googlesource.com/21824
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-07-07 13:57:59 +00:00
Brian Salomon
cfe910dc79 Revert "Revert "Make mock GrContext unit testable.""
This reverts commit c867a89b01.

Reason for revert: test

Original change's description:
> Revert "Make mock GrContext unit testable."
> 
> This reverts commit 993e7e2521.
> 
> Reason for revert: Seeing if this fixes the NexusPlayer bots
> 
> Original change's description:
> > Make mock GrContext unit testable.
> > 
> > Bug: skia:
> > Change-Id: I959122f1f2c390832ab1033bcdbdd2ca6cfc0419
> > Reviewed-on: https://skia-review.googlesource.com/20699
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com
> 
> Change-Id: I25ed9329962d930fe38108f779ff7083e0e4847e
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/21731
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,bsalomon@google.com

Change-Id: I62c579e087db1ff9891cf6c41b3eb40f47561887
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/21733
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-06 21:59:18 +00:00
Brian Salomon
cf54081a09 Potentially fix definition of GR_TEST_UTILS in gn_to_bp.py
TBR=scroggo@google.com

Change-Id: I0afe43855e7ac55a0f6a9b88af16a1d7b36666a2
Reviewed-on: https://skia-review.googlesource.com/21737
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-06 21:33:07 +00:00
Brian Salomon
c19ced195a Attempt to fix Android framework build
Bug: skia:
Change-Id: I70004f5edc47d6de4e2bdb33d40467c9a6f81b48
Reviewed-on: https://skia-review.googlesource.com/21729
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-06 18:35:46 +00:00
Brian Salomon
c867a89b01 Revert "Make mock GrContext unit testable."
This reverts commit 993e7e2521.

Reason for revert: Seeing if this fixes the NexusPlayer bots

Original change's description:
> Make mock GrContext unit testable.
> 
> Bug: skia:
> Change-Id: I959122f1f2c390832ab1033bcdbdd2ca6cfc0419
> Reviewed-on: https://skia-review.googlesource.com/20699
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,bsalomon@google.com

Change-Id: I25ed9329962d930fe38108f779ff7083e0e4847e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/21731
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-06 18:21:37 +00:00
Brian Salomon
993e7e2521 Make mock GrContext unit testable.
Bug: skia:
Change-Id: I959122f1f2c390832ab1033bcdbdd2ca6cfc0419
Reviewed-on: https://skia-review.googlesource.com/20699
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-06 15:25:35 +00:00
Mike Reed
bdf6c62a19 srgb conversion needs to be in unpremul
Bug: skia:
Change-Id: Ic7dffb2cb30aae33a6c127ab10ea4282e1360114
Reviewed-on: https://skia-review.googlesource.com/21536
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-07-06 12:51:24 +00:00
Greg Daniel
e5ddff5553 Add basic metal build files for backend
Bug: skia:
Change-Id: Iddeeb91b378bdb61d200070d8faa3610299ab733
Reviewed-on: https://skia-review.googlesource.com/21533
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-07-05 21:12:40 +00:00
Ethan Nicholas
9fb036fb13 rewrote GrAlphaThresholdFragmentProcessor in sksl
Bug: skia:
Change-Id: I641b206fc3bc19ac190ad94ee755ab9e1caab9b3
Reviewed-on: https://skia-review.googlesource.com/21341
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-07-05 21:02:39 +00:00
Hal Canary
94fd66cc25 SkPDF: Refactor PDFShader to use ShTHashMap<>
my tests run ~14% faster.

  - Split out gradient shaders from image shaders.  new compilation
    unit: SkPDFGradientShader
  - Common functions InverseTransformBBox and PopulateTilingPatternDict
    moved to SkPDFUtils
  - Split SkPDFShader::State into image and gradient structures.
  - SkPDFCanon is now a simpler structure, with no logic of its own.
    I am considering just moving all of its fields into SkPDFDocument
  - SkPDFShader::State (the image/fallback shader) now is POD, making
    the use of a hashmap for canonicalization straightforward.
    Formerly, we used a linear search.
  - Do not bother trying to canonicalize the falback image shader.
  - SkPDFGradientShader::Key is not POD; comparison of two objects
    requires looking at the contents of two variable-sized arrays.
    We now pre-calculate the hash of the arrays using SkOpts::hash and
    store a hash for the object in the fHash field.
    Using that hash, we can now canonicalize using a hashmap instead
    of a linar search!
  - several static functions renamed to follow style guidelines
  - stop using codeFunction function pointer; I find that less
    clear than it could be.
  - operator==() for SkPDFShader::State and SkPDFGradientShader::Key is
    now much simpler and can now be inlined.
  - SkArrayEqual template in SkPDFUtils.h

No change to PDF output.

BUG=skia:3585
Change-Id: I354ad1b600be6d6749abccb58d13db257370bc0b
Reviewed-on: https://skia-review.googlesource.com/21376
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-07-05 17:27:54 +00:00
Chris Dalton
cb72722cb9 Add a nanobench for drawing glyphs as paths
Bug: skia:
Change-Id: I6e620befd2fe8e84f744e79e9287d9d2d19ffa57
Reviewed-on: https://skia-review.googlesource.com/21389
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-07-05 15:38:22 +00:00
Mike Reed
cdb9a6de0a Revert "enable new tiling for android"
This reverts commit fe11e458b0.

Reason for revert: android roll failed, even with newer images:

junit.framework.AssertionFailedError: 80 dpi: totalDiffPixelCount is 2
at junit.framework.Assert.fail(Assert.java:50)
at android.graphics.drawable.cts.DrawableTestUtils.compareImages(DrawableTestUtils.java:193)
at android.graphics.drawable.cts.BitmapDrawableTest.compareOrSave(BitmapDrawableTest.java:629)
at android.graphics.drawable.cts.BitmapDrawableTest.verifyPreloadDensityInner(BitmapDrawableTest.java:598)
at android.graphics.drawable.cts.BitmapDrawableTest.testPreloadDensity(BitmapDrawableTest.java:556)


Original change's description:
> enable new tiling for android
> 
> android roll will need to be coordinated w/
> https://googleplex-android-review.git.corp.google.com/#/c/2483600/
> 
> Bug: skia:
> Change-Id: Iee6d6cd246f2e5b64f24440a17791821c8fb2f94
> Reviewed-on: https://skia-review.googlesource.com/21369
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Reviewed-by: Mike Reed <reed@google.com>

TBR=djsollen@google.com,reed@google.com

Change-Id: Ic8cd056d0737a817d558cc1de9d90d8d334d0ec1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/21522
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-05 15:17:23 +00:00
Mike Reed
fe11e458b0 enable new tiling for android
android roll will need to be coordinated w/
https://googleplex-android-review.git.corp.google.com/#/c/2483600/

Bug: skia:
Change-Id: Iee6d6cd246f2e5b64f24440a17791821c8fb2f94
Reviewed-on: https://skia-review.googlesource.com/21369
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-07-05 13:08:23 +00:00
Mike Reed
bfa23d7d87 update blendmode bench
Bug: skia:
Change-Id: Id47fedd9e346035af0f14b9a9c171c79eec0d9cd
Reviewed-on: https://skia-review.googlesource.com/21407
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-04 16:47:29 +00:00
Mike Reed
a920d367bf remove unneeded code for index8 imagse
Bug: skia:6828
Change-Id: I039d6bc35a1ed93ce747247f32fe4e9d5b09da0c
Reviewed-on: https://skia-review.googlesource.com/21400
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-03 19:07:25 +00:00
wutao
039a7c70ce Added new edge handling mode (clamp and repeat) to Gaussian blur filter.
Gaussian blur filter will interpolate value by using out of bounds
coords, which is 0. This makes it appears darker near the bounds in the
blurred images. There are two issues: 1) when downsampling and
upsampling, we should use GrTextureDomainEffect kClamp_Mode to clamp
the texture coords to the bounds; 2) during Gaussian blur, we need to
clamp to texture bounds.

BUG=622128
TEST=cc_unittests, GM image test & manual. Some test results can be found at:
https://bugs.chromium.org/p/chromium/issues/detail?id=622128#c49
Change-Id: I9283da1d91efb0da94a991f2d372e9f62c288bdc
Reviewed-on: https://skia-review.googlesource.com/20465
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-06-30 18:11:16 +00:00
Florin Malita
981deec8b2 Delete non-raster-pipeline SkTwoPointConicalGradient impl
Change-Id: If39a2b01d6099fef14695a4ce05b57a3d5c3d99c
Reviewed-on: https://skia-review.googlesource.com/21320
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-06-30 18:09:46 +00:00
Florin Malita
3d96f06d9f Always use raster pipeline for SkTwoPointConicalGradient
Change-Id: I14fc27c5ba8d6fd58df193a172148b7f5aca20bf
Reviewed-on: https://skia-review.googlesource.com/21262
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-06-29 17:44:30 +00:00
Ethan Nicholas
762466e9fe Re-re-land sksl fragment processor support
This reverts commit 5ce3972055.

Bug: skia:
Change-Id: I88260c90004610a1cf8ad1a87c2b4b222525bbb6
Reviewed-on: https://skia-review.googlesource.com/21108
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-06-29 14:57:47 +00:00
Mike Reed
e3ab061601 Revert "remove SK_SUPPORT_LEGACY_TILED_BITMAPS flag for android"
This reverts commit e5cb7c9a5e.

Reason for revert: 	BitmapDrawableTest.testPreloadDensity (android.graphics.drawable.cts.BitmapDrawableTest) 

Original change's description:
> remove SK_SUPPORT_LEGACY_TILED_BITMAPS flag for android
> 
> Bug: skia:
> Change-Id: Ic96de4227bf7a7f0b0a0413b104d206c36809048
> Reviewed-on: https://skia-review.googlesource.com/21109
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=djsollen@google.com,reed@google.com

Change-Id: Ia538b0cc07042bea7bc8dcc6859535e512da68cc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/21161
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-28 21:15:26 +00:00
Mike Reed
e5cb7c9a5e remove SK_SUPPORT_LEGACY_TILED_BITMAPS flag for android
Bug: skia:
Change-Id: Ic96de4227bf7a7f0b0a0413b104d206c36809048
Reviewed-on: https://skia-review.googlesource.com/21109
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-28 17:04:27 +00:00
Mike Klein
5ce3972055 Revert "Re-land sksl fragment processor support"
This reverts commit c070939fd1.

Reason for revert: 

This has some knock-on effects in the generation of Android.bp from our GN files.  See gn/gn_to_bp.py?  We're seeing things like "tmp/tmpsBVycx/gen/" end up in the include search path in Android.bp, which obviously don't exist there...

Original change's description:
> Re-land sksl fragment processor support
> 
> This reverts commit ed50200682.
> 
> Bug: skia:
> Change-Id: I9caa7454b391450620d6989dc472abb3cf7a2cab
> Reviewed-on: https://skia-review.googlesource.com/20965
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

TBR=benjaminwagner@google.com,ethannicholas@google.com

Change-Id: I502486b5405923b322429219f4cc396a45a14cea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20990
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2017-06-27 22:52:10 +00:00
Ethan Nicholas
c070939fd1 Re-land sksl fragment processor support
This reverts commit ed50200682.

Bug: skia:
Change-Id: I9caa7454b391450620d6989dc472abb3cf7a2cab
Reviewed-on: https://skia-review.googlesource.com/20965
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-06-27 18:27:57 +00:00
Derek Sollenberger
19b2a56ad7 Upgrade android build (and infrastructure) to use ndk r15.
Bug: 6672
Change-Id: Ia6c6bae8a9adfd75172d7116487dfa63c3d69670
Reviewed-on: https://skia-review.googlesource.com/20904
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Eric Boren <borenet@google.com>
2017-06-27 16:32:15 +00:00
Ethan Nicholas
ed50200682 Revert "sksl fragment processor support"
This reverts commit ccf59917d3.

Reason for revert: breaking iOS bots

Original change's description:
> sksl fragment processor support
> 
> Bug: skia:
> Change-Id: Ia3b0305c2b0c78074303831f628fb01852b90d34
> Reviewed-on: https://skia-review.googlesource.com/17843
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,benjaminwagner@google.com,ethannicholas@google.com

Change-Id: I0a33060c7c42c7b44c5c13d443ac42958291c2f1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20962
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-06-27 14:36:44 +00:00
Ethan Nicholas
ccf59917d3 sksl fragment processor support
Bug: skia:
Change-Id: Ia3b0305c2b0c78074303831f628fb01852b90d34
Reviewed-on: https://skia-review.googlesource.com/17843
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-06-27 14:20:05 +00:00
wutao
0dc1f4f4cd Add GM image test for blur with clamp mode.
Adding a GM (Golden Master) image test in Skia to reproduce the bleed
black issue in Chrome. This would allow regressions to be caught in
Skia's status page before being rolled into Chrome.

Bug: 622128
Change-Id: Ifd2824fff59483c8e4be48392ba467414d41ca13
TEST=imageblurclampmode.cpp
Reviewed-on: https://skia-review.googlesource.com/20778
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-06-27 11:37:26 +00:00
Mike Reed
7944756396 attempt to fix android roll
Bug: skia:
Change-Id: I78147d215b752b6622a3c96508a6f21bf0284bb8
Reviewed-on: https://skia-review.googlesource.com/20907
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-06-27 01:53:10 +00:00
Mike Reed
8fa0ca2bb0 remove unneeded guards for android
Bug: skia:
Change-Id: I4c0116a9ec27a0c0aa853ce1585d457c7c485b67
Reviewed-on: https://skia-review.googlesource.com/20832
Reviewed-by: Mike Reed <reed@google.com>
2017-06-26 19:25:12 +00:00
Brian Osman
cff94e407e Move threaded BMP device to samples
Currently only referenced by SampleApp, and this squelches false positive
warnings from Clang's thread safety analysis when clients build this code.

Bug: skia:
Change-Id: I710fdc882e05fc5b80977139237028d1408f17db
Reviewed-on: https://skia-review.googlesource.com/20831
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-06-26 17:42:00 +00:00
Mike Reed
fb49909aca Revert "Remove deadcode for sRGB image shading."
This reverts commit 51f6a0f89e.

Reason for revert: try to fix chrome roll

Original change's description:
> Remove deadcode for sRGB image shading.
> 
> Change-Id: I9d98da67d97b64ab55cf44b9ae447882dccda1ca
> Reviewed-on: https://skia-review.googlesource.com/20695
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Herb Derby <herb@google.com>

TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,reed@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I90409a08409177d9dc3b094d736af0fdaf7d6cdd
Reviewed-on: https://skia-review.googlesource.com/20824
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-26 13:59:51 +00:00
Mike Reed
5e78c61075 Revert "remove a bit more dead code"
This reverts commit d9b1fe02a6.

Reason for revert: try to fix chrome roll

Original change's description:
> remove a bit more dead code
> 
> Change-Id: I61484672e88d6bb4f75833ee89e7178c4f34d610
> Reviewed-on: https://skia-review.googlesource.com/20780
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Herb Derby <herb@google.com>

TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I03dcd344dfb138261d9421b0692d12e4ed431100
Reviewed-on: https://skia-review.googlesource.com/20822
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-26 13:53:22 +00:00
Mike Reed
91d7d1d4ac Revert "Revert "Remove deadcode for sRGB image shading.""
This reverts commit e08e639063.

Reason for revert: revert was not clean

Original change's description:
> Revert "Remove deadcode for sRGB image shading."
> 
> This reverts commit 51f6a0f89e.
> 
> Reason for revert: crazy attempt to fix chrome roll
> 
> Original change's description:
> > Remove deadcode for sRGB image shading.
> > 
> > Change-Id: I9d98da67d97b64ab55cf44b9ae447882dccda1ca
> > Reviewed-on: https://skia-review.googlesource.com/20695
> > Reviewed-by: Mike Klein <mtklein@chromium.org>
> > Commit-Queue: Herb Derby <herb@google.com>
> 
> TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,reed@google.com
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Change-Id: Icab02936d6c18e50b8de353aa1cd4c225e15e0bf
> Reviewed-on: https://skia-review.googlesource.com/20800
> Reviewed-by: Mike Reed <reed@google.com>

TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,reed@google.com

Change-Id: Ibc579a5a95e78cb257e8d443dbb905db3761e84a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/20802
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-25 20:01:28 +00:00
Mike Reed
e08e639063 Revert "Remove deadcode for sRGB image shading."
This reverts commit 51f6a0f89e.

Reason for revert: crazy attempt to fix chrome roll

Original change's description:
> Remove deadcode for sRGB image shading.
> 
> Change-Id: I9d98da67d97b64ab55cf44b9ae447882dccda1ca
> Reviewed-on: https://skia-review.googlesource.com/20695
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Herb Derby <herb@google.com>

TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,reed@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Icab02936d6c18e50b8de353aa1cd4c225e15e0bf
Reviewed-on: https://skia-review.googlesource.com/20800
Reviewed-by: Mike Reed <reed@google.com>
2017-06-25 19:55:03 +00:00
Mike Reed
428266de30 use rasterpipeline for colorfilters
Bug: skia:
Change-Id: Ia0e88f3ae29d026843ac7beb2aee3c891123ce18
Reviewed-on: https://skia-review.googlesource.com/20773
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-25 14:21:30 +00:00
Mike Reed
1aa77f0ed7 remove unused blitrow
Bug: skia:
Change-Id: Id905a4b9246a986a3c5de05042e32930d881c1ed
Reviewed-on: https://skia-review.googlesource.com/20772
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-24 21:50:32 +00:00
Mike Klein
d9b1fe02a6 remove a bit more dead code
Change-Id: I61484672e88d6bb4f75833ee89e7178c4f34d610
Reviewed-on: https://skia-review.googlesource.com/20780
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2017-06-24 16:08:23 +00:00
Herb Derby
51f6a0f89e Remove deadcode for sRGB image shading.
Change-Id: I9d98da67d97b64ab55cf44b9ae447882dccda1ca
Reviewed-on: https://skia-review.googlesource.com/20695
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Herb Derby <herb@google.com>
2017-06-23 21:21:59 +00:00