platform/upstream/libSkiaSharp.git
7 years agoremove debugging printf from resource cache test.
Brian Salomon [Tue, 3 Jan 2017 14:47:27 +0000 (09:47 -0500)]
remove debugging printf from resource cache test.

Change-Id: Iec03961810c477d34e763ea4da3149b0788f4efd
Reviewed-on: https://skia-review.googlesource.com/6522
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoRemove ref counting from GrOp.
Brian Salomon [Tue, 3 Jan 2017 14:42:58 +0000 (09:42 -0500)]
Remove ref counting from GrOp.

Instead use std::unique_ptr to manage GrOp lifetime.

Change-Id: Ic1dc1e0ffd7254c3994221f498677af5bbf66a71
Reviewed-on: https://skia-review.googlesource.com/6479
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoChange GaussianBlur logic wrt color spaces
Brian Osman [Thu, 29 Dec 2016 16:50:48 +0000 (11:50 -0500)]
Change GaussianBlur logic wrt color spaces

I was using 'source' where I should have said 'input'. Also, to be
consistent with other image filters, ensure that the input is in the
destination gamut before we start blurring.

BUG=skia:

Change-Id: I751961b42a2a5d110ee8ea8916279c8fe0d5248e
Reviewed-on: https://skia-review.googlesource.com/6486
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoBUILD.gn: skia_enable_pdf
Hal Canary [Fri, 30 Dec 2016 18:09:03 +0000 (13:09 -0500)]
BUILD.gn: skia_enable_pdf

BUG=skia:

Change-Id: Icf616bec73e81aad97815b519566ff5b9db611e3
Reviewed-on: https://skia-review.googlesource.com/6495
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoMove two skia arrays to read-only data segment
Bruce Dawson [Thu, 29 Dec 2016 22:05:39 +0000 (14:05 -0800)]
Move two skia arrays to read-only data segment

The BCP47FromLanguageID and UnicodeFromMacRoman arrays are logically
const but were not marked as such. Marking them as const lets the
compiler/linker store them in the read-only data segment, which is
strictly better than being in read/write memory. This change moves about
3,000 bytes from the .data to .rdata segment in both chrome.dll and
chrome_child.dll.

BUG=677351

Change-Id: I85ff44d61aa232cf29178833fd2bb2e004032b9e
Reviewed-on: https://skia-review.googlesource.com/6424
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoDisable msaa on IntelIris540 (new bot).
Ben Wagner [Sun, 1 Jan 2017 15:31:22 +0000 (10:31 -0500)]
Disable msaa on IntelIris540 (new bot).

BUG=skia:5792

Change-Id: I1b6140042ae74be455ffa04b0f2924e058e8f9be
Reviewed-on: https://skia-review.googlesource.com/6492
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoUpdate SKP version
UpdateSKPs [Sun, 1 Jan 2017 06:57:42 +0000 (06:57 +0000)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=update-skps@skia.org
NO_MERGE_BUILDS

Change-Id: I30cf8c2c92a62f83eb6d91a69df5d28d536a4cd5
Reviewed-on: https://skia-review.googlesource.com/6426
Reviewed-by: update-skps <update-skps@skia.org>
Commit-Queue: update-skps <update-skps@skia.org>

7 years agoremove unused parameter in onNewimageSnapshot
Mike Reed [Fri, 30 Dec 2016 11:23:12 +0000 (06:23 -0500)]
remove unused parameter in onNewimageSnapshot

BUG=skia:

Change-Id: I59b4cbace841489698fb22828c35b82a738d06b3
Reviewed-on: https://skia-review.googlesource.com/6494
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoUpdate Win version for iHD530 after driver upgrade.
Ben Wagner [Thu, 29 Dec 2016 21:27:03 +0000 (16:27 -0500)]
Update Win version for iHD530 after driver upgrade.

BUG=skia:

Change-Id: I92c0c4ca9ad3d8e0fa6e0063c47284fb819fe24c
Reviewed-on: https://skia-review.googlesource.com/6417
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Stephan Altmueller <stephana@google.com>
7 years agoOmit failing test on GTX1070 (new bot).
Ben Wagner [Thu, 29 Dec 2016 19:10:04 +0000 (14:10 -0500)]
Omit failing test on GTX1070 (new bot).

BUG=skia:6080

Change-Id: Ie6553470461a6a4a5c5602ca81074f7303d4786a
Reviewed-on: https://skia-review.googlesource.com/6488
Reviewed-by: Stephan Altmueller <stephana@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoAdd ImageToColorSpace helper in SkImageFilter
Brian Osman [Thu, 29 Dec 2016 14:18:20 +0000 (09:18 -0500)]
Add ImageToColorSpace helper in SkImageFilter

Share this logic among a couple filters that need it. This also fixes a
bug that showed up in the morhpology GM for GPU color space configs.

Re-land of https://skia-review.googlesource.com/c/6475/

BUG=skia:

Change-Id: If7b8d892cf89fa030bae68bdd3c03118f290f032
Reviewed-on: https://skia-review.googlesource.com/6484
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoremove unused ForceUnique option from makeImageSnapshot
Mike Reed [Thu, 29 Dec 2016 14:36:20 +0000 (09:36 -0500)]
remove unused ForceUnique option from makeImageSnapshot

BUG=skia:

Change-Id: I2555ceb86b597f7bb34c8fc48b3e07eb7115ea82
Reviewed-on: https://skia-review.googlesource.com/6481
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
7 years agoFix typos in the sheriffing document
Yuqian Li [Tue, 27 Dec 2016 19:53:13 +0000 (14:53 -0500)]
Fix typos in the sheriffing document

BUG=skia:

NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=6470

Change-Id: Id80f5bb1a3f0279162b0397fd6822aec83eae322
Reviewed-on: https://skia-review.googlesource.com/6470
Reviewed-by: Stephan Altmueller <stephana@google.com>
Commit-Queue: Stephan Altmueller <stephana@google.com>

7 years agoRevert "Add ImageToColorSpace helper in SkImageFilter"
Brian Osman [Thu, 29 Dec 2016 01:24:28 +0000 (01:24 +0000)]
Revert "Add ImageToColorSpace helper in SkImageFilter"

This reverts commit e02d3caab823728d3106bcb1d4fbb674afc959fb.

Reason for revert: New logic triggers out-of-date assert. Reverting until I can fix that, too.

Original change's description:
> Add ImageToColorSpace helper in SkImageFilter
>
> Share this logic among a couple filters that need it. This also fixes a
> bug that showed up in the morhpology GM for GPU color space configs.
>
> BUG=skia:
>
> Change-Id: Ic686b07aff80e58e14a86108703bfbb3cf524979
> Reviewed-on: https://skia-review.googlesource.com/6475
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
>

TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I00b444dfaaa9b5981f7b33b34419cf9795b52ddb
Reviewed-on: https://skia-review.googlesource.com/6480
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoAdd ImageToColorSpace helper in SkImageFilter
Brian Osman [Wed, 28 Dec 2016 17:28:18 +0000 (12:28 -0500)]
Add ImageToColorSpace helper in SkImageFilter

Share this logic among a couple filters that need it. This also fixes a
bug that showed up in the morhpology GM for GPU color space configs.

BUG=skia:

Change-Id: Ic686b07aff80e58e14a86108703bfbb3cf524979
Reviewed-on: https://skia-review.googlesource.com/6475
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoupdate pixel and pixelxl to NMF26Q
Kevin Lubick [Wed, 28 Dec 2016 18:35:13 +0000 (13:35 -0500)]
update pixel and pixelxl to NMF26Q

BUG=skia:

Change-Id: I560fc9a7c50187897c9769d4f221d95919558a86
Reviewed-on: https://skia-review.googlesource.com/6476
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>

7 years agoAdd skia_enable_discrete_gpu argument to GN
Brian Osman [Wed, 28 Dec 2016 16:19:22 +0000 (11:19 -0500)]
Add skia_enable_discrete_gpu argument to GN

This forces all of our testing tools to run with the discrete GPU in
laptop systems that have that option.

BUG=skia:

Change-Id: Ibd7629d6de5f063cdf219b3c7469210af5085d90
Reviewed-on: https://skia-review.googlesource.com/6474
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoUpdate Nexus 5 to M4B30Z
Kevin Lubick [Wed, 28 Dec 2016 15:10:09 +0000 (10:10 -0500)]
Update Nexus 5 to M4B30Z

BUG=skia:

Change-Id: I6544be934f3ea84c67e0b0349e2467dd78292647
Reviewed-on: https://skia-review.googlesource.com/6473
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>

7 years agoAdd color space fallback for matrix convolution filter
Brian Osman [Tue, 27 Dec 2016 17:50:37 +0000 (12:50 -0500)]
Add color space fallback for matrix convolution filter

GrMatrixConvolutionFilter is used in two places right now.
The GaussianBlur code ensures that we blur in the space of
the source image, so no conversion is needed. This changes
SkMatrixConvolutionImageFilter to give the same guarantee.

BUG=skia:

Change-Id: I1a6199d4893f2e579dc6fa809c59cd195bd62f90
Reviewed-on: https://skia-review.googlesource.com/6467
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoModify matrix convolution GM for sRGB testing
Brian Osman [Tue, 27 Dec 2016 16:04:12 +0000 (11:04 -0500)]
Modify matrix convolution GM for sRGB testing

Tag bitmap as sRGB, and adjust gain/bias in color-managed configs to
produce results that are less blown out.

Also added a colorized version of the GM, to validate that gamut
conversion is working.

BUG=skia:

Change-Id: I333988dcdaa1272121e8aa731b4188c942fe19d8
Reviewed-on: https://skia-review.googlesource.com/6466
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoUpdate SKP version
UpdateSKPs [Sun, 25 Dec 2016 07:01:19 +0000 (07:01 +0000)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=update-skps@skia.org
NO_MERGE_BUILDS

Change-Id: Ia0a857e5e1c7daa5c12fd9befd15014f1ba40d02
Reviewed-on: https://skia-review.googlesource.com/6421
Reviewed-by: update-skps <update-skps@skia.org>
Commit-Queue: update-skps <update-skps@skia.org>

7 years agoRemove legacy matrix defines
Matt Sarett [Thu, 22 Dec 2016 21:21:18 +0000 (16:21 -0500)]
Remove legacy matrix defines

BUG=skia:

Change-Id: Iaa9e402d687df6f24d94fc58d7edcf9fe47d913d
Reviewed-on: https://skia-review.googlesource.com/6460
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoRemove render target unique ID virtual from GrOp.
Brian Salomon [Thu, 22 Dec 2016 20:42:51 +0000 (15:42 -0500)]
Remove render target unique ID virtual from GrOp.

GrRenderTargetOpList now stores the IDs along side each op.

This should put us closer to using proxy IDs and not forcing early render target instantiation as many comments point towards.

Change-Id: I1ee82b01a0818a80d2bcac39fdf3a4ee7dccecc9
Reviewed-on: https://skia-review.googlesource.com/6403
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoFix iOS build
Matt Sarett [Thu, 22 Dec 2016 18:14:30 +0000 (13:14 -0500)]
Fix iOS build

BUG=skia:

Change-Id: I914cd75c84bbe57401ab65352d4e8b3dc413dce1
Reviewed-on: https://skia-review.googlesource.com/6418
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoImprove color space support in SkImage::readPixels()
Matt Sarett [Thu, 22 Dec 2016 15:52:25 +0000 (10:52 -0500)]
Improve color space support in SkImage::readPixels()

Correct handling of kGray, k565, k4444 etc. is still a TODO.
SkImage_Generator and SkImage_Gpu are still TODOs.

BUG=skia:6021

Change-Id: Ib53d97d3a866b2b4934fd85c10100855743a8fab
Reviewed-on: https://skia-review.googlesource.com/6396
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoChange GPU read/write pixels API to support color space conversion
Brian Osman [Thu, 22 Dec 2016 16:12:16 +0000 (11:12 -0500)]
Change GPU read/write pixels API to support color space conversion

GrContext still doesn't convert, but it has the source and destination
color spaces, and call sites are supplying appropriate values where it
makes sense.

BUG=skia:

Change-Id: Ia88733125b8090776cfc9b0dc8030cce365b0b8b
Reviewed-on: https://skia-review.googlesource.com/6400
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoBot upgrades.
Ben Wagner [Thu, 22 Dec 2016 13:40:14 +0000 (08:40 -0500)]
Bot upgrades.

Upgrading most Windows bots in the Skolo to version 1607 (build number 14393).

Adding IntelIris540 and GTX1070 bot.

BUG=skia:

Change-Id: Ide7a09a4061d1e387e1d2a22be31b14b13f2fa96
Reviewed-on: https://skia-review.googlesource.com/6357
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoDo not support index8 for generateScaledPixels
Leon Scroggins III [Thu, 22 Dec 2016 14:53:21 +0000 (09:53 -0500)]
Do not support index8 for generateScaledPixels

Since the in/out parameter is a const SkPixmap without the proper
color table, there is no way to tell the client about it without
modifying the const SkPixmap. Rather than cheating, just return
false.

Change-Id: I63fdf57febc59e1ee9af13aa6eb9b253d19bcb17
Reviewed-on: https://skia-review.googlesource.com/6414
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>

7 years agoremove SK_SUPPORT_LEGACY_PREROLL code
Mike Reed [Tue, 20 Dec 2016 21:01:03 +0000 (16:01 -0500)]
remove SK_SUPPORT_LEGACY_PREROLL code

BUG=skia:

Change-Id: I608a3250882708cefc37747b462d5fa08b1e28be
Reviewed-on: https://skia-review.googlesource.com/6349
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoTest CL
Ravi Mistry [Thu, 22 Dec 2016 01:47:55 +0000 (20:47 -0500)]
Test CL

NOTRY=true
BUG=skia:

Change-Id: Ifc020282cfce791db66d90b0173294158b3e16ab
Reviewed-on: https://skia-review.googlesource.com/6410
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>

7 years agoRevert "Revert "Fix issue in SkDebugCanvas where filter canvas prevents GrOp bounds...
Ravi Mistry [Wed, 21 Dec 2016 22:41:03 +0000 (22:41 +0000)]
Revert "Revert "Fix issue in SkDebugCanvas where filter canvas prevents GrOp bounds from drawing""

This reverts commit 9bcda719e87140dcb541356fdb3f589e145c9b8e.

Reason for revert: No idea why the bots failed with the original CL. Putting it back in.

Original change's description:
> Revert "Fix issue in SkDebugCanvas where filter canvas prevents GrOp bounds from drawing"
>
> This reverts commit 4bf98e7e802edf43effec93bea22fecb031f65f1.
>
> Reason for revert: Seems to have caused some compile bots to break-
> https://chromium-swarm.appspot.com/task?id=333c47cadb764f10&refresh=10
>
> Original change's description:
> > Fix issue in SkDebugCanvas where filter canvas prevents GrOp bounds from drawing
> >
> > Change-Id: I3446bfc42c4cf521916a03aa0f367cd38b4fd370
> > Reviewed-on: https://skia-review.googlesource.com/6401
> > Reviewed-by: Ben Wagner <bungeman@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> >
>
> TBR=bsalomon@google.com,bungeman@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Change-Id: I0a73fe8c13967233dec950c317693d13d738722a
> Reviewed-on: https://skia-review.googlesource.com/6408
> Commit-Queue: Ravi Mistry <rmistry@google.com>
> Reviewed-by: Ravi Mistry <rmistry@google.com>
>

TBR=bsalomon@google.com,bungeman@google.com,rmistry@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Iad544f883804d13f04640498b4b63f735d33840e
Reviewed-on: https://skia-review.googlesource.com/6409
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
7 years agoRevert "Fix issue in SkDebugCanvas where filter canvas prevents GrOp bounds from...
Ravi Mistry [Wed, 21 Dec 2016 22:32:21 +0000 (22:32 +0000)]
Revert "Fix issue in SkDebugCanvas where filter canvas prevents GrOp bounds from drawing"

This reverts commit 4bf98e7e802edf43effec93bea22fecb031f65f1.

Reason for revert: Seems to have caused some compile bots to break-
https://chromium-swarm.appspot.com/task?id=333c47cadb764f10&refresh=10

Original change's description:
> Fix issue in SkDebugCanvas where filter canvas prevents GrOp bounds from drawing
>
> Change-Id: I3446bfc42c4cf521916a03aa0f367cd38b4fd370
> Reviewed-on: https://skia-review.googlesource.com/6401
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
>

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

Change-Id: I0a73fe8c13967233dec950c317693d13d738722a
Reviewed-on: https://skia-review.googlesource.com/6408
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
7 years agoProtect glyph sub-pixel placement against NaN and Inf.
Herb Derby [Wed, 21 Dec 2016 22:00:06 +0000 (17:00 -0500)]
Protect glyph sub-pixel placement against NaN and Inf.

BUG=chromium:675106

Change-Id: I3f8f2575ca3d1b02615be00d66cf7a123407c5a3
Reviewed-on: https://skia-review.googlesource.com/6404
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agoFix issue in SkDebugCanvas where filter canvas prevents GrOp bounds from drawing
Brian Salomon [Wed, 21 Dec 2016 21:13:14 +0000 (16:13 -0500)]
Fix issue in SkDebugCanvas where filter canvas prevents GrOp bounds from drawing

Change-Id: I3446bfc42c4cf521916a03aa0f367cd38b4fd370
Reviewed-on: https://skia-review.googlesource.com/6401
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoCleanup GrBicubicEffect
Brian Osman [Wed, 21 Dec 2016 20:26:37 +0000 (15:26 -0500)]
Cleanup GrBicubicEffect

- The base class already stores a color space xform, so just forward our
  factory argument and use that one.

- We had factories that took arbitrary coefficients, but they were only
  used in the unit test. Make the assumption of Mitchell's coefficients
  really hard-coded, which lets us skip transposing, storing, comparing,
  etc...

BUG=skia:

Change-Id: Ia1d4f72d32c201cba1da24d61b90250f383336d1
Reviewed-on: https://skia-review.googlesource.com/6394
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoAdd color space xform fallback to GrMorphologyEffect
Brian Osman [Wed, 21 Dec 2016 18:36:02 +0000 (13:36 -0500)]
Add color space xform fallback to GrMorphologyEffect

99% of the time (or maybe 100%?) morphology will trigger pad_image,
so the input texture will already be in the destimation color space.
If that doesn't happen, then just force the source to be converted,
which keeps the morphology effect and driver code simple.

BUG=skia:

Change-Id: I98876af4f9e9a5da031973213ed76349752ce68f
Reviewed-on: https://skia-review.googlesource.com/6388
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoImplement scaling in SkCodecImageGenerator
Leon Scroggins III [Mon, 19 Dec 2016 20:04:06 +0000 (15:04 -0500)]
Implement scaling in SkCodecImageGenerator

Plumb calls down to SkCodec.

Add a gm

Change-Id: I16da24eb739295ab72f487df02f19968151443f3
Reviewed-on: https://skia-review.googlesource.com/6287
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>

7 years agoClean up SkFontHost_Mac ownership.
bungeman [Tue, 20 Dec 2016 17:04:29 +0000 (12:04 -0500)]
Clean up SkFontHost_Mac ownership.

This clarifies ownership rules throughout SkFontHost_Mac.cpp, as well as
tidying up various bits of code. Clarifying ownership means replacing
AutoCFRelease with UniqueCFRef which is based on std::unique_ptr. Most of
the cleanup is removing now dead code and properly indenting.

Change-Id: I6d3a225d62b5d0f2f48a9e70c1a24317faa06747
Reviewed-on: https://skia-review.googlesource.com/6297
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>

7 years agohelper to convert CGImage -> SkImage
Mike Reed [Wed, 21 Dec 2016 17:01:12 +0000 (12:01 -0500)]
helper to convert CGImage -> SkImage

BUG=skia:

Change-Id: I07e0b8fe510d34ab541de7572cb6775478527624
Reviewed-on: https://skia-review.googlesource.com/6386
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
7 years agoRename GrOp::draw to GrOp::execute
Brian Salomon [Wed, 21 Dec 2016 16:37:49 +0000 (11:37 -0500)]
Rename GrOp::draw to GrOp::execute

Change-Id: I36b8532c57d0b6004a5fd283e30a506df89a4fa6
Reviewed-on: https://skia-review.googlesource.com/6387
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoMisc batch->op cleanup Part 2 of 2
Brian Salomon [Wed, 21 Dec 2016 16:38:53 +0000 (11:38 -0500)]
Misc batch->op cleanup Part 2 of 2

Change-Id: Iedfe5bd019ca1171ab09de569f74c57975aa54c9
Reviewed-on: https://skia-review.googlesource.com/6384
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoMisc batch->op cleanup Part 1 of 2
Brian Salomon [Wed, 21 Dec 2016 16:14:46 +0000 (11:14 -0500)]
Misc batch->op cleanup Part 1 of 2

Change-Id: I80f951976558a284e55386e0a368f08bd835d8ca
Reviewed-on: https://skia-review.googlesource.com/6359
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoMake SkGIFLZWBlock modifiable so it is assignable
Chris Blume [Wed, 21 Dec 2016 02:59:39 +0000 (18:59 -0800)]
Make SkGIFLZWBlock modifiable so it is assignable

std::vector needs to be able to assign objects contained inside it. With
const member variables, this isn't possible. Remove the consts so
SkGIFLZWBlock can be assigned.

BUG=skia:6072

Change-Id: I990dc80fb1c49fbd584712c6d0c1154c2da36e85
Reviewed-on: https://skia-review.googlesource.com/6362
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>

7 years agoRemove sk_ref_sp's misleading preprocessor define and comment
Brian Osman [Tue, 20 Dec 2016 16:18:03 +0000 (11:18 -0500)]
Remove sk_ref_sp's misleading preprocessor define and comment

This function will always be useful. Don't make it look/feel like a
temporary hack.

BUG=skia:

Change-Id: I6506d7d51dc3b25a7dbcea4ac273f51cf05f3a89
Reviewed-on: https://skia-review.googlesource.com/6330
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoThis renames methods and classes that relate to static analysis of combinations of...
Brian Salomon [Wed, 21 Dec 2016 14:20:25 +0000 (09:20 -0500)]
This renames methods and classes that relate to static analysis of combinations of GrDrawOps and GrPipelines.

Change-Id: I737b901a19d3c67d2ff7f95802fb4df35656beb2
Reviewed-on: https://skia-review.googlesource.com/6199
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoutils/win/SkTScopedComPtr: reset(T*)
Hal Canary [Wed, 21 Dec 2016 13:18:51 +0000 (08:18 -0500)]
utils/win/SkTScopedComPtr: reset(T*)

Change-Id: I59a687569e2c7b69cdf65ebc9656c7fbffcc32e0
Motivation: to be used by SkXPS.
Reviewed-on: https://skia-review.googlesource.com/6355
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoone more empty contour
Cary Clark [Wed, 21 Dec 2016 13:25:00 +0000 (08:25 -0500)]
one more empty contour

Add one more empty contour check.

R=kjlubick@google.com
BUG=skia:6073

Change-Id: Ie971875d37388f6bd86a0bdaeaf9230d64aca38d
Reviewed-on: https://skia-review.googlesource.com/6356
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>

7 years agoRevert of Generate Signed Distance Field directly from vector path (patchset #23...
rmistry [Wed, 21 Dec 2016 12:25:18 +0000 (04:25 -0800)]
Revert of Generate Signed Distance Field directly from vector path (patchset #23 id:440001 of https://codereview.chromium.org/1643143002/ )

Reason for revert:
Caused test failures again but this time in Win8 and Win10 bots:
* https://chromium-swarm.appspot.com/task?id=33384540bf6f3710&refresh=10
* https://chromium-swarm.appspot.com/task?id=3338a3ea9f6fe510&refresh=10

Original issue's description:
> Generate Signed Distance Field directly from vector path
>
> Add SkGenerateDistanceFieldFromPath API to generate signed distance field directly from SkPath.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1643143002
>
> Committed: https://skia.googlesource.com/skia/+/4de97a64e8829323a7070b623411d9f9ddb0cd0f
> Committed: https://skia.googlesource.com/skia/+/e8f0a7b986f1e5583c9bc162efcdd92fd6430549
> Committed: https://skia.googlesource.com/skia/+/67c7c81a82b6351e9fbbf235084d7120162d9268
> Review-Url: https://codereview.chromium.org/1643143002
> Committed: https://skia.googlesource.com/skia/+/64b70b096ac20833d9737758a4bd5f2a51078bc4
> Review-Url: https://codereview.chromium.org/1643143002
> Committed: https://skia.googlesource.com/skia/+/6d2f73c364d0d823f14d1ddebc88e0bcbc8f0634

TBR=bsalomon@google.com,jvanverth@google.com,mtklein@google.com,wasim.abbas@arm.com,caryclark@google.com,reed@google.com,egdaniel@google.com,joel.liang@arm.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2597473003

7 years agoremove MIPS DSP optimizations
Mike Klein [Tue, 20 Dec 2016 22:34:29 +0000 (17:34 -0500)]
remove MIPS DSP optimizations

There are only a couple of these, primarily focused on index8 srcs and 565 dsts.  The burden's starting to outweigh the benefit.  No one on the team knows MIPS assembly.

If we're going to try this again, I'd rather we try some sort of SkNx / compiler-intrinsic based approach, probably targeting MIPS SIMD (MSA), not this older instruction set.

We already ignore these files for 64-bit MIPS.  This just closes the loop on 32-bit MIPS.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD,Build-Ubuntu-Clang-mips64el-Debug-Android,Build-Ubuntu-Clang-mips64el-Release-Android,Build-Ubuntu-Clang-mipsel-Debug-Android,Build-Ubuntu-Clang-mipsel-Release-Android

BUG=skia:6065

Change-Id: Iecac15b56f59625b2e743ea36e7791b90bb0b422
Reviewed-on: https://skia-review.googlesource.com/6353
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoGenerate Signed Distance Field directly from vector path
joel.liang [Wed, 21 Dec 2016 02:58:53 +0000 (18:58 -0800)]
Generate Signed Distance Field directly from vector path

Add SkGenerateDistanceFieldFromPath API to generate signed distance field directly from SkPath.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1643143002

Committed: https://skia.googlesource.com/skia/+/4de97a64e8829323a7070b623411d9f9ddb0cd0f
Committed: https://skia.googlesource.com/skia/+/e8f0a7b986f1e5583c9bc162efcdd92fd6430549
Committed: https://skia.googlesource.com/skia/+/67c7c81a82b6351e9fbbf235084d7120162d9268
Review-Url: https://codereview.chromium.org/1643143002
Committed: https://skia.googlesource.com/skia/+/64b70b096ac20833d9737758a4bd5f2a51078bc4
Review-Url: https://codereview.chromium.org/1643143002

7 years agoHandle failed surface creation in AlphaThresholdImageFilter GM
Robert Phillips [Wed, 21 Dec 2016 00:05:09 +0000 (19:05 -0500)]
Handle failed surface creation in AlphaThresholdImageFilter GM

Change-Id: Ibc27d26a9afc1f88d5ca7de2216e09afa10ce846
Reviewed-on: https://skia-review.googlesource.com/6354
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoRename batch->op in skiaserve
Brian Salomon [Tue, 20 Dec 2016 21:48:59 +0000 (16:48 -0500)]
Rename batch->op in skiaserve

Change-Id: Ib831b9a6bcf4f37c0f077b26f68b1cefef81bb73
Reviewed-on: https://skia-review.googlesource.com/6351
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoRemove getDevice_just_for_deprecated_compatibility_testing (take 2)
Robert Phillips [Tue, 20 Dec 2016 20:49:18 +0000 (15:49 -0500)]
Remove getDevice_just_for_deprecated_compatibility_testing (take 2)

Change-Id: I516ba4ff1c30bb91563a50c6f2b50f6c01c96f5b
Reviewed-on: https://skia-review.googlesource.com/6346
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoxps.gni
Hal Canary [Tue, 20 Dec 2016 21:15:56 +0000 (16:15 -0500)]
xps.gni

Motivation: Since I am activly refactoring SkXPS, I will be needing to
add and subtract sources.  This is the only way to keep chrome and skia
in sync.

TODO(halcanry): follow up in Chrome build files.

BUG=skia:3495

Change-Id: I2bfcbfce7628c34f9a623c6fa806374a10cdbb75
Reviewed-on: https://skia-review.googlesource.com/6350
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoRename batch->op in GrAuditTrail.
Brian Salomon [Tue, 20 Dec 2016 21:14:45 +0000 (16:14 -0500)]
Rename batch->op in GrAuditTrail.

Change-Id: I68670e5ceb06716e9928ee58485d63e157c7aca7
Reviewed-on: https://skia-review.googlesource.com/6345
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoAdd color space xform to GrMagnifierEffect
Brian Osman [Tue, 20 Dec 2016 20:54:11 +0000 (15:54 -0500)]
Add color space xform to GrMagnifierEffect

Tag helper image as sRGB in magnifier image filter GM, so we can see
this working.

BUG=skia:

Change-Id: I8057dc332d09e1d508ad8462aaf0749b307f480f
Reviewed-on: https://skia-review.googlesource.com/6347
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoRename files, macros, types, and functions related to GrDrawOp testing.
Brian Salomon [Tue, 20 Dec 2016 20:34:05 +0000 (15:34 -0500)]
Rename files, macros, types, and functions related to GrDrawOp testing.

Make the test factories use sk_sp.

Change-Id: Idba630b84deb2848f2203a80fd72e1efa5fc6acf
Reviewed-on: https://skia-review.googlesource.com/6342
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoRemove the last "batch tracker" from AAStrokeRectOp.
Brian Salomon [Tue, 20 Dec 2016 19:43:36 +0000 (14:43 -0500)]
Remove the last "batch tracker" from AAStrokeRectOp.

Most of the fields weren't really needed.

BUG=skia:

Change-Id: If0dbcb707b3a45d044656cbadbe118aa5583be2e
Reviewed-on: https://skia-review.googlesource.com/6338
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoAdd color space xform support to GrDisplacementEffect
Brian Osman [Tue, 20 Dec 2016 20:00:09 +0000 (15:00 -0500)]
Add color space xform support to GrDisplacementEffect

BUG=skia:

Change-Id: I7508f27d4da6cec7acb801aa389f70c30cb5bfb5
Reviewed-on: https://skia-review.googlesource.com/6340
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoAdd color space xform bits to key for texture domain effect
Brian Osman [Tue, 20 Dec 2016 20:06:18 +0000 (15:06 -0500)]
Add color space xform bits to key for texture domain effect

Overlooked this in a recent CL

BUG=skia:

Change-Id: I050f8843cc2a8caadc2a46f1ea833b74b47f76b7
Reviewed-on: https://skia-review.googlesource.com/6341
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoFix more Skia filter fuzzer bugs
Robert Phillips [Tue, 20 Dec 2016 17:44:41 +0000 (12:44 -0500)]
Fix more Skia filter fuzzer bugs

This CL fixes 3 fuzzer bugs:

 the rowBytes computation is really unfortunate in ReadRawPixels when width or height is negative
 In two instances uints were being read through the underlying SkReader32 rather than going through the readUInt virtual
 In skip SkAlign4 can wrap around and return an answer of 0 for large size_ts!!

Change-Id: I657e3afdb4804627604b59abc8008ccdfe47eab2
Reviewed-on: https://skia-review.googlesource.com/6332
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agocheck for empty contours in sortable top
Cary Clark [Tue, 20 Dec 2016 17:52:34 +0000 (12:52 -0500)]
check for empty contours in sortable top

TBR=reed@google.com
BUG=675132

Change-Id: I022ce0c59574b450e47e22a3dac0929034439b1b
Reviewed-on: https://skia-review.googlesource.com/6334
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>

7 years agoGPU: Fix for fuzzer issue for sw-rendered paths with large bounds.
Brian Salomon [Tue, 20 Dec 2016 16:41:43 +0000 (11:41 -0500)]
GPU: Fix for fuzzer issue for sw-rendered paths with large bounds.

BUG=675315

Change-Id: Ida43ef878f89d0f327ef11d1c3e0df429d5760dd
Reviewed-on: https://skia-review.googlesource.com/6331
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoFix mapping from src to dst image space in SkAlphaThresholdFilter
Robert Phillips [Mon, 19 Dec 2016 21:51:53 +0000 (16:51 -0500)]
Fix mapping from src to dst image space in SkAlphaThresholdFilter

This CL does 3 things:
   It updates the imagealphathreshold GMs so they would've caught this bug
   It updates SkAlphaImageThresholdFilter to fix the bug
   It updates the imagealphathreshold_surface GM to match the imagealphathreshold_crop GM (which it was, presumably, originally written to do)

The bug in question is that the prior mapping from src to dst space was correct as long as the imageOffset was (0, 0).

BUG=675332

Change-Id: I3aa1f463a2234576fb2277797caa2fc4aba2650d
Reviewed-on: https://skia-review.googlesource.com/6291
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Stephan White <senorblanco@chromium.org>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoFix iOS build
Robert Phillips [Tue, 20 Dec 2016 16:11:08 +0000 (11:11 -0500)]
Fix iOS build

Change-Id: I6a698685cddb70684ced64c3373b9b7b67650d6f
Reviewed-on: https://skia-review.googlesource.com/6327
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoTag string bitmaps (for GMs) as sRGB
Brian Osman [Tue, 20 Dec 2016 16:09:31 +0000 (11:09 -0500)]
Tag string bitmaps (for GMs) as sRGB

These are often used as inputs when testing image filters, and we need
tagged inputs to test the color pipeline. To avoid changing legacy mode
results, rasterize the bitmaps in legacy, but tag the output.

BUG=skia:

Change-Id: I55e2c0e0061b3f50b1caa18c19ba4fcf92cdf902
Reviewed-on: https://skia-review.googlesource.com/6280
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoRestore getDevice_just_for_deprecated_compatibility_testing
Robert Phillips [Tue, 20 Dec 2016 16:05:30 +0000 (11:05 -0500)]
Restore getDevice_just_for_deprecated_compatibility_testing

Change-Id: I98e73a5f72ef8c8efb1a4f382a5359d21bb5edc8
Reviewed-on: https://skia-review.googlesource.com/6325
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoDo color space conversion in XfermodeImageFilter
Brian Osman [Tue, 20 Dec 2016 15:36:35 +0000 (10:36 -0500)]
Do color space conversion in XfermodeImageFilter

BUG=skia:

Change-Id: I69c92506fca62e8711cece005f169ac05d26c872
Reviewed-on: https://skia-review.googlesource.com/6324
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoFloor to scalar for SDF paths.
Jim Van Verth [Tue, 20 Dec 2016 15:23:09 +0000 (10:23 -0500)]
Floor to scalar for SDF paths.

Should help Joel land his SDF generation patch.

Change-Id: Ib22b634715c5660f769897c153ceabdb47041838
Reviewed-on: https://skia-review.googlesource.com/6323
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>

7 years agoUpdate libwebp to v0.5.2-rc2
Leon Scroggins III [Tue, 20 Dec 2016 14:49:25 +0000 (09:49 -0500)]
Update libwebp to v0.5.2-rc2

This matches the version used by Chromium (crbug.com/675306) and
Android (https://android-review.googlesource.com/#/c/316352/).

Update our test. In the new version, we successfully decode a subset
from incomplete input that we previously did not.

Change-Id: I3442bf59ffdf223a723d8aa75f5b9b816b9e9c3c
Reviewed-on: https://skia-review.googlesource.com/6320
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>

7 years agoRemove getDevice_just_for_deprecated_compatibility_test()
Robert Phillips [Tue, 20 Dec 2016 13:57:26 +0000 (08:57 -0500)]
Remove getDevice_just_for_deprecated_compatibility_test()

BUG=skia:6067

Change-Id: I646e75f43bc77ea884b7fad7281bf0b684996bb9
Reviewed-on: https://skia-review.googlesource.com/6299
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoImplement SkICC::WriteICC()
Matt Sarett [Mon, 19 Dec 2016 23:37:34 +0000 (18:37 -0500)]
Implement SkICC::WriteICC()

BUG=skia:

Change-Id: Idd950c3da2c517780b24e312a4e7cc16ee413c99
Reviewed-on: https://skia-review.googlesource.com/6270
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoRespect color space in GrTextureDomainEffect
Brian Osman [Mon, 19 Dec 2016 22:04:59 +0000 (17:04 -0500)]
Respect color space in GrTextureDomainEffect

Forgot that this was plumbed in, but not being used. From local testing,
fixes color correctness in a variety of real world content.

BUG=skia:

Change-Id: Iad4cdf38da03719d1af144a9094c16d545139114
Reviewed-on: https://skia-review.googlesource.com/6296
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoswitch to _deprecated suffix for exotic SkClipOps
Mike Reed [Tue, 20 Dec 2016 13:17:36 +0000 (08:17 -0500)]
switch to _deprecated suffix for exotic SkClipOps

BUG=skia:

Change-Id: Ibb0cd0f963c040d9033cd6bcb040c651bca99651
Reviewed-on: https://skia-review.googlesource.com/6206
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
7 years agoFix, cleanup and document the clamp tiler better.
Herb Derby [Mon, 19 Dec 2016 20:40:28 +0000 (15:40 -0500)]
Fix, cleanup and document the clamp tiler better.

* Fix by making the bounds where the bounds of the edge effect starts to be .5 pixels all around the border.
* Sample from the center of the pixel. This was wrong on the left edge.

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

Change-Id: I39af942644fa58f0ee8dc7027481fef85b9488fe
Reviewed-on: https://skia-review.googlesource.com/5127
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
7 years agohandle empty contours in a couple more places
Cary Clark [Mon, 19 Dec 2016 16:16:36 +0000 (11:16 -0500)]
handle empty contours in a couple more places

R=kjlubick@google.com
BUG=skia:6061

Change-Id: I5b465f1495f80a5ac44253cadf4afd7f509fa75b
Reviewed-on: https://skia-review.googlesource.com/6268
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>

7 years agoFix precision errors in large circle rendering.
Jim Van Verth [Mon, 19 Dec 2016 19:45:19 +0000 (14:45 -0500)]
Fix precision errors in large circle rendering.

BUG=skia:6044

Change-Id: I2ff2a80e1e6798ad18d1c8ec97e8b0fcc731e9af
Reviewed-on: https://skia-review.googlesource.com/6281
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>

7 years agoFix swapped interpretation of c and e in SkColorSpace_ICC
Matt Sarett [Mon, 19 Dec 2016 19:33:35 +0000 (14:33 -0500)]
Fix swapped interpretation of c and e in SkColorSpace_ICC

The ICC errata supports the opposite of what we do.
http://www.color.org/icc_specs2.xalter

TBR=reed@google.com

BUG=skia:

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: I18ace7f312926b264e624c30d8cb983eff5c434b
Reviewed-on: https://skia-review.googlesource.com/6277
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoupdate dox for generateScaledPixels
Mike Reed [Mon, 19 Dec 2016 18:39:49 +0000 (13:39 -0500)]
update dox for generateScaledPixels

BUG=skia:

Change-Id: Ia897c9f58ccb856b92308cdec0abde86fb1b2e29
Reviewed-on: https://skia-review.googlesource.com/6278
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
7 years agoGuard some uint32_t -> int cases in SkPictureData reading
Robert Phillips [Mon, 19 Dec 2016 17:58:14 +0000 (12:58 -0500)]
Guard some uint32_t -> int cases in SkPictureData reading

Change-Id: I67e6a67a57bf83922d159083e359df1a8ce053c1
Reviewed-on: https://skia-review.googlesource.com/6275
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoConsolidate TILEX_LOW_BITS/TILEY_LOW_BITS -> EXTRACT_LOW_BITS
Florin Malita [Mon, 19 Dec 2016 15:55:41 +0000 (10:55 -0500)]
Consolidate TILEX_LOW_BITS/TILEY_LOW_BITS -> EXTRACT_LOW_BITS

R=reed@google.com

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: I5450d1ae3239c9d4e70502fc042222410ac77e72
Reviewed-on: https://skia-review.googlesource.com/6265
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>

7 years ago"Fix" some ImageFilter fuzzer issues
Robert Phillips [Mon, 19 Dec 2016 16:37:37 +0000 (11:37 -0500)]
"Fix" some ImageFilter fuzzer issues

SkClipOp.h & SkPictureFlat.h
   Invalid SkClipOps were getting through - the question here is where (for a class enum) is a good place to put the k*Mask definition.

SkPath1DPathEffect
   NaNs were getting past.

SkBlurMaskFilter
   Assert wasn't necessary since we whacked the flag on the next line.

Change-Id: I87f95ad39f4760284f881d7c4500eb82fcdba282
Reviewed-on: https://skia-review.googlesource.com/6194
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Herb Derby <herb@google.com>
7 years agoExplicit ownership of data in SkBlockMemoryStream.
Ben Wagner [Fri, 16 Dec 2016 20:34:58 +0000 (15:34 -0500)]
Explicit ownership of data in SkBlockMemoryStream.

SkBlockMemoryStream does not currently document the ownership of its
data pointers. Make the ownership explicit.

Change-Id: Id3f59d09c298550a987a4e74031e2d920e83ba82
Reviewed-on: https://skia-review.googlesource.com/6222
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>

7 years agoAllow running gn_to_bp.py from another script
Leon Scroggins III [Mon, 19 Dec 2016 14:32:21 +0000 (09:32 -0500)]
Allow running gn_to_bp.py from another script

Use __file__ to determine where 'here' is.

Necessary for
https://chrome-internal-review.googlesource.com/313075.

Change-Id: I1b9571847c761da311012039e2c885fad0a593cb
Reviewed-on: https://skia-review.googlesource.com/6230
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>

7 years agoGIF: Avoid copying/storing data when possible
Leon Scroggins III [Fri, 16 Dec 2016 16:39:51 +0000 (11:39 -0500)]
GIF: Avoid copying/storing data when possible

If the input SkStream has a length and position, do not copy and store
LZW blocks or ColorMaps. Instead, mark the position and size, and read
from the stream when necessary.

This will save memory in Chromium's use case, which has already
buffered all of its data.

In the case where we *do* need to copy, store it on the SkStreamBuffer.
This allows SkGifImageReader to have simpler code.

Add tests.

Change-Id: Ic65fa766328ae2e5974b2084bc2099e19aced731
Reviewed-on: https://skia-review.googlesource.com/6157
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>

7 years agoMove existing writeICC() code into SkICC
Matt Sarett [Mon, 19 Dec 2016 14:43:30 +0000 (09:43 -0500)]
Move existing writeICC() code into SkICC

BUG=skia:

Change-Id: Ifb7db7adcc69104fa9abe1765fd60b7f627bdbaf
Reviewed-on: https://skia-review.googlesource.com/6261
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoTemorarily remove Vulkan NexusPlayer bots till we can fix them
Greg Daniel [Mon, 19 Dec 2016 14:28:50 +0000 (09:28 -0500)]
Temorarily remove Vulkan NexusPlayer bots till we can fix them

BUG=skia:

Change-Id: Iba79f4ade1ed653098eb81f30b02d02aa542028d
Reviewed-on: https://skia-review.googlesource.com/6240
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
7 years agoRoll Recipe DEPS
Eric Boren [Mon, 19 Dec 2016 13:21:26 +0000 (08:21 -0500)]
Roll Recipe DEPS

BUG=skia:

Change-Id: Ifcfbd2b6d5ae636b6c11e9bfae29cc03e569c18d
Reviewed-on: https://skia-review.googlesource.com/6237
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>

7 years agoUpdate SKP version
UpdateSKPs [Sun, 18 Dec 2016 06:57:19 +0000 (06:57 +0000)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=update-skps@skia.org
NO_MERGE_BUILDS

Change-Id: Ieba42cd46dd6c85836bb439cc3100ef000b644f1
Reviewed-on: https://skia-review.googlesource.com/6204
Reviewed-by: update-skps <update-skps@skia.org>
Commit-Queue: Ravi Mistry <rmistry@google.com>

7 years agosimplify generatescaledpixels
Mike Reed [Sat, 17 Dec 2016 12:27:05 +0000 (07:27 -0500)]
simplify generatescaledpixels

BUG=skia:

Change-Id: Ia1f975d8ca088a552258fd70d3333683a88bbb5f
Reviewed-on: https://skia-review.googlesource.com/6234
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoRevert of Generate Signed Distance Field directly from vector path (patchset #23...
rmistry [Mon, 19 Dec 2016 12:32:28 +0000 (04:32 -0800)]
Revert of Generate Signed Distance Field directly from vector path (patchset #23 id:440001 of https://codereview.chromium.org/1643143002/ )

Reason for revert:
Seems to have caused lot of test bots to fail.
Eg:
https://luci-milo.appspot.com/swarming/task/332e3b427135f010

Original issue's description:
> Generate Signed Distance Field directly from vector path
>
> Add SkGenerateDistanceFieldFromPath API to generate signed distance field directly from SkPath.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1643143002
>
> Committed: https://skia.googlesource.com/skia/+/4de97a64e8829323a7070b623411d9f9ddb0cd0f
> Committed: https://skia.googlesource.com/skia/+/e8f0a7b986f1e5583c9bc162efcdd92fd6430549
> Committed: https://skia.googlesource.com/skia/+/67c7c81a82b6351e9fbbf235084d7120162d9268
> Review-Url: https://codereview.chromium.org/1643143002
> Committed: https://skia.googlesource.com/skia/+/64b70b096ac20833d9737758a4bd5f2a51078bc4

TBR=bsalomon@google.com,jvanverth@google.com,mtklein@google.com,wasim.abbas@arm.com,caryclark@google.com,reed@google.com,egdaniel@google.com,joel.liang@arm.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2580373002

7 years agoGenerate Signed Distance Field directly from vector path
joel.liang [Mon, 19 Dec 2016 04:24:12 +0000 (20:24 -0800)]
Generate Signed Distance Field directly from vector path

Add SkGenerateDistanceFieldFromPath API to generate signed distance field directly from SkPath.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1643143002

Committed: https://skia.googlesource.com/skia/+/4de97a64e8829323a7070b623411d9f9ddb0cd0f
Committed: https://skia.googlesource.com/skia/+/e8f0a7b986f1e5583c9bc162efcdd92fd6430549
Committed: https://skia.googlesource.com/skia/+/67c7c81a82b6351e9fbbf235084d7120162d9268
Review-Url: https://codereview.chromium.org/1643143002

7 years agoFix clamp lowbits extraction when combined with non-clamp
Florin Malita [Fri, 16 Dec 2016 22:20:54 +0000 (17:20 -0500)]
Fix clamp lowbits extraction when combined with non-clamp

R=reed@google.com

Change-Id: I1dc17c827077e968d4dbcd0f9ea8da8e1732b253
Reviewed-on: https://skia-review.googlesource.com/6231
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoFix iOS build
Matt Sarett [Sun, 18 Dec 2016 18:49:43 +0000 (13:49 -0500)]
Fix iOS build

TBR=rmistry@google.com

BUG=skia:

Change-Id: I5fc38227138d5433b2435d9dab13ec5ade9a26b8
Reviewed-on: https://skia-review.googlesource.com/6235
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoRevert "Revert "WIP: Skia support library for ICC tasks""
Ravi Mistry [Sat, 17 Dec 2016 01:31:03 +0000 (01:31 +0000)]
Revert "Revert "WIP: Skia support library for ICC tasks""

This reverts commit eb733fbf56538838a36814c75cd03f917462cb22.

Reason for revert: Revert patch was automatically merged incorrectly?

Original change's description:
> Revert "WIP: Skia support library for ICC tasks"
>
> This reverts commit fc8dc3194acb959ee5980b41766660ca0644bcab.
>
> Reason for revert: Breaks Build-Mac-Clang-Arm7-{Debug,Release}-iOS builds.
> Example tasks:
> * https://chromium-swarm.appspot.com/task?id=3322f668620b9e10&refresh=10
> * https://chromium-swarm.appspot.com/task?id=332296146331e810&refresh=10
>
> Original change's description:
> > WIP: Skia support library for ICC tasks
> >
> > As a starting point, this would be mostly trivial to implement using
> > SkColorSpace.
> >
> > This also would give us the flexibility to begin to move all of
> > the ICC related code from SkColorSpace to SkICC.
> >
> > What are the advantages of moving this away from SkColorSpace?
> > (1) A long term goal (once Chrome uses SkCodec), might be to
> > move SkColorSpace::MakeICC() out of the public API.  That way,
> > we can guarantee that we can draw to/from *any* SkColorSpace.
> > (2) Keeps SkColorSpace separate from ICC-specific representations
> > like SkColorSpaceTransferFn etc.
> >
> > BUG=skia:
> >
> > Change-Id: Iddeb9903221fb57fbfc01218d8641c928b4a5165
> > Reviewed-on: https://skia-review.googlesource.com/5676
> > Commit-Queue: Matt Sarett <msarett@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Reviewed-by: Mike Reed <reed@google.com>
> >
>
> TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org
> BUG=skia:
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Change-Id: Ibdf272fce25892402bd3e85595fb8814cdf59856
> Reviewed-on: https://skia-review.googlesource.com/6232
> Commit-Queue: Ravi Mistry <rmistry@google.com>
> Reviewed-by: Ravi Mistry <rmistry@google.com>
>

TBR=mtklein@google.com,rmistry@google.com,msarett@google.com,reviews@skia.org,brianosman@google.com,reed@google.com
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I68b1624cfab8adfe31b17e1193a7766507dec8b0
Reviewed-on: https://skia-review.googlesource.com/6233
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
7 years agoRevert "WIP: Skia support library for ICC tasks"
Ravi Mistry [Sat, 17 Dec 2016 01:26:51 +0000 (01:26 +0000)]
Revert "WIP: Skia support library for ICC tasks"

This reverts commit fc8dc3194acb959ee5980b41766660ca0644bcab.

Reason for revert: Breaks Build-Mac-Clang-Arm7-{Debug,Release}-iOS builds.
Example tasks:
* https://chromium-swarm.appspot.com/task?id=3322f668620b9e10&refresh=10
* https://chromium-swarm.appspot.com/task?id=332296146331e810&refresh=10

Original change's description:
> WIP: Skia support library for ICC tasks
>
> As a starting point, this would be mostly trivial to implement using
> SkColorSpace.
>
> This also would give us the flexibility to begin to move all of
> the ICC related code from SkColorSpace to SkICC.
>
> What are the advantages of moving this away from SkColorSpace?
> (1) A long term goal (once Chrome uses SkCodec), might be to
> move SkColorSpace::MakeICC() out of the public API.  That way,
> we can guarantee that we can draw to/from *any* SkColorSpace.
> (2) Keeps SkColorSpace separate from ICC-specific representations
> like SkColorSpaceTransferFn etc.
>
> BUG=skia:
>
> Change-Id: Iddeb9903221fb57fbfc01218d8641c928b4a5165
> Reviewed-on: https://skia-review.googlesource.com/5676
> Commit-Queue: Matt Sarett <msarett@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
>

TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ibdf272fce25892402bd3e85595fb8814cdf59856
Reviewed-on: https://skia-review.googlesource.com/6232
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
7 years agoRename GrBatchAtlas -> GrDrawOpAtlas.
Brian Salomon [Fri, 16 Dec 2016 23:59:19 +0000 (18:59 -0500)]
Rename GrBatchAtlas -> GrDrawOpAtlas.

Change-Id: I776f37e42dcab8b16535c48df9c405b1f211f6c9
Reviewed-on: https://skia-review.googlesource.com/6165
Commit-Queue: Brian Salomon <brian@thesalomons.net>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoRename GrBatchAtlas files to GrDrawOpAtlas
Brian Salomon [Fri, 16 Dec 2016 19:24:46 +0000 (14:24 -0500)]
Rename GrBatchAtlas files to GrDrawOpAtlas

This intermediary change only exists to make the actual class rename change readable on gerrit due to gerrit not recognizing file renames correctly.

Change-Id: I919f84837fb17191ca49f00f82e56330f84766da
Reviewed-on: https://skia-review.googlesource.com/6190
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoAdded gamma visualizations to colorspaceinfo tool
raftias [Fri, 16 Dec 2016 22:24:30 +0000 (17:24 -0500)]
Added gamma visualizations to colorspaceinfo tool

Visualizations for gamma curves were added.
Tool now outputs at the end following 9 ='s a list of all output images.

BUG=skia:

Change-Id: Id934c4c8cceec68291527554c2c951be08593ef5
Reviewed-on: https://skia-review.googlesource.com/6085
Commit-Queue: Robert Aftias <raftias@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agorework xor to be more like winding
Cary Clark [Fri, 16 Dec 2016 22:17:25 +0000 (17:17 -0500)]
rework xor to be more like winding

Pathops is very well exercised with winding paths,
but less so with xor (even odd) paths.

Rewrite the xor main loop to look like the winding
one to take advantage of the latter's bug fixes.

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

Change-Id: Ied8d522254a327b1817b54f0abbf4414f5fab7da
Reviewed-on: https://skia-review.googlesource.com/6228
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>