Commit Graph

21838 Commits

Author SHA1 Message Date
robertphillips
6b13473dd4 Move SkImageFilter over to storing sk_sps
This CL also removes the old bare-pointer style ctor.

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

Review URL: https://codereview.chromium.org/1894573002
2016-04-15 09:58:37 -07:00
mtklein
86498fbfcb Revert of Move CPU feature detection to its own file. (patchset #7 id:120001 of https://codereview.chromium.org/1890483002/ )
Reason for revert:
many unexpected GM diffs across GPU+CPU configs on Windows (hopefully just text masks on GPU?).   seems like we pick a different srcover variant in some places.

Original issue's description:
> 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
>
> Committed: https://skia.googlesource.com/skia/+/872ea29357439f05b1f6995dd300fc054733e607

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/1892643003
2016-04-15 08:40:23 -07:00
mtklein
2c7f24093a Revert of skcpu: sse4.1 floor, f16c f16<->f32 (patchset #11 id:200001 of https://codereview.chromium.org/1891513002/ )
Reason for revert:
this depends on a CL I want to revert

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
>
> Committed: https://skia.googlesource.com/skia/+/3faf74b8364491ca806f523fbb1d8a97be592663

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/1897433002
2016-04-15 08:37:22 -07:00
kulshin
82497f9300 Add option to specify font fallback when creating the skia font manager
This originally existed as https://codereview.chromium.org/1740533003/,
but then got reverted for causing perf problems at startup. This change
avoids that by allowing callers to specify their own font fallback, and
only uses the system fallback if a fallback is needed and none was
provided.

This is part 1 of a three part change.
1: https://codereview.chromium.org/1878843002/
   Adds support for specifying a font fallback in skia
2: https://codereview.chromium.org/1846433005/
   Implements the fallback proxy in Chromium
3: https://codereview.chromium.org/1883483002/
   Adds code to blink to call skia's fallback API

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

Review URL: https://codereview.chromium.org/1878843002
2016-04-15 08:20:46 -07:00
brianosman
7a9b9aff1a Fix ANGLE in SampleApp
Typo in DLL name meant that we were never running with ANGLE.

Fixing that exposed problem with attachANGLE -> we weren't filling out
attachment info after the first call, resulting in invalid surface
descriptions on windowSizeChanged events.

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

Review URL: https://codereview.chromium.org/1892113002
2016-04-15 08:13:57 -07:00
robertphillips
938115c9f8 Remove asFragmentProcessor gpu-specific ImageFilter code path
No image filter should be using this code path now.

TBR=reed@google.com

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

Review URL: https://codereview.chromium.org/1892493002
2016-04-15 08:07:27 -07:00
robertphillips
534c270465 Update TileImageFilter to sk_sp
TBR=reed@google.com

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

Review URL: https://codereview.chromium.org/1882113002
2016-04-15 07:57:40 -07:00
robertphillips
bfe11fc9a6 Update DisplacementMapEffect to sk_sp
TBR=reed@google.com

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

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

Review URL: https://codereview.chromium.org/1877783003
2016-04-15 07:17:36 -07:00
reed
8c3fd4f1b4 spriteblitter for memcpy case (for all configs)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1887103003

Review URL: https://codereview.chromium.org/1887103003
2016-04-15 06:59:39 -07:00
mtklein
3faf74b836 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

Review URL: https://codereview.chromium.org/1891513002
2016-04-15 06:18:37 -07:00
robertphillips
47db5fe443 Revert of Update DisplacementMapEffect to sk_sp (patchset #3 id:40001 of https://codereview.chromium.org/1877783003/ )
Reason for revert:
unexpected image diffs in imagefilterscropexpand GM

Original issue's description:
> Update DisplacementMapEffect to sk_sp
>
> TBR=reed@google.com
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1877783003
>
> Committed: https://skia.googlesource.com/skia/+/a53011ef44705a091a8e24f7ea289a3f9ad759f2

TBR=fmalita@chromium.org,reed@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/1884253004
2016-04-15 05:09:32 -07:00
robertphillips
ad3dc0da21 Switch SkLightingImageFilter 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=1887103002

Review URL: https://codereview.chromium.org/1887103002
2016-04-15 05:06:11 -07:00
robertphillips
a53011ef44 Update DisplacementMapEffect to sk_sp
TBR=reed@google.com

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

Review URL: https://codereview.chromium.org/1877783003
2016-04-15 04:37:07 -07:00
mtklein
834d9e1092 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
2016-04-14 16:23:15 -07:00
bungeman
a3760992c9 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
2016-04-14 14:57:01 -07:00
mtklein
567118fbe6 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
2016-04-14 14:07:02 -07:00
herb
149b47fec7 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
2016-04-14 13:58:05 -07:00
reed
a9eb626104 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
2016-04-14 13:34:45 -07:00
brianosman
6b08652abf 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
2016-04-14 12:39:00 -07:00
mtklein
cbe3c1af98 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
2016-04-14 12:27:38 -07:00
scroggo
d06920a29f 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
2016-04-14 11:40:48 -07:00
herb
d5f2e2e742 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
2016-04-14 11:16:44 -07:00
bungeman
bc95173756 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
2016-04-14 10:25:01 -07:00
bungeman
a821af8389 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
2016-04-14 09:44:34 -07:00
mtklein
fbcfd6d060 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
2016-04-14 09:42:34 -07:00
bungeman
ccb0de64f3 Add doc instructions for multi-repo Chromium trybots.
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1865153003

Review URL: https://codereview.chromium.org/1865153003
2016-04-14 09:23:41 -07:00
mtklein
872ea29357 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
2016-04-14 09:03:35 -07:00
reed
3dc6aac5da 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
2016-04-14 09:02:14 -07:00
bungeman
82a455f0e9 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
2016-04-14 08:04:45 -07:00
robertphillips
b2a4dc6a35 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
2016-04-14 07:54:04 -07:00
yujieqin
e34635dee1 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
2016-04-14 07:04:00 -07:00
brianosman
5280dcbae3 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
2016-04-14 06:02:59 -07:00
benjaminwagner
f9634b95ec 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
2016-04-13 17:51:57 -07:00
bsalomon
5092eacc7e 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
2016-04-13 15:10:20 -07:00
bsalomon
3f21a2e9f3 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
2016-04-13 15:03:59 -07:00
bsalomon
7e68ab7318 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
2016-04-13 14:29:25 -07:00
brianosman
0e3c55431b 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
2016-04-13 13:56:21 -07:00
bungeman
d3b63d3244 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
2016-04-13 13:50:21 -07:00
brianosman
b461d34575 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
2016-04-13 13:10:14 -07:00
robertphillips
54ef1a7c95 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
2016-04-13 10:55:07 -07:00
borenet
2892668f1b 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
2016-04-13 09:37:26 -07:00
bsalomon
33b6b8ef99 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
2016-04-13 08:14:22 -07:00
bsalomon
09e127bd38 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
2016-04-13 08:02:43 -07:00
robertphillips
0b7e5a13bd 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
2016-04-13 07:18:41 -07:00
borenet
903ec3ce4d 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
2016-04-13 06:00:42 -07:00
bungeman
ed2edabd07 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
2016-04-13 05:23:35 -07:00
robertphillips
dada4dd9cf 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
2016-04-13 04:54:36 -07:00
reed
58700da76b 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
2016-04-12 16:57:55 -07:00
mtklein
20efb41dbb 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
2016-04-12 15:52:52 -07:00
herb
69076fe5cf 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
2016-04-12 14:07:59 -07:00