Commit Graph

4053 Commits

Author SHA1 Message Date
scroggo
c46cdd48eb Fix an assert statement in SkPngCodec
allRowsCallback was asserting that
    rowNum - fFirstRow == fLinesDecoded

But it was expecting fFirstRow to be 0 (logically, it is, since we are
decoding all rows), and it never set it (because it doesn't really need
to, except for this assert). This is only a problem if we reuse an
SkPngCodec after previously scaling with it. Add a test that triggers
the assert, and fix it.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2401133002

Review-Url: https://codereview.chromium.org/2401133002
2016-10-10 06:45:33 -07:00
ethannicholas
08b2ccf398 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
Review-Url: https://codereview.chromium.org/2288033003
2016-10-10 06:40:24 -07:00
caryclark
0871401538 fix another fuzz
Add one more early exit.

TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2401673004

Review-Url: https://codereview.chromium.org/2401673004
2016-10-07 12:57:47 -07:00
caryclark
221a4bb55b fix fuzz busters
When fuzz is hit
just quit

TBR=reed@google.com
BUG=skia:5837, skia:5838, skia:5839
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2404483002

Review-Url: https://codereview.chromium.org/2404483002
2016-10-07 11:15:16 -07:00
caryclark
8f18643867 remove sprintf
Most uses of sprintf are
in pathops testing.

Replace them with
SkString::appendf

and replace the remaining
with snprintf

R=scroggo@google.com
BUG=skia:2716
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2391133005

Review-Url: https://codereview.chromium.org/2391133005
2016-10-06 11:46:25 -07:00
Mike Klein
33cbfd75af Make load4 and store4 part of SkNx properly.
Every type now nominally has Load4() and Store4() methods.
The ones that we use are implemented.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3046
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Change-Id: I7984f0c2063ef8acbc322bd2e968f8f7eaa0d8fd
Reviewed-on: https://skia-review.googlesource.com/3046
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-06 17:13:59 +00:00
Cary Clark
40f23780e7 fuzzer fix
Error out when fuzzing
conditions are met.

Also, make degenerate
input line ends consistent.

TBR=reed@google.com
BUG=653452, 626164, skia:5829

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3048

Change-Id: I23a01adde9dec07b54d66ab2418b3ea0b96e4456
Reviewed-on: https://skia-review.googlesource.com/3048
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
2016-10-06 16:22:51 +00:00
caryclark
f114a9bb4e fix mac all build
R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2394943002

Review-Url: https://codereview.chromium.org/2394943002
2016-10-06 07:06:00 -07:00
reed
374772bd61 Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints"
This reverts commit c245574ba3.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2396953002

TBR=

Review-Url: https://codereview.chromium.org/2396953002
2016-10-05 17:33:03 -07:00
caryclark
61c21cdcc3 tight bounds optimization
Add support for tight bounds to detect and return moveTo
followed by close or zero-length lineTo.

Also short circuit so that hard work is avoided when
the path bounds is also the tight bounds.

Avoid doing work if the bounds can be trivially computed.
Include naked moveTo coordinates in the tight bounds.

R=fmalita@chromium.org
BUG=skia:5555, skia:5553
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2394443004

Review-Url: https://codereview.chromium.org/2394443004
2016-10-05 13:23:00 -07:00
Mike Reed
c245574ba3 Revert[7] "replace SkXfermode obj with SkBlendMode enum in paints"
This reverts commit Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8.

Reason for revert: new assert from 100K bot

Original change's description:
> Revert[6] "replace SkXfermode obj with SkBlendMode enum in paints"
> 
> - perform version check in CreateProc for XfermodeImageFilter and ArithmeticImageFilter
> This reverts commit 3ed485f424.
> 
> BUG=skia:
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2992
> 
> Change-Id: Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8
> Reviewed-on: https://skia-review.googlesource.com/2992
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> 

TBR=reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I848e5a69c5cd67f2c14889f4f0a346652578c4ff
Reviewed-on: https://skia-review.googlesource.com/3023
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2016-10-05 20:20:14 +00:00
caryclark
0c52b1740e validate using nx to match bounds
Check the path against the bounds
using Nx instead of straight scalars,

R=mtklein@google.com
BUG=skia:5541
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2388903006

Review-Url: https://codereview.chromium.org/2388903006
2016-10-05 12:16:52 -07:00
Mike Reed
2b2fc7db4f Revert[6] "replace SkXfermode obj with SkBlendMode enum in paints"
- perform version check in CreateProc for XfermodeImageFilter and ArithmeticImageFilter
This reverts commit 3ed485f424.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2992

Change-Id: Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8
Reviewed-on: https://skia-review.googlesource.com/2992
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-10-05 18:31:17 +00:00
Mike Klein
26bea5d557 Make test lower-level, make const_cast more visible.
I can only think there's something funky going on with the hidden
const_cast inside SkRasterPipeline.cpp, or with the Sk4h -> Sk4f
conversion.  So make the const_cast visible and write the test
directly in halfs instead of floats.

CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-GN-Trybot

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3003

Change-Id: I3a7e19ae165fce44f177b4968a63ec04e25c4b93
Reviewed-on: https://skia-review.googlesource.com/3003
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-05 16:52:58 +00:00
Cary Clark
b9ae53727b fix fuzz
This fix is slightly interesting; if the final
close of the contour degenerates into a zero-length
line, remove the previous line from the generated
contour.

TBR=reed@google.com
BUG=skia:5822

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3004

Change-Id: Id668d13ccf6aad9bc81d78588fc77437527a0b7b
Reviewed-on: https://skia-review.googlesource.com/3004
Reviewed-by: Cary Clark <caryclark@google.com>
2016-10-05 14:41:37 +00:00
Mike Klein
d0ccb57ec4 looks like red and blue start wrong (more unit test debugging)
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3001

CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-GN-Trybot

Change-Id: I8d26b5484a2bf67d5d5891475640970046e470d8
Reviewed-on: https://skia-review.googlesource.com/3001
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-10-05 13:56:40 +00:00
Mike Klein
c876e99d4c initialize result in SkRasterPipelineTest... more debugging
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2982

Change-Id: I7c40766c3df61fb66f63e17a2da61219d1d95d1b
Reviewed-on: https://skia-review.googlesource.com/2982
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-05 13:06:50 +00:00
Mike Klein
85a45d93ed more debugging for this test.
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2965

Change-Id: I583bcdeb199212840ff227942ab6ebbf57a481d7
Reviewed-on: https://skia-review.googlesource.com/2965
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-05 00:06:52 +00:00
Mike Klein
433b306a70 Revert "Debug Mac test failure."
This reverts commit I0ed569b585f4962a90a0b6993acc484a74055177.

Reason for revert: Mac bots look okay now.  I am puzzled.

Original change's description:
> Debug Mac test failure.
> 
> CQ_EXTRA_TRYBOTS=master.client.skia:Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-GN-Trybot
> TBR=
> 
> BUG=skia:
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2933
> 
> Change-Id: I0ed569b585f4962a90a0b6993acc484a74055177
> Reviewed-on: https://skia-review.googlesource.com/2933
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> 

TBR=mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I4feef1f58172d1cc649bc311c9e6d3c86f915617
Reviewed-on: https://skia-review.googlesource.com/2963
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-04 21:46:55 +00:00
Mike Reed
3ed485f424 Revert[5] "replace SkXfermode obj with SkBlendMode enum in paints"
This reverts commit I0fa5c58af428f3da8565465d1219a34ef8417d9a.

Reason for revert: failing to deserialize some of the 100K

Original change's description:
> Revert[4] "replace SkXfermode obj with SkBlendMode enum in paints"
> 
> This reverts commit 2cbcd12281.
> 
> BUG=skia:
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2924
> 
> Change-Id: I0fa5c58af428f3da8565465d1219a34ef8417d9a
> Reviewed-on: https://skia-review.googlesource.com/2924
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> 

TBR=reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I1805a57eef5ebcac203da5989c8539345ecf806f
Reviewed-on: https://skia-review.googlesource.com/2962
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-10-04 21:35:56 +00:00
Mike Reed
1834242ec6 Revert[4] "replace SkXfermode obj with SkBlendMode enum in paints"
This reverts commit 2cbcd12281.

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>
2016-10-04 20:09:34 +00:00
Cary Clark
4a3717a0b7 run dean4 test everywhere
This test got different results when run with a
GCC compiler generating FMA instructions. The
support for those have been dropped, so the
test should no longer fail.

TBR=reed@google.com
BUG=skia:5508

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2935

Change-Id: I318ec8ae12c9eb489f6f89bd59b202453943d31e
Reviewed-on: https://skia-review.googlesource.com/2935
Reviewed-by: Cary Clark <caryclark@google.com>
2016-10-04 19:26:28 +00:00
Mike Klein
67dd94a263 Debug Mac test failure.
CQ_EXTRA_TRYBOTS=master.client.skia:Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-GN-Trybot
TBR=

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2933

Change-Id: I0ed569b585f4962a90a0b6993acc484a74055177
Reviewed-on: https://skia-review.googlesource.com/2933
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-04 19:25:10 +00:00
Cary Clark
3fdf52cf38 fix fuzz with null check
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>
2016-10-04 18:40:13 +00:00
Mike Klein
9161ef012f Make all SkRasterPipeline stages stock stages in SkOpts.
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>
2016-10-04 18:33:52 +00:00
Cary Clark
a35c68d52a fix initialization order
Broke the linux build
with incorrectly ordered
construction initialization.

TBR=reed@google.com
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2926

Change-Id: I2555616b945021cf119122811db0cfaf999834a0
Reviewed-on: https://skia-review.googlesource.com/2926
Reviewed-by: Cary Clark <caryclark@google.com>
2016-10-04 15:00:10 +00:00
Cary Clark
ab87d7abf1 coin debugging runs all tests in extended
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>
2016-10-04 14:26:00 +00:00
Mike Reed
2cbcd12281 Revert "Revert "Revert "replace SkXfermode obj with SkBlendMode enum in 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 ce02e71758.
> 
> 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>
2016-10-03 21:34:36 +00:00
Mike Reed
70cdb396eb Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints""
This reverts commit ce02e71758.

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>
2016-10-03 20:02:20 +00:00
Brian Salomon
a3b45d4f7d Move clip CTM application to SkRasterClip and SkClipStack
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>
2016-10-03 19:32:07 +00:00
Mike Reed
ce02e71758 Revert "replace SkXfermode obj with SkBlendMode enum in paints"
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>
2016-10-03 18:03:29 +00:00
Mike Reed
0591897548 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>
2016-10-03 17:17:10 +00:00
reed
d921dbb9b8 Propagate validation errors from inner readbuffer when deserializing 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
2016-09-30 09:27:20 -07:00
fmalita
d214d6ae69 Revert of Turned on SkSL->GLSL compiler (patchset #41 id:880001 of 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
2016-09-30 08:05:24 -07:00
ethannicholas
f008b0a59f 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
Review-Url: https://codereview.chromium.org/2288033003
2016-09-30 06:23:25 -07:00
raftias
c6cc28c35b Fixed invalid memory access issue in SkColorSpaceXform::apply()
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>
2016-09-29 18:59:53 +00:00
bsalomon
7c2213ba61 Revert of Explicit control in tools of ANGLE frontend and backend (patchset #6 id:90001 of https://codereview.chromium.org/2381033002/ )
Reason for revert:
Broke bots

Original issue's description:
> Explicit control in tools of ANGLE frontend and backend
>
> Update the ANGLE test GL context, GrContextFactory, and config parsing to allow explicit control of ANGLE front/backend.
>
> This will allow us to explicitly test ES2 vs ES3 interfaces to ANGLE as well as D3D9, D3D11, and OpenGL backends.
>
> Also makes the angle api types valid in all builds (but will just fail when SK_ANGLE=1 or not on windows for the d3d backends).
>
> BUG=skia:5804
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2381033002
>
> Committed: https://skia.googlesource.com/skia/+/50094fb489543655df026be4e4f99e09e57a1f49

TBR=brianosman@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:5804

Review-Url: https://codereview.chromium.org/2384483003
2016-09-29 10:07:22 -07:00
bsalomon
50094fb489 Explicit control in tools of ANGLE frontend and backend
Update the ANGLE test GL context, GrContextFactory, and config parsing to allow explicit control of ANGLE front/backend.

This will allow us to explicitly test ES2 vs ES3 interfaces to ANGLE as well as D3D9, D3D11, and OpenGL backends.

Also makes the angle api types valid in all builds (but will just fail when SK_ANGLE=1 or not on windows for the d3d backends).

BUG=skia:5804
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2381033002
NOTREECHECKS=true
NOTRY=true
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2381033002
2016-09-29 09:49:06 -07:00
Mike Klein
baaf8ad952 Start moving SkRasterPipeline stages to SkOpts.
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>
2016-09-29 16:20:26 +00:00
Mike Reed
627778d5ba isABitmap is deprecated, use isAImage
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2748

Change-Id: I7006a3231ff0e9e39b187deae550364bc97f49d6
Reviewed-on: https://skia-review.googlesource.com/2748
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2016-09-28 21:42:04 +00:00
bsalomon
808ecbb135 Use brackets for explicit GPU config params in tools
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2378163003

Review-Url: https://codereview.chromium.org/2378163003
2016-09-28 12:40:22 -07:00
msarett
7802c3db24 Move toXYZD50() to SkColorSpace_Base
SkColorSpace needs to become more versatile, in order to support
profiles that cannot specified with just a "to XYZ D50" matrix.

This a just first step to clean up the public API.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2381553002

Review-Url: https://codereview.chromium.org/2381553002
2016-09-28 11:15:27 -07:00
caryclark
e3a4e993ef fix cubic linear test
Check to see if the line between end points is
degenerate before measuring control points.

Also, add test case for a bug to see if it
shows up on any platform.

TBR=reed@google.com
BUG=skia:5169, skia:5240
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2375053002

Review-Url: https://codereview.chromium.org/2375053002
2016-09-28 09:22:17 -07:00
bsalomon
3306925576 Make GPU configs use kRGBA color type not kN32.
This makes ES msaa contexts testable on systems where kN32 is compiled as kBGRA due to the fact that render buffers are not always supported for GL_BGRA with GL_EXT_texture_format_BGRA8888.

BUG=skia:5804
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2378713002

Review-Url: https://codereview.chromium.org/2378713002
2016-09-28 08:49:54 -07:00
Mike Klein
c8dd6bc3e7 Rearrange SkRasterPipeline scanline tail handling.
We used to step at a 4-pixel stride as long as possible, then run up to 3 times, one pixel at a time.  Now replace those 1-at-a-time runs with a single tail stamp if there are 1-3 remaining pixels.

This style is simply more efficient: e.g. we'll blend and lerp once for 3 pixels instead of 3 times.  This should make short blits significantly more efficient.  It's also more future-oriented... AVX+ on Intel and SVE on ARM support masked loads and stores, so we can do the entire tail in one direct step.

This also makes it possible to re-arrange the code a bit to encapsulate each stage better.  I think generally this code reads more clearly than the old code, but YMMV.  I've arranged things so you write one function, but it's compiled into two specializations, one for tail=0 (Body) and one for tail>0 (Tail).  It's pretty tidy.

For now I've just burned a register to pass around tail.  It's 2 bits now, maybe soon 3 with AVX, and capped at 4 for even the craziest new toys, so there are plenty of places we can pack it if we want to get clever.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2717

Change-Id: I45852a3e5d4c5b5e9315302c46601aee0d32265f
Reviewed-on: https://skia-review.googlesource.com/2717
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-09-28 15:28:24 +00:00
brianosman
eec8304714 Added kSRGBLinear_Named color space, along with tests
Gradients (and other shaders) are going to end up serializing this
particular color space very frequently, so we want a shorthand way of
writing it out. I think it's also helpful to have a clearer way of
creating it (vs. NewNamed(kSRGB_Named)->makeLinearGamma()).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2377763002

Review-Url: https://codereview.chromium.org/2377763002
2016-09-27 15:11:47 -07:00
Mike Klein
615daf0e04 OverAlignedTest: use sk_ malloc and free.
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2712

Change-Id: I73b2b45ba6a1303b957aa03953eef305f8be9144
Reviewed-on: https://skia-review.googlesource.com/2712
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2016-09-27 16:12:13 +00:00
Mike Klein
fc6c37b981 Remove stray semicolons.
Turns out function declarations don't end in semicolons...

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2720

No public API changes.
TBR=reed@google.com

Change-Id: I72b56d52e1ff7fa6e89c295b0de8c46599791ebb
Reviewed-on: https://skia-review.googlesource.com/2720
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-09-27 14:04:26 +00:00
Mike Klein
7bfc08b9fb Focus -Wno-over-aligned to just 32-bit x86 Android. (2)
I've even found the code that's making this happen, just don't know why.
I've added a test to assert that it's safe to assume malloc() is 8-byte aligned.

Test should compile this time.

CQ_INCLUDE_TRYBOTS=master.client.skia.android:Test-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Release-GN_Android-Trybot

Change-Id: I48714b99670c20704adf4f7f216da0d60d7d9bcd
Reviewed-on: https://skia-review.googlesource.com/2662
Reviewed-on: https://skia-review.googlesource.com/2703
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-09-27 12:16:39 +00:00
Mike Reed
75d6ffbc74 Revert "Focus -Wno-over-aligned to just 32-bit x86 Android."
This reverts commit If8a2898ab3a77571622eb125c97f676e029b902c.

Reason for revert: 

../../../../../work/skia/tests/OverAlignedTest.cpp: In function 'void test_OverAligned(skiatest::Reporter*, sk_gpu_test::GrContextFactory*)':
../../../../../work/skia/tests/OverAlignedTest.cpp:19:33: error: invalid operands of types 'void*' and 'int' to binary 'operator&'
         REPORTER_ASSERT(r, SkIsAlign8(p));
                                 ^
ninja: build stopped: subcommand failed.

Original issue's description:
> Focus -Wno-over-aligned to just 32-bit x86 Android.
> 
> I've even found the code that's making this happen, just don't know why.
> I've added a test to assert that it's safe to assume malloc() is 8-byte aligned.
> 
> BUG=skia:
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2662
> 
> CQ_INCLUDE_TRYBOTS=master.client.skia.android:Test-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Release-GN_Android-Trybot
> 

TBR=mtklein@chromium.org,bungeman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ic9b30ce980d8d5155528a6f2b4e1913e5fa95dc0
Reviewed-on: https://skia-review.googlesource.com/2702
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-09-27 10:44:04 +00:00