platform/upstream/libSkiaSharp.git
7 years agoclipstacks can be on the stack or embedded, therefore should not be ref-counted
Mike Reed [Fri, 10 Mar 2017 05:21:52 +0000 (00:21 -0500)]
clipstacks can be on the stack or embedded, therefore should not be ref-counted

BUG=skia:

Change-Id: I7e16034d463a1db1baac404f775cf33076cbbf73
Reviewed-on: https://skia-review.googlesource.com/9509
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoClients can provide preallocated storage to clipstack
Mike Reed [Fri, 10 Mar 2017 04:56:25 +0000 (23:56 -0500)]
Clients can provide preallocated storage to clipstack

This allows devices (gpu, pdf) which are themselves always dynamically allocated
(since they are reference counted) to provide storage to clipstack, allowing it
to avoid calls to malloc.

Previously this was attempted by embedding the storage directly in clipstack,
but that increased the size of clipstack in all instances, even those where
it might be on the stack. This can be problematic for small-stack environments
like servers.

See previous (reverted) CL: https://skia-review.googlesource.com/c/9522/

BUG=skia:

Change-Id: Ifc7f5ef411303f33513195b1502ea9f281e995c5
Reviewed-on: https://skia-review.googlesource.com/9508
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoFuzzCanvas: SkVertices
Hal Canary [Thu, 9 Mar 2017 19:10:36 +0000 (14:10 -0500)]
FuzzCanvas: SkVertices

Change-Id: Ib068ffa634759bca5e214082d43a8471c8839f82
Reviewed-on: https://skia-review.googlesource.com/9493
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years ago[recipes.cfg] manually roll recipes to get skia recipe roller unstuck.
Robert Iannucci [Thu, 9 Mar 2017 22:43:50 +0000 (14:43 -0800)]
[recipes.cfg] manually roll recipes to get skia recipe roller unstuck.

This rolls the engine past the bad revision which was the cause of the
mentioned bug (22e413ad35481ecd49d232620e7794ce6f544958).

No expectation changes.

BUG=chromium:699379
R=borenet@google.com

Change-Id: I3b44ae54ddec3b2053af59117074b5c1332d0cdf
Reviewed-on: https://skia-review.googlesource.com/9503
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>

7 years agoRevert "prealloc room for some number of Elements to avoid malloc"
Mike Reed [Fri, 10 Mar 2017 02:51:59 +0000 (02:51 +0000)]
Revert "prealloc room for some number of Elements to avoid malloc"

This reverts commit 94cbbba96f1a2a425663e631c09591023f2e48d7.

Reason for revert: exceeded stack-size on g3 (in SkPDFDevice.cpp:1552

Original change's description:
> prealloc room for some number of Elements to avoid malloc
>
> I chose 16, as in my test case from android, the depth was
> at least 9. Possibly we could make it even smaller if our
> underlying impl (SkDeque) would never prune its allocations,
> so that we don't malloc repeatedly if we save/restore/save/restore
> across the boundary of the first/nth chunk...
>
> BUG=skia:
>
> Change-Id: Id3f0b900b1931f713f80a664f2b4b142f264be8d
> Reviewed-on: https://skia-review.googlesource.com/9522
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>

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

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

7 years agoprealloc room for some number of Elements to avoid malloc
Mike Reed [Thu, 9 Mar 2017 21:39:41 +0000 (16:39 -0500)]
prealloc room for some number of Elements to avoid malloc

I chose 16, as in my test case from android, the depth was
at least 9. Possibly we could make it even smaller if our
underlying impl (SkDeque) would never prune its allocations,
so that we don't malloc repeatedly if we save/restore/save/restore
across the boundary of the first/nth chunk...

BUG=skia:

Change-Id: Id3f0b900b1931f713f80a664f2b4b142f264be8d
Reviewed-on: https://skia-review.googlesource.com/9522
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoRevert "Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs"
Florin Malita [Thu, 9 Mar 2017 22:42:58 +0000 (22:42 +0000)]
Revert "Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs"

This reverts commit db3ceb86421fb9da86bb920e3a1f0957beec08d9.

Reason for revert: observing some strange budget behavior w/ instrumented Chromium builds;  need to investigate.

Original change's description:
> Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs
>
> Refactor to store sk_sps, and minimize explicit ref manipulation.
>
> Change-Id: Ie3d18e5fe1cefbbc5c2f3c4941287a24038522a6
> Reviewed-on: https://skia-review.googlesource.com/9490
> Commit-Queue: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>

TBR=bsalomon@google.com,robertphillips@google.com,fmalita@chromium.org,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I8ca9862ad1519a9ec69ad1ce8e4d129b0dae7b0a
Reviewed-on: https://skia-review.googlesource.com/9524
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>

7 years agoFuzzCanvas: ImageFilter
Hal Canary [Thu, 9 Mar 2017 16:33:35 +0000 (11:33 -0500)]
FuzzCanvas: ImageFilter

Change-Id: I9446bd81fda82e398f08ed162dcd55253b597096
Reviewed-on: https://skia-review.googlesource.com/9491
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agotake fast case in swap() if we're using malloc OR we're empty
Mike Reed [Thu, 9 Mar 2017 21:36:26 +0000 (16:36 -0500)]
take fast case in swap() if we're using malloc OR we're empty

This avoids taking the (more expensive) copy case when we don't need to.
The old behavior only took this fast case if we were "actively" using
a dynamically allocated array.

BUG=skia:

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

7 years agoMark function used as template parameter extern.
Ben Wagner [Thu, 9 Mar 2017 20:12:09 +0000 (15:12 -0500)]
Mark function used as template parameter extern.

VC++19.10.2517 does not support the C++11 change to allow the address of
internal linkage objects to be used as non-type template arguments.

BUG=skia:6351

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

7 years agoHold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs
Florin Malita [Thu, 9 Mar 2017 19:21:44 +0000 (14:21 -0500)]
Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs

Refactor to store sk_sps, and minimize explicit ref manipulation.

Change-Id: Ie3d18e5fe1cefbbc5c2f3c4941287a24038522a6
Reviewed-on: https://skia-review.googlesource.com/9490
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoRemove more unused ownership arguments
Brian Osman [Thu, 9 Mar 2017 19:19:20 +0000 (14:19 -0500)]
Remove more unused ownership arguments

Technically, we only ever pass kAdopt along one specific code path, but
the remaining functions that have it are at least all similar. This was
another outlier that seems unlikely to ever benefit.

BUG=skia:

Change-Id: If9a1275a2a0b83417225660f5e18c2133681830a
Reviewed-on: https://skia-review.googlesource.com/9494
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoAdd IntelBayTrail jobs
Kevin Lubick [Thu, 9 Mar 2017 15:24:18 +0000 (10:24 -0500)]
Add IntelBayTrail jobs

BUG=skia:6344
NOTRY=true

Change-Id: I8cb951faf49e1cf0be9945c1efcbf6ae52326e60
Reviewed-on: https://skia-review.googlesource.com/9483
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>

7 years agoAdd a separate draw function to GrRenderTargetContext for GrMeshDrawOp derived classes.
Brian Salomon [Thu, 9 Mar 2017 18:50:43 +0000 (13:50 -0500)]
Add a separate draw function to GrRenderTargetContext for GrMeshDrawOp derived classes.

The first phase of deferring GrPipeline creation until flush will apply only to GrDrawOp subclasses that do not derive from GrMeshDrawOp. This change prepares for that by creating separate draw functions on GrRenderTargetContext for GrMeshDrawOp-derived ops. This is temporary and will incrementally be undone as pipeline-creation deferral rolls out to the GrMeshDrawOps in a later phase of this work.

Change-Id: I0f5b71fe913f3273cfe9e965f7d8bbe7f01ad0ef
Reviewed-on: https://skia-review.googlesource.com/9481
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoRemove unused ownership argument to GrSurfaceProxy::MakeWrappedBackend
Brian Osman [Thu, 9 Mar 2017 18:39:02 +0000 (13:39 -0500)]
Remove unused ownership argument to GrSurfaceProxy::MakeWrappedBackend

This is the last public reference to GrWrapOwnership, so removal paves
the way for moving it to somewhere internal.

BUG=skia:

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

7 years agoFix SkTArray copy construction
Florin Malita [Thu, 9 Mar 2017 18:34:09 +0000 (13:34 -0500)]
Fix SkTArray copy construction

We can't use memcpy for copy construction, even when MEM_COPY == true.

Change-Id: I50eb369f0fbf77e8f0ad5a148c67d46df0d3ab0e
Reviewed-on: https://skia-review.googlesource.com/9487
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
7 years agoSkSTArray move ctor
Florin Malita [Thu, 9 Mar 2017 17:17:15 +0000 (12:17 -0500)]
SkSTArray move ctor

Change-Id: Ice90a229e1ca5959b365c678e8df332cd6ed4a03
Reviewed-on: https://skia-review.googlesource.com/9489
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>

7 years agoAdd tolerance to quadratic and linear cubic detection
csmartdalton [Wed, 8 Mar 2017 23:10:45 +0000 (16:10 -0700)]
Add tolerance to quadratic and linear cubic detection

Otherwise these can be misclassified as cusps since there is already
tolerance in the discriminant test.

BUG=skia:

Change-Id: Id02c12f671714cebf799953ebed5335ee4c4d52a
Reviewed-on: https://skia-review.googlesource.com/9355
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>

7 years agoAdd GrSemaphoreOp to support deferred semaphore use
Greg Daniel [Thu, 9 Mar 2017 15:41:31 +0000 (10:41 -0500)]
Add GrSemaphoreOp to support deferred semaphore use

This is a precursor to adding support for external drawable ops.

BUG=skia:

Change-Id: I3e8b06b4cbe2b5728b7911c22ee74a93d0813f98
Reviewed-on: https://skia-review.googlesource.com/9452
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>

7 years agoDisable image tests on NexusPlayer Vulkan
Greg Daniel [Thu, 9 Mar 2017 15:30:31 +0000 (10:30 -0500)]
Disable image tests on NexusPlayer Vulkan

BUG=skia:6223

Change-Id: I39b4107e7e267ef6f465b1dae13c9dfe3c6990f6
Reviewed-on: https://skia-review.googlesource.com/9484
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>

7 years agoFuzzCanvas: TextBlob RSXform SkMaskFilter SkPathEffect
Hal Canary [Wed, 8 Mar 2017 21:52:18 +0000 (16:52 -0500)]
FuzzCanvas: TextBlob RSXform SkMaskFilter SkPathEffect

Change-Id: I41221c74e9f0b23d4fa70dca419f1451967df9fb
Reviewed-on: https://skia-review.googlesource.com/9413
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agomake GrPaint.h private -- IWYU
Mike Reed [Thu, 9 Mar 2017 03:21:00 +0000 (22:21 -0500)]
make GrPaint.h private -- IWYU

prerequisit: https://codereview.chromium.org/2743533002/

BUG=skia:

Change-Id: I8c2f34a6df165744ddeaeabb562cd6d6a9679b6a
Reviewed-on: https://skia-review.googlesource.com/9461
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agomove intermediate patheffect classes inside src
Mike Reed [Thu, 9 Mar 2017 12:51:09 +0000 (07:51 -0500)]
move intermediate patheffect classes inside src

BUG=skia:

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

7 years agoMake GrClip.h private
Brian Salomon [Thu, 9 Mar 2017 14:03:58 +0000 (09:03 -0500)]
Make GrClip.h private

BUG=skia:

Change-Id: I4aa3c2707811ece3a63d161035e316c3bbc1cd15
Reviewed-on: https://skia-review.googlesource.com/9482
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agolimit addEndMoveSpans loop in pathops
Cary Clark [Wed, 8 Mar 2017 22:11:12 +0000 (17:11 -0500)]
limit addEndMoveSpans loop in pathops

Prevent addEndMoveSpans from looping
forever and abort with an error
if the loop count is crazy big.

R=kjlubick@google.com
BUG=684553

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

7 years agoOptimize mipmap downsample_2_2 in sRGB mode
Matt Sarett [Wed, 8 Mar 2017 21:30:18 +0000 (16:30 -0500)]
Optimize mipmap downsample_2_2 in sRGB mode

Reland of:
https://skia-review.googlesource.com/c/9386/

Desktop (HP z620)
Before:
mipmap_build_2048x2048_0_gamma 10.5 ms
mipmap_build_2048x2048_1_gamma 77.1 ms
After:
mipmap_build_2048x2048_0_gamma 10.5 ms
mipmap_build_2048x2048_1_gamma 41.0 ms

Pixel XL
Before:
mipmap_build_2048x2048_0_gamma 160 ms
mipmap_build_2048x2048_1_gamma 1.5 s
After:
mipmap_build_2048x2048_0_gamma 160 ms
mipmap_build_2048x2048_1_gamma 570 ms

Also provides marginal performance improvements
for other sRGB downsamples.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind_PreAbandonGpuContext

BUG=skia:

Change-Id: Ia82fc2ef795e1bb63a4a9deac5e38f5fde39f651
Reviewed-on: https://skia-review.googlesource.com/9455
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoAdded MSAA selection to viewer GUI
Brian Osman [Wed, 8 Mar 2017 22:10:24 +0000 (17:10 -0500)]
Added MSAA selection to viewer GUI

On Windows, we need to reconstruct the window to allow setting a new
pixel format with a different sample count.

Added some code that maintains window size/position across these changes.
Previously, just cycling through backends would cause the window to move,
as the "default" position would cycle across the screen. Now it's pinned.

BUG=skia:

Change-Id: Iecbe7a490577382043ffe5a88c910b4c0be2ed5c
Reviewed-on: https://skia-review.googlesource.com/9085
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoSwitch GrYUVProvider over to GrTextureProxies
Robert Phillips [Wed, 8 Mar 2017 19:32:55 +0000 (14:32 -0500)]
Switch GrYUVProvider over to GrTextureProxies

This is split out of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors)

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

7 years agoAdd SkImage_Base::onMakeColorSpace() stub
Matt Sarett [Wed, 8 Mar 2017 20:26:29 +0000 (15:26 -0500)]
Add SkImage_Base::onMakeColorSpace() stub

BUG=skia:

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

7 years agoRevert "remove SkClipVisitor"
Mike Reed [Wed, 8 Mar 2017 21:42:37 +0000 (21:42 +0000)]
Revert "remove SkClipVisitor"

This reverts commit 91b961d33d1d3e78c212be8738c1c7c468c358ca.

Reason for revert: need to update caller in android

Original change's description:
> remove SkClipVisitor
>
> With new device clipping, this is unsupported on SkCanvas
>
> BUG=skia:
>
> Change-Id: I39443f213be1005b8b9208d604e4bfb31cbda424
> Reviewed-on: https://skia-review.googlesource.com/9349
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
>

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

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

7 years agoMaintain window position and size when re-created
Brian Osman [Wed, 8 Mar 2017 20:36:30 +0000 (15:36 -0500)]
Maintain window position and size when re-created

Eliminates a UI oddity on Windows when cycling through backends.

BUG=skia:

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

7 years agoMake SkGr.h private and remove unused functions
Brian Osman [Tue, 7 Mar 2017 21:58:08 +0000 (16:58 -0500)]
Make SkGr.h private and remove unused functions

BUG=skia:

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

7 years agoAdd instanced rendering command line flag to viewer.
Brian Salomon [Wed, 8 Mar 2017 19:03:56 +0000 (14:03 -0500)]
Add instanced rendering command line flag to viewer.

Previously this could only be turned on at runtime.

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

7 years agoRemove SkChunckAlloc
Herb Derby [Mon, 6 Mar 2017 22:18:47 +0000 (17:18 -0500)]
Remove SkChunckAlloc

Change-Id: Ia400dd2d8aa398cf53852acd71c4a45228752496
Reviewed-on: https://skia-review.googlesource.com/9328
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agoUse Fibonacci instead of 2^n for block growth.
Herb Derby [Wed, 8 Mar 2017 19:17:49 +0000 (14:17 -0500)]
Use Fibonacci instead of 2^n for block growth.

Chrome on android showed an increase of 5% memory use when 2^n block
growth was introduced. Use Fibonacci instead.

BUG=chromium:699130

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

7 years agoremove SkClipVisitor
Mike Reed [Wed, 8 Mar 2017 19:15:50 +0000 (14:15 -0500)]
remove SkClipVisitor

With new device clipping, this is unsupported on SkCanvas

BUG=skia:

Change-Id: I39443f213be1005b8b9208d604e4bfb31cbda424
Reviewed-on: https://skia-review.googlesource.com/9349
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoRevert "Optimize mipmap downsample_2_2 in sRGB mode"
Derek Sollenberger [Wed, 8 Mar 2017 19:45:33 +0000 (19:45 +0000)]
Revert "Optimize mipmap downsample_2_2 in sRGB mode"

This reverts commit 3ea01f72f20d4f58bf0dcd420fa5c2724b67ac8d.

Reason for revert: triggering errors on the MSAN bots

Original change's description:
> Optimize mipmap downsample_2_2 in sRGB mode
>
> Desktop (HP z620)
> Before:
> mipmap_build_2048x2048_0_gamma 10.5 ms
> mipmap_build_2048x2048_1_gamma 77.1 ms
> After:
> mipmap_build_2048x2048_0_gamma 10.5 ms
> mipmap_build_2048x2048_1_gamma 25.1 ms
>
> Pixel XL
> Before:
> mipmap_build_2048x2048_0_gamma 160 ms
> mipmap_build_2048x2048_1_gamma 1.5 s
> After:
> mipmap_build_2048x2048_0_gamma 160 ms
> mipmap_build_2048x2048_1_gamma 313 ms
>
> Also provides marginal performance improvements
> for other sRGB downsamples.
>
> BUG=skia:
>
> Change-Id: Icfcd2ccd69676ccf3822db8042a4698e4464bb71
> Reviewed-on: https://skia-review.googlesource.com/9386
> Commit-Queue: Matt Sarett <msarett@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
>

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

Change-Id: I06907fb1691077a03daadc0980e86393bc08d9c5
Reviewed-on: https://skia-review.googlesource.com/9450
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>

7 years agoremove SkPictureUtils.h
Mike Reed [Wed, 8 Mar 2017 15:39:02 +0000 (10:39 -0500)]
remove SkPictureUtils.h

BUG=skia:

Change-Id: Iab6e71f347fa34baf442e38ba7773058695f3e6d
Reviewed-on: https://skia-review.googlesource.com/9348
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
7 years agoAdd jobs for building for Chromecast
Kevin Lubick [Wed, 8 Mar 2017 19:01:01 +0000 (14:01 -0500)]
Add jobs for building for Chromecast

BUG=skia:6345

Change-Id: Iaf09eb7f57ae71687c6804221837a8cc8ef04931
Reviewed-on: https://skia-review.googlesource.com/9419
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
7 years agoRevert "Fix SkJumper gcc warning"
Mike Klein [Wed, 8 Mar 2017 19:10:44 +0000 (19:10 +0000)]
Revert "Fix SkJumper gcc warning"

This reverts commit e353e81a6fdf401310e0643280ec34d9de0019a3.

Reason for revert: crashing

Original change's description:
> Fix SkJumper gcc warning
>
> TBR=mtklein@google.com
>
> Change-Id: I1c3201307a1cd74a441d63d505882dc5535e150e
> Reviewed-on: https://skia-review.googlesource.com/9416
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Florin Malita <fmalita@chromium.org>
>

TBR=mtklein@chromium.org,mtklein@google.com,fmalita@chromium.org,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I937e37be90f951fbbd1307dcc334d955addfec1f
Reviewed-on: https://skia-review.googlesource.com/9446
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoclip to elements directly, no need for replay indirection
Mike Reed [Wed, 8 Mar 2017 18:13:44 +0000 (13:13 -0500)]
clip to elements directly, no need for replay indirection

allows us to remove SkCanvas::replayClips in future CL

BUG=skia:

Change-Id: I20c3700c8a331b4988fc1332702ff0e0565e94bc
Reviewed-on: https://skia-review.googlesource.com/9417
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoRevert "Turn on SkJumper all the time."
Mike Klein [Wed, 8 Mar 2017 18:54:25 +0000 (18:54 +0000)]
Revert "Turn on SkJumper all the time."

This reverts commit 135555101cbde68656f028c41506113374a4026f.

Reason for revert: forgot g3, seems to break Chrome NaCl builders?

https://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20Win/builds/15969/steps/compile/logs/stdio

Original change's description:
> Turn on SkJumper all the time.
>
> If the previous CL sticks, it's now easy to turn on SkJumper everywhere:
> I was mostly holding back because of build system complexity.
>
> This has the main effect of turning on SkJumper in Chromium.
> It's already been on on our local test bots and on Android framework.
>
> Change-Id: I7fbfc6aaaa7dace9c3f2cb509583c69b10997dbf
> Reviewed-on: https://skia-review.googlesource.com/9380
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
>

TBR=mtklein@chromium.org,herb@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I69747e9e75b2a8e3d78f6c150c9b6d6453e00632
Reviewed-on: https://skia-review.googlesource.com/9444
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoRefactor GrColorSpaceXformHelper
Brian Osman [Wed, 8 Mar 2017 16:42:02 +0000 (11:42 -0500)]
Refactor GrColorSpaceXformHelper

Nonlinear blending mode is going to (sometimes) require additional
uniforms and shader code for color space transformation.

This change just alters the usage of the helper struct so that we can
hide any new logic (without having to change all the FPs that use it).

BUG=skia:

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

7 years agoFix SkJumper gcc warning
Florin Malita [Wed, 8 Mar 2017 18:07:51 +0000 (13:07 -0500)]
Fix SkJumper gcc warning

TBR=mtklein@google.com

Change-Id: I1c3201307a1cd74a441d63d505882dc5535e150e
Reviewed-on: https://skia-review.googlesource.com/9416
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>

7 years agoAdd a unique ID to GrOpLists and return it from GrRenderTargetContext::addDrawOp
Robert Phillips [Wed, 8 Mar 2017 16:50:55 +0000 (11:50 -0500)]
Add a unique ID to GrOpLists and return it from GrRenderTargetContext::addDrawOp

This is to support the preFlush callbacks

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

7 years agoMake GPU dm sink correctly advertise whether it is multisampled
Brian Salomon [Wed, 8 Mar 2017 16:38:45 +0000 (11:38 -0500)]
Make GPU dm sink correctly advertise whether it is multisampled

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

7 years agoAdd gm to compare premuls in dst vs. src color space
Matt Sarett [Wed, 8 Mar 2017 16:31:06 +0000 (11:31 -0500)]
Add gm to compare premuls in dst vs. src color space

BUG=skia:

Change-Id: I36755f4bbc405a8af12990573e1f554df012b30a
Reviewed-on: https://skia-review.googlesource.com/9402
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agospecial device for not drawing -- performs no clipping
Mike Reed [Wed, 8 Mar 2017 16:29:33 +0000 (11:29 -0500)]
special device for not drawing -- performs no clipping

Running nanobench clip_overhead_recording_lite

Before : 240us
After  : 177us

BUG=skia:6214

Change-Id: I9ae6f9170c151798ffdc6c584a48b08cc7705d6b
Reviewed-on: https://skia-review.googlesource.com/9409
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
7 years agobin/fetch-clang-format
Hal Canary [Wed, 8 Mar 2017 15:54:09 +0000 (10:54 -0500)]
bin/fetch-clang-format

Change-Id: I7deb9b49b4a3a361888a6afc07b4c6341a4b16cf
Reviewed-on: https://skia-review.googlesource.com/9410
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoformatting change: FuzzCanvas.cpp
Hal Canary [Wed, 8 Mar 2017 16:02:40 +0000 (11:02 -0500)]
formatting change: FuzzCanvas.cpp

Change-Id: I55345c193e6a15f650a992053d00bc42ef6a8854
Reviewed-on: https://skia-review.googlesource.com/9412
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoDW last resort font default name not necessary.
Ben Wagner [Wed, 8 Mar 2017 15:36:31 +0000 (10:36 -0500)]
DW last resort font default name not necessary.

Currently in SkFontMgr_DirectWrite when trying to find some last resort
font SystemParametersInfoW failing is considered a fatal error and so
onLegacyCreateTypeface will return nullptr. Instead, treat failure of
getDefaultFontFamily as ignorable and continue to the default default.

BUG=chromium:697672

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

7 years agoSkPDF: Always get advances at unitsPerEm.
Hal Canary [Mon, 6 Mar 2017 21:18:49 +0000 (16:18 -0500)]
SkPDF: Always get advances at unitsPerEm.

  * Work around BUG=chromium:696356
  * SkTestScalerContext needs a return a em-size.
  * SkPDFFont::MakeVectorCache which always produces a glyph
    cache at emsize.  Replaces vector_cache().
  * Stop looking at fLastGlyphID and fEmSize in TypefaceMetrics.

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

7 years agoRemove SK_SUPPORT_LEGACY_AAA flag as chromium now turns it off
Yuqian Li [Mon, 6 Mar 2017 22:04:58 +0000 (17:04 -0500)]
Remove SK_SUPPORT_LEGACY_AAA flag as chromium now turns it off

BUG=skia:

Change-Id: I3b385b8aeab08f402f4471637bf641cd456c8c56
Reviewed-on: https://skia-review.googlesource.com/9327
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>

7 years agoUse glXCreateContextAttribsARB in viewer to make it easier to attach RenderDoc.
Brian Salomon [Wed, 8 Mar 2017 15:50:21 +0000 (10:50 -0500)]
Use glXCreateContextAttribsARB in viewer to make it easier to attach RenderDoc.

Change-Id: I0cc82fe826b81a082b579f60af3d9ef35d5fe351
Reviewed-on: https://skia-review.googlesource.com/9407
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoRename not-fBlendCorrectly to fNonLinearBlending
Matt Sarett [Wed, 8 Mar 2017 15:22:41 +0000 (10:22 -0500)]
Rename not-fBlendCorrectly to fNonLinearBlending

No policy or behavior changes here, just a rename.

BUG=skia:

Change-Id: Ieefa5c5bbd40f25d4fef81f07b50b4057ea732b4
Reviewed-on: https://skia-review.googlesource.com/9406
Commit-Queue: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoOptimize mipmap downsample_2_2 in sRGB mode
Matt Sarett [Wed, 8 Mar 2017 14:53:41 +0000 (09:53 -0500)]
Optimize mipmap downsample_2_2 in sRGB mode

Desktop (HP z620)
Before:
mipmap_build_2048x2048_0_gamma 10.5 ms
mipmap_build_2048x2048_1_gamma 77.1 ms
After:
mipmap_build_2048x2048_0_gamma 10.5 ms
mipmap_build_2048x2048_1_gamma 25.1 ms

Pixel XL
Before:
mipmap_build_2048x2048_0_gamma 160 ms
mipmap_build_2048x2048_1_gamma 1.5 s
After:
mipmap_build_2048x2048_0_gamma 160 ms
mipmap_build_2048x2048_1_gamma 313 ms

Also provides marginal performance improvements
for other sRGB downsamples.

BUG=skia:

Change-Id: Icfcd2ccd69676ccf3822db8042a4698e4464bb71
Reviewed-on: https://skia-review.googlesource.com/9386
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoTurn on SkJumper all the time.
Mike Klein [Tue, 7 Mar 2017 15:04:05 +0000 (10:04 -0500)]
Turn on SkJumper all the time.

If the previous CL sticks, it's now easy to turn on SkJumper everywhere:
I was mostly holding back because of build system complexity.

This has the main effect of turning on SkJumper in Chromium.
It's already been on on our local test bots and on Android framework.

Change-Id: I7fbfc6aaaa7dace9c3f2cb509583c69b10997dbf
Reviewed-on: https://skia-review.googlesource.com/9380
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoRefactor GrTextBlobCache
Florin Malita [Tue, 7 Mar 2017 21:51:57 +0000 (16:51 -0500)]
Refactor GrTextBlobCache

Instead of a single-level cache with blob-id-derived key, refactor GrTextBlobCache
as a two-level cache with a direct blob-id key (to support efficient lookup by id in
future CLs).

Change-Id: Idf29c05224faeb04919610a3935572773d5aba03
Reviewed-on: https://skia-review.googlesource.com/9400
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>

7 years agoAdd GalaxyS6 bot.
Ben Wagner [Tue, 7 Mar 2017 21:41:43 +0000 (16:41 -0500)]
Add GalaxyS6 bot.

BUG=skia:6337
NOTRY=true

Change-Id: Ibddd57c461d3a1ce62245487dfc0e4eeeba1978a
Reviewed-on: https://skia-review.googlesource.com/9397
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
7 years agoFuzzCanvas: SkColorFilter
Hal Canary [Tue, 7 Mar 2017 21:23:20 +0000 (16:23 -0500)]
FuzzCanvas: SkColorFilter

  * Also fix SkRRect generation to only make valid RRs.a
  * drawDRRect only draws if outer contains inner.
  * Also fix SkComposeColorFilter::toString

Change-Id: Ia75da2813555b7714663929d0ec288ae2a86d9f1
Reviewed-on: https://skia-review.googlesource.com/9399
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
7 years agoFuzz Canvas: Remember that nextRange is inclusive.
Hal Canary [Tue, 7 Mar 2017 20:06:29 +0000 (15:06 -0500)]
Fuzz Canvas: Remember that nextRange is inclusive.

BUG=skia:6336
Change-Id: I5ca005f8bf821d5a6f153c3df80d4c7309519cba
Reviewed-on: https://skia-review.googlesource.com/9395
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoAdd viewer GUI options for desktop and Android to toggle instanced rendering.
Brian Salomon [Tue, 7 Mar 2017 20:16:34 +0000 (15:16 -0500)]
Add viewer GUI options for desktop and Android to toggle instanced rendering.

BUG=skia:

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

7 years agooptimize intersect, use getType to utilize fast-case in preTranslate
Mike Reed [Tue, 7 Mar 2017 19:55:37 +0000 (14:55 -0500)]
optimize intersect, use getType to utilize fast-case in preTranslate

10-15% speed up in clip_record_overhead bench

Comparing the raw fType field was missing the (maybe deprecatable) IsRectToRect
bit (0x10), which is set for identity and translate matrices, so we were
never taking the fast case.

BUG=skia:

Change-Id: I1c73f4bae42f2311454c7568ef8891239c3cae83
Reviewed-on: https://skia-review.googlesource.com/9388
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Herb Derby <herb@google.com>
7 years agoSkJumper: constant() embeds constants directly in code
Mike Klein [Tue, 7 Mar 2017 19:41:06 +0000 (14:41 -0500)]
SkJumper: constant() embeds constants directly in code

This is a potential alternative to threading around a constants struct.
I've applied it in a smattering of locations to get a feel for it.
If we like it and the performance is fine, I'll follow up with the rest.

Change-Id: Ief469e17d6da2cb94e4545ae96cf5d2604ffba88
Reviewed-on: https://skia-review.googlesource.com/9393
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoControl making of GrSemaphore objects inside of GrResourceProvider
Greg Daniel [Tue, 7 Mar 2017 18:37:21 +0000 (13:37 -0500)]
Control making of GrSemaphore objects inside of GrResourceProvider

This change will help us get to the point of not needing access to the GrGpu
object from GrContext.

BUG=skia:

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

7 years agoGrTessellator: convert contours to VertexLists.
Stephen White [Tue, 7 Mar 2017 19:07:18 +0000 (14:07 -0500)]
GrTessellator: convert contours to VertexLists.

This is a cleanup patch; should have no user-visible effects.

Note that contours are now returned opened, rather than closed. This
plays better with VertexList, and makes the code simpler.

BUG=skia:

Change-Id: I6a422fed0805cdca53cf0697b8427fff7cd77ad3
Reviewed-on: https://skia-review.googlesource.com/9343
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>

7 years agoGroundwork for nonlinear blending mode in Ganesh
Brian Osman [Tue, 7 Mar 2017 18:22:22 +0000 (13:22 -0500)]
Groundwork for nonlinear blending mode in Ganesh

Changing a bit of plumbing so we have what we need for one-off color
conversion, and fixing the logic in some of our surface validation.

Plenty more to come, want to submit this stuff in manageable chunks.

BUG=skia:6242

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

7 years agoAdd GrOp::wasRecorded and use in instanced rendering for tracking.
Brian Salomon [Mon, 6 Mar 2017 21:36:49 +0000 (16:36 -0500)]
Add GrOp::wasRecorded and use in instanced rendering for tracking.

BUG=skia:

Change-Id: I4c5cdf47d42b7adae3649c7f96caabe68f45acbf
Reviewed-on: https://skia-review.googlesource.com/9308
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
7 years agoSkJumper: a couple stages used by color filters
Mike Klein [Tue, 7 Mar 2017 17:28:11 +0000 (12:28 -0500)]
SkJumper: a couple stages used by color filters

Nothing too interesting here.
  - 4x5 matrix is the same as 2x3 and 3x4, but bigger.
  - luminance to alpha is pretty boring indeed.

Change-Id: I24893df15d1e22cbb500d946e1bbb58aa1522c8c
Reviewed-on: https://skia-review.googlesource.com/9385
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoMove from SkChunkAlloc to SkArenaAlloc for PathOps
Herb Derby [Tue, 7 Mar 2017 16:11:47 +0000 (11:11 -0500)]
Move from SkChunkAlloc to SkArenaAlloc for PathOps

Attempt two. Remove ~SkOpContour because it is handled by the SkArenaAlloc.

Change-Id: Id3049db97aebcc1009d403a031f2fac219f58f2f
Reviewed-on: https://skia-review.googlesource.com/9381
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agoBe able to compile nanobench for Chromecast
Kevin Lubick [Tue, 7 Mar 2017 14:45:50 +0000 (09:45 -0500)]
Be able to compile nanobench for Chromecast

Get toolchain from https://goto.google.com/ncoqy and put in
$CAST_TOOLCHAIN

gn gen out/chromecast --args='cc="$CAST_TOOLCHAIN/armv7a/bin/armv7a-cros-linux-gnueabi-gcc" cxx="$CAST_TOOLCHAIN/armv7a/bin/armv7a-cros-linux-gnueabi-g++" ar="$CAST_TOOLCHAIN/armv7a/bin/armv7a-cros-linux-gnueabi-ar" is_official_build=true skia_use_fontconfig=false extra_ldflags=["-static-libstdc++","-static-libgcc"] target_cpu="arm" skia_enable_gpu=false skia_use_system_freetype2=false'

ninja -C out/chromecast nanobench

We go with is_official_build to minimize binary size, as the chromecast
does not have much onboard storage.

They do not package libstdc++ so we add the link options:
-static-libstdc++ -static-libgcc

-momit-leaf-frame-pointer is not supported, so we delete it, as it is not important.

BUG=skia:

Change-Id: I7b0882ab5d6109f07345a2d59df265efef9b9554
Reviewed-on: https://skia-review.googlesource.com/9338
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoRemove dead links in SampleApp docs.
Mike Klein [Tue, 7 Mar 2017 16:27:18 +0000 (11:27 -0500)]
Remove dead links in SampleApp docs.

NOTRY=true

Change-Id: I503e413a22855301610427743912ccad1f1f8ed9
Reviewed-on: https://skia-review.googlesource.com/9384
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoRevert[6] "Remove SkDraw from device-draw methods, and enable device-centric clipping...
Mike Reed [Tue, 7 Mar 2017 14:37:29 +0000 (09:37 -0500)]
Revert[6] "Remove SkDraw from device-draw methods, and enable device-centric clipping.""""""

Previous failure was failure to detect that the clip wasn't wide-open when
optimizing for retain-vs-discard in copy-on-write. gm:copy_on_write_retain
detected this. Now fixed by adding new method to SkBaseDevice.h

This reverts commit 27d07f0acb85eea4062075dfbe9148ce12d92c66.

BUG=skia:6214

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

7 years agoMove GrDrawOp pipeline/clip processing to GrRenderTargetContext
Brian Salomon [Mon, 6 Mar 2017 21:17:12 +0000 (16:17 -0500)]
Move GrDrawOp pipeline/clip processing to GrRenderTargetContext

This is currently done in GrOpList. However, it can trigger resource creation, which in turn can trigger a flush. In the future flushing may destroy the op list.

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

7 years agoBack to code as data arrays, this time in .text.
Mike Klein [Tue, 7 Mar 2017 12:59:52 +0000 (07:59 -0500)]
Back to code as data arrays, this time in .text.

This technique lets us generate a single source file, use the C++
preprocessor, and avoid the pain of working with assemblers.

By using the section attribute or declspec allocate, we can put these
data arrays into the .text section, making them ordinary code.

This is like the previous solution, except it should actually run.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Debug,Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug,Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug

Change-Id: Ide7675f6cf32eb4831ff02906acbdc3faaeaa684
Reviewed-on: https://skia-review.googlesource.com/9336
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoDon't run image tests on msaa configs.
Brian Salomon [Tue, 7 Mar 2017 14:08:36 +0000 (09:08 -0500)]
Don't run image tests on msaa configs.

BUG=skia:6331
BUG=skia:4888

Change-Id: I8b66f4662342c2b60ddd2859146839d7cb09bbeb
Reviewed-on: https://skia-review.googlesource.com/9339
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoRevert "Move from SkChunkAlloc to SkArenaAlloc for PathOps"
Derek Sollenberger [Tue, 7 Mar 2017 11:14:59 +0000 (11:14 +0000)]
Revert "Move from SkChunkAlloc to SkArenaAlloc for PathOps"

This reverts commit 38c60180241e335e368fdadbf7856aff114ff668.

Reason for revert: breaking ASAN run in TAP build

Original change's description:
> Move from SkChunkAlloc to SkArenaAlloc for PathOps
>
> Change-Id: Iab111a4ebcae4e896b1fdfe285def9ef0ae2ab6b
> Reviewed-on: https://skia-review.googlesource.com/7314
> Reviewed-by: Cary Clark <caryclark@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
>

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

Change-Id: I6364254571bb1617a9f45ed08f2af4a59f9d5841
Reviewed-on: https://skia-review.googlesource.com/9335
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>

7 years agofix RecordOptsTest.cpp on Android framework
Mike Klein [Tue, 7 Mar 2017 01:02:32 +0000 (20:02 -0500)]
fix RecordOptsTest.cpp on Android framework

Change-Id: Iea45ece603cf0700860f55860b565c73088dca14
Reviewed-on: https://skia-review.googlesource.com/9333
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoRevert "Fix new IT blocks ARMv8"
Mike Klein [Tue, 7 Mar 2017 00:54:47 +0000 (00:54 +0000)]
Revert "Fix new IT blocks ARMv8"

This reverts commit 90165c2269bc33ca3d6aaa73d528194daf48da4e.

Reason for revert: Skia and Chrome iOS builds broken.

../../third_party/skia/include/private/SkFixed.h:106:41: error: invalid output constraint '+t' in asm
        asm("vcvt.s32.f32 %0, %0, #16": "+t"(x));

Original change's description:
> Fix new IT blocks ARMv8
>
> ARMv8 specifies that an IT block should be followed by only one 16-bit instruction.
> * SkFloatToFix is back to a C implementation that mirrors the assembly code.
>
> * S32A_D565_Opaque_neon switched the usage of the temporary 'ip' register to let
> the compiler choose what is best in the context of the IT block. And replaced
> 'keep_dst' by 'ip' where low register or high register does not matter.
>
> BUG=skia:
>
> CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
>
> Change-Id: I096759841c972e9300c1d0293bc80d3c3ff2747b
> Reviewed-on: https://skia-review.googlesource.com/9340
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
>

TBR=mtklein@chromium.org,amaury.leleyzour@arm.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: Idbcbda88039066153e1c34233d43366ab114fd01
Reviewed-on: https://skia-review.googlesource.com/9332
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoFix new IT blocks ARMv8
Amaury Le Leyzour [Mon, 6 Mar 2017 21:00:49 +0000 (13:00 -0800)]
Fix new IT blocks ARMv8

ARMv8 specifies that an IT block should be followed by only one 16-bit instruction.
* SkFloatToFix is back to a C implementation that mirrors the assembly code.

* S32A_D565_Opaque_neon switched the usage of the temporary 'ip' register to let
the compiler choose what is best in the context of the IT block. And replaced
'keep_dst' by 'ip' where low register or high register does not matter.

BUG=skia:

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

Change-Id: I096759841c972e9300c1d0293bc80d3c3ff2747b
Reviewed-on: https://skia-review.googlesource.com/9340
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoadd test for copy-on-write optimization
Mike Reed [Mon, 6 Mar 2017 21:37:07 +0000 (16:37 -0500)]
add test for copy-on-write optimization

exercises a bug in the device-clip CL (hopefully to land soon)
BUG=skia:

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

7 years agoAdd half-float mipmap benchmarks too
Brian Osman [Mon, 6 Mar 2017 21:16:15 +0000 (16:16 -0500)]
Add half-float mipmap benchmarks too

Just trying to get better perf coverage of our mipmapping code, in
anticipation of different optimization strategies for the sRGB case.
I want to have some good reference points to measure progress.

BUG=skia:

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

7 years agobench clip overhead during recording
Mike Reed [Mon, 6 Mar 2017 19:14:09 +0000 (14:14 -0500)]
bench clip overhead during recording

BUG=skia:

Change-Id: I739c5a7f44380e1218627b1b6430a03950ae84aa
Reviewed-on: https://skia-review.googlesource.com/9309
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoTurn off savelayer optimization for Android framework
Yuqian Li [Mon, 6 Mar 2017 20:47:09 +0000 (15:47 -0500)]
Turn off savelayer optimization for Android framework

This is a simpler version of https://skia-review.googlesource.com/c/8970/

Note that we couldn't do the optimization and add back the clip effect by
another clipRect or clipPath call because the final matrix is not available at
recording time.

BUG=skia:6334

Change-Id: I3ca091bdc1ee1d265a79fb88d0a6f9afe2b27e58
Reviewed-on: https://skia-review.googlesource.com/9311
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>

7 years agoRemove Win10 IntelHD405 bots.
Ben Wagner [Mon, 6 Mar 2017 21:01:53 +0000 (16:01 -0500)]
Remove Win10 IntelHD405 bots.

We are still testing IntelHD405 on Ubuntu16.

There are no interesting differences in gms between Braswell
(IntelHD405) and Broadwell (IntelIris6100).

Perf results are obviously worse for the slower chip, but the results
seem to track fairly well between these two bot flavors.

BUG=skia:6324
NOTRY=true

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

7 years agoOmit abnormal.wbmp on Linux IntelHD405.
Ben Wagner [Mon, 6 Mar 2017 18:33:03 +0000 (13:33 -0500)]
Omit abnormal.wbmp on Linux IntelHD405.

BUG=skia:6331

Change-Id: Id3ac102174c45b623dc2b071070b230954b901a2
Reviewed-on: https://skia-review.googlesource.com/9305
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoRoll Recipe DEPS
Eric Boren [Mon, 6 Mar 2017 18:42:01 +0000 (13:42 -0500)]
Roll Recipe DEPS

BUG=skia:

Change-Id: I942ebebcb299440202b7fde205db3b9025401ae3
Reviewed-on: https://skia-review.googlesource.com/9285
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
7 years agoMove from SkChunkAlloc to SkArenaAlloc for PathOps
Herb Derby [Wed, 1 Mar 2017 21:48:12 +0000 (16:48 -0500)]
Move from SkChunkAlloc to SkArenaAlloc for PathOps

Change-Id: Iab111a4ebcae4e896b1fdfe285def9ef0ae2ab6b
Reviewed-on: https://skia-review.googlesource.com/7314
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agoAdd bench for odd-sized mipmapping w/sRGB filtering
Brian Osman [Mon, 6 Mar 2017 18:58:54 +0000 (13:58 -0500)]
Add bench for odd-sized mipmapping w/sRGB filtering

Need some data to inform a decision about always doing gamma correct
mipmapping.

BUG=skia:

Change-Id: I92fd120413aae3d946252b0b7122c36bc74f58da
Reviewed-on: https://skia-review.googlesource.com/9307
Commit-Queue: Matt Sarett <msarett@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoUpdate bots to NDK r14.
Mike Klein [Mon, 6 Mar 2017 15:00:31 +0000 (10:00 -0500)]
Update bots to NDK r14.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Mac-Clang-arm64-Debug-Android,Build-Ubuntu-Clang-arm-Debug-Android,Build-Ubuntu-Clang-arm64-Debug-Android,Build-Ubuntu-Clang-mips64el-Debug-Android,Build-Ubuntu-Clang-mipsel-Debug-Android,Build-Ubuntu-Clang-x64-Debug-Android,Build-Ubuntu-Clang-x86-Debug-Android,Build-Win-Clang-arm64-Release-Android

Change-Id: I31df35c3d73b80f465cc063f2a1a7a526172cd67
Reviewed-on: https://skia-review.googlesource.com/9293
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoStore clipped bounds on GrOp rather than in parallel in GrRenderTargetOpList.
Brian Salomon [Mon, 6 Mar 2017 17:02:34 +0000 (12:02 -0500)]
Store clipped bounds on GrOp rather than in parallel in GrRenderTargetOpList.

When the op is recorded we update its bounds to incorporate both clipping and aa bloat.

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

7 years agoAdd ability to insert systrace markers for the android framework
Derek Sollenberger [Fri, 3 Mar 2017 20:48:33 +0000 (15:48 -0500)]
Add ability to insert systrace markers for the android framework

Change-Id: I34cee8382b73f1d95fde279377f976ebad6983a7
Reviewed-on: https://skia-review.googlesource.com/9232
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>

7 years agoAdd SkColorSpace::isSRGB()
Matt Sarett [Mon, 6 Mar 2017 16:11:23 +0000 (11:11 -0500)]
Add SkColorSpace::isSRGB()

BUG=skia:

Change-Id: I124480a15e0c3cb01f4e22397c0a116f2d1c0d7d
Reviewed-on: https://skia-review.googlesource.com/9239
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoAdd legacy++ to viewer (sRGB w/nonlinear blending)
Brian Osman [Mon, 6 Mar 2017 16:47:26 +0000 (11:47 -0500)]
Add legacy++ to viewer (sRGB w/nonlinear blending)

BUG=skia:6242

Change-Id: I696de8eac61aebaf5cb07d8874bde3c7bd470277
Reviewed-on: https://skia-review.googlesource.com/9299
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoRename PentiumN3700 to IntelHD405.
Ben Wagner [Mon, 6 Mar 2017 16:10:54 +0000 (11:10 -0500)]
Rename PentiumN3700 to IntelHD405.

BUG=skia:6324
NOTRY=true

Change-Id: I64d87d40c85f1e3a1b2c5aee8d5d68fca81192d6
Reviewed-on: https://skia-review.googlesource.com/9301
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoRemove PLS path renderer
Brian Salomon [Mon, 6 Mar 2017 16:29:48 +0000 (11:29 -0500)]
Remove PLS path renderer

Change-Id: Ib727b0749a5a7da95832970e79804417e8b6a247
Reviewed-on: https://skia-review.googlesource.com/9300
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoAdd unit tests for SkImage::colorSpace()
Matt Sarett [Mon, 6 Mar 2017 15:28:24 +0000 (10:28 -0500)]
Add unit tests for SkImage::colorSpace()

BUG=skia:

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

7 years agoFuzzCanvas: fix BUG=skia:6321
Hal Canary [Mon, 6 Mar 2017 13:30:44 +0000 (08:30 -0500)]
FuzzCanvas: fix BUG=skia:6321

Change-Id: I979b85cbe1eadca667d5d622bbbe24749da7b770
Reviewed-on: https://skia-review.googlesource.com/9289
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
7 years agoRoll Recipe DEPS
Eric Boren [Mon, 6 Mar 2017 15:00:04 +0000 (10:00 -0500)]
Roll Recipe DEPS

Bisect remaining commits...
BUG=skia:

Change-Id: I0bf8cfdcc60bc1a52ff12554d883e0a37537962e
Reviewed-on: https://skia-review.googlesource.com/9292
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>

7 years agoDocumentation: fix width
Hal Canary [Mon, 6 Mar 2017 15:32:54 +0000 (10:32 -0500)]
Documentation: fix width

NOTRY=true
Change-Id: I60861019cc19537eaff000dec15b4ecbea54e915
Reviewed-on: https://skia-review.googlesource.com/9298
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>