platform/upstream/libSkiaSharp.git
7 years agoAdd onBackendCreated callback to Viewer
Christopher Dalton [Fri, 24 Feb 2017 20:22:53 +0000 (13:22 -0700)]
Add onBackendCreated callback to Viewer

Also removes fWidth and fHeight from Window and instead
calls into WindowContent to get these values.

BUG=skia:

Change-Id: I72ee506004b7da73db9abb607a3bc82edfcf7d43
Reviewed-on: https://skia-review.googlesource.com/8795
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
7 years agoSet a limit on the size for BMP images
Leon Scroggins III [Fri, 24 Feb 2017 20:33:24 +0000 (15:33 -0500)]
Set a limit on the size for BMP images

This limit matches the limit used by Chromium. I am not aware of any
real world BMPs that are larger than this (or even close to it), but
there are some invalid BMPs that are larger than this, leading to
crashes when we try to read a row.

BUG:34778578
BUG=skia:3617

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

7 years agoRead color space info from raw exif data
Matt Sarett [Fri, 24 Feb 2017 19:51:08 +0000 (14:51 -0500)]
Read color space info from raw exif data

b/35516531

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

7 years agoImprove comment in SkICC.h
Matt Sarett [Fri, 24 Feb 2017 19:56:26 +0000 (14:56 -0500)]
Improve comment in SkICC.h

BUG=skia:

Change-Id: Ib0d30883a9e790bf1c4a85fce74a095a7df708c1
Reviewed-on: https://skia-review.googlesource.com/8908
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoUse construct/init pattern with GrPipeline to replace CreateAt.
Brian Salomon [Fri, 24 Feb 2017 16:01:15 +0000 (11:01 -0500)]
Use construct/init pattern with GrPipeline to replace CreateAt.

Change-Id: Ic6c7432a9a298a143ce4f2431e94c89a0ea79793
Reviewed-on: https://skia-review.googlesource.com/8938
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoFix some viewer crashes when switching color mode
Brian Osman [Fri, 24 Feb 2017 16:57:23 +0000 (11:57 -0500)]
Fix some viewer crashes when switching color mode

The whole idea of immediate mode GUIs is to put your GUI code and the
resulting action close together. Unfortunately, for actions that tear
down the backend (possibly freeing the surfaces we're drawing to), we
can't do that. So defer that action until the next frame (really, the
next idle). Only required when an action might call setDisplayParams.

BUG=skia:

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

7 years agoabs -> abs_ to avoid name conflicts
Mike Klein [Fri, 24 Feb 2017 17:10:47 +0000 (12:10 -0500)]
abs -> abs_ to avoid name conflicts

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-Clang-x86_64-Debug-MSAN

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

7 years agoRevert "Add GrExternalTextureData and SkCrossContextImageData"
Brian Osman [Fri, 24 Feb 2017 17:27:52 +0000 (17:27 +0000)]
Revert "Add GrExternalTextureData and SkCrossContextImageData"

This reverts commit 9ad1f92e2fceea33215c0f13cee42a679fb88d44.

Reason for revert: Breaking lots of bots

Original change's description:
> Add GrExternalTextureData and SkCrossContextImageData
>
> GrExternalTextureData is an API for exporting the backend-specific
> information about a texture in a type-safe way, and without pointing
> into the GrTexture. The new detachBackendTexture API lets us release
> ownership of a texture to the client.
>
> SkCrossContextImageData is the public API that lets clients upload
> textures on one thread/GrContext, then safely transfer ownership to
> another thread and GrContext for rendering.
>
> Only GL is implemented/supported right now. Vulkan support requires
> that we add thread-safe memory pools, or otherwise transfer the
> actual memory block containing the texture to the new context.
>
> BUG=skia:
>
> Change-Id: I784a3a74be69807df038c7d192eaed002c7e45ca
> Reviewed-on: https://skia-review.googlesource.com/8529
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>

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

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

7 years agoSkJumper: perspective matrix
Mike Klein [Fri, 24 Feb 2017 16:51:36 +0000 (11:51 -0500)]
SkJumper: perspective matrix

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

7 years agoAdd SkTypeface::getVariationDesignPosition.
Ben Wagner [Fri, 24 Feb 2017 16:15:26 +0000 (11:15 -0500)]
Add SkTypeface::getVariationDesignPosition.

Allow users to query a typeface's position in variation design space.

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

7 years agoSkJumper: tiling modes
Mike Klein [Fri, 24 Feb 2017 16:04:50 +0000 (11:04 -0500)]
SkJumper: tiling modes

Slight changes to clamp to make it look more like the other two.

Mirror gets a fun new SSE/AVX abs() that requires no constants:

    abs(v) = v & (0-v)

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

7 years agoRemove the skip-draw xp optimization
Brian Salomon [Fri, 24 Feb 2017 15:37:15 +0000 (10:37 -0500)]
Remove the skip-draw xp optimization

This seems like extra complexity for a impractical case. Also, if this is important a lot more work could be saved by catching this upstack (e.g. SkCanvas or SkPaintToGrPaint).

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

7 years agoAdd GrExternalTextureData and SkCrossContextImageData
Brian Osman [Thu, 23 Feb 2017 22:06:10 +0000 (17:06 -0500)]
Add GrExternalTextureData and SkCrossContextImageData

GrExternalTextureData is an API for exporting the backend-specific
information about a texture in a type-safe way, and without pointing
into the GrTexture. The new detachBackendTexture API lets us release
ownership of a texture to the client.

SkCrossContextImageData is the public API that lets clients upload
textures on one thread/GrContext, then safely transfer ownership to
another thread and GrContext for rendering.

Only GL is implemented/supported right now. Vulkan support requires
that we add thread-safe memory pools, or otherwise transfer the
actual memory block containing the texture to the new context.

BUG=skia:

Change-Id: I784a3a74be69807df038c7d192eaed002c7e45ca
Reviewed-on: https://skia-review.googlesource.com/8529
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoheaders: forward declare SkDOM, and include SkClipOp
Hal Canary [Thu, 23 Feb 2017 18:24:49 +0000 (13:24 -0500)]
headers: forward declare SkDOM, and include SkClipOp

Change-Id: I38041cd2c71a89604f35832415287e2356592efd
Reviewed-on: https://skia-review.googlesource.com/8925
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoImGui color space controls
Brian Osman [Fri, 24 Feb 2017 14:49:14 +0000 (09:49 -0500)]
ImGui color space controls

Adds radio buttons for switching among legacy, sRGB and F16.
Also adds a list of primaries you can pick from, as well as
a gamut diagram showing the primaries. The primaries can be
dragged around to alter the working space.

BUG=skia:

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

7 years agogn_to_bp to recurse deps.
Ben Wagner [Thu, 23 Feb 2017 23:00:06 +0000 (18:00 -0500)]
gn_to_bp to recurse deps.

Currently gn_to_bp GrabDependentSrcs only grabs the top level deps of
a target. In a proposed change there are more levels of deps to
clarify the real dependencies. To make this work well, a number of
lists are now sets to avoid including the same file multiple times.

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

7 years agoSkJumper: a8
Mike Klein [Fri, 24 Feb 2017 14:05:14 +0000 (09:05 -0500)]
SkJumper: a8

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

7 years agoFix a confusing typo in a comment about MSAA
Brian Osman [Fri, 24 Feb 2017 14:31:16 +0000 (09:31 -0500)]
Fix a confusing typo in a comment about MSAA

BUG=skia:

Change-Id: I8d35862fc5f8ff2b511d716d30c734a2f0e92442
Reviewed-on: https://skia-review.googlesource.com/8946
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoWrap cached GrTextures in GrTextureProxies (e.g., blur profiles, nine-patch blurs...
Robert Phillips [Fri, 24 Feb 2017 13:37:13 +0000 (08:37 -0500)]
Wrap cached GrTextures in GrTextureProxies (e.g., blur profiles, nine-patch blurs, etc.)

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

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

7 years agoSkJumper: scales and lerps
Mike Klein [Fri, 24 Feb 2017 13:21:18 +0000 (08:21 -0500)]
SkJumper: scales and lerps

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

7 years agoRevert "Revert "removed flags for g3""
Mike Reed [Fri, 24 Feb 2017 11:26:03 +0000 (11:26 +0000)]
Revert "Revert "removed flags for g3""

This reverts commit a6e431b2c1baa564d2619bdc2a51a3b5bfa7e276.

Reason for revert: g3 updated

Original change's description:
> Revert "removed flags for g3"
>
> This reverts commit 319ca08ba27d4582d716ce21b290eeb3f997394e.
>
> Reason for revert: missed some callers (drawARGB at least)
>
> Original change's description:
> > removed flags for g3
> >
> > BUG=skia:
> >
> > Change-Id: I2b1f748c23f2a5cd8d25f5f74f175f0d3beec75d
> > Reviewed-on: https://skia-review.googlesource.com/8896
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
> >
>
> TBR=reed@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: Ic1d03407da436fa4024643d8fce869541fea13b9
> Reviewed-on: https://skia-review.googlesource.com/8897
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>

TBR=reviews@skia.org,reed@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
BUG=skia:

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

7 years agoGrTessellator (AA): simplify boundary extraction.
Stephen White [Thu, 23 Feb 2017 21:50:47 +0000 (16:50 -0500)]
GrTessellator (AA): simplify boundary extraction.

Perform boundary simplification and meshing inline with extraction.

Removed EdgeList::fNext (don't need to concatenate edge lists).
Removed new_contour() (don't need to heap-allocate them either).

BUG=skia:

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

7 years agoOne-liner fix that allows Viewer to switch between Raster and OpenGL
Chet Haase [Thu, 23 Feb 2017 01:28:41 +0000 (17:28 -0800)]
One-liner fix that allows Viewer to switch between Raster and OpenGL

A previous change to Viewer removed a key setTag() call that
meant that the logic to replace the SurfaceView on a toggle
between OpenGL/Raster was not able to execute, making the app
useless after that toggle was performed.

BUG=skia:

Change-Id: Idddb7612209ce83d3461155c59f451407118e1d5
Reviewed-on: https://skia-review.googlesource.com/8789
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chet Haase <chet@google.com>

7 years agoRevert "Add SkTypeface::getVariationDesignPosition."
Ben Wagner [Thu, 23 Feb 2017 20:48:43 +0000 (20:48 +0000)]
Revert "Add SkTypeface::getVariationDesignPosition."

This reverts commit 0f3d0c37dbcaf4ec271d5fe847becc9b1aa6f537.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Add SkTypeface::getVariationDesignPosition.
>
> Allow users to query a typeface's position in variation design space.
>
> Change-Id: I173ee9eefdddee6b2613435ebcc6b08c25b382ed
> Reviewed-on: https://skia-review.googlesource.com/8684
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
>

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

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

7 years agoSkJumper: 565
Mike Klein [Thu, 23 Feb 2017 18:03:57 +0000 (13:03 -0500)]
SkJumper: 565

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

7 years agoSkJumper: portable round() was truncating...
Mike Klein [Thu, 23 Feb 2017 18:49:06 +0000 (13:49 -0500)]
SkJumper: portable round() was truncating...

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

7 years agoAdd SkTypeface::getVariationDesignPosition.
bungeman [Fri, 17 Feb 2017 23:03:49 +0000 (18:03 -0500)]
Add SkTypeface::getVariationDesignPosition.

Allow users to query a typeface's position in variation design space.

Change-Id: I173ee9eefdddee6b2613435ebcc6b08c25b382ed
Reviewed-on: https://skia-review.googlesource.com/8684
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoSkPDF: Stop using SkRasterClip/SkRegion
Hal Canary [Wed, 22 Feb 2017 22:16:59 +0000 (17:16 -0500)]
SkPDF: Stop using SkRasterClip/SkRegion

All test PDFs render the same now.

Change-Id: Ia912fd3adc1e1285cbd27f6deb5861df8396e44d
Reviewed-on: https://skia-review.googlesource.com/8906
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoFix Chrome iOS no GPU build and block includes from src/gpu on our NoGpu bot.
Brian Salomon [Thu, 23 Feb 2017 17:23:47 +0000 (12:23 -0500)]
Fix Chrome iOS no GPU build and block includes from src/gpu on our NoGpu bot.

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

7 years agoFix memory leak: adopt rather than ref GrTexture* in GrTextureStripAtlas
Robert Phillips [Thu, 23 Feb 2017 16:32:32 +0000 (11:32 -0500)]
Fix memory leak: adopt rather than ref GrTexture* in GrTextureStripAtlas

This was introduced in: https://skia-review.googlesource.com/c/8881/ (Switch GrTextureStripAtlas over to GrTextureProxies)

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

7 years agoDon't use mixed samples if NVPR is disabled
csmartdalton [Thu, 23 Feb 2017 06:16:23 +0000 (23:16 -0700)]
Don't use mixed samples if NVPR is disabled

BUG=skia:

Change-Id: I48c72268e30e202a101177393eb777f18a11cb6f
Reviewed-on: https://skia-review.googlesource.com/8790
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>

7 years agoGrTessellator (AA): sorting and comparison performance improvements.
Stephen White [Thu, 23 Feb 2017 16:10:01 +0000 (11:10 -0500)]
GrTessellator (AA): sorting and comparison performance improvements.

Change comparison functions to perform the common case first (a.fX > b.fX),
and the uncommon case (a.fX == b.fX) after the short-circuit.

Change Comparator to switch on a direction enum instead of using function
pointers.

Inline sorted_merge() and front_back_split() into merge_sort(), and template
it on the comparator function, so it instantiates two versions. This
is even faster (but costs us some code bloat of course).

BUG=skia:

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

7 years agoSkJumper: fill in AVX f16 stages, turn on AVX
Mike Klein [Thu, 23 Feb 2017 16:01:52 +0000 (11:01 -0500)]
SkJumper: fill in AVX f16 stages, turn on AVX

As far as I can tell, this draws identically to the SSE4.1 backend.

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

7 years agoBlacklist test on Vulkan Ubuntu Intel caused by driver bug
Greg Daniel [Thu, 23 Feb 2017 15:11:48 +0000 (10:11 -0500)]
Blacklist test on Vulkan Ubuntu Intel caused by driver bug

BUG=skia:6280

Change-Id: Ib8d0a8fe7ca2e0174daa209eac487027e833e6ec
Reviewed-on: https://skia-review.googlesource.com/8907
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>

7 years agoMake shadow_utils GM use its own SkResourceCache
Brian Salomon [Thu, 23 Feb 2017 14:34:03 +0000 (09:34 -0500)]
Make shadow_utils GM use its own SkResourceCache

This should stabilize the replay testing on the bots.

Change-Id: I89e3e308000743da6e1a765751103cffabc7e4ba
Reviewed-on: https://skia-review.googlesource.com/8902
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoRevert "skslc switch support"
Ethan Nicholas [Thu, 23 Feb 2017 16:18:54 +0000 (16:18 +0000)]
Revert "skslc switch support"

This reverts commit 2b1e468dabd2ac7bea7ec17740275f4f4aad30c3.

Reason for revert: bot breakage

Original change's description:
> skslc switch support
>
> BUG=skia:
>
> Change-Id: Ida7f9e80139aa1e4f43804cafbcac640e47fab25
> Reviewed-on: https://skia-review.googlesource.com/8771
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
>

TBR=benjaminwagner@google.com,ethannicholas@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: Iaaa35d10a15704279c6883d4d68f6d4ad5078320
Reviewed-on: https://skia-review.googlesource.com/8792
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

7 years agoDo not throw away the savelayer if kDontClipToLayer_PrivateSaveLayerFlag is set
Yuqian Li [Thu, 23 Feb 2017 15:28:33 +0000 (10:28 -0500)]
Do not throw away the savelayer if kDontClipToLayer_PrivateSaveLayerFlag is set

This affects the Android CTS test
android.uirendering.cts.testclasses.LayerTests#testSaveLayerUnclippedWithAlpha

BUG=skia:

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

7 years agoMove around GL dependencies.
Mike Klein [Thu, 23 Feb 2017 15:31:13 +0000 (10:31 -0500)]
Move around GL dependencies.

  :gpu gets GL and GLU
  :gpu_tool_utils gets X11
  :views gets GL and X11

{shared,static}x{gpu,no-gpu} all seem to link.
May not be perfect, but it's a start.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-GCC-x86_64-Debug-NoGPU,Build-Ubuntu-GCC-x86_64-Release-Shared

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

7 years agoremove no longer used links from directory
Heather Miller [Thu, 23 Feb 2017 16:04:00 +0000 (11:04 -0500)]
remove no longer used links from directory

BUG=skia:

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

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

7 years agoskslc switch support
Ethan Nicholas [Wed, 22 Feb 2017 22:20:11 +0000 (17:20 -0500)]
skslc switch support

BUG=skia:

Change-Id: Ida7f9e80139aa1e4f43804cafbcac640e47fab25
Reviewed-on: https://skia-review.googlesource.com/8771
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
7 years agoIn Vulkan make sure resolve is sent to GPU when preparing msaa RenderTarget for exter...
Greg Daniel [Thu, 23 Feb 2017 14:44:02 +0000 (09:44 -0500)]
In Vulkan make sure resolve is sent to GPU when preparing msaa RenderTarget for external IO

In GrDrawingManager, when preparing for I/O we first flush the GPU then call resolve. However,
in Vulkan the resolve lives in a command buffer that needs to be flushed to the GPU as well.

This is most likely the cause we were seeing in Viewer app where first frame was always black
since the actually resolve command buffer was not flushed to the gpu before presenting. All
future frames would then typically show one frame behind.

BUG=skia:

Change-Id: Iaf492f88680b998be0087637279cc78d5a38ec50
Reviewed-on: https://skia-review.googlesource.com/8903
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoSwitch GrTextureStripAtlas over to GrTextureProxies
Robert Phillips [Wed, 22 Feb 2017 20:28:38 +0000 (15:28 -0500)]
Switch GrTextureStripAtlas over to GrTextureProxies

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

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

7 years agoRevert "Revert "Revert[2] "hide deprecated underline and strikethru"""
Mike Reed [Thu, 23 Feb 2017 14:19:35 +0000 (14:19 +0000)]
Revert "Revert "Revert[2] "hide deprecated underline and strikethru"""

This reverts commit cfd3d9ff8f370e3a4a53e2aba84dc4d682501f4c.

Reason for revert: derek is fixing caller

Original change's description:
> Revert "Revert[2] "hide deprecated underline and strikethru""
>
> This reverts commit aab68c56ef8fc88b0d1536f99aa1cc9ae7a0573a.
>
> Reason for revert: android still broken RecordingCanvasTests.cpp
>
> Original change's description:
> > Revert[2] "hide deprecated underline and strikethru"
> >
> > android now updated.
> >
> > This reverts commit e005edd3a5deb602beec59f59cdc8b14d3764d58.
> >
> > BUG=skia:6250
> >
> > Change-Id: If08d344cdd863fde1d9955dc3fab671a83be0f73
> > Reviewed-on: https://skia-review.googlesource.com/8815
> > Commit-Queue: Mike Reed <reed@google.com>
> > Reviewed-by: Mike Reed <reed@google.com>
> >
>
> TBR=reed@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:6250
>
> Change-Id: I954575a0e4b9aca8414e10901a7be03a2d7e6396
> Reviewed-on: https://skia-review.googlesource.com/8900
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>

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

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

7 years agoRevert "Revert[2] "hide deprecated underline and strikethru""
Mike Reed [Thu, 23 Feb 2017 14:06:12 +0000 (14:06 +0000)]
Revert "Revert[2] "hide deprecated underline and strikethru""

This reverts commit aab68c56ef8fc88b0d1536f99aa1cc9ae7a0573a.

Reason for revert: android still broken RecordingCanvasTests.cpp

Original change's description:
> Revert[2] "hide deprecated underline and strikethru"
>
> android now updated.
>
> This reverts commit e005edd3a5deb602beec59f59cdc8b14d3764d58.
>
> BUG=skia:6250
>
> Change-Id: If08d344cdd863fde1d9955dc3fab671a83be0f73
> Reviewed-on: https://skia-review.googlesource.com/8815
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
>

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

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

7 years agoMake GrPipeline::CreateAt take GrRenderTarget and not GrRenderTargetContext
Brian Salomon [Wed, 22 Feb 2017 16:52:36 +0000 (11:52 -0500)]
Make GrPipeline::CreateAt take GrRenderTarget and not GrRenderTargetContext

This is needed in order to create pipelines at flush time.

Change-Id: I0bcd64d503d45c3383dbb932b048e2d7faa07c67
Reviewed-on: https://skia-review.googlesource.com/8849
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoSkJumper: reformat .S files
Mike Klein [Thu, 23 Feb 2017 13:38:31 +0000 (08:38 -0500)]
SkJumper: reformat .S files

Decimal byte encoding makes more horizontal space for comments,
which are the only thing you really want to read.

No code change here.

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

7 years agoAdd AVX to the SkJumper mix.
Mike Klein [Thu, 23 Feb 2017 13:04:49 +0000 (08:04 -0500)]
Add AVX to the SkJumper mix.

AVX is a nice little halfway point between SSE4.1 and HSW, in terms
of instructions available, performance, and availability.

Intel chips have had AVX since ~2011, compared to ~2013 for HSW and
~2007 for SSE4.1.  Like HSW it's got 8-wide 256-bit float vectors,
but integer (and double) operations are essentially still only 128-bit.
It also doesn't have F16 conversion or FMA instructions.

It doesn't look like this is going to be a burden to maintain, and only
adds a few KB of code size.  In exchange, we now run 8x wide on 45% to
70% of x86 machines, depending on the OS.

In my brief testing, speed eerily resembles exact geometric progression:
   SSE4.1:        1x speed (baseline)
      AVX: ~sqrt(2)x speed
      HSW:       ~2x speed

This adds all the basic plumbing for AVX but leaves it disabled.
I'll flip it on once I've implemented the f16 TODOs.

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

7 years agoRevert "removed flags for g3"
Mike Reed [Thu, 23 Feb 2017 04:42:14 +0000 (04:42 +0000)]
Revert "removed flags for g3"

This reverts commit 319ca08ba27d4582d716ce21b290eeb3f997394e.

Reason for revert: missed some callers (drawARGB at least)

Original change's description:
> removed flags for g3
>
> BUG=skia:
>
> Change-Id: I2b1f748c23f2a5cd8d25f5f74f175f0d3beec75d
> Reviewed-on: https://skia-review.googlesource.com/8896
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>

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

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

7 years agoremoved flags for g3
Mike Reed [Thu, 23 Feb 2017 02:33:26 +0000 (21:33 -0500)]
removed flags for g3

BUG=skia:

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

7 years agoabstract access to device-clip-bounds
Mike Reed [Wed, 22 Feb 2017 20:21:35 +0000 (15:21 -0500)]
abstract access to device-clip-bounds

apply this to GpuDevice. Should allow us to switch to per-device-clipping
with minimal change (since we've abstracted how the device sees its
clip-bounds.)

BUG=skia:

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

7 years agoSkPDF: stop using RasterClip for drawAnnotation()
Hal Canary [Wed, 22 Feb 2017 20:55:06 +0000 (15:55 -0500)]
SkPDF: stop using RasterClip for drawAnnotation()

Change-Id: Idc3a4151f1b6bd3cb11b59e39ddb1458af385035
Reviewed-on: https://skia-review.googlesource.com/8891
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoSkPDF: do not use SkRegion in populateGraphicStateEntryFromPaint()
Hal Canary [Wed, 22 Feb 2017 21:32:34 +0000 (16:32 -0500)]
SkPDF: do not use SkRegion in populateGraphicStateEntryFromPaint()

Change-Id: I3eb192426f5b648fe7ad7db3c8dac42771be0197
Reviewed-on: https://skia-review.googlesource.com/8893
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoDon't include GrContextFactory.h from SkCommonFlagsPathRenderer.h
csmartdalton [Wed, 22 Feb 2017 21:29:48 +0000 (14:29 -0700)]
Don't include GrContextFactory.h from SkCommonFlagsPathRenderer.h

BUG=skia:

Change-Id: Ied4d23120cd21542314c45369597f375ca8affcf
Reviewed-on: https://skia-review.googlesource.com/8788
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoUse uintptr_t for masking ptrs.
Herb Derby [Wed, 22 Feb 2017 21:01:27 +0000 (16:01 -0500)]
Use uintptr_t for masking ptrs.

TBR=mtklein@google.com

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

7 years agoRevert[2] "hide deprecated underline and strikethru"
Mike Reed [Wed, 22 Feb 2017 20:51:27 +0000 (15:51 -0500)]
Revert[2] "hide deprecated underline and strikethru"

android now updated.

This reverts commit e005edd3a5deb602beec59f59cdc8b14d3764d58.

BUG=skia:6250

Change-Id: If08d344cdd863fde1d9955dc3fab671a83be0f73
Reviewed-on: https://skia-review.googlesource.com/8815
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoActually test our ref-counting in release builds
Brian Osman [Wed, 22 Feb 2017 20:37:45 +0000 (15:37 -0500)]
Actually test our ref-counting in release builds

BUG=skia:

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

7 years agoViewer: balance save/restores and draw offscreen to window in src mode
Brian Salomon [Wed, 22 Feb 2017 20:21:11 +0000 (15:21 -0500)]
Viewer: balance save/restores and draw offscreen to window in src mode

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

7 years agoSkPDF: use RasterClip and Region less.
Hal Canary [Wed, 22 Feb 2017 15:45:25 +0000 (10:45 -0500)]
SkPDF: use RasterClip and Region less.

  * GraphicStackState::updateClip() uses device bounds, not region bounds
  * SkPDFDevice::handleInversePath() uses clipstack, not rasterclip

Rendered PDF Changes: unnoticable.

Change-Id: Ibf9c169a5ada828c8fefedf2bcb37f6de34f3528
Reviewed-on: https://skia-review.googlesource.com/8885
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoCheck for bounds intersection when batching MSAAPathOps
Jim Van Verth [Wed, 22 Feb 2017 19:50:52 +0000 (14:50 -0500)]
Check for bounds intersection when batching MSAAPathOps

Change-Id: Ic4f1e13728b1137ffdc94dab077ec065619a0221
Reviewed-on: https://skia-review.googlesource.com/8883
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>

7 years agoAdd the ability to enable/disable GPU path renderers
csmartdalton [Wed, 22 Feb 2017 19:00:42 +0000 (12:00 -0700)]
Add the ability to enable/disable GPU path renderers

Adds a bitfield to GrContextOptions that masks out path renderers.
Adds commandline flags support to set this bitfield in tools apps.
Removes GrGLInterfaceRemoveNVPR since we can now accomplish the same
thing in the context options.

BUG=skia:

Change-Id: Icf2a4df36374b3ba2f69ebf0db56e8aedd6cf65f
Reviewed-on: https://skia-review.googlesource.com/8786
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>

7 years agoFix SkSemaphore comments.
Mike Klein [Wed, 22 Feb 2017 19:33:12 +0000 (14:33 -0500)]
Fix SkSemaphore comments.

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

7 years agoSkJumper: add mode to help prioritize porting
Mike Klein [Wed, 22 Feb 2017 19:04:38 +0000 (14:04 -0500)]
SkJumper: add mode to help prioritize porting

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

7 years agoSkJumper: set_rgb and swap_rb
Mike Klein [Wed, 22 Feb 2017 19:17:32 +0000 (14:17 -0500)]
SkJumper: set_rgb and swap_rb

swap_rb is a big limiting factor on Windows and Linux.
set_rgb just happened to be nearby and easy.

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

7 years agoUpdate endRecordingAsPicture to finishRecordingAsPicture
Yuqian Li [Wed, 22 Feb 2017 18:12:30 +0000 (13:12 -0500)]
Update endRecordingAsPicture to finishRecordingAsPicture

BUG=skia:

DOCS_PREVIEW= https://skia.org/?cl=8854

Change-Id: Ia3ad32d088d44fbe47ec37de016931c4bd21231c
Reviewed-on: https://skia-review.googlesource.com/8854
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>

7 years agoMake GrPipelineAnalysis a nested class of GrProcessorSet.
Brian Salomon [Wed, 22 Feb 2017 16:52:03 +0000 (11:52 -0500)]
Make GrPipelineAnalysis a nested class of GrProcessorSet.

It is renamed to FragmentProcessorAnalysis since it represents the outputs of the final FPs.

It now stores the analysis results that are subsequently needed rather than exposing GrProcOptInfo.

GrProcOptInfo is now only used on color FPs (not coverage).

Miscellaneous related renamings.

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

7 years agohide trivial helpers on canvas
Mike Reed [Wed, 22 Feb 2017 18:21:42 +0000 (13:21 -0500)]
hide trivial helpers on canvas

BUG=skia:

Change-Id: I42d4ca92897bde5bd8e0575a0104b12b83134cef
Reviewed-on: https://skia-review.googlesource.com/8852
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoSkJumper: implement lerp_u8
Mike Klein [Wed, 22 Feb 2017 18:52:40 +0000 (13:52 -0500)]
SkJumper: implement lerp_u8

Going to start filling these in in biggest-bang-for-the-buck order.
lerp_u8 (i.e. text drawing) is number 1 right now.

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

7 years agoAttempt to stabilize shadow_utils GM for replay configs
Brian Salomon [Wed, 22 Feb 2017 18:49:09 +0000 (13:49 -0500)]
Attempt to stabilize shadow_utils GM for replay configs

Change-Id: I0ed15ab102fa1e0a364d5f3a953bedd8afbda3c3
Reviewed-on: https://skia-review.googlesource.com/8853
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoEnable legacy premuls in SkColorSpaceXform
Matt Sarett [Wed, 22 Feb 2017 18:02:31 +0000 (13:02 -0500)]
Enable legacy premuls in SkColorSpaceXform

***Will allow for simplified Android framework code, they typically
   want a color correct transform followed by a gamma encoded premul.
***Chrome does the same, so this will make it easier to replace their
   codecs.
***Will decrease code size.  Both types of premuls are moved off the
   fast path here - one is essentially unused in production and the
   other is not "encouraged".
***Will actually make the common case faster: sRGB->sRGB means no
   color xform, just premul in SkSwizzler.

BUG=skia:

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

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

7 years agoSwitch SkTaskGroup to std::atomic.
Mike Klein [Wed, 22 Feb 2017 18:00:33 +0000 (13:00 -0500)]
Switch SkTaskGroup to std::atomic.

No interesting change, just getting on std APIs.

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

7 years agofix typo in SkTaskGroup.h
Mike Klein [Wed, 22 Feb 2017 17:49:29 +0000 (12:49 -0500)]
fix typo in SkTaskGroup.h

This was meant to stay -1 (num_cores() threads) not to become 1 (1 thread).

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

7 years agoAdd new GMs to stress rendering of many circles and rrects
Jim Van Verth [Tue, 21 Feb 2017 22:55:13 +0000 (17:55 -0500)]
Add new GMs to stress rendering of many circles and rrects

Change-Id: I060419bc39484b379329a1691e199d9d3db9c808
Reviewed-on: https://skia-review.googlesource.com/8807
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoremove device field from SkDraw
Mike Reed [Wed, 22 Feb 2017 16:01:08 +0000 (11:01 -0500)]
remove device field from SkDraw

BUG=skia:6214

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

7 years agoSkClipStack: add bounds() and isEmpty() methods
Hal Canary [Tue, 7 Feb 2017 21:58:28 +0000 (16:58 -0500)]
SkClipStack: add bounds() and isEmpty() methods

Also: update some of SkPDF to use these rather than the RasterClip.

Change-Id: I5a2564d2269c145135df6a8eda65ab05e4aeaf14
Reviewed-on: https://skia-review.googlesource.com/8159
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoSkExecutor
Mike Klein [Wed, 22 Feb 2017 03:53:16 +0000 (22:53 -0500)]
SkExecutor

Refactoring to refamiliarize myself with SkTaskGroup and SkThreadPool.

This adds an SkExecutor interface to describe how we use SkThreadPool,
with a global setter and getter for a default instance.  Then I rewrote
SkTaskGroup to work with any executor, the global default by default.

I also think I've made the SkTaskGroup::wait() borrow logic clearer
with the addition of SkSemaphore::try_wait().  This lets me keep the
semaphore count and actual count of work in perfect sync.

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

7 years agoFold MSAN awareness into SkJumper.cpp.
Mike Klein [Tue, 21 Feb 2017 23:50:51 +0000 (18:50 -0500)]
Fold MSAN awareness into SkJumper.cpp.

This is preparation for removing skia_enable_jumper, making it true.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN

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

7 years agoReland "CQ config: add gerrit CQAbility verifier."
Andrii Shyshkalov [Mon, 20 Feb 2017 10:34:35 +0000 (10:34 +0000)]
Reland "CQ config: add gerrit CQAbility verifier."

This reverts commit 02241e976b34c8bc4b2d4add2f0c881d8a8d2bc1.

Reason for revert: cq proto has been rolled to depot_tools.

Original change's description:
> Revert "CQ config: add gerrit CQAbility verifier."
>
> This reverts commit 04628221324eb2e5b329a8fd9c69196ea9acb43c.
>
> Reason for revert: Lets revert until the proto is rolled into Skia.
>
> Original change's description:
> > CQ config: add gerrit CQAbility verifier.
> >
> > Goal is to ensure that unreviewed and untrusted code isn't sent through
> > CQ to try bots, by accident or through malicious intent.
> >
> > R=​rmistry@google.com
> > BUG=chromium:692613
> > NOTRY=True
> >
> > Change-Id: I750be91895f5b77229b8f4a22216f00eaa75f7a0
> > Reviewed-on: https://skia-review.googlesource.com/8620
> > Reviewed-by: Ravi Mistry <rmistry@google.com>
> > Commit-Queue: Ravi Mistry <rmistry@google.com>
> >
>
> TBR=rmistry@google.com,reviews@skia.org,tandrii@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=chromium:692613
>
> Change-Id: I6d4b821b2a02ef3e097cf68cd8ebfb2b51d4d165
> Reviewed-on: https://skia-review.googlesource.com/8663
> Reviewed-by: Ravi Mistry <rmistry@google.com>
> Commit-Queue: Ravi Mistry <rmistry@google.com>
>

R=rmistry@google.com,reviews@skia.org,tandrii@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
BUG=chromium:692613

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

7 years agoRemove GrPipelineBuilder.cpp
Brian Salomon [Tue, 21 Feb 2017 21:54:27 +0000 (16:54 -0500)]
Remove GrPipelineBuilder.cpp

Change-Id: I14c26f2967e4722fa4d6ce4664a5857add0cf854
Reviewed-on: https://skia-review.googlesource.com/8822
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoGrTessellator: misc. cleanups and minor tweaks.
Stephen White [Tue, 21 Feb 2017 20:24:13 +0000 (15:24 -0500)]
GrTessellator: misc. cleanups and minor tweaks.

Invert some math to remove a negation.

Don't keep a persistent count in EdgeList; we'll test for degenerate
boundaries in boundary_to_aa_mesh().

Make connect() use the top/bottom ordering that new_edge has already
done for us.

Don't add the an edge to the same poly twice when it's easily detectable.

Remove some superfluous variables and intialization.

BUG=skia:

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

7 years agoRemove special build for Valgrind.
Ben Wagner [Wed, 22 Feb 2017 00:27:07 +0000 (19:27 -0500)]
Remove special build for Valgrind.

Valgrind uses the unmodified binary. See skia:6267.

BUG=skia:6267

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

7 years agoFix tasks.json after crossed CLs.
Ben Wagner [Wed, 22 Feb 2017 15:04:20 +0000 (10:04 -0500)]
Fix tasks.json after crossed CLs.

These two CLs caused failure on Housekeeper-PerCommit-InfraTests:
https://skia-review.googlesource.com/8839
https://skia-review.googlesource.com/8805

NOTRY=true

Change-Id: Ie27c2fd73186cdd4d9ae5528635bc9690df03210
Reviewed-on: https://skia-review.googlesource.com/8845
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoSkJumper: remove TODO.
Mike Klein [Tue, 21 Feb 2017 22:59:03 +0000 (17:59 -0500)]
SkJumper: remove TODO.

Starting with uninitialized vectors is only minorly faster (<0.5%).
I'd rather keep the zeroes and feel warm and fuzzy.

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

7 years agoAdd eGPU jobs.
Ben Wagner [Tue, 21 Feb 2017 20:15:55 +0000 (15:15 -0500)]
Add eGPU jobs.

Change-Id: Ia160d3b17abebf0075f8ce2b608653e496f46d58
Reviewed-on: https://skia-review.googlesource.com/8805
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoFix Mesa compile
Brian Osman [Wed, 22 Feb 2017 13:48:10 +0000 (08:48 -0500)]
Fix Mesa compile

BUG=skia:

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

7 years agoSkRegion: change serialization unit tests, better validation code
Hal Canary [Mon, 20 Feb 2017 03:16:10 +0000 (22:16 -0500)]
SkRegion: change serialization unit tests, better validation code

Also: Don't alloc before validation.

Change-Id: Ic2e007ecf4e06fb099366295b963f66df3f7903a
Reviewed-on: https://skia-review.googlesource.com/8728
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoDo not retry test or perf tasks
Eric Boren [Wed, 22 Feb 2017 13:36:03 +0000 (08:36 -0500)]
Do not retry test or perf tasks

BUG=skia:

Change-Id: I153978a92420eb2c39024213ebcdf95d1b8bde30
Reviewed-on: https://skia-review.googlesource.com/8839
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoWhitespace change to test new submit strategy II
Ravi Mistry [Wed, 22 Feb 2017 13:57:06 +0000 (08:57 -0500)]
Whitespace change to test new submit strategy II

BUG=skia:
NOTRY=true

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

7 years agoWhitespace change to test new submit strategy I
Ravi Mistry [Wed, 22 Feb 2017 13:56:52 +0000 (08:56 -0500)]
Whitespace change to test new submit strategy I

BUG=skia:
NOTRY=true

Change-Id: I9a20af0c57d98f86794d6ce6f37ee8200fe8e088
Reviewed-on: https://skia-review.googlesource.com/8840
Reviewed-by: Ravi Mistry <rmistry@google.com>
7 years agoWhitespace change to test new submit strategy II
Ravi Mistry [Wed, 22 Feb 2017 13:29:26 +0000 (08:29 -0500)]
Whitespace change to test new submit strategy II

BUG=skia:
NOTRY=true

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

7 years agoSupport shared GL contexts in GrContextFactory
Brian Osman [Tue, 21 Feb 2017 21:58:08 +0000 (16:58 -0500)]
Support shared GL contexts in GrContextFactory

Mostly plumbing, plus some minimal testing to make sure that
the platform APIs don't explode. I plan to add testing of
SkCrossContextImageData using this, which should verify that
textures are actually shared.

Also found a factory and some related code in the
CommandBuffer test context that was totally unused.
BUG=skia:

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

7 years agoremove guard for SkImageGenerator api
Mike Reed [Wed, 22 Feb 2017 03:48:21 +0000 (22:48 -0500)]
remove guard for SkImageGenerator api

BUG=skia:

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

7 years agoexpore flags for text decoration into android-specific reserved bits
Mike Reed [Tue, 21 Feb 2017 20:07:44 +0000 (15:07 -0500)]
expore flags for text decoration into android-specific reserved bits

BUG=skia:6250

precursor to https://skia-review.googlesource.com/c/8815/

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

7 years agoSkConvertPixels: Add Alpha8 fast path
Matt Sarett [Tue, 21 Feb 2017 23:28:48 +0000 (18:28 -0500)]
SkConvertPixels: Add Alpha8 fast path

BUG:692936

Change-Id: I8394554764b1f46bd8eaabb0194d52f361d477c1
Reviewed-on: https://skia-review.googlesource.com/8826
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoSplit Valgrind jobs -- one DM/NB run per task.
Ben Wagner [Wed, 22 Feb 2017 00:10:24 +0000 (19:10 -0500)]
Split Valgrind jobs -- one DM/NB run per task.

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

BUG=skia:2789
NOTRY=true

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

7 years agoRevert "Split Valgrind jobs -- one DM/NB run per task."
Ben Wagner [Tue, 21 Feb 2017 23:56:42 +0000 (23:56 +0000)]
Revert "Split Valgrind jobs -- one DM/NB run per task."

This reverts commit bc9cd524d8ce8fd61ff6e49fa2a6e2a26a069874.

Reason for revert: Unable to find Valgrind binary.

Original change's description:
> Split Valgrind jobs -- one DM/NB run per task.
>
> Remove special build for Valgrind -- Valgrind uses the unmodified binary. See skia:6267.
>
> BUG=skia:2789,skia:6267
>
> Change-Id: Id56c460abf36eb2be633ac3a309e0dbc7a278f41
> Reviewed-on: https://skia-review.googlesource.com/8723
> Commit-Queue: Ben Wagner <benjaminwagner@google.com>
> Reviewed-by: Eric Boren <borenet@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
>

TBR=mtklein@chromium.org,borenet@google.com,mtklein@google.com,benjaminwagner@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2789,skia:6267

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

7 years agoOmit encode-platform on N5 for all configs.
Ben Wagner [Tue, 21 Feb 2017 23:17:15 +0000 (18:17 -0500)]
Omit encode-platform on N5 for all configs.

BUG=skia:5876

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

7 years agoWhoops, forgot to re-run build_stages.
Mike Klein [Tue, 21 Feb 2017 22:57:50 +0000 (17:57 -0500)]
Whoops, forgot to re-run build_stages.

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

7 years agoSplit Valgrind jobs -- one DM/NB run per task.
Ben Wagner [Tue, 21 Feb 2017 22:36:57 +0000 (17:36 -0500)]
Split Valgrind jobs -- one DM/NB run per task.

Remove special build for Valgrind -- Valgrind uses the unmodified binary. See skia:6267.

BUG=skia:2789,skia:6267

Change-Id: Id56c460abf36eb2be633ac3a309e0dbc7a278f41
Reviewed-on: https://skia-review.googlesource.com/8723
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agofixed SPIR-V vector equality tests
Ethan Nicholas [Tue, 21 Feb 2017 18:50:00 +0000 (13:50 -0500)]
fixed SPIR-V vector equality tests

BUG=skia:

Change-Id: I6ae597d16c0bd17ce4c0316e7ef65cd52643f4b7
Reviewed-on: https://skia-review.googlesource.com/8804
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

7 years agoMove looping logic into start_pipeline().
Mike Klein [Tue, 21 Feb 2017 21:50:52 +0000 (16:50 -0500)]
Move looping logic into start_pipeline().

This should be a big win on Windows, but I haven't timed there yet.
On my Mac, it's a solid 2% speedup.

PS1 was insufficiently ambitious, but was this for posterity:
    No need to vzeroupper twice on Windows.

    On Windows start_pipeline() will vzeroupper,
    so no need to do it in just_return().

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