Commit Graph

29189 Commits

Author SHA1 Message Date
Mike Reed
c3c9d817f0 add guard for api change in google3
Bug: skia:
Change-Id: I2d84c546cd2bc097c809690bb423581cbd98f2a8
Reviewed-on: https://skia-review.googlesource.com/23060
Reviewed-by: Mike Reed <reed@google.com>
2017-07-13 13:24:21 +00:00
Mike Reed
cbe5e6588a Revert "add guard for recent api change"
This reverts commit 1c8bb8a4c6.

Reason for revert: google3 now updated

Original change's description:
> add guard for recent api change
> 
> Bug: skia:
> Change-Id: Ief80e0eb08d091c54cacb045d074c8564adcedba
> Reviewed-on: https://skia-review.googlesource.com/22640
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Reed <reed@google.com>

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

Change-Id: If534fa0f508b5087e3e7527f822906626fdb65c0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/23002
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-13 12:47:44 +00:00
Robert Phillips
04380e4232 Remove renderTargetContext swapping from GaussianBlur method (take 2)
TBR=bsalomon@google.com
Change-Id: I6c594a8dfef1c3319a56665437f1e13e746a2875
Reviewed-on: https://skia-review.googlesource.com/23001
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-07-13 12:33:02 +00:00
Robert Phillips
4ccbfd127f Revert "Remove renderTargetContext swapping from GaussianBlur method"
This reverts commit 0284de0a21.

Reason for revert: assert firing in nanobench

Original change's description:
> Remove renderTargetContext swapping from GaussianBlur method
> 
> Change-Id: Iee3d5165a09b5760e001cade4f9d68e823ae695f
> Reviewed-on: https://skia-review.googlesource.com/22725
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: Ied1e184c7ab5de0e41814ef8be9c4c94a679d56d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/23000
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-07-13 11:46:43 +00:00
Robert Phillips
0284de0a21 Remove renderTargetContext swapping from GaussianBlur method
Change-Id: Iee3d5165a09b5760e001cade4f9d68e823ae695f
Reviewed-on: https://skia-review.googlesource.com/22725
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-07-13 11:36:02 +00:00
Mike Reed
580501382f Guard to remove kIndex_8_SkColorType
Bug: skia:6828
Change-Id: Ia942a36abb18213184f8d436555a658270d97d47
Reviewed-on: https://skia-review.googlesource.com/22721
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
2017-07-13 10:44:42 +00:00
Florin Malita
4d41b8f2fd Remove dead gradient perspective code
The cool bit here is that Sk4fLinearGradient is now always fast, and never calls the slow
base-class impl.  This means we can rip out Sk4fGradientBase::{mapTs, shadeSpan4f, etc}.

Change-Id: Id3788bc810873b2a209f66efa4187c84b3397e2f
Reviewed-on: https://skia-review.googlesource.com/22366
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-07-13 02:31:32 +00:00
Brian Salomon
1cc3b156c4 Make MSAAPathOp a non-legacy GrMeshDrawOp
Change-Id: Ibe1626a3ebecad0ccc51505c670f9a3ee98d5209
Reviewed-on: https://skia-review.googlesource.com/22361
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-07-13 01:58:32 +00:00
Ravi Mistry
da066b865c Revert "Revert "Temporarily stop uploading to partner bucket in RecreateSKPs bot""
This reverts commit 0f3942fc24.

Reason for revert: Still cannot upload to partner bucket

Original change's description:
> Revert "Temporarily stop uploading to partner bucket in RecreateSKPs bot"
> 
> This reverts commit 6945c946ea.
> 
> Reason for revert: Should be able to upload to partner bucket now
> 
> Original change's description:
> > Temporarily stop uploading to partner bucket in RecreateSKPs bot
> > 
> > Bug: skia:6797
> > Change-Id: I812837d02b90b78b6df3980649ccf6362e939afc
> > Reviewed-on: https://skia-review.googlesource.com/20820
> > Commit-Queue: Ravi Mistry <rmistry@google.com>
> > Reviewed-by: Eric Boren <borenet@google.com>
> 
> TBR=borenet@google.com,rmistry@google.com
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: skia:6797
> Change-Id: I145275da0050da01fca3e6e9c3c5efd84bdadea1
> Reviewed-on: https://skia-review.googlesource.com/21738
> Reviewed-by: Ravi Mistry <rmistry@google.com>
> Commit-Queue: Ravi Mistry <rmistry@google.com>

TBR=borenet@google.com,rmistry@google.com

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

Bug: skia:6797
Change-Id: I5114c2cacd239c45c6a60cb7aa795c96ef28439e
Reviewed-on: https://skia-review.googlesource.com/22840
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2017-07-13 01:37:32 +00:00
Mike Reed
27b3d272a8 Revert "Experimental blur code with 32 bit fix."
This reverts commit d4b2c537d0.

Reason for revert: speculative fix for android-roll

java.lang.AssertionError: expected:<0> but was:<255>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:834)
at org.junit.Assert.assertEquals(Assert.java:645)
at org.junit.Assert.assertEquals(Assert.java:631)
at android.graphics.cts.BlurMaskFilterTest.verifyColor(BlurMaskFilterTest.java:79)
at android.graphics.cts.BlurMaskFilterTest.verifyQuadrants(BlurMaskFilterTest.java:72)
at android.graphics.cts.BlurMaskFilterTest.testBlurMaskFilter(BlurMaskFilterTest.java:56)

Original change's description:
> Experimental blur code with 32 bit fix.
> 
> 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.
> 
> Bug: skia:
> Change-Id: I847270906b0ceac1dfbf43ab5446756689ef660f
> Reviewed-on: https://skia-review.googlesource.com/22700
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

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

Change-Id: Ie84f6bf8872cae08c06d679f0c2f2e6c3d8a02a2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/22880
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-13 01:19:23 +00:00
Brian Salomon
f0366326cc Make RegionOp a non-legacy GrMeshDrawOp
Also add a test factory function.

Change-Id: I612973312824a4ba358965ce8378160a980b86fa
Reviewed-on: https://skia-review.googlesource.com/22213
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-07-13 00:45:51 +00:00
Hal Canary
d425a1d013 SkPDF: start to support AlphaOnly Images as masks.
Does not work when img->isAlphaOnly() && pnt.getMaskFilter().

Change-Id: I60712d035e3a505799258e24660bba30f2c0ed53
Reviewed-on: https://skia-review.googlesource.com/22723
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-07-12 21:02:22 +00:00
Greg Daniel
6b7e0e2c74 Add arc support to gpu Obj c++ code
This is mainly for getting ready to start adding lots of metal backend code.
I've also update the "gpu tools" target to require ARC with involved updating
one IOS file in there.

Bug: skia:
Change-Id: Ied22e8fe7532445cc274efb529e3450654a6614b
Reviewed-on: https://skia-review.googlesource.com/22484
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-07-12 20:49:32 +00:00
Hal Canary
7cbf5e3e03 SkPDF: simplify drawImage/Bitmap/Sprite code.
- SkImageSubset becomes SkKeyedImage
  - SkPDFCanvas::onDraw{Bitmap, Image} go away
  - Remove SkPDFCanvas: base classes now do the right thing.
  - SkPDFDevice::draw{Bitmap,Image}{Rect,}() simplified
  - 244 fewer SLOC.

All but a few PDFs are identical, those rasterize almost the same.

Change-Id: I3ceb3b8935c689719cedf1ad544b0407b5c1733e
Reviewed-on: https://skia-review.googlesource.com/22218
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2017-07-12 20:41:41 +00:00
Florin Malita
5769dd2c9a Add some raster pipeline perspective asserts
I meant to add these when removing the guard, but since we landed without
a guard, might as well do it now.

A couple of things exposed by these asserts:

1) we need to also catch perspective in local matrices

2) we need to disallow burst mode with perspective

Also tweak the predicate to hasPerspective() instead of explicit mask
check.

Change-Id: I099e5125fca52dccffca77c60fc800bbdf539b53
Reviewed-on: https://skia-review.googlesource.com/22483
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-07-12 20:36:45 +00:00
Herb Derby
d4b2c537d0 Experimental blur code with 32 bit fix.
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.

Bug: skia:
Change-Id: I847270906b0ceac1dfbf43ab5446756689ef660f
Reviewed-on: https://skia-review.googlesource.com/22700
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2017-07-12 20:36:38 +00:00
Brian Osman
80a82dff82 On Windows, always re-create window for GL or Vulkan
On at least one machine, I've seen SetPixelFormat fail after Vulkan was
used to render to a window, preventing us from creating a GL context.
This is ham-fisted, but solves the problem.

Bug: skia:
Change-Id: I76d0cb26e181304846aa06109c1af768f8363a18
Reviewed-on: https://skia-review.googlesource.com/22740
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-07-12 20:31:38 +00:00
Brian Osman
176c3b2e88 Move expensive initialization to onOnceBeforeDraw
This was being triggered at viewer startup, while initalizing the slide
list (and then again when switching to the slide). Removing it
declutters startup, particularly if you're trying to debug raster
drawing code.

Bug: skia:
Change-Id: If21cdd10b0dbda74f4a845031ae3e33f7305a1d7
Reviewed-on: https://skia-review.googlesource.com/22742
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-07-12 20:30:50 +00:00
Brian Salomon
98222ac41d Revert "Revert "Make DashOp a non-legacy GrMeshDrawOp.""
This reverts commit beae8a9faa.

Clean revert of revert.

Change-Id: Ibb486bf3411ed347b560fc110a2cfbb0e0caa4f2
Reviewed-on: https://skia-review.googlesource.com/22730
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-12 20:25:46 +00:00
Mike Reed
304a07c6c9 remove references to kIndex_8_SkColorType from our tools/tests
Bug: skia:6828
Change-Id: Ib5049c28c11b7320bece20f5a0a886de8b2a4343
Reviewed-on: https://skia-review.googlesource.com/22728
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-12 20:25:44 +00:00
Yuqian Li
7da6ba2d63 Implement Sk4i's abs, min, max
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
Bug: skia:
Change-Id: Ia9ec3f72095e1c744f88df7bb990d99e0f87d578
Reviewed-on: https://skia-review.googlesource.com/22720
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2017-07-12 20:20:43 +00:00
Brian Osman
f0ca0e0844 Extend final point in closed degenerate hairline segments
For single-contour paths (MLZ), the close is ignored during iteration,
and we instead process the 'Done', which does extend in both directions.
But if there's a second contour (MLZM), then we process the 'Close', and
only extend the degenerate segment in one direction. Depending on where
the path was positioned (relative to pixel centers), this led to some
contours not drawing at all.

Bug: skia:
Change-Id: I88aeaecc94c0e69532479e50920ba2e0cc6f4bda
Reviewed-on: https://skia-review.googlesource.com/22520
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-07-12 20:20:41 +00:00
Brian Salomon
0db1b53a84 Fix assert in lattice op triggered by GLProgramsTest
Change-Id: Ia495a8c7bc7dd0832da7ad48c6dbdf4c0dc67119
Reviewed-on: https://skia-review.googlesource.com/22729
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-07-12 19:47:56 +00:00
Florin Malita
5b8e2b899e Clarify adjustMatrixAndAppendStages semantics
A false return from adjustMatrixAndAppendStages() currently means we'll
attempt to create a legacy context wrapper stage.

Only two gradient impls can return false, and they don't really want the
same thing:

1) linear returns false when the stops are compressed, to get the "nice"
   legacy blend color behavior

2) two-point radial returns false when it cannot map the center points
   (degenerate matrix); in this case we prolly don't want to draw at all

This setup made sense while we were retrofitting gradients with stages,
but now that all of them support RP, it is confusing to sometimes get
a legacy context wrapper even when we are specifically asked for stages.

I propose we align the semantics with SkShader::onAppendStages(), such
that a false return means "don't draw" rather than "try to draw with a
legacy context".

This means we're giving up the compressed stop behavior for linear, but
that's such an arbitrary corner case that I don't think we care at all.

Change-Id: I01256c4acb81b16fb68e6c74cf8d91ea77b95a3b
Reviewed-on: https://skia-review.googlesource.com/22541
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2017-07-12 17:18:08 +00:00
Brian Salomon
beae8a9faa Revert "Make DashOp a non-legacy GrMeshDrawOp."
This reverts commit ebb38256c6.

Reason for revert: Assertions on ANGLE bots

Original change's description:
> Make DashOp a non-legacy GrMeshDrawOp.
> 
> Change-Id: I84ee3c64a5af8889e9a122cbc08d70ed6b25fbab
> Reviewed-on: https://skia-review.googlesource.com/22210
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: I886a0bd75221f05d737d8b27c6b3d8d6cce5573c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/22680
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-12 16:59:04 +00:00
Mike Reed
1c8bb8a4c6 add guard for recent api change
Bug: skia:
Change-Id: Ief80e0eb08d091c54cacb045d074c8564adcedba
Reviewed-on: https://skia-review.googlesource.com/22640
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-07-12 16:45:29 +00:00
Mike Reed
6409f84fc3 Revert "Revert "Change image encode api to return sk_sp""
This reverts commit 64778d9f27.

Bug: skia:
Change-Id: I779515ff1e16a40c33890a4bac7a8a07171aadfe
Reviewed-on: https://skia-review.googlesource.com/22261
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-12 15:44:35 +00:00
Brian Salomon
ebb38256c6 Make DashOp a non-legacy GrMeshDrawOp.
Change-Id: I84ee3c64a5af8889e9a122cbc08d70ed6b25fbab
Reviewed-on: https://skia-review.googlesource.com/22210
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-07-12 15:44:33 +00:00
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
Yuqian Li
016eef47d7 Always enable Analytic AA for rects
Previously, suitableForAAA disabled Analytic AA for small rects.
But that's a mistake. Re-enabling AAA will bring 10-20% speedup for small rects
(~800ns -> ~700ns measured by path_fill_small_rect nanobench).

Bug: skia:
Change-Id: I943f1c754669391f55e46471781fa65840629377
Reviewed-on: https://skia-review.googlesource.com/22205
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-07-12 13:15:56 +00:00
Brian Salomon
febbd23eb7 Make SmallPathOp a non-legacy GrMeshDrawOp
Change-Id: I7fd0739d7bae9176e816772b3aed54528c4fa576
Reviewed-on: https://skia-review.googlesource.com/21865
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2017-07-12 13:13:35 +00:00
Robert Phillips
0f9927712a Address ASAN complaint
TBR=bsalomon@google.com
Change-Id: Ic3b1f328a84d58939ff55b38cbc1fd4bd29ad5c6
Reviewed-on: https://skia-review.googlesource.com/22482
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-07-12 12:53:35 +00:00
Robert Phillips
590533f066 Plumb raw GrMipLevel* down instead of SkTArray<GrMipLevel> in GrGpu
Change-Id: I34033b6ecb469458eb820cbc01aad8c7bb876312
Reviewed-on: https://skia-review.googlesource.com/22212
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-07-12 11:40:15 +00:00
Florin Malita
c4176a2fa5 Always use raster pipeline for perspective
Change-Id: I6205769ea77e12647985496a5c74d3754edd3108
Reviewed-on: https://skia-review.googlesource.com/22365
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-07-12 03:14:05 +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
Ben Wagner
52e4fd98b5 Check first deserialized verb of path is a move.
SkPathRef::Iter::next and several other bits of code depend on the first
verb of a path always being a move. Contructors and builders currently
enforce this, so the deserializer must do so also.

BUG=chromium:740789

Change-Id: Iad0f6fc6d2b2fe40064c674fa7dd1612c120bb8f
Reviewed-on: https://skia-review.googlesource.com/22216
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-07-12 02:40:35 +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
Mike Reed
7e49d534d7 check for null surface in test
If the bounds of the blob are empty, we will request a zero-sized surface
which will fail. Just check for that.

Only expect this if the typeface is empty (e.g. faked out for testing)

Bug: skia:
Change-Id: Idcac0e9d4e2a5fe68926a33250015609b5c7e365
Reviewed-on: https://skia-review.googlesource.com/22360
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-11 19:45:04 +00:00
Leon Scroggins III
a6cb441fc0 Remove Android-FrameworkDefs from CQ
I am removing the builder entirely in 22072, but the CQ stops me.
Remove it from the CQ so we can then delete it.

Bug: b/63429612
Change-Id: I05381df71cb849bbbc02ef270388c48dcf088737
Reviewed-on: https://skia-review.googlesource.com/22219
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-07-11 19:42:01 +00:00
Brian Salomon
18df763be8 Handle invalid lattice case in LatticeOp test factory
Change-Id: I8df10082d9c354685c39d6188340cf2972629e6b
Reviewed-on: https://skia-review.googlesource.com/22214
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2017-07-11 19:31:11 +00:00
wutao
da69944cbb Serialize the new TileMode in SkBlurImageFilterImpl.
Serialize the new TileMode in SkBlurImageFilterImpl. And also update the
SkReadBuffer::Version and CURRENT_PICTURE_VERSION in SkPicture.

Bug: 622128
Change-Id: I3b04be2a36406227c6d8112e943d7415566c0c42
Reviewed-on: https://skia-review.googlesource.com/22079
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-07-11 18:13:31 +00:00
Leon Scroggins
571b30f611 Reland "Remove support for decoding to kIndex_8"
Original change's description:
> > Remove support for decoding to kIndex_8
> > 
> > Fix up callsites, and remove tests that no longer make sense.
> > 
> > Bug: skia:6828
> > Change-Id: I2548c4b7528b7b1be7412563156f27b52c9d4295
> > Reviewed-on: https://skia-review.googlesource.com/21664
> > Reviewed-by: Derek Sollenberger <djsollen@google.com>
> > Commit-Queue: Leon Scroggins <scroggo@google.com>
> 
> TBR=djsollen@google.com,scroggo@google.com
> 
> Change-Id: I1bc669441f250690884e75a9a61427fdf75c6907
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:6828
> Reviewed-on: https://skia-review.googlesource.com/22120
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>

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

Bug: skia:6828
Change-Id: I36ff5a11c529d29e8adc95f43b8edc6fd1dbf5b8
Reviewed-on: https://skia-review.googlesource.com/22320
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-07-11 18:00:31 +00:00
Mike Reed
f778eb2f51 check for default typeface for new test
Bug: skia:
Change-Id: I5e52b3259acf73875640ec172d4ff8030975b611
Reviewed-on: https://skia-review.googlesource.com/22262
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-11 16:49:21 +00:00
Jim Van Verth
4c70c75d0a Update SkiaSDLExample to latest Ganesh interfaces.
Also updates SDL to 2.0.5.

Change-Id: I3a3c8f69360fc20a3d543c19dcf82dd3f42f1309
Reviewed-on: https://skia-review.googlesource.com/22204
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-07-11 16:34:21 +00:00
Brian Osman
39ef556d7c Correctly set encoder options according to color space
The default value is kRespect, so we were always using that value.
Replace that with more explicit (and correct) logic.

Bug: skia:
Change-Id: I6984a96fa16033f41824851cade3ff046b0fae94
Reviewed-on: https://skia-review.googlesource.com/22260
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-07-11 16:25:21 +00:00
Mike Reed
64778d9f27 Revert "Change image encode api to return sk_sp"
This reverts commit dc799550e2.

Reason for revert: need to fix sites in Document_none

Original change's description:
> Change image encode api to return sk_sp
> 
> Bug: skia:
> Change-Id: I238289bc630be27795cb1384955dd6e887597c05
> Reviewed-on: https://skia-review.googlesource.com/22208
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>

TBR=scroggo@google.com,fmalita@chromium.org,reed@google.com

Change-Id: Id7f67027e5f1405a60fdbde29863cdf8daef0cb7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/22280
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-11 16:00:32 +00:00
Mike Reed
dc799550e2 Change image encode api to return sk_sp
Bug: skia:
Change-Id: I238289bc630be27795cb1384955dd6e887597c05
Reviewed-on: https://skia-review.googlesource.com/22208
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-07-11 15:43:21 +00:00