platform/upstream/libSkiaSharp.git
8 years agoRevert of skcpu: sse4.1 floor, f16c f16<->f32 (patchset #10 id:180001 of https:/...
mtklein [Thu, 14 Apr 2016 23:23:15 +0000 (16:23 -0700)]
Revert of skcpu: sse4.1 floor, f16c f16<->f32 (patchset #10 id:180001 of https://codereview.chromium.org/1891513002/ )

Reason for revert:
Need to change around my #if guards so that clang-cl is treated like GCC and Clang, rather than MSVC.

Original issue's description:
> skcpu: sse4.1 floor, f16c f16<->f32
>
>   -  floor with roundps is about 4.5x faster when available
>   -  f16 srcover_n is similar to but a little faster than the version in https://codereview.chromium.org/1884683002.  This new one fuses the dst load/stores into the f16<->f32 conversions:
>
> +0x180     movups              (%r15), %xmm1
> +0x184     vcvtph2ps           (%rbx), %xmm2
> +0x189     movaps              %xmm1, %xmm3
> +0x18c     shufps              $255, %xmm3, %xmm3
> +0x190     movaps              %xmm0, %xmm4
> +0x193     subps               %xmm3, %xmm4
> +0x196     mulps               %xmm2, %xmm4
> +0x199     addps               %xmm1, %xmm4
> +0x19c     vcvtps2ph           $0, %xmm4, (%rbx)
> +0x1a2     addq                $16, %r15
> +0x1a6     addq                $8, %rbx
> +0x1aa     decl                %r14d
> +0x1ad     jne                 +0x180
>
> If we decide to land this it'd be a good idea to convert most or all users of SkFloatToHalf_01 and SkHalfToFloat_01 over to the pointer-based versions.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1891513002
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/cbe3c1af987d622ea67ef560d855b41bb14a0ce9

TBR=fmalita@chromium.org,herb@google.com,reed@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/1891993002

8 years agoRevert of Fixes for SkRWBuffer (patchset #5 id:80001 of https://codereview.chromium...
bungeman [Thu, 14 Apr 2016 21:57:01 +0000 (14:57 -0700)]
Revert of Fixes for SkRWBuffer (patchset #5 id:80001 of https://codereview.chromium.org/1871953002/ )

Reason for revert:
Making MSAN and TSAN rather unhappy.

https://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN/builds/1586

https://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN/builds/5922

Original issue's description:
> Fixes for SkRWBuffer
>
> Do not call SkBufferHead::validate in SkROBuffer's destructor, which
> may be called in a separate thread from SkRWBuffer::append. validate()
> reads SkBufferBlock::fUsed, and append() writes to it, resulting in
> a data race.
>
> Update some comments to be more clear about how it is safe to use
> these classes across threads.
>
> Test the readers in separate threads.
>
> In addition, make sure it is safe to create a reader even when no
> data has been appended. Add tests for this case.
>
> Mark a parameter to SkBufferHead::validate() as const, reflecting
> its use.
>
> BUG=chromium:601578
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1871953002
>
> Committed: https://skia.googlesource.com/skia/+/d06920a29fe11c68bde2b93948ec99f277bb8459

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

Review URL: https://codereview.chromium.org/1882853004

8 years agoGraduate matrix map-point procs out of SkOpts.
mtklein [Thu, 14 Apr 2016 21:07:02 +0000 (14:07 -0700)]
Graduate matrix map-point procs out of SkOpts.

These are implemented generically with Sk4s and don't benefit
from anything fancier than vanilla SSE/NEON.

This means there's no need to hide this code away in another
file or behind a function pointer... it's readable and we have
compile-time support for all the instructions it needs.

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

Review URL: https://codereview.chromium.org/1872193002

8 years agoMake sure the color profile propagetes through the system.
herb [Thu, 14 Apr 2016 20:58:05 +0000 (13:58 -0700)]
Make sure the color profile propagetes through the system.

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

Review URL: https://codereview.chromium.org/1892543002

8 years agoadd index in getPixels for F16
reed [Thu, 14 Apr 2016 20:34:45 +0000 (13:34 -0700)]
add index in getPixels for F16

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

Review URL: https://codereview.chromium.org/1888883003

8 years agoSeveral fixes for fp 16 rendering:
brianosman [Thu, 14 Apr 2016 19:39:00 +0000 (12:39 -0700)]
Several fixes for fp 16 rendering:

With the GPU backend, allow F16 render targets to be created (along with
any other renderable format). We were previously just falling back to 8888.

In SampleApp, if the window configuration is F16, don't render directly
to the primary surface (which is actually sRGB 8888). Intead, make an
off-screen F16 surface, then blit it back to the framebuffer when we're done.

In DM, clamp values outside of [0,1]. These were wrapping, producing very
incorrect images. (Many filters can trigger out-of-range values due to
ringing).

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

Review URL: https://codereview.chromium.org/1890923003

8 years agoskcpu: sse4.1 floor, f16c f16<->f32
mtklein [Thu, 14 Apr 2016 19:27:38 +0000 (12:27 -0700)]
skcpu: sse4.1 floor, f16c f16<->f32

  -  floor with roundps is about 4.5x faster when available
  -  f16 srcover_n is similar to but a little faster than the version in https://codereview.chromium.org/1884683002.  This new one fuses the dst load/stores into the f16<->f32 conversions:

+0x180     movups              (%r15), %xmm1
+0x184     vcvtph2ps           (%rbx), %xmm2
+0x189     movaps              %xmm1, %xmm3
+0x18c     shufps              $255, %xmm3, %xmm3
+0x190     movaps              %xmm0, %xmm4
+0x193     subps               %xmm3, %xmm4
+0x196     mulps               %xmm2, %xmm4
+0x199     addps               %xmm1, %xmm4
+0x19c     vcvtps2ph           $0, %xmm4, (%rbx)
+0x1a2     addq                $16, %r15
+0x1a6     addq                $8, %rbx
+0x1aa     decl                %r14d
+0x1ad     jne                 +0x180

If we decide to land this it'd be a good idea to convert most or all users of SkFloatToHalf_01 and SkHalfToFloat_01 over to the pointer-based versions.

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

Review URL: https://codereview.chromium.org/1891513002

8 years agoFixes for SkRWBuffer
scroggo [Thu, 14 Apr 2016 18:40:48 +0000 (11:40 -0700)]
Fixes for SkRWBuffer

Do not call SkBufferHead::validate in SkROBuffer's destructor, which
may be called in a separate thread from SkRWBuffer::append. validate()
reads SkBufferBlock::fUsed, and append() writes to it, resulting in
a data race.

Update some comments to be more clear about how it is safe to use
these classes across threads.

Test the readers in separate threads.

In addition, make sure it is safe to create a reader even when no
data has been appended. Add tests for this case.

Mark a parameter to SkBufferHead::validate() as const, reflecting
its use.

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

Review URL: https://codereview.chromium.org/1871953002

8 years agoAdd F16 source to the linear pipelin.
herb [Thu, 14 Apr 2016 18:16:44 +0000 (11:16 -0700)]
Add F16 source to the linear pipelin.

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

Review URL: https://codereview.chromium.org/1882893003

8 years agoExplain Rietveld patching better on site.
bungeman [Thu, 14 Apr 2016 17:25:01 +0000 (10:25 -0700)]
Explain Rietveld patching better on site.

State which values should be updated and how to determine them.

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

Review URL: https://codereview.chromium.org/1883213002

8 years agoPut SkEmptyTypeface in anonymous namespace.
bungeman [Thu, 14 Apr 2016 16:44:34 +0000 (09:44 -0700)]
Put SkEmptyTypeface in anonymous namespace.

We ended up with two SkEmptyTypefaces it differnt places. Avoid this odr
violation by sticking these in anonymous namespaces.

Review URL: https://codereview.chromium.org/1887093002

8 years agomojo -> nojo
mtklein [Thu, 14 Apr 2016 16:42:34 +0000 (09:42 -0700)]
mojo -> nojo

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

Review URL: https://codereview.chromium.org/1889543003

8 years agoAdd doc instructions for multi-repo Chromium trybots.
bungeman [Thu, 14 Apr 2016 16:23:41 +0000 (09:23 -0700)]
Add doc instructions for multi-repo Chromium trybots.

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

Review URL: https://codereview.chromium.org/1865153003

8 years agoMove CPU feature detection to its own file.
mtklein [Thu, 14 Apr 2016 16:03:35 +0000 (09:03 -0700)]
Move CPU feature detection to its own file.

   - Moves CPU feature detection to its own file.
   - Cleans up some redundant feature detection scattered around core/ and opts/.
   - Can now detect a few new CPU features:
       * F16C     -> Intel f16<->f32 instructions, added between AVX and AVX2
       * FMA      -> Intel FMA instructions, added at the same time as AVX2
       * VFP_FP16 -> ARM f16<->f32 instructions, quite common
       * NEON_FMA -> ARM FMA instructions, also quite common
       * SSE and SSE3... why not?

This new internal API makes it very cheap to do fine-grained runtime CPU
feature detection.  Redundant calls to SkCpu::Supports() should be eliminated
and it's hoistable out of loops.  It compiles away entirely when we have the
appropriate instructions available at compile time.

This means we can call it to guard even a little snippet of 1 or 2 instructions
right where needed and let inlining hoist the check (if any at all) up to
somewhere that doesn't hurt performance.  I've explained how I made this work
in the private section of the new header.

Once this lands and bakes a bit, I'll start following up with CLs to use it more
and to add a bunch of those little 1-2 instruction snippets we've been wanting,
e.g. cvtps2ph, cvtph2ps, ptest, pmulld, pmovzxbd, blendvps, pshufb, roundps
(for floor) on x86, and vcvt.f32.f16, vcvt.f16.f32 on ARM.

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

Review URL: https://codereview.chromium.org/1890483002

8 years agoremove U16 support, just support F16
reed [Thu, 14 Apr 2016 16:02:14 +0000 (09:02 -0700)]
remove U16 support, just support F16

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

Review URL: https://codereview.chromium.org/1889753002

8 years agoRemove requestedStyle from SkTypefaceCache.
bungeman [Thu, 14 Apr 2016 15:04:45 +0000 (08:04 -0700)]
Remove requestedStyle from SkTypefaceCache.

The typeface cache contains typefaces which can be compared against to
determine if an already known typeface will work instead of creating a
new typeface id. This is primarily for sharing scaler contexts. How that
typeface was requested is not relevant to this comparison, so don't cache
it. Request caching must be handled separately.

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

Review URL: https://codereview.chromium.org/1879423002

8 years agoSwitch SkMagnifierImageFilter over to new onFilterImage interface
robertphillips [Thu, 14 Apr 2016 14:54:04 +0000 (07:54 -0700)]
Switch SkMagnifierImageFilter over to new onFilterImage interface

Additionally, this CL:

adds crop handling to the CPU path (the GPU path handled it but with a bug)

adds a cropRect (to better justify the applyCropRect)

adds a GM to exercise the cropRect

Note: I believe the handling of cropRects and clipping is deeply flawed but, at least, the two paths are consistently flawed now.

TBR=reed@google.com

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

Review URL: https://codereview.chromium.org/1882943002

8 years agoSince PIEX can now return an uncompressed RGB thumbnail, check the type of the image...
yujieqin [Thu, 14 Apr 2016 14:04:00 +0000 (07:04 -0700)]
Since PIEX can now return an uncompressed RGB thumbnail, check the type of the image before treating it as a JPEG.

Highlights of new PIEX:
* PIEX can now return JPEG compressed image or uncompressed RGB image
* Add IsOfType() and GEtNumberofBytesForIsOfType() to image_type_recognition_lite
* Add GetDngInformation() and GetOrientation() to piex
* Remove deprecated data entries from piex_types

BUG=b/27214608, b/28119810
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1883783002

Review URL: https://codereview.chromium.org/1883783002

8 years agoSimplify gamma-correctness for text rendering.
brianosman [Thu, 14 Apr 2016 13:02:59 +0000 (06:02 -0700)]
Simplify gamma-correctness for text rendering.

Just use the DC flag, independent of the destination pixel config or the
special output override flag (which is only to be used internally be
special effects that will never hit this code path.)

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

Review URL: https://codereview.chromium.org/1888473003

8 years agoFor GOOGLE3, add deref method to SkRefCnt.
benjaminwagner [Thu, 14 Apr 2016 00:51:57 +0000 (17:51 -0700)]
For GOOGLE3, add deref method to SkRefCnt.

This makes it easier to integrate with Blink code using RefPtr/PassRefPtr without pulling in Chrome's SkUserConfig.h.

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

Review URL: https://codereview.chromium.org/1890573003

8 years agoFix legacy NewRenderTarget factory
bsalomon [Wed, 13 Apr 2016 22:10:20 +0000 (15:10 -0700)]
Fix legacy NewRenderTarget factory

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

Review URL: https://codereview.chromium.org/1888593002

8 years agoOnly eglTerminate command buffer displays when no displays are in use
bsalomon [Wed, 13 Apr 2016 22:03:59 +0000 (15:03 -0700)]
Only eglTerminate command buffer displays when no displays are in use

This is a workaround for crbug.com/603223

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

Review URL: https://codereview.chromium.org/1878943008

8 years agoRemove GrTextureStorageAllocator. This was added from Chromium but never used and...
bsalomon [Wed, 13 Apr 2016 21:29:25 +0000 (14:29 -0700)]
Remove GrTextureStorageAllocator. This was added from Chromium but never used and not expected to be used.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1886613003

Review URL: https://codereview.chromium.org/1886613003

8 years agoTweak distance field path renderer behavior in gamma-correct mode to match
brianosman [Wed, 13 Apr 2016 20:56:21 +0000 (13:56 -0700)]
Tweak distance field path renderer behavior in gamma-correct mode to match
recent changes to text rendering.

Uses linear coverage falloff. Produces results that are perceptually more
similar to L32 (raster and gpu). Smoothstep + sRGB was too soft.

Plumb the gamma-correctness via DrawPathArgs, which also paves the way for
other path rendering implementations to easily make decisions about rendering
technique based on that flag.

Fix a few typos and formatting issues from my most recent change.

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

Review URL: https://codereview.chromium.org/1889453002

8 years agoRespect FC_MATRIX and FC_EMBOLDEN as extra font parameters.
bungeman [Wed, 13 Apr 2016 20:50:20 +0000 (13:50 -0700)]
Respect FC_MATRIX and FC_EMBOLDEN as extra font parameters.

A font consists of a set of data and a set of parameters to that data.
For example a ttc font consists of the full font data parameterized by
the index. In addition to the index, FontConfig allows specifying a
matrix and embolden flag. In the future there may also be additional
parameters of this sort, for example which color palette to use.

This does not provide a way to serialize these parameters.
Adding this here provides a nice place to experiment with doing so.

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

Review URL: https://codereview.chromium.org/1890533002

8 years agoRename lots of things from 'sRGB' to 'GammaCorrect', where appropriate
brianosman [Wed, 13 Apr 2016 20:10:14 +0000 (13:10 -0700)]
Rename lots of things from 'sRGB' to 'GammaCorrect', where appropriate

Trying to be much more explicit about where we really mean sRGB as a format,
and where we mean gamma-correct, as in: "not legacy behavior". Most of the
changes to rendering behavior are dependent on the latter, so let's be precise.

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

Review URL: https://codereview.chromium.org/1884873006

8 years agoAdd GM to prevent mis-drawing of LCD text in SkPictureImageFilters
robertphillips [Wed, 13 Apr 2016 17:55:07 +0000 (10:55 -0700)]
Add GM to prevent mis-drawing of LCD text in SkPictureImageFilters

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

Review URL: https://codereview.chromium.org/1878373003

8 years agoFix ChromeOS Swarming bot compile
borenet [Wed, 13 Apr 2016 16:37:25 +0000 (09:37 -0700)]
Fix ChromeOS Swarming bot compile

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

Review URL: https://codereview.chromium.org/1886573004

8 years agoAllow a small tolerance in GrAtlasTextBatch bounds test.
bsalomon [Wed, 13 Apr 2016 15:14:22 +0000 (08:14 -0700)]
Allow a small tolerance in GrAtlasTextBatch bounds test.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1882833002

Review URL: https://codereview.chromium.org/1882833002

8 years agoMake build_shaderc.py blow away output dir and allow build_type arg to contain either...
bsalomon [Wed, 13 Apr 2016 15:02:42 +0000 (08:02 -0700)]
Make build_shaderc.py blow away output dir and allow build_type arg to contain either Debug or Release

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

Review URL: https://codereview.chromium.org/1884963002

8 years agoMake SkSpecialSurfaces always use kUnknown for their pixel geometry
robertphillips [Wed, 13 Apr 2016 14:18:41 +0000 (07:18 -0700)]
Make SkSpecialSurfaces always use kUnknown for their pixel geometry

This now matches how the SkDevices were being created by the device proxy and prevents LCD text from being inadvertently applied.

BUG=602555

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

Review URL: https://codereview.chromium.org/1878143004

8 years agoFix CommandBuffer bot's DM config
borenet [Wed, 13 Apr 2016 13:00:42 +0000 (06:00 -0700)]
Fix CommandBuffer bot's DM config

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

Review URL: https://codereview.chromium.org/1880403002

8 years agoRemove SK_VERY_LEGACY_CREATE_TYPEFACE.
bungeman [Wed, 13 Apr 2016 12:23:35 +0000 (05:23 -0700)]
Remove SK_VERY_LEGACY_CREATE_TYPEFACE.

The flag and code it guards are no longer used.

TBR=reed
This just removes dead code.

Review URL: https://codereview.chromium.org/1882803002

8 years agoSwitch SkMatrixConvolutionImageFilter over to new onFilterImage interface
robertphillips [Wed, 13 Apr 2016 11:54:36 +0000 (04:54 -0700)]
Switch SkMatrixConvolutionImageFilter over to new onFilterImage interface

TBR=reed@google.com

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

Review URL: https://codereview.chromium.org/1877343002

8 years agoremove SK_SUPPORT_NEW_ONCREATESCALERCONTEXT, no longer needed in chdrome
reed [Tue, 12 Apr 2016 23:57:55 +0000 (16:57 -0700)]
remove SK_SUPPORT_NEW_ONCREATESCALERCONTEXT, no longer needed in chdrome

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

TBR=

Review URL: https://codereview.chromium.org/1881733005

8 years agodistinguish distinct matrixconvolution benchmarks
mtklein [Tue, 12 Apr 2016 22:52:52 +0000 (15:52 -0700)]
distinguish distinct matrixconvolution benchmarks

Today they all show as "matrixconvolution", and we probably only log one.

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

Review URL: https://codereview.chromium.org/1886523002

8 years agoBlitter for repeat RGBA8888->RGBA8888.
herb [Tue, 12 Apr 2016 21:07:59 +0000 (14:07 -0700)]
Blitter for repeat RGBA8888->RGBA8888.

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

Review URL: https://codereview.chromium.org/1852613002

8 years agoAdd missing F16 case to reverse pixel config conversion
brianosman [Tue, 12 Apr 2016 20:49:53 +0000 (13:49 -0700)]
Add missing F16 case to reverse pixel config conversion

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

Review URL: https://codereview.chromium.org/1884753002

8 years agoBegin switch to SkFontStyle for legacy calls.
bungeman [Tue, 12 Apr 2016 20:45:06 +0000 (13:45 -0700)]
Begin switch to SkFontStyle for legacy calls.

This adds SK_VERY_LEGACY_CREATE_TYPEFACE which, when defined, provides
only the old interface.

Ideally, everyone would switch directly to SkFontMgr and use one of the
newer calls, but there is currently no path for current users to get
there. This updates all the internals to use SkFontStyle, after
switching these over the higher level APIs can be switched.

The Chromium follow on patch can be seen at https://crrev.com/1877673002

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

TBR=reed
This doesn't really change API, just modernizes it.

Review URL: https://codereview.chromium.org/1873923002

8 years agosRGB support for distance field text.
brianosman [Tue, 12 Apr 2016 19:48:21 +0000 (12:48 -0700)]
sRGB support for distance field text.

Add a second distance field adjust table that only applies contrast,
not fake-gamma correction. Store a flag in the batch at creation time,
using the same logic we apply elsewhere (render target format, plus
paint flags).

That gets us close, but not as good as bitmap text. The final step is
to use a linear step function (rather than smoothstep) to map distance
to coverage, when we have sRGB output. Smoothstep's nonlinear response
is actually doing some fake-gamma, so it ends up over-correcting when
the output is already gamma-correct.

Results are now very close between L32 (old table, smoothstep) and S32
(contrast-only table, linstep).

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

Review URL: https://codereview.chromium.org/1885613002

8 years agoRemove SimpleOffsetFilter
robertphillips [Tue, 12 Apr 2016 19:41:00 +0000 (12:41 -0700)]
Remove SimpleOffsetFilter

SimpleOffsetFilter & SkOffsetImageFilter seem equivalent nowadays.

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

Review URL: https://codereview.chromium.org/1884733002

8 years agoRevert AlphaThresholdFilter to its old behavior wrt premul
robertphillips [Tue, 12 Apr 2016 19:39:26 +0000 (12:39 -0700)]
Revert AlphaThresholdFilter to its old behavior wrt premul

TBR=borenet@google.com

This fixes the "serialize-8888 gm  imagealphathreshold_surface" failure related to:
https://codereview.chromium.org/1879643003/ (Switch AlphaThresholdFilter over to new onFilterImage interface)

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

Review URL: https://codereview.chromium.org/1885633003

8 years agoMake fuzz builds set SK_FUZZ_LOGGING
kjlubick [Tue, 12 Apr 2016 19:02:59 +0000 (12:02 -0700)]
Make fuzz builds set SK_FUZZ_LOGGING

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

Review URL: https://codereview.chromium.org/1878363002

8 years agoSwitch AlphaThresholdFilter over to new onFilterImage interface
robertphillips [Tue, 12 Apr 2016 18:02:25 +0000 (11:02 -0700)]
Switch AlphaThresholdFilter over to new onFilterImage interface

This CL also alters the raster path in two ways:
  it now respects the sRGB/linear distinction of its input
  it now respects the clip

TBR=reed@google.com

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

Review URL: https://codereview.chromium.org/1879643003

8 years agof16 and pm4f are always the same swizzle, so remove adaptor
reed [Tue, 12 Apr 2016 17:32:56 +0000 (10:32 -0700)]
f16 and pm4f are always the same swizzle, so remove adaptor

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

Review URL: https://codereview.chromium.org/1880953003

8 years agoMake more unit tests run on Vulkan
bsalomon [Tue, 12 Apr 2016 16:59:58 +0000 (09:59 -0700)]
Make more unit tests run on Vulkan
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1885623002

Review URL: https://codereview.chromium.org/1885623002

8 years agoGYP_DEFINES and DM flags for Vulkan bot
borenet [Tue, 12 Apr 2016 15:13:56 +0000 (08:13 -0700)]
GYP_DEFINES and DM flags for Vulkan bot

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

Review URL: https://codereview.chromium.org/1885563002

8 years agoFix Vk build breakage due to new GrSLType
bsalomon [Tue, 12 Apr 2016 14:46:21 +0000 (07:46 -0700)]
Fix Vk build breakage due to new GrSLType

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

Review URL: https://codereview.chromium.org/1881033002

8 years agoMake is_ktx safer
scroggo [Tue, 12 Apr 2016 14:41:22 +0000 (07:41 -0700)]
Make is_ktx safer

Rather than assuming the data passed to ktx at least
KTX_FILE_IDENTIFIER_SIZE, pass the length of the data to is_ktx and
compare it.

Splitting off from crrev.com/1862133002, which no longer depends on
is_ktx.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1882593002

Review URL: https://codereview.chromium.org/1882593002

8 years agoImplement initCopySurfaceDstDesc for Vulkan
egdaniel [Tue, 12 Apr 2016 14:31:49 +0000 (07:31 -0700)]
Implement initCopySurfaceDstDesc for Vulkan

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

Review URL: https://codereview.chromium.org/1880613002

8 years agoRevert "Revert of Pass effects directly to fontcache (patchset #8 id:140001 of https...
reed [Tue, 12 Apr 2016 13:47:05 +0000 (06:47 -0700)]
Revert "Revert of Pass effects directly to fontcache (patchset #8 id:140001 of https://codereview.chromium.org/1863013003/ )"

add SK_SUPPORT_NEW_ONCREATESCALERCONTEXT for chrome

this has now landed https://codereview.chromium.org/1878913002/
TBR=

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

Review URL: https://codereview.chromium.org/1880873002

8 years agoiOS: Tweak xcodebuild location
borenet [Tue, 12 Apr 2016 13:21:47 +0000 (06:21 -0700)]
iOS: Tweak xcodebuild location

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

Review URL: https://codereview.chromium.org/1879513002

8 years agoSkWStream::writeText inlined.
halcanary [Tue, 12 Apr 2016 02:41:48 +0000 (19:41 -0700)]
SkWStream::writeText inlined.

Motivation: This function is used throughout SkPDF.

Note that the compiler can usually inline the result of strlen() for literal strings.

Before:
    out/Release/nanobench -m WStreamWriteText -q
        Timer overhead: 24.2ns
        ! -> high variance, ? -> moderate variance
            micros    bench
              6.10   WStreamWriteText nonrendering

After:
    out/Release/nanobench -m WStreamWriteText -q
        Timer overhead: 23.9ns
        ! -> high variance, ? -> moderate variance
            micros    bench
              2.51   WStreamWriteText nonrendering

PDF runtime change: -0.8% ±0.04%.

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

Review URL: https://codereview.chromium.org/1844343004

8 years agoImplement texel buffers
cdalton [Mon, 11 Apr 2016 21:47:28 +0000 (14:47 -0700)]
Implement texel buffers

Adds a mechanism for processors to add buffer accesses and implements
them in the GL backend.

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

Review URL: https://codereview.chromium.org/1870893002

8 years agoConvert some unit tests from running on GL contexts to running on all contexts
bsalomon [Mon, 11 Apr 2016 21:40:50 +0000 (14:40 -0700)]
Convert some unit tests from running on GL contexts to running on all contexts
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1873313002

Review URL: https://codereview.chromium.org/1873313002

8 years agoVulkan config in dm
bsalomon [Mon, 11 Apr 2016 21:21:33 +0000 (14:21 -0700)]
Vulkan config in dm

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

Review URL: https://codereview.chromium.org/1872283003

8 years agoSeparate private headers for condition inclusion in BUILD file.
iroth [Mon, 11 Apr 2016 20:45:51 +0000 (13:45 -0700)]
Separate private headers for condition inclusion in BUILD file.

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

Review URL: https://codereview.chromium.org/1878753002

8 years agoWait for all device work to finish before destroy VkDevice
egdaniel [Mon, 11 Apr 2016 20:41:51 +0000 (13:41 -0700)]
Wait for all device work to finish before destroy VkDevice

Currently before destroying the GrVkGpu, we do wait on all queue work to finish before destroying objects there.
Since we only have one queue, the vkDeviceWaitIdle added here is probably not necessary, but the spec does suggest
having it just to make sure all work is fully done on the device.

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

Review URL: https://codereview.chromium.org/1876863004

8 years agoSwitch SkTileImageFilter over to new onFilterImage interface
robertphillips [Mon, 11 Apr 2016 20:26:14 +0000 (13:26 -0700)]
Switch SkTileImageFilter over to new onFilterImage interface

This relies on: https://codereview.chromium.org/1816223002 (Update SkSpecialImage to be able to create tight SkImages and SkSurfaces)

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

Review URL: https://codereview.chromium.org/1810693003

8 years agonullptr -> "sans-serif" fixes bold in gm/colorwheel
mtklein [Mon, 11 Apr 2016 20:20:11 +0000 (13:20 -0700)]
nullptr -> "sans-serif" fixes bold in gm/colorwheel

This was an odd case where 8888 drew wrong and serialize-8888 was correct.

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

Review URL: https://codereview.chromium.org/1880653002

8 years agoAdd GLSL support for texelFetch
cdalton [Mon, 11 Apr 2016 20:02:05 +0000 (13:02 -0700)]
Add GLSL support for texelFetch

Adds a cap and builder methods for texelFetch. This is required for
texel buffers. Also moves the texel buffer cap into the general shader
caps, and adds glTexBufferRange to the GL interface.

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

Review URL: https://codereview.chromium.org/1869063005

8 years agoRename EmitArgs::fSamplers to fTexSamplers
cdalton [Mon, 11 Apr 2016 19:18:09 +0000 (12:18 -0700)]
Rename EmitArgs::fSamplers to fTexSamplers

Renames fSamplers to fTexSamplers in GrProcessor EmitArgs, and renames
GrGLSLTextureSampler to GrGLSLSampler. This will allow us to add a
second array of buffer samplers.

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

Review URL: https://codereview.chromium.org/1862373003

8 years agoInfer sampler precision from pixel config
cdalton [Mon, 11 Apr 2016 19:03:08 +0000 (12:03 -0700)]
Infer sampler precision from pixel config

Adds a "samplerPrecision" method to GrGLSLCaps and updates
GrGLSLProgramBuilder to infer a sampler's precision based on its
config and visibility.

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

Review URL: https://codereview.chromium.org/1846963004

8 years agoEnsure all image filter tests have "ImageFilter" somewhere in the name.
senorblanco [Mon, 11 Apr 2016 18:58:39 +0000 (11:58 -0700)]
Ensure all image filter tests have "ImageFilter" somewhere in the name.

This is for convenience, so that running
out/Release/dm --match ImageFilter runs them all.

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

Review URL: https://codereview.chromium.org/1879553004

8 years agoAdd appendPrecisionModifier method to GrGLSLShaderBuilder
cdalton [Mon, 11 Apr 2016 18:30:50 +0000 (11:30 -0700)]
Add appendPrecisionModifier method to GrGLSLShaderBuilder

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

Review URL: https://codereview.chromium.org/1881513002

8 years agoSwitch SkPictureImageFilter over to new onFilterImage interface
robertphillips [Mon, 11 Apr 2016 18:08:52 +0000 (11:08 -0700)]
Switch SkPictureImageFilter over to new onFilterImage interface

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

TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1779743002

8 years agoRevert of Pass effects directly to fontcache (patchset #8 id:140001 of https://codere...
borenet [Mon, 11 Apr 2016 17:25:28 +0000 (10:25 -0700)]
Revert of Pass effects directly to fontcache (patchset #8 id:140001 of https://codereview.chromium.org/1863013003/ )

Reason for revert:
Seems to have broken the DEPS roll.

Original issue's description:
> Pass effects directly to fontcache
>
> BUG=skia:5176
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1863013003
>
> Committed: https://skia.googlesource.com/skia/+/c79172857c3f69cc46837e1beeae0c1ead377bb2

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

Review URL: https://codereview.chromium.org/1872253004

8 years agoForce upload to VRAM in filterImage
robertphillips [Mon, 11 Apr 2016 17:20:24 +0000 (10:20 -0700)]
Force upload to VRAM in filterImage

This forces the conversion of image filter result to VRAM (if it is required) prior to the filtered result being put into the ImageFilter cache.

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

Review URL: https://codereview.chromium.org/1874763002

8 years agoFixes for CommandBuffer bot
borenet [Mon, 11 Apr 2016 17:16:01 +0000 (10:16 -0700)]
Fixes for CommandBuffer bot

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

Review URL: https://codereview.chromium.org/1877883002

8 years agoFix to zoom on Vulkan Viewer
egdaniel [Mon, 11 Apr 2016 15:30:40 +0000 (08:30 -0700)]
Fix to zoom on Vulkan Viewer

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

Review URL: https://codereview.chromium.org/1876853003

8 years agoPass effects directly to fontcache
reed [Mon, 11 Apr 2016 14:51:07 +0000 (07:51 -0700)]
Pass effects directly to fontcache

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

Review URL: https://codereview.chromium.org/1863013003

8 years agoadjust gm bounds for better content fit
reed [Mon, 11 Apr 2016 14:46:38 +0000 (07:46 -0700)]
adjust gm bounds for better content fit

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

TBR=djsollen

Review URL: https://codereview.chromium.org/1876753003

8 years agoSwitch SkDisplacementImageFilter over to new onFilterImage interface
robertphillips [Mon, 11 Apr 2016 14:23:34 +0000 (07:23 -0700)]
Switch SkDisplacementImageFilter over to new onFilterImage interface

TBR=reed@google.com

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

Review URL: https://codereview.chromium.org/1846313002

8 years agoFix roll bot's win gn build
robertphillips [Sun, 10 Apr 2016 21:04:19 +0000 (14:04 -0700)]
Fix roll bot's win gn build

TBR=borenet@google.com,bsalomon@google.com

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

Review URL: https://codereview.chromium.org/1873063002

8 years agoarithmetic mode with Sk4f
mtklein [Sun, 10 Apr 2016 13:23:28 +0000 (06:23 -0700)]
arithmetic mode with Sk4f

After reading the SSE version, I figured I'd show off the new hotness a little.  This'll get us SSE, NEON and portable implementations all in one easy to read package.

Since we've been talking about it, it's worth noting the several ways this implementation is still not constant time:
  - short circuits on 0x00 and 0xff coverage;
  - floating point multiplication with untrusted k1-k4; if someone figures out a clever way to sometimes create denorm floats and sometimes not, there's a gigantic performance difference.

I would hazard the pin is constant time now though.

I've also fixed the lerp to lerp between dst and r instead of src and r.  That can't have been right.

curr/maxrss loops min median mean max stddev samples    config bench
   9/9   MB 1 25.5ms 25.5ms 25.5ms 25.5ms 0% ▃▁▁▃▂▇▅▆▇█ 8888 Xfermode_arithmetic_enforce_pm_aa
   9/9   MB 1 24.1ms 24.2ms 24.2ms 24.3ms 0% ▄▃▁▄█▆▆█▃█ 8888 Xfermode_arithmetic_aa
   9/9   MB 1 102ms 102ms 102ms 103ms 0% ▁▅▂▆▂█▂█▁▂ 8888 Xfermode_arithmetic_enforce_pm
   9/9   MB 1 94.8ms 95.4ms 95.2ms 95.8ms 0% ▅▅▁▁▁▁▄▇█▇ 8888 Xfermode_arithmetic

~~~~>

curr/maxrss loops min median mean max stddev samples    config bench
   9/9   MB 1 9.71ms 9.74ms 9.73ms 9.78ms 0% █▅▄▄▁▂▂▂▄▄ 8888 Xfermode_arithmetic_enforce_pm_aa
   9/9   MB 1 9.5ms 9.57ms 9.58ms 9.7ms 1% ▂▁█▅▂▂▆▃▄▄ 8888 Xfermode_arithmetic_aa
   9/9   MB 1 21.8ms 21.8ms 21.8ms 21.9ms 0% █▂▂▂▂▂▂▁▄▂ 8888 Xfermode_arithmetic_enforce_pm
   9/9   MB 1 16.5ms 16.6ms 16.6ms 16.6ms 0% ▃█▁▁▄▄▁▁▆▅ 8888 Xfermode_arithmetic

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

Review URL: https://codereview.chromium.org/1873963003

8 years agoUpdate SKP version
update-skps [Sun, 10 Apr 2016 07:30:13 +0000 (00:30 -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=1873033002

Review URL: https://codereview.chromium.org/1873033002

8 years agoremove unused BML (binary xml) code
reed [Sat, 9 Apr 2016 18:09:49 +0000 (11:09 -0700)]
remove unused BML (binary xml) code

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

TBR=

Review URL: https://codereview.chromium.org/1868423002

8 years agoUpdate LightingImageFilter to sk_sp
robertphillips [Fri, 8 Apr 2016 23:28:09 +0000 (16:28 -0700)]
Update LightingImageFilter to sk_sp

TBR=reed@google.com

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

Review URL: https://codereview.chromium.org/1869763002

8 years agoAdd AVX/AVX2 support for runtime check
Melnikov.Sergey.V [Fri, 8 Apr 2016 22:31:45 +0000 (15:31 -0700)]
Add AVX/AVX2 support for runtime check

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

Review URL: https://codereview.chromium.org/1867193002

8 years agoFix memory leak in SkBlurImageFilter
robertphillips [Fri, 8 Apr 2016 21:52:52 +0000 (14:52 -0700)]
Fix memory leak in SkBlurImageFilter

TBR=caryclark@google.com

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

Review URL: https://codereview.chromium.org/1873923003

8 years agoAdd some benches for SkArithmeticMode.
senorblanco [Fri, 8 Apr 2016 21:29:47 +0000 (14:29 -0700)]
Add some benches for SkArithmeticMode.

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

Review URL: https://codereview.chromium.org/1868333002

8 years agoFix context size for benchmakr.
herb [Fri, 8 Apr 2016 21:24:37 +0000 (14:24 -0700)]
Fix context size for benchmakr.

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

Review URL: https://codereview.chromium.org/1871173002

8 years agoAdd SkFUZZF to help whitelist imagefilter fuzz failures
robertphillips [Fri, 8 Apr 2016 21:03:06 +0000 (14:03 -0700)]
Add SkFUZZF to help whitelist imagefilter fuzz failures

The current use case for this is whitelisting MergeImageFilter failures when the number of inputs is too big. Presumably there will be other whitelisting use cases as we progress.

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

Review URL: https://codereview.chromium.org/1873463002

8 years agoFix scaledstrokes GM
robertphillips [Fri, 8 Apr 2016 21:03:00 +0000 (14:03 -0700)]
Fix scaledstrokes GM

Small fix to https://codereview.chromium.org/1873733003 (More cleanup in the Vulkan viewer)

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

Review URL: https://codereview.chromium.org/1875793002

8 years agoMake some GMs animate
robertphillips [Fri, 8 Apr 2016 20:35:14 +0000 (13:35 -0700)]
Make some GMs animate
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1870133003

Review URL: https://codereview.chromium.org/1870133003

8 years agoDon't create new descriptor set for vulkan uniforms every draw
egdaniel [Fri, 8 Apr 2016 20:27:53 +0000 (13:27 -0700)]
Don't create new descriptor set for vulkan uniforms every draw

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

Review URL: https://codereview.chromium.org/1872553005

8 years agoAdd clone to Stage. Rename place to mix and PolymorphicUnion to Stage. Cleanup.
herb [Fri, 8 Apr 2016 20:25:28 +0000 (13:25 -0700)]
Add clone to Stage. Rename place to mix and PolymorphicUnion to Stage. Cleanup.

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

Review URL: https://codereview.chromium.org/1877483002

8 years agoMore cleanup in the Vulkan viewer
jvanverth [Fri, 8 Apr 2016 19:51:45 +0000 (12:51 -0700)]
More cleanup in the Vulkan viewer

* add animation support for GMs
* don't load all SkPictures at start, only as needed
* don't update constantly, only for animation or stats
* hide/show stats
* scale slides up/down

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

Review URL: https://codereview.chromium.org/1873733003

8 years agoFix race condition in SkROBuffer.
reed [Fri, 8 Apr 2016 19:47:14 +0000 (12:47 -0700)]
Fix race condition in SkROBuffer.

SkBufferBlock::fUsed may be updated by the writer while a reader is
attempting to read it.

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

Review URL: https://codereview.chromium.org/1872853002

8 years agoSerialize invNormRotation in SkLightingShader.
mtklein [Fri, 8 Apr 2016 19:19:50 +0000 (12:19 -0700)]
Serialize invNormRotation in SkLightingShader.

This fixes a serialize-8888 / 8888 GM mismatch.

This requires a picture bump so we know not to bother trying to read the
invNormRotation vector from older .SKPs.   Any chance no one's ever made
one?

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

Just bumping the picture version.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1870443002

8 years agoUpgrade SkSpecialImage to have getTextureRef & getROPixels entry points
robertphillips [Fri, 8 Apr 2016 19:10:42 +0000 (12:10 -0700)]
Upgrade SkSpecialImage to have getTextureRef & getROPixels entry points

This more closely aligns the SkSpecialImage API with the SkImage API. In doing so it allows the image filters to handle SkImages that can sneak through while remaining encoded (e.g., if an input filter just returns a wrapped version of the source SkImage)

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

Review URL: https://codereview.chromium.org/1861643003

8 years agoSkPDF: Fix links to be more valid PDF/A
halcanary [Fri, 8 Apr 2016 17:51:05 +0000 (10:51 -0700)]
SkPDF: Fix links to be more valid PDF/A

See:
  https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and-3-rules#rule-632-1
  https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and-3-rules#rule-632-2

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

Review URL: https://codereview.chromium.org/1867003004

8 years agoSkPDF: fix pessimizing-move in PDFA code
halcanary [Fri, 8 Apr 2016 16:55:20 +0000 (09:55 -0700)]
SkPDF: fix pessimizing-move in PDFA code

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

Review URL: https://codereview.chromium.org/1863393004

8 years agoIncrease request cache size.
bungeman [Fri, 8 Apr 2016 15:57:00 +0000 (08:57 -0700)]
Increase request cache size.

BUG=chromium:424082
See comment #63.

Review URL: https://codereview.chromium.org/1875733002

8 years agoUpdate MatrixConvolutionImageFilter to sk_sp
robertphillips [Fri, 8 Apr 2016 15:01:20 +0000 (08:01 -0700)]
Update MatrixConvolutionImageFilter to sk_sp

TBR=reed@google.com

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

Review URL: https://codereview.chromium.org/1869833002

8 years agoAdd slides to VulkanViewer
jvanverth [Fri, 8 Apr 2016 14:24:09 +0000 (07:24 -0700)]
Add slides to VulkanViewer

Adds SKP loading, matching, and moving backwards as well as forwards
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1873543003

Review URL: https://codereview.chromium.org/1873543003

8 years agoTest CTFonts for equality, not just name and style.
bungeman [Fri, 8 Apr 2016 14:22:29 +0000 (07:22 -0700)]
Test CTFonts for equality, not just name and style.

The current code looks up CTFonts from descriptors by just name and style.
This is not sufficient, for example Avenir Book and Avenir Roman have the
same family name but the same basic style, but are obviously not the same.

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

Review URL: https://codereview.chromium.org/1860993004

8 years agoConvert SkRefCnt to std::atomic.
bungeman [Fri, 8 Apr 2016 13:58:51 +0000 (06:58 -0700)]
Convert SkRefCnt to std::atomic.

This enables removing the more complicated atomic shims from SkAtomics.h.

TBR=reed
This doesn't actually change any API.

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN-Trybot,Test-Ubuntu-GCC-Golo-GPU-GT610-x86_64-Release-TSAN-Trybot

Review URL: https://codereview.chromium.org/1867863002

8 years agoAdd specialized rgba8888 unit sampler.
herb [Fri, 8 Apr 2016 13:49:59 +0000 (06:49 -0700)]
Add specialized rgba8888 unit sampler.

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

Review URL: https://codereview.chromium.org/1868723003

8 years agoDecouple contrast boost from fake gamma.
brianosman [Fri, 8 Apr 2016 13:47:54 +0000 (06:47 -0700)]
Decouple contrast boost from fake gamma.

Replace FakeGamma with FontWeightFlags. Largely mechanical, except for
the changes in ignorePreBlend. With this change, text GMs generally look
the same (or at least more similar) in 8888/srgb/gpu/gpusrgb configs.

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

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

Review URL: https://codereview.chromium.org/1866293003