platform/upstream/libSkiaSharp.git
8 years agoInstruct yasm to compile position independent code on Android
msarett [Tue, 10 May 2016 21:30:07 +0000 (14:30 -0700)]
Instruct yasm to compile position independent code on Android

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

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

8 years agoSeparate user and raw stencil settings
cdalton [Tue, 10 May 2016 21:23:01 +0000 (14:23 -0700)]
Separate user and raw stencil settings

Adds a new GrUserStencilSettings class that describes in abstract terms
how a draw will use the stencil (e.g. kAlwaysIfInClip, kSetClipBit,
etc.). GrPipelineBuilder now only defines the GrUserStencilSettings.
When the GrPipeline is finalized, the user stencil settings are then
translated into concrete GrStencilSettings.

At this point, GrClipMaskManager only needs to tell the GrAppliedClip
whether or not there is a stencil clip. It does not need to modify
stencil settings and GrPipelineBuilder does not need
AutoRestoreStencil.

This is one step of the stencil overhaul. In the future it will also
allow us to clean up the special case handling for nvpr and the
stateful fClipMode member of GrClipMaskManager.

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

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

8 years agoAdd tests and benches to support the sRGB blitter for SkOpts
herb [Tue, 10 May 2016 20:33:47 +0000 (13:33 -0700)]
Add tests and benches to support the sRGB blitter for SkOpts

 1,370.85 LinearSrcOvericonstrip.pngVSkOptsSSE41
 2,359.69 LinearSrcOvericonstrip.pngVSkOptsDefault
 1,828.72 LinearSrcOvericonstrip.pngVSkOptsNonSimdCore
 3,277.40 LinearSrcOvericonstrip.pngVSkOptsTrivial
 9,862.34 LinearSrcOvericonstrip.pngVSkOptsBruteForce

   633.55 LinearSrcOvermandrill_512.pngVSkOptsSSE41
   684.29 LinearSrcOvermandrill_512.pngVSkOptsDefault
 1,201.88 LinearSrcOvermandrill_512.pngVSkOptsNonSimdCore
 2,382.63 LinearSrcOvermandrill_512.pngVSkOptsTrivial
10,888.74 LinearSrcOvermandrill_512.pngVSkOptsBruteForce

   209.14 LinearSrcOverplane.pngVSkOptsSSE41
   562.24 LinearSrcOverplane.pngVSkOptsDefault
   272.64 LinearSrcOverplane.pngVSkOptsNonSimdCore
   436.46 LinearSrcOverplane.pngVSkOptsTrivial
 1,327.23 LinearSrcOverplane.pngVSkOptsBruteForce

   318.01 LinearSrcOverbaby_tux.pngVSkOptsSSE41
   529.05 LinearSrcOverbaby_tux.pngVSkOptsDefault
   441.33 LinearSrcOverbaby_tux.pngVSkOptsNonSimdCore
   720.50 LinearSrcOverbaby_tux.pngVSkOptsTrivial
 2,191.10 LinearSrcOverbaby_tux.pngVSkOptsBruteForce

   479.68 LinearSrcOveryellow_rose.pngVSkOptsSSE41
 1,095.03 LinearSrcOveryellow_rose.pngVSkOptsDefault
   668.60 LinearSrcOveryellow_rose.pngVSkOptsNonSimdCore
 1,257.19 LinearSrcOveryellow_rose.pngVSkOptsTrivial
 4,970.25 LinearSrcOveryellow_rose.pngVSkOptsBruteForce

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1939513002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

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

8 years agoFix nvpr path renderer to reject styles with nonDashPathEffects.
bsalomon [Tue, 10 May 2016 18:57:04 +0000 (11:57 -0700)]
Fix nvpr path renderer to reject styles with nonDashPathEffects.

TBR=robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1965903002

NOTRY=true

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

8 years agoRemove config range asserts that cause tautological-constant-out-of-range-compare...
bsalomon [Tue, 10 May 2016 17:23:50 +0000 (10:23 -0700)]
Remove config range asserts that cause tautological-constant-out-of-range-compare warnings
on clang
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1964053002

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

8 years agoFix AllocedProxyTest on Mesa
robertphillips [Tue, 10 May 2016 17:23:30 +0000 (10:23 -0700)]
Fix AllocedProxyTest on Mesa

Mesa is handing us a context that supports MSAA but has 0 as the max number of color samples

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

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

8 years agoReplace GrStrokeInfo with GrStyle.
bsalomon [Tue, 10 May 2016 16:14:17 +0000 (09:14 -0700)]
Replace GrStrokeInfo with GrStyle.

A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002

Committed: https://skia.googlesource.com/skia/+/33595bdf4b64a745f6340338d307e806e96c587f

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

8 years agoOnly enable SRGB write control on desktop GL when SRGB is supported.
bsalomon [Tue, 10 May 2016 16:05:06 +0000 (09:05 -0700)]
Only enable SRGB write control on desktop GL when SRGB is supported.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1961273004

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

8 years agoAdd flexible keybinding/command system to sk_app.
brianosman [Tue, 10 May 2016 13:50:49 +0000 (06:50 -0700)]
Add flexible keybinding/command system to sk_app.

Viewer demonstrates use: Just create an instance of CommandSet,
register with the window, and add commands. Hopefully, we can keep
all commands in one place, and get some nice side-benefits. With
this framework, if you want to add a new command, you are only
required to add code in ONE place. And you get added to the help
screen, for free.

CommandSet automatically binds 'h' to cycle through the help modes.
(Functional grouping is most useful for general use, but the other
mode is nice to know what a key does, or to find an unused key for
a new feature).

Grouped by function: https://screenshot.googleplex.com/G5h3f52wFKu.png
Alphabetical by key: https://screenshot.googleplex.com/nZiopabLKJ6.png

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

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

8 years agoSet level count for wrapped backbuffer
jvanverth [Tue, 10 May 2016 13:42:18 +0000 (06:42 -0700)]
Set level count for wrapped backbuffer

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

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

8 years agoRevert of Replace GrStrokeInfo with GrStyle. (patchset #4 id:160001 of https://codere...
bsalomon [Tue, 10 May 2016 13:19:21 +0000 (06:19 -0700)]
Revert of Replace GrStrokeInfo with GrStyle. (patchset #4 id:160001 of https://codereview.chromium.org/1957363002/ )

Reason for revert:
Breaking some bots

Original issue's description:
> Replace GrStrokeInfo with GrStyle.
>
> A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers.
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002
>
> Committed: https://skia.googlesource.com/skia/+/33595bdf4b64a745f6340338d307e806e96c587f

TBR=egdaniel@google.com,robertphillips@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

8 years agoRun RAW images serially on Win8-MSVC-ShuttleB
scroggo [Tue, 10 May 2016 13:11:20 +0000 (06:11 -0700)]
Run RAW images serially on Win8-MSVC-ShuttleB

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

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

8 years agoReplace GrStrokeInfo with GrStyle.
bsalomon [Tue, 10 May 2016 12:57:27 +0000 (05:57 -0700)]
Replace GrStrokeInfo with GrStyle.

A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002

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

8 years agorefactor drawPath to have drawDevPath
reed [Tue, 10 May 2016 00:48:46 +0000 (17:48 -0700)]
refactor drawPath to have drawDevPath
pre-CL for larger change to support read-only paths

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

TBR=

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

8 years agoApproximate common gamma tables as single values
msarett [Mon, 9 May 2016 21:27:48 +0000 (14:27 -0700)]
Approximate common gamma tables as single values

This should improve performance of gamma conversion in
software (we can use vector math instead of table look
ups).

Additionally this allows us to quickly and easily
identify sRGB-like gammas.

On gpu, identifying sRGB gamma improves performance/memory,
because the hardware may support gamma conversion.

This will help us identify situations where gamma
conversion is not necessary.
Ex: sRGB input -> sRGB display

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

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

8 years agoMake DM fail if no configs were successfully created
brianosman [Mon, 9 May 2016 20:42:16 +0000 (13:42 -0700)]
Make DM fail if no configs were successfully created

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

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

8 years agoStop valgrind bot from crashing
scroggo [Mon, 9 May 2016 20:20:58 +0000 (13:20 -0700)]
Stop valgrind bot from crashing

make_surface is returning nullptr, resulting in an invalid read.

Add an error message with debugging information and skip this
iteration.

Also switch to cleaner for loop syntax.

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

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

8 years agoIncorporate scale into GrStyle and GrShape
bsalomon [Mon, 9 May 2016 20:02:01 +0000 (13:02 -0700)]
Incorporate scale into GrStyle and GrShape
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1952383003

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

8 years agoMake SkAssertResult work with SK_WARN_UNUSED_RESULT in Release on gcc
bsalomon [Mon, 9 May 2016 19:35:17 +0000 (12:35 -0700)]
Make SkAssertResult work with SK_WARN_UNUSED_RESULT in Release on gcc
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1962723003

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

8 years agoAllow gpu ResourceHandle class to be shared for multiple purposes
egdaniel [Mon, 9 May 2016 18:03:48 +0000 (11:03 -0700)]
Allow gpu ResourceHandle class to be shared for multiple purposes

Currently this class was just used for resource handles when building up
a shader. However, I want to now use this class for things like objects
owned/held by the GrVkResourceProvider which are used by other classes.
An example of this will be for GrVkRenderTargets to hold a handle to a
collection of compatible render passes without having to own/hold onto
the render passes themselves.

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

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

8 years agoBreak apart shared use of varying and uniform transforms
egdaniel [Mon, 9 May 2016 17:22:19 +0000 (10:22 -0700)]
Break apart shared use of varying and uniform transforms

This is a pre-cl for: https://codereview.chromium.org/1955893002/

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

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

8 years agoNo error if function marked with SK_WARN_UNUSED_RESULT is used in SkAssertResult
bsalomon [Mon, 9 May 2016 16:14:36 +0000 (09:14 -0700)]
No error if function marked with SK_WARN_UNUSED_RESULT is used in SkAssertResult
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1955263002

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

8 years agoReset layout to undefined when we realloc VkTexture memory
egdaniel [Mon, 9 May 2016 15:53:59 +0000 (08:53 -0700)]
Reset layout to undefined when we realloc VkTexture memory

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

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

8 years agoInitial commit of our new Android app to demo Skia.
liyuqian [Mon, 9 May 2016 15:49:29 +0000 (08:49 -0700)]
Initial commit of our new Android app to demo Skia.

Currently, there's only a simple Activity with a title bar and a surface view
that connects with Skia viewer native application.

Before integrating user action events, I want to make sure that the design and
implementation so far are good.  Note that the old NativeApplication-based
Activity (ViewerActivity) is still there for reference and test purposes. It
will be removed eventually.

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

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

8 years agoLess indentation.
bungeman [Mon, 9 May 2016 15:41:01 +0000 (08:41 -0700)]
Less indentation.

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

8 years agoharfbuzz test: compile fewer files
halcanary [Mon, 9 May 2016 15:15:58 +0000 (08:15 -0700)]
harfbuzz test: compile fewer files

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

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

8 years agoDEPS: update icu + sfntly
halcanary [Mon, 9 May 2016 15:00:26 +0000 (08:00 -0700)]
DEPS: update icu + sfntly

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

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

8 years agoReland of Simplify SkGpuBlurUtils::GaussianBlur method (patchset #1 id:1 of https...
robertphillips [Mon, 9 May 2016 13:45:37 +0000 (06:45 -0700)]
Reland of Simplify SkGpuBlurUtils::GaussianBlur method (patchset #1 id:1 of https://codereview.chromium.org/1956023002/ )

Reason for revert:
May not be as bad as was thought

Original issue's description:
> Revert of Simplify SkGpuBlurUtils::GaussianBlur method (patchset #2 id:20001 of https://codereview.chromium.org/1958603002/ )
>
> Reason for revert:
> Looks like it's causing some issues with the bleed_image GM.
>
> Original issue's description:
> > Simplify SkGpuBlurUtils::GaussianBlur method
> >
> > No one was using the canClobberSrc capability and moving the direct filtering case forward makes the rest of the logic simpler.
> >
> > Split out of: https://codereview.chromium.org/1959493002/ (Retract GrRenderTarget from SkGpuBlurUtils)
> >
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1958603002
> >
> > Committed: https://skia.googlesource.com/skia/+/56a85e69a8d034e0fdee00e8207cda0a9da06fee
>
> TBR=bsalomon@google.com,robertphillips@google.com
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://skia.googlesource.com/skia/+/67a58dcd4a1e79e5832161ae953526d27893aa61

TBR=bsalomon@google.com,jvanverth@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.

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

8 years agoSkAdvancedTypefaceMetrics: getAdvanceData uses std::function
halcanary [Mon, 9 May 2016 13:34:39 +0000 (06:34 -0700)]
SkAdvancedTypefaceMetrics: getAdvanceData uses std::function

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

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

8 years agoReland of Disable layer hoisting for non-8888 canvases (patchset #1 id:1 of https...
robertphillips [Mon, 9 May 2016 12:12:18 +0000 (05:12 -0700)]
Reland of Disable layer hoisting for non-8888 canvases (patchset #1 id:1 of https://codereview.chromium.org/1961483002/ )

Reason for revert:
This CL was not the culprit in the perf regression.

Original issue's description:
> Revert of Disable layer hoisting for non-8888 canvases (patchset #2 id:20001 of https://codereview.chromium.org/1957433002/ )
>
> Reason for revert:
> Experimental revert to investigate perf regression
>
> Original issue's description:
> > Disable layer hoisting for non-8888 canvases
> >
> > This just stops the bleeding. A real fix would propagate the canvas' backing type down to the layer hoister.
> >
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957433002
> >
> > Committed: https://skia.googlesource.com/skia/+/4e30f27164179d344f0c8efa9a691d1bc9a53e3f
>
> TBR=bsalomon@google.com
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://skia.googlesource.com/skia/+/6b53b9daeb2137a91d8ddb8e890d66c702bfbaa3

TBR=bsalomon@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.

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

8 years agoSkAdvancedTypefaceMetrics: abstract out linked list
halcanary [Mon, 9 May 2016 01:47:16 +0000 (18:47 -0700)]
SkAdvancedTypefaceMetrics: abstract out linked list

+ use SkSinglyLinkedList<T>
+ move SkSinglyLinkedList.h to core
+ remove SkHackyAutoTDelete
+ getAdvanceData() -> setGlyphWidths()
+ finishRange no longer templated
+ remove unused templated functions

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

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

8 years agoUpdate SKP version
update-skps [Sun, 8 May 2016 07:41:08 +0000 (00:41 -0700)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

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

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

8 years agodocumentation: SkMilestone
halcanary [Fri, 6 May 2016 21:09:09 +0000 (14:09 -0700)]
documentation: SkMilestone

https://skia.org/schedule?cl=1956473006
NOTRY=true
TBR=

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

8 years agoAdd sRGB mode toggle to Viewer.
brianosman [Fri, 6 May 2016 20:28:57 +0000 (13:28 -0700)]
Add sRGB mode toggle to Viewer.

Unlike SampleApp, this just switches out the format of the window
surface (and then adjusts the gamma-correct flag on the SkSurfaces).

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

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

8 years agoRevert of Simplify SkGpuBlurUtils::GaussianBlur method (patchset #2 id:20001 of https...
jvanverth [Fri, 6 May 2016 20:05:09 +0000 (13:05 -0700)]
Revert of Simplify SkGpuBlurUtils::GaussianBlur method (patchset #2 id:20001 of https://codereview.chromium.org/1958603002/ )

Reason for revert:
Looks like it's causing some issues with the bleed_image GM.

Original issue's description:
> Simplify SkGpuBlurUtils::GaussianBlur method
>
> No one was using the canClobberSrc capability and moving the direct filtering case forward makes the rest of the logic simpler.
>
> Split out of: https://codereview.chromium.org/1959493002/ (Retract GrRenderTarget from SkGpuBlurUtils)
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1958603002
>
> Committed: https://skia.googlesource.com/skia/+/56a85e69a8d034e0fdee00e8207cda0a9da06fee

TBR=bsalomon@google.com,robertphillips@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

8 years agoClean up GrVkImage::setLayout()
jvanverth [Fri, 6 May 2016 19:31:28 +0000 (12:31 -0700)]
Clean up GrVkImage::setLayout()

Fixes issues with mipmap generation, and calculates src information
inside the routine rather than having the client do it.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1950713006

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

8 years agoRemove Sk(Float|Double)PinToFixed functions, only used in tests.
brianosman [Fri, 6 May 2016 18:45:55 +0000 (11:45 -0700)]
Remove Sk(Float|Double)PinToFixed functions, only used in tests.

These were triggering compile-time floating point overflow for one user,
and we don't use them.

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

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

8 years agoFix issue where GrStyle::applyToPath exited before applying stroke
bsalomon [Fri, 6 May 2016 18:07:03 +0000 (11:07 -0700)]
Fix issue where GrStyle::applyToPath exited before applying stroke
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1954123002

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

8 years agoFix for Sk4f Ubuntu compile warning
jvanverth [Fri, 6 May 2016 18:03:18 +0000 (11:03 -0700)]
Fix for Sk4f Ubuntu compile warning

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1958633003
TBR=herbderby@google.com

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

8 years agoRemove hasMixedSamples() from GrPipelineBuilder
cdalton [Fri, 6 May 2016 16:41:16 +0000 (09:41 -0700)]
Remove hasMixedSamples() from GrPipelineBuilder

This info is unknown until after any clip has been applied to the
stencil settings, so it's misleading to include in the builder.

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

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

8 years agoFix for Ubuntu compile warning
jvanverth [Fri, 6 May 2016 16:33:55 +0000 (09:33 -0700)]
Fix for Ubuntu compile warning

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

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

8 years agoDisable skia_warnings_as_errors for Fast bot.
benjaminwagner [Fri, 6 May 2016 16:30:08 +0000 (09:30 -0700)]
Disable skia_warnings_as_errors for Fast bot.

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

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

8 years agoDetect an invalid intervalCount in SkRegion during deserialiation.
senorblanco [Fri, 6 May 2016 15:48:57 +0000 (08:48 -0700)]
Detect an invalid intervalCount in SkRegion during deserialiation.

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

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

8 years agoSkAdvancedTypefaceMetrics: fail cleanly.
halcanary [Fri, 6 May 2016 15:45:46 +0000 (08:45 -0700)]
SkAdvancedTypefaceMetrics: fail cleanly.

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

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

8 years agohttps://groups.google.com/forum/#!topic/skia-discuss/2F2she2nQMg
halcanary [Fri, 6 May 2016 15:03:44 +0000 (08:03 -0700)]
https://groups.google.com/forum/#!topic/skia-discuss/2F2she2nQMg

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

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

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

8 years agoRevert of Retract GrRenderTarget a bit within SkGpuDevice (patchset #2 id:20001 of...
robertphillips [Fri, 6 May 2016 14:55:19 +0000 (07:55 -0700)]
Revert of Retract GrRenderTarget a bit within SkGpuDevice (patchset #2 id:20001 of https://codereview.chromium.org/1956473002/ )

Reason for revert:
Experimental revert to track down perf regression

Original issue's description:
> Retract GrRenderTarget a bit within SkGpuDevice
>
> Split off of: https://codereview.chromium.org/1930013002/ ((Mostly) Retract GrRenderTarget from SkGpuDevice)
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1956473002
>
> Committed: https://skia.googlesource.com/skia/+/d215a95882485026d176a81bf58871276b21c89c

TBR=bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

8 years agoSkAdvancedTypefaceMetrics: improve robustness
halcanary [Fri, 6 May 2016 14:30:13 +0000 (07:30 -0700)]
SkAdvancedTypefaceMetrics: improve robustness

Manually unwind linked list.

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

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

8 years agoTake SkStrokeRec::InitStyle rather than SkPaint::Style in mask filter and DrawMask
bsalomon [Fri, 6 May 2016 14:22:58 +0000 (07:22 -0700)]
Take SkStrokeRec::InitStyle rather than SkPaint::Style in mask filter and DrawMask
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1955633002

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

8 years agoCompile SkForceLinking on CMake
msarett [Fri, 6 May 2016 14:21:26 +0000 (07:21 -0700)]
Compile SkForceLinking on CMake

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1956573002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

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

8 years agoSimplify SkGpuBlurUtils::GaussianBlur method
robertphillips [Fri, 6 May 2016 14:17:49 +0000 (07:17 -0700)]
Simplify SkGpuBlurUtils::GaussianBlur method

No one was using the canClobberSrc capability and moving the direct filtering case forward makes the rest of the logic simpler.

Split out of: https://codereview.chromium.org/1959493002/ (Retract GrRenderTarget from SkGpuBlurUtils)

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

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

8 years agoRevert of Disable layer hoisting for non-8888 canvases (patchset #2 id:20001 of https...
robertphillips [Fri, 6 May 2016 14:16:18 +0000 (07:16 -0700)]
Revert of Disable layer hoisting for non-8888 canvases (patchset #2 id:20001 of https://codereview.chromium.org/1957433002/ )

Reason for revert:
Experimental revert to investigate perf regression

Original issue's description:
> Disable layer hoisting for non-8888 canvases
>
> This just stops the bleeding. A real fix would propagate the canvas' backing type down to the layer hoister.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957433002
>
> Committed: https://skia.googlesource.com/skia/+/4e30f27164179d344f0c8efa9a691d1bc9a53e3f

TBR=bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

8 years agoWhitespace change to test bots
borenet [Fri, 6 May 2016 13:41:36 +0000 (06:41 -0700)]
Whitespace change to test bots

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

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

8 years agoremove alias for SkMatrix44.h -- chrome callers have been updated
reed [Fri, 6 May 2016 02:31:45 +0000 (19:31 -0700)]
remove alias for SkMatrix44.h -- chrome callers have been updated

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

TBR=

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

8 years agoSkOncePtr -> SkOnce
mtklein [Thu, 5 May 2016 23:05:56 +0000 (16:05 -0700)]
SkOncePtr -> SkOnce

It's always nice to kill off a synchronization primitive.
And while less terse, I think this new code reads more clearly.

... and, SkOncePtr's tests were the only thing now using sk_num_cores()
outside of SkTaskGroup, so I've hidden it as static inside SkTaskGroup.cpp.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1953533002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Committed: https://skia.googlesource.com/skia/+/9bd3fc7fa9bb7cad050bd619aa93d4c48ebb5c02

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

8 years agoFix unit test crash caused by OSMesa not supporting rendering to GL_ALPHA8
bsalomon [Thu, 5 May 2016 21:40:03 +0000 (14:40 -0700)]
Fix unit test crash caused by OSMesa not supporting rendering to GL_ALPHA8
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1947373003

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

8 years agoRevert of Modify LineBench for drawing straight line (patchset #3 id:40001 of https...
reed [Thu, 5 May 2016 21:02:36 +0000 (14:02 -0700)]
Revert of Modify LineBench for drawing straight line (patchset #3 id:40001 of https://codereview.chromium.org/1936153002/ )

Reason for revert:
         for (int i = 0; i < loops; i++) {
 54             canvas->drawPoints(SkCanvas::kLines_PointMode, PTS, fPts, paint);  68             canvas->drawLine(fStartPts[i].x(), fStartPts[i].y(), fEndPts[i].x(), fEndPts[i].y(), pai
    nt);

This change means we index arbitrarily far into fStartPts (if loops gets big enough).

Original issue's description:
> Modify LineBench for drawing
>
> Currently we only have benchmark for lines that contains randomly generated
> points. This CL modifies the benchmark which adds cases of drawing straight
> lines. Also, this CL changes the call from drawPoints() to drawLines()
> which measures the performance of line drawing.
>
> BUG=skia:5243
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1936153002
>
> Committed: https://skia.googlesource.com/skia/+/6b27a5e7292d9a18e376f0c229ec62f7b801305a

TBR=bsalomon@chromium.org,robertphillips@chromium.org,robertphillips@google.com,xidachen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:5243

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

8 years agoModify LineBench for drawing
xidachen [Thu, 5 May 2016 20:24:04 +0000 (13:24 -0700)]
Modify LineBench for drawing

Currently we only have benchmark for lines that contains randomly generated
points. This CL modifies the benchmark which adds cases of drawing straight
lines. Also, this CL changes the call from drawPoints() to drawLines()
which measures the performance of line drawing.

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

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

8 years agoDisable layer hoisting for non-8888 canvases
robertphillips [Thu, 5 May 2016 19:38:03 +0000 (12:38 -0700)]
Disable layer hoisting for non-8888 canvases

This just stops the bleeding. A real fix would propagate the canvas' backing type down to the layer hoister.

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

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

8 years agoMore refactoring for Viewer
jvanverth [Thu, 5 May 2016 19:32:03 +0000 (12:32 -0700)]
More refactoring for Viewer

* Move support files into sk_app and main files up to top directory
* Rename VulkanTestContext and create WindowContext parent class
* Place VulkanWindowContext et al. in sk_app namespace.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1944413005

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

8 years agoAdded --deepColor option to SampleApp, triggers creation of a ten-bit/channel
brianosman [Thu, 5 May 2016 19:24:31 +0000 (12:24 -0700)]
Added --deepColor option to SampleApp, triggers creation of a ten-bit/channel
buffer. (Only on Windows at the moment). Uses new effect to do the final
gamma adjustment

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

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

8 years agoRetract GrRenderTarget a bit within SkGpuDevice
robertphillips [Thu, 5 May 2016 19:03:29 +0000 (12:03 -0700)]
Retract GrRenderTarget a bit within SkGpuDevice

Split off of: https://codereview.chromium.org/1930013002/ ((Mostly) Retract GrRenderTarget from SkGpuDevice)

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

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

8 years agoBring back sRGB-write-control as a caps bit.
brianosman [Thu, 5 May 2016 18:52:53 +0000 (11:52 -0700)]
Bring back sRGB-write-control as a caps bit.

We're not going to support this on Vulkan (yet), but want to still
have it as an option for GL. (The fallback alternative for our YUV use
case involves injecting expensive fragment shader code, which we'd like
to avoid).

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

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

8 years agoexperimental/tools/coreGraphicsPdf2png: remove skia dependency
halcanary [Thu, 5 May 2016 18:17:08 +0000 (11:17 -0700)]
experimental/tools/coreGraphicsPdf2png: remove skia dependency

// experimental-only
TBR=
NOTRY=true

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

8 years agoUpdate SK_IMAGE_VERSION to 5
msarett [Thu, 5 May 2016 18:03:38 +0000 (11:03 -0700)]
Update SK_IMAGE_VERSION to 5

This is should allow us to begin seeing colorspace tests on Gold.

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

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

8 years agoRemove NEON runtime detection support.
mtklein [Thu, 5 May 2016 17:58:39 +0000 (10:58 -0700)]
Remove NEON runtime detection support.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1952953004
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

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

8 years agoModernize SkMutex and SkSemaphore.
mtklein [Thu, 5 May 2016 17:57:37 +0000 (10:57 -0700)]
Modernize SkMutex and SkSemaphore.

   - use <atomic>
   - fuse SkMutex and SkBaseMutex
   - fuse SkSemaphore and SkBaseSemaphore

Still TODO:
   - replace SK_DECLARE_STATIC_MUTEX(name) with static SkMutex name

I just didn't want to bother fixing all that up until I know this CL sticks.

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

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

Committed: https://skia.googlesource.com/skia/+/427c2819d9237d7d7729c59238036cfc73c072ea

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

8 years agoMake GrPathRenderer only support fills for path stenciling
bsalomon [Thu, 5 May 2016 16:26:21 +0000 (09:26 -0700)]
Make GrPathRenderer only support fills for path stenciling

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

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

8 years agoStop banning stroke-and-fill for GrStyle and add tests
bsalomon [Thu, 5 May 2016 15:28:30 +0000 (08:28 -0700)]
Stop banning stroke-and-fill for GrStyle and add tests

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

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

8 years agoRevert of SkOncePtr -> SkOnce (patchset #1 id:1 of https://codereview.chromium.org...
reed [Thu, 5 May 2016 08:36:43 +0000 (01:36 -0700)]
Revert of SkOncePtr -> SkOnce (patchset #1 id:1 of https://codereview.chromium.org/1949313003/ )

Reason for revert:
ok, I have no idea what's going on

Original issue's description:
> Reland of SkOncePtr -> SkOnce (patchset #1 id:1 of https://codereview.chromium.org/1945293004/ )
>
> Reason for revert:
> previous revert unneeded (I think)
>
> Original issue's description:
> > Revert of SkOncePtr -> SkOnce (patchset #4 id:60001 of https://codereview.chromium.org/1953533002/ )
> >
> > Reason for revert:
> > broken the Mac and Linux builders, e.g.:
> >
> > https://build.chromium.org/p/chromium/builders/Mac/builds/15151
> > https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/19052
> >
> > Original issue's description:
> > > SkOncePtr -> SkOnce
> > >
> > > It's always nice to kill off a synchronization primitive.
> > > And while less terse, I think this new code reads more clearly.
> > >
> > > ... and, SkOncePtr's tests were the only thing now using sk_num_cores()
> > > outside of SkTaskGroup, so I've hidden it as static inside SkTaskGroup.cpp.
> > >
> > > BUG=skia:
> > > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1953533002
> > > CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
> > >
> > > Committed: https://skia.googlesource.com/skia/+/9bd3fc7fa9bb7cad050bd619aa93d4c48ebb5c02
> >
> > TBR=herb@google.com,mtklein@chromium.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/7eb33da7eede34c050b865dbb1b60c3dcea7191b
>
> TBR=herb@google.com,mtklein@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/82da9a8aa0ce648f36882830765b42e0ada6c0fa

TBR=herb@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

8 years agoReland of SkOncePtr -> SkOnce (patchset #1 id:1 of https://codereview.chromium.org...
reed [Thu, 5 May 2016 08:28:56 +0000 (01:28 -0700)]
Reland of SkOncePtr -> SkOnce (patchset #1 id:1 of https://codereview.chromium.org/1945293004/ )

Reason for revert:
previous revert unneeded (I think)

Original issue's description:
> Revert of SkOncePtr -> SkOnce (patchset #4 id:60001 of https://codereview.chromium.org/1953533002/ )
>
> Reason for revert:
> broken the Mac and Linux builders, e.g.:
>
> https://build.chromium.org/p/chromium/builders/Mac/builds/15151
> https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/19052
>
> Original issue's description:
> > SkOncePtr -> SkOnce
> >
> > It's always nice to kill off a synchronization primitive.
> > And while less terse, I think this new code reads more clearly.
> >
> > ... and, SkOncePtr's tests were the only thing now using sk_num_cores()
> > outside of SkTaskGroup, so I've hidden it as static inside SkTaskGroup.cpp.
> >
> > BUG=skia:
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1953533002
> > CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
> >
> > Committed: https://skia.googlesource.com/skia/+/9bd3fc7fa9bb7cad050bd619aa93d4c48ebb5c02
>
> TBR=herb@google.com,mtklein@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/7eb33da7eede34c050b865dbb1b60c3dcea7191b

TBR=herb@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

8 years agoRevert of Modernize SkMutex and SkSemaphore. (patchset #2 id:20001 of https://coderev...
sclittle [Thu, 5 May 2016 01:23:30 +0000 (18:23 -0700)]
Revert of Modernize SkMutex and SkSemaphore. (patchset #2 id:20001 of https://codereview.chromium.org/1947153002/ )

Reason for revert:
This CL seems to have broken the Linux x64 and Mac
bots, e.g.

https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/19052
https://build.chromium.org/p/chromium/builders/Mac/builds/15151

The error appears to have something to do with new static initializers being
added.

Original issue's description:
> Modernize SkMutex and SkSemaphore.
>
>    - use <atomic>
>    - fuse SkMutex and SkBaseMutex
>    - fuse SkSemaphore and SkBaseSemaphore
>
> Still TODO:
>    - replace SK_DECLARE_STATIC_MUTEX(name) with static SkMutex name
>
> I just didn't want to bother fixing all that up until I know this CL sticks.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1947153002
>
> No public API changes.
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/427c2819d9237d7d7729c59238036cfc73c072ea

TBR=herb@google.com,mtklein@chromium.org,reed@google.com,bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=609340

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

8 years agoRevert of SkOncePtr -> SkOnce (patchset #4 id:60001 of https://codereview.chromium...
reed [Thu, 5 May 2016 00:14:44 +0000 (17:14 -0700)]
Revert of SkOncePtr -> SkOnce (patchset #4 id:60001 of https://codereview.chromium.org/1953533002/ )

Reason for revert:
broken the Mac and Linux builders, e.g.:

https://build.chromium.org/p/chromium/builders/Mac/builds/15151
https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/19052

Original issue's description:
> SkOncePtr -> SkOnce
>
> It's always nice to kill off a synchronization primitive.
> And while less terse, I think this new code reads more clearly.
>
> ... and, SkOncePtr's tests were the only thing now using sk_num_cores()
> outside of SkTaskGroup, so I've hidden it as static inside SkTaskGroup.cpp.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1953533002
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/9bd3fc7fa9bb7cad050bd619aa93d4c48ebb5c02

TBR=herb@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

8 years agoRevert of SK_DECLARE_STATIC_MUTEX -> static SkMutex (patchset #1 id:1 of https:/...
reed [Thu, 5 May 2016 00:12:46 +0000 (17:12 -0700)]
Revert of SK_DECLARE_STATIC_MUTEX -> static SkMutex (patchset #1 id:1 of https://codereview.chromium.org/1948193002/ )

Reason for revert:
broken the Mac and Linux builders, e.g.:

https://build.chromium.org/p/chromium/builders/Mac/builds/15151
https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/19052

Original issue's description:
> SK_DECLARE_STATIC_MUTEX -> static SkMutex
>
> There's no need to use a macro to declare static SkMutexes any more
> (and there's likewise no need to restrict them to global scope).
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1948193002
>
> Committed: https://skia.googlesource.com/skia/+/5e56cfd3fa1041dbb83899844fb92fa9a2ef1009

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

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

8 years agoSK_DECLARE_STATIC_MUTEX -> static SkMutex
mtklein [Wed, 4 May 2016 22:21:12 +0000 (15:21 -0700)]
SK_DECLARE_STATIC_MUTEX -> static SkMutex

There's no need to use a macro to declare static SkMutexes any more
(and there's likewise no need to restrict them to global scope).

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

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

8 years agoSkOncePtr -> SkOnce
mtklein [Wed, 4 May 2016 21:40:18 +0000 (14:40 -0700)]
SkOncePtr -> SkOnce

It's always nice to kill off a synchronization primitive.
And while less terse, I think this new code reads more clearly.

... and, SkOncePtr's tests were the only thing now using sk_num_cores()
outside of SkTaskGroup, so I've hidden it as static inside SkTaskGroup.cpp.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1953533002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

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

8 years agoNow we're on MSVC 2015, try using std::chrono for timing again.
mtklein [Wed, 4 May 2016 21:02:14 +0000 (14:02 -0700)]
Now we're on MSVC 2015, try using std::chrono for timing again.

2015's std::chrono::high_resolution_clock should have a precision equal to our old custom code.

Tested this locally on Windows 10 and Mac (the two affected platforms).

Long term SkTime::GetNSecs() can probably be phased out for direct <chrono> use.

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

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

8 years agoSimplify implementation of SkOnce to not need so many comments.
mtklein [Wed, 4 May 2016 20:57:30 +0000 (13:57 -0700)]
Simplify implementation of SkOnce to not need so many comments.

I think this version reads more clearly, and the key invariants are
expressed in code rather than comments:
   - race losers always go through an acquire
   - we never exit the function unless fState is Done

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

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

8 years agoMake cap only affect the keys of GrShapes that are possibly-open
bsalomon [Wed, 4 May 2016 20:50:29 +0000 (13:50 -0700)]
Make cap only affect the keys of GrShapes that are possibly-open

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

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

8 years agoRename VulkanViewer to Viewer, take 2.
jvanverth [Wed, 4 May 2016 20:49:13 +0000 (13:49 -0700)]
Rename VulkanViewer to Viewer, take 2.

Also puts Window and Application in sk_app namespace.

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

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

8 years agoRemove executable bit from source code files.
benjaminwagner [Wed, 4 May 2016 20:45:06 +0000 (13:45 -0700)]
Remove executable bit from source code files.

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

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

8 years agomove colorshader into its own .cpp, add color4f variant
reed [Wed, 4 May 2016 20:09:39 +0000 (13:09 -0700)]
move colorshader into its own .cpp, add color4f variant

Implemented as a different subclass for SkColorShader (which is also private) partly to make the CL clearer/simpler, and partly for flatten/unflatten compatibility. Later I'm sure we could combine these if that proves useful.

Lots of TODOs at the moment, but still valuable to get reviewed.

Note: this ignores the question (for the moment) about how to interpret SkColor in the larger world. That needs to happen, but this CL is more focused on what *else* to do besides handle the old-style input (and old-style pipeline).

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

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

8 years agoFix ICO bug exposed by the fuzzer
msarett [Wed, 4 May 2016 20:03:48 +0000 (13:03 -0700)]
Fix ICO bug exposed by the fuzzer

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

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

8 years agoAdd Gr*Proxy classes
robertphillips [Wed, 4 May 2016 19:47:41 +0000 (12:47 -0700)]
Add Gr*Proxy classes

This isn't wired in anywhere yet.

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

Committed: https://skia.googlesource.com/skia/+/de5bf0cfeca908b81a28cc50065f7bc2da3d2fd1

Committed: https://skia.googlesource.com/skia/+/92605b35efa0155c44d24bd8415b4cc1db8831db

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

8 years agoAllow stencils to be attached to render targets created via SkSurface::MakeFromBacken...
ericrk [Wed, 4 May 2016 19:01:58 +0000 (12:01 -0700)]
Allow stencils to be attached to render targets created via SkSurface::MakeFromBackendTextureAsRenderTarget

This is a regression from "Refactor to separate backend object lifecycle
and GpuResource budget decision".

GrGLRenderer::canAttemptStencilAttachment was incorrectly returning false
for all wrapped render targets. This function should return false only if
the FBO is wrapped (unowned). If the FBO is owned by Skia, we can attach
stencils.

BUG=608238

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

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

8 years agoModernize SkMutex and SkSemaphore.
mtklein [Wed, 4 May 2016 18:31:29 +0000 (11:31 -0700)]
Modernize SkMutex and SkSemaphore.

   - use <atomic>
   - fuse SkMutex and SkBaseMutex
   - fuse SkSemaphore and SkBaseSemaphore

Still TODO:
   - replace SK_DECLARE_STATIC_MUTEX(name) with static SkMutex name

I just didn't want to bother fixing all that up until I know this CL sticks.

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

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

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

8 years agoDisable Ganesh layer hoister in a more revertable form
robertphillips [Wed, 4 May 2016 18:26:46 +0000 (11:26 -0700)]
Disable Ganesh layer hoister in a more revertable form

I have a worry that disabling the layer hoister might cause a perf regression on tiled architectures. This CL will be easier to revert than https://codereview.chromium.org/1950523002/ (Remove GrLayerHoister)

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

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

8 years agoPrototype code that turns any/every flattenable into JSON
brianosman [Wed, 4 May 2016 18:06:28 +0000 (11:06 -0700)]
Prototype code that turns any/every flattenable into JSON

This makes inspecting things in SkDebugger far more useful - any filter
or other complex object on the paint is ultimately visible. You still
have to do some guess work to figure out what the fields actually mean,
but you can at least cross-reference with the code in flatten().

Screenshots:
Before: https://screenshot.googleplex.com/a6JM5HBBe6G.png
After : https://screenshot.googleplex.com/XQfr4YJ6mnH.png

Changes to public API are just removals and changes to make
some functions virtual.

TBR=reed@google.com

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

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

8 years agoFix ASAN errors.
benjaminwagner [Wed, 4 May 2016 18:06:19 +0000 (11:06 -0700)]
Fix ASAN errors.

These errors occur when building for GPU but running dm with --nogpu. The current ASAN bots do not catch these because 1) the CPU bot compiles with skia_gpu=0 and 2) the GPU bot runs with --nocpu; whereas the new ASAN bots use the same compile for both the CPU and GPU bots.

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

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

8 years agoRevert of Allow stencils to be attached to render targets created via SkSurface:...
jvanverth [Wed, 4 May 2016 17:08:12 +0000 (10:08 -0700)]
Revert of Allow stencils to be attached to render targets created via SkSurface::MakeFromBackendTextureAsRend… (patchset #1 id:60001 of https://codereview.chromium.org/1941353003/ )

Reason for revert:
Breaking the ANGLE bots. Message is:

Caught exception 3221225477 EXCEPTION_ACCESS_VIOLATION

8.59m elapsed, 1 active, 82 queued, 315MB RAM, 1442MB peak
unit test  SurfaceAttachStencil_Gpu
step returned non-zero exit code: -1073741819

Original issue's description:
> Allow stencils to be attached to render targets created via SkSurface::MakeFromBackendTextureAsRenderTarget
>
> This is a regression from "Refactor to separate backend object lifecycle
> and GpuResource budget decision".
>
> GrGLRenderer::canAttemptStencilAttachment was incorrectly returning false
> for all wrapped render targets. This function should return false only if
> the FBO is wrapped (unowned). If the FBO is owned by Skia, we can attach
> stencils.
>
> BUG=608238
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1924183003
>
> Committed: https://skia.googlesource.com/skia/+/0736f3386820f19c0fe90b5dda2094e253780071

TBR=bsalomon@google.com,kkinnunen@nvidia.com,ericrk@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=608238

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

8 years agotools/using_skia_and_harfbuzz: minor cleanup
halcanary [Wed, 4 May 2016 16:34:25 +0000 (09:34 -0700)]
tools/using_skia_and_harfbuzz: minor cleanup

TBR=aam@

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

8 years agoAdd some more testing around hairline GrShapes
bsalomon [Wed, 4 May 2016 15:44:15 +0000 (08:44 -0700)]
Add some more testing around hairline GrShapes
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1949903002

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

8 years agoexperimental/tools/coreGraphicsPdf2png: fix
halcanary [Wed, 4 May 2016 15:42:35 +0000 (08:42 -0700)]
experimental/tools/coreGraphicsPdf2png: fix

NOTRY=true
TBR=

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

8 years agoExpand GrStyle's interface.
bsalomon [Wed, 4 May 2016 15:27:41 +0000 (08:27 -0700)]
Expand GrStyle's interface.

Adds some basic getters on GrStyle as well as static const instances for fill and hairline.

Adds the ability to apply a GrStyle to a SkPath to produce an output SkPath.

Moves style key functions from GrShape to GrStyle.

Also fixes some issues with SkPath creation when applying style to GrShapes.

Adds tests that GrShape produces the correct SkPath when its GrStyle is applied.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1951613002

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

8 years agoFix type conversion compile errors
brianosman [Wed, 4 May 2016 15:19:44 +0000 (08:19 -0700)]
Fix type conversion compile errors

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

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

8 years agoAdd XSAN suppression files to infrabots.isolate. Only compile 'dm' and 'nanobench...
benjaminwagner [Wed, 4 May 2016 13:35:50 +0000 (06:35 -0700)]
Add XSAN suppression files to infrabots.isolate. Only compile 'dm' and 'nanobench' for XSAN flavors.

Needed for https://codereview.chromium.org/1920283002

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

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

8 years agoAllow stencils to be attached to render targets created via SkSurface::MakeFromBacken...
ericrk [Wed, 4 May 2016 00:14:07 +0000 (17:14 -0700)]
Allow stencils to be attached to render targets created via SkSurface::MakeFromBackendTextureAsRenderTarget

This is a regression from "Refactor to separate backend object lifecycle
and GpuResource budget decision".

GrGLRenderer::canAttemptStencilAttachment was incorrectly returning false
for all wrapped render targets. This function should return false only if
the FBO is wrapped (unowned). If the FBO is owned by Skia, we can attach
stencils.

BUG=608238

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

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

8 years agoStart building HarfBuzz+Skia example
halcanary [Tue, 3 May 2016 22:09:52 +0000 (15:09 -0700)]
Start building HarfBuzz+Skia example

(prevent bitrot in example code)

tools/using_skia_and_harfbuzz.cpp was written by aam@:
  https://github.com/aam/skiaex

update HarfBuzz to latest release: 1.2.7

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

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

8 years agoCreate a single, unique pointer to sRGB color space
msarett [Tue, 3 May 2016 21:24:47 +0000 (14:24 -0700)]
Create a single, unique pointer to sRGB color space

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

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

8 years agoRevert of Add Gr*Proxy classes (patchset #10 id:220001 of https://codereview.chromium...
robertphillips [Tue, 3 May 2016 19:56:04 +0000 (12:56 -0700)]
Revert of Add Gr*Proxy classes (patchset #10 id:220001 of https://codereview.chromium.org/1937553002/ )

Reason for revert:
ASAN

Original issue's description:
> Add Gr*Proxy classes
>
> This isn't wired in anywhere yet.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1937553002
>
> Committed: https://skia.googlesource.com/skia/+/de5bf0cfeca908b81a28cc50065f7bc2da3d2fd1
>
> Committed: https://skia.googlesource.com/skia/+/92605b35efa0155c44d24bd8415b4cc1db8831db

TBR=bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

8 years agoreturn 4x4 matrix from SkColorSpace
reed [Tue, 3 May 2016 19:13:21 +0000 (12:13 -0700)]
return 4x4 matrix from SkColorSpace
move SkMatrix44 into core (with alias in utils to transition chrome)

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

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