platform/upstream/libSkiaSharp.git
8 years agoRemove SK_SUPPORT_LEGACY_FILTERBOUNDS_RETURN.
senorblanco [Wed, 23 Mar 2016 00:32:59 +0000 (17:32 -0700)]
Remove SK_SUPPORT_LEGACY_FILTERBOUNDS_RETURN.

It's now-unused.

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

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

8 years agoSk4x4f
mtklein [Wed, 23 Mar 2016 00:17:44 +0000 (17:17 -0700)]
Sk4x4f

   An API for loading and storing 4 Sk4f with transpose.
   This has SSSE3+ and portable versions.
   SSE2 and NEON versions to follow.

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

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

8 years agoUse SkColorSpacePrintf instead of SkDebugf
msarett [Tue, 22 Mar 2016 21:30:27 +0000 (14:30 -0700)]
Use SkColorSpacePrintf instead of SkDebugf

TBR=reed@google.com

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

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

8 years agoFix borrowed GrVkImage::Resource.
jvanverth [Tue, 22 Mar 2016 20:15:44 +0000 (13:15 -0700)]
Fix borrowed GrVkImage::Resource.

With the current system, if we wrap a given GrVkTextureInfo*, add a
command using it to the command buffer, then delete the texture, the
command buffer will unref the GrVkImage::Resource when it's done, which
will delete the VkImage and VkDeviceMemory. This subclasses
GrVkImage::Resource for those cases, and will not delete the data on
an unref.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1824123002

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

8 years agofix --threads 4, blacklist interlaced1,2,3 on GPU
mtklein [Tue, 22 Mar 2016 19:36:01 +0000 (12:36 -0700)]
fix --threads 4, blacklist interlaced1,2,3 on GPU

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

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

8 years agoRemove SkPixmap::release
robertphillips [Tue, 22 Mar 2016 19:20:15 +0000 (12:20 -0700)]
Remove SkPixmap::release

No longer need this for ImageFilters

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

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

8 years agoSkRecord: infer return type for visit() and mutate().
mtklein [Tue, 22 Mar 2016 18:46:53 +0000 (11:46 -0700)]
SkRecord: infer return type for visit() and mutate().

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

8 years agoTry throttling x86 desktop bots down with fewer threads.
mtklein [Tue, 22 Mar 2016 18:08:24 +0000 (11:08 -0700)]
Try throttling x86 desktop bots down with fewer threads.

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

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

8 years agoCorrectly handle lfWidth in GDI.
bungeman [Tue, 22 Mar 2016 17:59:09 +0000 (10:59 -0700)]
Correctly handle lfWidth in GDI.

The LOGFONT::lfWidth field is related to the LOGFONT::lfHeight field,
it is not related in any way to the OS/2::usWidthClass (unlike
LOGFONT::lfWeight, which mirrors the OS/2::usWeightClass). Be sure to
canonicalize this field to 0 (default) and not use it as a style value.

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

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

8 years agoReland of [2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https:...
reed [Tue, 22 Mar 2016 17:17:23 +0000 (10:17 -0700)]
Reland of [2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o… (patchset #1 id:1 of https://codereview.chromium.org/1821103004/ )

Reason for revert:
guard has now landed in chrome

Original issue's description:
> Revert of Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o… (patchset #3 id:40001 of https://codereview.chromium.org/1825073002/ )
>
> Reason for revert:
> CreateModeFilter not compiling
>
> Original issue's description:
> > Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.org/1822623002/ )"
> >
> > Fixed legacy withColorFilter to call new(er) make method
> >
> > This reverts commit 1eb81db650d31f50be67b12d60c4f9e7dd08432f.
> >
> > BUG=skia:
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825073002
> >
> > TBR=
> >
> > Committed: https://skia.googlesource.com/skia/+/4c9776b046dd5e9e46e2d1ce35154855c8fcb381
>
> TBR=
> # 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/+/d6889293dd0942f27f9593f679722c956831f2c4

TBR=
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:

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

8 years agoFix second memory leak in SkSpecialImage
robertphillips [Tue, 22 Mar 2016 16:56:58 +0000 (09:56 -0700)]
Fix second memory leak in SkSpecialImage

TBR=bsalomon@google.com

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

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

8 years agoAdd experimental Swarmbucket bot
borenet [Tue, 22 Mar 2016 16:37:57 +0000 (09:37 -0700)]
Add experimental Swarmbucket bot

Docs here:
https://chromium.googlesource.com/infra/infra/+/master/appengine/cr-buildbucket/doc/swarming.md

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

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

8 years agoMake GrCircleBlurFragmentProcessor::onIsEqual include the position
abarth [Tue, 22 Mar 2016 16:14:40 +0000 (09:14 -0700)]
Make GrCircleBlurFragmentProcessor::onIsEqual include the position

Previously we would fail to draw two adjacent blurred circles if they differed
only by their position.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1824693003

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

8 years agoBlacklist RAW images on x86 Ubuntu
msarett [Tue, 22 Mar 2016 16:01:20 +0000 (09:01 -0700)]
Blacklist RAW images on x86 Ubuntu

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

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

8 years agoRevert of Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https...
reed [Tue, 22 Mar 2016 15:59:19 +0000 (08:59 -0700)]
Revert of Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o… (patchset #3 id:40001 of https://codereview.chromium.org/1825073002/ )

Reason for revert:
CreateModeFilter not compiling

Original issue's description:
> Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.org/1822623002/ )"
>
> Fixed legacy withColorFilter to call new(er) make method
>
> This reverts commit 1eb81db650d31f50be67b12d60c4f9e7dd08432f.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825073002
>
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/4c9776b046dd5e9e46e2d1ce35154855c8fcb381

TBR=
# 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/1821103004

8 years agoRefactor SkBmpCodec
msarett [Tue, 22 Mar 2016 15:58:35 +0000 (08:58 -0700)]
Refactor SkBmpCodec

I started working on indicating the native encoded formats
and things got really complicated for bmp.  I think starting
with this refactor may help a little, and I also think that
this is a good change by itself.

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

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

8 years agoRevert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://coderev...
reed [Tue, 22 Mar 2016 15:10:17 +0000 (08:10 -0700)]
Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.org/1822623002/ )"

Fixed legacy withColorFilter to call new(er) make method

This reverts commit 1eb81db650d31f50be67b12d60c4f9e7dd08432f.

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

TBR=

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

8 years agoRevert of switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview...
reed [Tue, 22 Mar 2016 14:35:17 +0000 (07:35 -0700)]
Revert of switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.org/1822623002/ )

Reason for revert:
need to fix unguarded makeWithFilter

Original issue's description:
> switch colorfilters to sk_sp
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1822623002
>
> Committed: https://skia.googlesource.com/skia/+/f809d7687a4fb7b88b651b046da2bc0035d6aa09

TBR=fmalita@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/1820303002

8 years agoRevert of Clean up SSSE3 and SSE4 stubs. (patchset #1 id:1 of https://codereview...
mtklein [Tue, 22 Mar 2016 14:28:12 +0000 (07:28 -0700)]
Revert of Clean up SSSE3 and SSE4 stubs. (patchset #1 id:1 of https://codereview.chromium.org/1810183003/ )

Reason for revert:
I've just had a better idea about how to fix this.  Let's revert while I work on it.

Original issue's description:
> Clean up SSSE3 and SSE4 stubs.
>
> We added these stubs to work around OpenBSD's old compiler, which had
> support for SSE2 but not SSSE3 or SSE4.
>
> We now already have other unstubbed files that require SSSE3 and SSE4 compiler
> support.  All the compilers we support have SSSE3 and SSE4 support, and all the
> way up to at least AVX2.
>
> (Requiring C++11 has had some nice ripple effects...)
>
>
> And, <immintrin.h> is already auto-included for these files, so no need for smmintrin or tmmintrin.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1810183003
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/2b1b40e11afc41452b4d2f74cdebb1b6e6f7cc96

TBR=djsollen@google.com,mtklein@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:

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

8 years agoswitch colorfilters to sk_sp
reed [Tue, 22 Mar 2016 14:23:24 +0000 (07:23 -0700)]
switch colorfilters to sk_sp

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

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

8 years agoFully implement onResetContext for Vulkan
egdaniel [Tue, 22 Mar 2016 14:16:10 +0000 (07:16 -0700)]
Fully implement onResetContext for Vulkan

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

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

8 years agoPotential fix for SpecialImageTest memory leak
robertphillips [Tue, 22 Mar 2016 13:15:47 +0000 (06:15 -0700)]
Potential fix for SpecialImageTest memory leak

TBR=bsalomon@google.com
NOTREECHECKS=true

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

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

8 years agonanobench: Stop reporting median_ms, it's no better than min_ms.
jcgregorio [Tue, 22 Mar 2016 12:26:57 +0000 (05:26 -0700)]
nanobench: Stop reporting median_ms, it's no better than min_ms.

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

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

8 years agoChange signatures of filter bounds methods to return a rect.
senorblanco [Mon, 21 Mar 2016 21:51:59 +0000 (14:51 -0700)]
Change signatures of filter bounds methods to return a rect.

Change filterBounds(), onFilterBounds() and onFilterNodeBounds() and computeFastBounds() to
return the destination rectangle. There was no code path that could
return false, and returning rects by value is ok now.

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

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

8 years agoSkPDF: SkPDFDevice has ptr to SkPDFDocument
halcanary [Mon, 21 Mar 2016 21:33:17 +0000 (14:33 -0700)]
SkPDF: SkPDFDevice has ptr to SkPDFDocument

This is necessary for pre-serialization of images.

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

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

8 years agofix release build vulkan
egdaniel [Mon, 21 Mar 2016 21:24:14 +0000 (14:24 -0700)]
fix release build vulkan

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

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

8 years agoSkPDF: SkPDFDocument reorganized so that some objects can be serialized early.
halcanary [Mon, 21 Mar 2016 20:45:05 +0000 (13:45 -0700)]
SkPDF:  SkPDFDocument reorganized so that some objects can be serialized early.

No change in output.

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

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

8 years agoUpdate SkSpecialImage to be able to create tight SkImages and SkSurfaces
robertphillips [Mon, 21 Mar 2016 20:44:18 +0000 (13:44 -0700)]
Update SkSpecialImage to be able to create tight SkImages and SkSurfaces

This calved off of: https://codereview.chromium.org/1810693003/ (Switch SkTileImageFilter over to new onFilterImage interface) since the TileImageFilter needs a tight bitmap/texture/image to perform its draw.

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

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

8 years agoDisable the WIC encoder for jpegs
msarett [Mon, 21 Mar 2016 20:35:43 +0000 (13:35 -0700)]
Disable the WIC encoder for jpegs

My fix from https://codereview.chromium.org/1791583002/ is not
sufficient.

WIC will only encode JPEGs if we pass in a bitmap in BGR
format.  For now, let's disable the WIC encoder on JPEGs
and fall back on SkImageEncoder_libjpeg.

This should fix the scaled-generator gm.
https://gold.skia.org/search2?query=source_type%3Dgm%26name%3Dscale-generator&include=false&head=true&unt=true&pos=false&neg=false&limit=100

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

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

8 years agoguard rasterizer and drawlooper setters
reed [Mon, 21 Mar 2016 20:25:16 +0000 (13:25 -0700)]
guard rasterizer and drawlooper setters

Need to land https://codereview.chromium.org/1823513002/ first

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

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

8 years agoRefactor 4f gradients using trait templates
fmalita [Mon, 21 Mar 2016 20:16:51 +0000 (13:16 -0700)]
Refactor 4f gradients using trait templates

Some 4f gradient housekeeping.

1) replace <DstPtrType, ColorProfile> specialization tuples with an enum covering all dest types
   (L32, S32, F16, F32)

2) group various template helpers into dest trait classes, specialized for each dest type

(2a - conflate current dst_swizzle and scale_for_dest ops into one load op)

R=reed@google.com,mtklein@google.com,herb@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1816883002

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

8 years agoSkPDF: Add SkPDFCanvas to intercept some draw calls
halcanary [Mon, 21 Mar 2016 20:01:34 +0000 (13:01 -0700)]
SkPDF: Add SkPDFCanvas to intercept some draw calls

Motivation: this simplifies implementation at the device level.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1812063002

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

8 years agoMinor fixes to avoid NVPR in Vulkan and provide good GrVkGpu teardown.
jvanverth [Mon, 21 Mar 2016 18:46:00 +0000 (11:46 -0700)]
Minor fixes to avoid NVPR in Vulkan and provide good GrVkGpu teardown.

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

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

8 years agoexit computeFilters if filter width is zero
caryclark [Mon, 21 Mar 2016 18:25:42 +0000 (11:25 -0700)]
exit computeFilters if filter width is zero

The fuzzer associated with this bug triggered an assert
when building the resize filter. I can't tell if there
is a more fundemental bug here or not.

Checking for a zero-sized filter fixes the fuzzer.

R=fmalita@chromium.org
BUG=595856
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1810333002

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

8 years agoExclude new file in Google3 build.
benjaminwagner [Mon, 21 Mar 2016 17:45:01 +0000 (10:45 -0700)]
Exclude new file in Google3 build.

The new file was added in https://codereview.chromium.org/1817633002

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

8 years agounified PNG encoding between SkDrawCommand and skiaserve
ethannicholas [Mon, 21 Mar 2016 17:19:39 +0000 (10:19 -0700)]
unified PNG encoding between SkDrawCommand and skiaserve
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1818043003

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

8 years agoSkPDF: add drop() virtual to release resources early.
halcanary [Mon, 21 Mar 2016 17:05:23 +0000 (10:05 -0700)]
SkPDF: add drop() virtual to release resources early.

Call drop() after calling emitObject() on top-level objects.  In Debug
mode, assert that each object is emited exactly once by asserting that
emitObject is never called after drop().  Same for addResources().

To make sure that top level objects don't get deleted prematurely,
SkPDFObjNumMap takes a reference.

Motivation: save RAM.  Allow even earlier serialization with later
changes.

Also: Switch some SkTDArrays to SkTArrays.

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

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

8 years agoSkNx refresh
mtklein [Mon, 21 Mar 2016 17:04:46 +0000 (10:04 -0700)]
SkNx refresh

   - rearrange a bit
   - fewer macros
   - hooks for all operators
   - add left and right scalar operator overrides
   - add +=, &=, <<=, etc.
   - add SkNx_split() and SkNx_join()
   - simplify the many rsqrt() and invert() options to just what we actually use

This refactoring pointed out that our float <-> int NEON conversions are not specialized, so I've implemented them.  It seems nice that this is an error rather than silently falling back to serial code.

It's unclear to me if split/join want to be external, static methods, or non-static methods (SkNx_join(), Sk4f::Join(), x.join()).  Time will tell?

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

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

8 years agoRemove transitional explicit operator bool.
mtklein [Mon, 21 Mar 2016 16:35:33 +0000 (09:35 -0700)]
Remove transitional explicit operator bool.

These should no longer be necessary. Android's STL should now
be sane.

TBR=reed
This just removes code.

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

8 years agoMake the debug interface a GrGLTestInterface subclass.
bsalomon [Mon, 21 Mar 2016 16:04:26 +0000 (09:04 -0700)]
Make the debug interface a GrGLTestInterface subclass.

The debug interface subsumes the GrDebugGL singleton which allows multiple instances.

Fixes a few issues that existed before this CL (pack alignment wasn't tracked or respected, and we weren't initializing a texture id to 0 in one GM). Apparently this is not currently run on the bots.

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

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

8 years agoSwarming: Ensure depot_tools is in PATH when compiling
borenet [Mon, 21 Mar 2016 16:02:51 +0000 (09:02 -0700)]
Swarming: Ensure depot_tools is in PATH when compiling

Turns out we were "lucky" for our Linux bots which already have depot_tools in PATH. The Mac bot does have depot_tools, but it's not in PATH.  Add it in the script to ensure we can always get to it.

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

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

8 years agoMake SkComposeImageFilter::onFilterImage filter the bounds given to the inner filter.
jbroman [Mon, 21 Mar 2016 15:38:58 +0000 (08:38 -0700)]
Make SkComposeImageFilter::onFilterImage filter the bounds given to the inner filter.

Previously, the bounds requested by the caller would be passed to both the
inner and outer filter, but since the outer filter may move pixels, this is not
necessarily sufficient to supply the pixels required by the outer filter to fill
the bounds.

Unit test included.

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

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

8 years agoadd SK_SUPPORT_LEGACY_PATHEFFECT_PTR for google3 roll fix
reed [Mon, 21 Mar 2016 15:30:19 +0000 (08:30 -0700)]
add SK_SUPPORT_LEGACY_PATHEFFECT_PTR for google3 roll fix

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

TBR=mtklein
NOTRY=True

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

8 years agoCorrect comment to refer to SkImageFilter::kReverse_MapDirection.
jbroman [Mon, 21 Mar 2016 15:28:48 +0000 (08:28 -0700)]
Correct comment to refer to SkImageFilter::kReverse_MapDirection.

kBackward_MapDirection does not exist; might as well have the comment exactly
match the valid enumerator.

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

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

8 years agoParse icc profiles and exif orientation from jpeg markers
msarett [Mon, 21 Mar 2016 15:04:40 +0000 (08:04 -0700)]
Parse icc profiles and exif orientation from jpeg markers

New resources should be fine to add since they are already
checked into chromium.

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

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

8 years agoAdd note about Chromium's use of old libstdc++ to docs.
bungeman [Mon, 21 Mar 2016 14:46:28 +0000 (07:46 -0700)]
Add note about Chromium's use of old libstdc++ to docs.

Chromium must still build against libstdc++4.6.4, which presents limits
on at least type traits and perhaps performance.

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

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

8 years agonanobench: Reduce the total number of statistics being captured.
jcgregorio [Mon, 21 Mar 2016 14:42:59 +0000 (07:42 -0700)]
nanobench: Reduce the total number of statistics being captured.

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

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

8 years agoMake FreeType usable on Windows.
caryclark [Mon, 21 Mar 2016 13:55:52 +0000 (06:55 -0700)]
Make FreeType usable on Windows.

Add missing functionality so that pdfium can use FreeType
from Windows.

Add an empty custom font manager so pdfium can use FreeType
without any local fonts.

R=bungeman@google.com

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

8 years agosRGB support in Ganesh. Several pieces:
brianosman [Mon, 21 Mar 2016 13:55:37 +0000 (06:55 -0700)]
sRGB support in Ganesh. Several pieces:

sRGB support now also requires GL_EXT_texture_sRGB_decode, which allows
us to disable sRGB -> Linear conversion when reading textures. This gives
us an easy way to support "legacy" L32 mode. We disable decoding based on
the pixel config of the render target. Textures can override that behavior
(specifically for format-conversion draws where we want that behavior).

Added sBGRA pixel config, which is not-really-a-format. It's just sRGBA
internally, and the external format is BGR order, so TexImage calls will
swizzle correctly. This lets us interact with sRGB raster surfaces on BGR
platforms.

Devices without sRGB support behave like they always have: conversion from
color type and profile type ignores sRGB and always returns linear pixel
configs.

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

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

8 years agoFix for unaligned automatic variable address in SSE routines. This used to work on...
marco.diiga [Mon, 21 Mar 2016 13:04:43 +0000 (06:04 -0700)]
Fix for unaligned automatic variable address in SSE routines. This used to work on linux but crashed on windows when rendering antialiased glyphs. I tracked the problem down to an alignment issue.

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

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

8 years agoSkPDF: metadata first
halcanary [Sun, 20 Mar 2016 14:07:11 +0000 (07:07 -0700)]
SkPDF: metadata first

Motivation: while experimenting with serializing images immediately, I would like to keep serializing metadata first.

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

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

8 years agoUpdate SKP version
update-skps [Sun, 20 Mar 2016 08:28:13 +0000 (01:28 -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=1817833002

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

8 years agoDon't convert DWORD to int.
bungeman [Sat, 19 Mar 2016 22:51:05 +0000 (15:51 -0700)]
Don't convert DWORD to int.

DWORD is unsigned, and might not be an int. vs2015u2 complains.

BUG=skia:4553

TBR=mtklein
This is pretty trivial and makes the vs2015 bot compile.

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

8 years agoTemplatize SkToXXX.
bungeman [Sat, 19 Mar 2016 22:06:56 +0000 (15:06 -0700)]
Templatize SkToXXX.

Makes the checked cast in debug more correct, avoiding new
warnings in vs2015.

BUG=skia:4553

Committed: https://skia.googlesource.com/skia/+/0be9e806af72b3e029e691eef5c891c90d3fd320

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

8 years agoFix uninitialized fCurrProgramID in GrGLCreateNullInterface
fmalita [Sat, 19 Mar 2016 20:07:13 +0000 (13:07 -0700)]
Fix uninitialized fCurrProgramID in GrGLCreateNullInterface

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

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

8 years agoDocument BitmapStateAutoMapper.
herb [Sat, 19 Mar 2016 15:46:24 +0000 (08:46 -0700)]
Document BitmapStateAutoMapper.

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

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

8 years agodisable SK_SUPPORT_LEGACY_PATHEFFECT_PTR for skia builds
reed [Sat, 19 Mar 2016 02:18:18 +0000 (19:18 -0700)]
disable SK_SUPPORT_LEGACY_PATHEFFECT_PTR for skia builds

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

TBR=

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

8 years agoRemove uses of SkImageDecoder from samplecode
msarett [Fri, 18 Mar 2016 22:48:49 +0000 (15:48 -0700)]
Remove uses of SkImageDecoder from samplecode

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

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

8 years agoReplace uses of SkImageDecoder in src/animator
msarett [Fri, 18 Mar 2016 22:41:00 +0000 (15:41 -0700)]
Replace uses of SkImageDecoder in src/animator

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

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

8 years agoAdd DescriptorPool and set manager to GrVkProgram
egdaniel [Fri, 18 Mar 2016 20:18:23 +0000 (13:18 -0700)]
Add DescriptorPool and set manager to GrVkProgram

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

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

8 years agoFix ANGLE build
bsalomon [Fri, 18 Mar 2016 20:10:33 +0000 (13:10 -0700)]
Fix ANGLE build
TBR=
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1814233003

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

8 years agoUse dynamic state from vulkan pipelines
egdaniel [Fri, 18 Mar 2016 19:50:27 +0000 (12:50 -0700)]
Use dynamic state from vulkan pipelines

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

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

8 years agoallow more options for shader blitprocs
reed [Fri, 18 Mar 2016 19:42:26 +0000 (12:42 -0700)]
allow more options for shader blitprocs

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

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

8 years agoEnable extension support and debug layer.
jvanverth [Fri, 18 Mar 2016 19:39:05 +0000 (12:39 -0700)]
Enable extension support and debug layer.

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

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

8 years agoRemove uses of SkImageDecoder from gms
msarett [Fri, 18 Mar 2016 19:13:47 +0000 (12:13 -0700)]
Remove uses of SkImageDecoder from gms

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

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

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

8 years agoStore null GL context's state in interface object
bsalomon [Fri, 18 Mar 2016 19:07:24 +0000 (12:07 -0700)]
Store null GL context's state in interface object

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

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

8 years agoImplement Vulkan GrBackendObject for textures.
jvanverth [Fri, 18 Mar 2016 18:57:24 +0000 (11:57 -0700)]
Implement Vulkan GrBackendObject for textures.

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

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

8 years agoRevert of Templatize SkToXXX. (patchset #2 id:20001 of https://codereview.chromium...
bungeman [Fri, 18 Mar 2016 18:53:16 +0000 (11:53 -0700)]
Revert of Templatize SkToXXX. (patchset #2 id:20001 of https://codereview.chromium.org/1814153003/ )

Reason for revert:
Chrome does not yet have std::underlying_type.

Original issue's description:
> Templatize SkToXXX.
>
> Makes the checked cast in debug more correct, avoiding new
> warnings in vs2015.
>
> BUG=skia:4553
>
> Committed: https://skia.googlesource.com/skia/+/0be9e806af72b3e029e691eef5c891c90d3fd320

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

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

8 years agoPropogate SkBudgeted for NewFromDeferredTextureImageData
ericrk [Fri, 18 Mar 2016 18:52:20 +0000 (11:52 -0700)]
Propogate SkBudgeted for NewFromDeferredTextureImageData

The budgeted flag was not propogated from
NewFromDeferredTextureImageData to MakeTextureFromPixmap, resulting in
the created textures always being budgeted, even when SkBudgeted::kNo
was passed in.

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

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

8 years agoRemove --verbose from DM on Swarming bots
borenet [Fri, 18 Mar 2016 18:27:42 +0000 (11:27 -0700)]
Remove --verbose from DM on Swarming bots

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

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

8 years agoReland of "switch patheffects over to sk_sp (patchset #5 id:80001 of https://coderevi...
reed [Fri, 18 Mar 2016 18:22:57 +0000 (11:22 -0700)]
Reland of "switch patheffects over to sk_sp (patchset #5 id:80001 of https://codereview.chromium.org/1813553005/ )"

This reverts commit f28ad894272018fd2855e3f77ea1236ea0cce1c0.

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

TBR=

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

8 years agoTemplatize SkToXXX.
bungeman [Fri, 18 Mar 2016 18:17:56 +0000 (11:17 -0700)]
Templatize SkToXXX.

Makes the checked cast in debug more correct, avoiding new
warnings in vs2015.

BUG=skia:4553

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

8 years agoFix pessimizing move in SamplePictFile
fmalita [Fri, 18 Mar 2016 18:07:50 +0000 (11:07 -0700)]
Fix pessimizing move in SamplePictFile

../../samplecode/SamplePictFile.cpp:194:20: error: moving a local object in a return statement prevents copy elision [-Werror,-Wpessimizing-move]
            return std::move(pic);
                               ^

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

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

8 years agocustom ssse3 srcover_n_srgb_bw, about 1.8x speedup
mtklein [Fri, 18 Mar 2016 18:07:46 +0000 (11:07 -0700)]
custom ssse3 srcover_n_srgb_bw, about 1.8x speedup

This is a little demo of the sorts of speedups we can get from working in planar format, or even just a mini-planar of 4 pixels at a time like I'm doing here.

I chose this blit by running
  $ out/Release/nanobench --config srgb --match skp
and looking for the hottest sRGB-related method.
After this CL, src_1 and src_n become hotter than srcover_n.  They can probably get a similar treatment.

We transpose three times in this function:
   - dst after reading, as part of the zero-extension and conversion to float
   - src after reading, _MM_TRANSPOSE4_PS (which expands to 8 cheap instructions)
   - result before writing, the last _mm_shuffle_epi8
If we changed our buffer format to a mini-planar format like rrrr gggg bbbb aaaa, we could eliminate the src transpose and get another small speedup, to right around 2x.

This code leans pretty heavily on SSSE3, so if we want it to speed up Windows+Linux Chrome, it'll eventually want to go behind a function pointer.

This also appears to fix what looks like overflow in a few GMs, most noticeably in hairmodes.  This is something we'd better look into...

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

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

8 years ago4f linear gradient shader blitters
fmalita [Fri, 18 Mar 2016 17:28:23 +0000 (10:28 -0700)]
4f linear gradient shader blitters

Add F16 specializations to support writing to half-float dests.

Add color profile template arg across the board to support writing
to sRGB dests.

R=reed@google.com,mtklein@google.com,herb@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1808963005

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

8 years agoRevert of switch patheffects over to sk_sp (patchset #5 id:80001 of https://coderevie...
reed [Fri, 18 Mar 2016 17:17:27 +0000 (10:17 -0700)]
Revert of switch patheffects over to sk_sp (patchset #5 id:80001 of https://codereview.chromium.org/1813553005/ )

Reason for revert:
some build breaks, possibly related to paint having to know what a patheffect is

Original issue's description:
> switch patheffects over to sk_sp
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1813553005
>
> Committed: https://skia.googlesource.com/skia/+/9fbee18f691a0afed1e38a851048ce06063505ed

TBR=caryclark@google.com
# 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/1817543002

8 years agoswitch patheffects over to sk_sp
reed [Fri, 18 Mar 2016 17:00:32 +0000 (10:00 -0700)]
switch patheffects over to sk_sp

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

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

8 years agoMake Win runtime DLLs writeable before overwriting
borenet [Fri, 18 Mar 2016 15:33:38 +0000 (08:33 -0700)]
Make Win runtime DLLs writeable before overwriting

This should fix the VS2015 bot which is failing because we can't
overwrite read-only DLL files.

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

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

8 years agoAdd SkSpecialImage::makeTextureImage entry point
robertphillips [Fri, 18 Mar 2016 15:14:27 +0000 (08:14 -0700)]
Add SkSpecialImage::makeTextureImage entry point

This is calved off of: https://codereview.chromium.org/1785643003 (Switch SkBlurImageFilter over to new onFilterImage interface)

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

Committed: https://skia.googlesource.com/skia/+/05849018c85403a34b88819db1c4bcf713b70a2b

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

8 years agoClean up SSSE3 and SSE4 stubs.
mtklein [Fri, 18 Mar 2016 15:10:31 +0000 (08:10 -0700)]
Clean up SSSE3 and SSE4 stubs.

We added these stubs to work around OpenBSD's old compiler, which had
support for SSE2 but not SSSE3 or SSE4.

We now already have other unstubbed files that require SSSE3 and SSE4 compiler
support.  All the compilers we support have SSSE3 and SSE4 support, and all the
way up to at least AVX2.

(Requiring C++11 has had some nice ripple effects...)

And, <immintrin.h> is already auto-included for these files, so no need for smmintrin or tmmintrin.

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

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

8 years agoreturn pictures as sk_sp
reed [Fri, 18 Mar 2016 14:25:55 +0000 (07:25 -0700)]
return pictures as sk_sp

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

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

8 years agoallow one zero length dash
caryclark [Fri, 18 Mar 2016 13:04:26 +0000 (06:04 -0700)]
allow one zero length dash

If the constructed stroke that represents a dash has a
single dash of length zero, and the end cap is square or
round, draw the cap.

The old code initialized the initial dash length to zero,
making it ambiguous whether the first length is zero or
not.

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

Committed: https://skia.googlesource.com/skia/+/5e1a24808415df2748822e8082e21a361362cdfe

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

8 years agoRevert of Add SkSpecialImage::makeTextureImage entry point & update filterInput ...
bungeman [Fri, 18 Mar 2016 12:36:20 +0000 (05:36 -0700)]
Revert of Add SkSpecialImage::makeTextureImage entry point & update filterInput (patchset #3 id:40001 of https://codereview.chromium.org/1813813002/ )

Reason for revert:
Suspected cause of layout test css3/filters/effect-reference-tile-hw.htmlto crash.

https://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/83847/steps/webkit_tests%20%28with%20patch%29/logs/stdio

It could also be the previous change (but it appears this one depends on that one).

Original issue's description:
> Add SkSpecialImage::makeTextureImage entry point
>
> This is calved off of: https://codereview.chromium.org/1785643003 (Switch SkBlurImageFilter over to new onFilterImage interface)
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1813813002
>
> Committed: https://skia.googlesource.com/skia/+/05849018c85403a34b88819db1c4bcf713b70a2b

TBR=bsalomon@google.com,senorblanco@google.com,senorblanco@chromium.org,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/1811973005

8 years agoRevert of allow one zero length dash (patchset #8 id:140001 of https://codereview...
bungeman [Fri, 18 Mar 2016 12:10:23 +0000 (05:10 -0700)]
Revert of allow one zero length dash (patchset #8 id:140001 of https://codereview.chromium.org/1805963002/ )

Reason for revert:
Causes the dash bench to crash.

Example crash:
https://build.chromium.org/p/client.skia/builders/Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release/builds/5581/steps/nanobench/logs/stdio

Original issue's description:
> allow one zero length dash
>
> If the constructed stroke that represents a dash has a
> single dash of length zero, and the end cap is square or
> round, draw the cap.
>
> The old code initialized the initial dash length to zero,
> making it ambiguous whether the first length is zero or
> not.
>
> R=robertphillips@google.com
> BUG=583299
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1805963002
>
> Committed: https://skia.googlesource.com/skia/+/5e1a24808415df2748822e8082e21a361362cdfe

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

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

8 years agoallow one zero length dash
caryclark [Fri, 18 Mar 2016 11:44:23 +0000 (04:44 -0700)]
allow one zero length dash

If the constructed stroke that represents a dash has a
single dash of length zero, and the end cap is square or
round, draw the cap.

The old code initialized the initial dash length to zero,
making it ambiguous whether the first length is zero or
not.

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

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

8 years agoAdd SkSpecialImage::makeTextureImage entry point
robertphillips [Thu, 17 Mar 2016 22:15:58 +0000 (15:15 -0700)]
Add SkSpecialImage::makeTextureImage entry point

This is calved off of: https://codereview.chromium.org/1785643003 (Switch SkBlurImageFilter over to new onFilterImage interface)

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

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

8 years agoSwitch SkSpecialImage & SkSpecialSurface classes over to smart pointers
robertphillips [Thu, 17 Mar 2016 21:31:39 +0000 (14:31 -0700)]
Switch SkSpecialImage & SkSpecialSurface classes over to smart pointers

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

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

8 years agoAdd SkImageGeneratorWIC
msarett [Thu, 17 Mar 2016 20:50:17 +0000 (13:50 -0700)]
Add SkImageGeneratorWIC

This will be a replacement for SkImageDecoder_WIC.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1785613010
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/1785613010

8 years agodocumentation: simplify pdf diagram
halcanary [Thu, 17 Mar 2016 20:33:50 +0000 (13:33 -0700)]
documentation: simplify pdf diagram

NOTRY=true
TBR=

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

8 years agodocumentation: simplify pdf diagram
halcanary [Thu, 17 Mar 2016 20:27:57 +0000 (13:27 -0700)]
documentation: simplify pdf diagram

NOTRY=true
TBR=

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

8 years agoRevert of sRGB support in Ganesh. Several pieces: (patchset #12 id:220001 of https...
brianosman [Thu, 17 Mar 2016 20:01:26 +0000 (13:01 -0700)]
Revert of sRGB support in Ganesh. Several pieces: (patchset #12 id:220001 of https://codereview.chromium.org/1789663002/ )

Reason for revert:
We're getting sRGB non-8888 configs?

Original issue's description:
> sRGB support in Ganesh. Several pieces:
>
> sRGB support now also requires GL_EXT_texture_sRGB_decode, which allows
> us to disable sRGB -> Linear conversion when reading textures. This gives
> us an easy way to support "legacy" L32 mode. We disable decoding based on
> the pixel config of the render target. Textures can override that behavior
> (specifically for format-conversion draws where we want that behavior).
>
> Added sBGRA pixel config, which is not-really-a-format. It's just sRGBA
> internally, and the external format is BGR order, so TexImage calls will
> swizzle correctly. This lets us interact with sRGB raster surfaces on BGR
> platforms.
>
> Devices without sRGB support behave like they always have: conversion from
> color type and profile type ignores sRGB and always returns linear pixel
> configs.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1789663002
>
> Committed: https://skia.googlesource.com/skia/+/9e3f1bf4e5cd8fc59554f986f36d6b034e99f9eb

TBR=reed@google.com,bsalomon@google.com,robertphillips@google.com
# 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/1814533003

8 years agoAdd asRRect method to SkClipStack::Element
cdalton [Thu, 17 Mar 2016 19:56:11 +0000 (12:56 -0700)]
Add asRRect method to SkClipStack::Element

Adds an asRRect method alongside asPath, for clip implementations that
can be generalized to round rects.

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

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

8 years agoDM: make --verbose send the vlog to stderr.
mtklein [Thu, 17 Mar 2016 19:53:36 +0000 (12:53 -0700)]
DM: make --verbose send the vlog to stderr.

See if this works out for you?
I've just turned off --verbose on the bots, so this ought to be safe now.

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

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

8 years agosRGB support in Ganesh. Several pieces:
brianosman [Thu, 17 Mar 2016 19:26:37 +0000 (12:26 -0700)]
sRGB support in Ganesh. Several pieces:

sRGB support now also requires GL_EXT_texture_sRGB_decode, which allows
us to disable sRGB -> Linear conversion when reading textures. This gives
us an easy way to support "legacy" L32 mode. We disable decoding based on
the pixel config of the render target. Textures can override that behavior
(specifically for format-conversion draws where we want that behavior).

Added sBGRA pixel config, which is not-really-a-format. It's just sRGBA
internally, and the external format is BGR order, so TexImage calls will
swizzle correctly. This lets us interact with sRGB raster surfaces on BGR
platforms.

Devices without sRGB support behave like they always have: conversion from
color type and profile type ignores sRGB and always returns linear pixel
configs.

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

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

8 years agoFix pointer aliasing bug in SkImageFilter::computeFastBounds.
jbroman [Thu, 17 Mar 2016 19:24:23 +0000 (12:24 -0700)]
Fix pointer aliasing bug in SkImageFilter::computeFastBounds.

Since src and dst are explicitly allowed to alias (according to a comment in
SkPaint.h), it is problematic to have the first input filter mutate dst, since
we still need access to the previous value to provide to the other input
filters.

To resolve this, SkImageFilter::computeFastBounds makes a copy of src on the
stack, and passes that to its inputs instead.

Also add a unit test that would have detected the issue.

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

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

8 years agojust write the verbose log file any time we have a --writePath
mtklein [Thu, 17 Mar 2016 18:58:11 +0000 (11:58 -0700)]
just write the verbose log file any time we have a --writePath

oughta fix the Android bots

TBR=bungeman@google.com

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

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

8 years agoUpdate how we send draws to gpu backend to reduce state setting.
egdaniel [Thu, 17 Mar 2016 18:35:45 +0000 (11:35 -0700)]
Update how we send draws to gpu backend to reduce state setting.

The main change here is that we pull primitive type off of the vertices, we set the gpu state on gpu once per pipeline/prim proc draw batch, and we create the ProgramDescriptor only for the Cache/ProgramBuilder.

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

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

8 years agofree -> reset
mtklein [Thu, 17 Mar 2016 17:51:27 +0000 (10:51 -0700)]
free -> reset

The C++ standard library uses ".reset()" where we sometimes write ".free()".
We also use ".reset()" quite a lot.  This standardizes on ".reset()".

This is one more step towards dropping SkAutoTDelete in favor of the standard
std::unique_ptr.

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

Committed: https://skia.googlesource.com/skia/+/0e3738db89e86035ed5d4f629bf58b817b1e5274

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

8 years agoupdate callsites for Make image factories
reed [Thu, 17 Mar 2016 17:51:11 +0000 (10:51 -0700)]
update callsites for Make image factories

not forced yet, as we still have the build-guard. waiting on chrome CL

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

TBR=

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

8 years agoFix gdb debugging for the latest NDK release.
djsollen [Thu, 17 Mar 2016 17:45:47 +0000 (10:45 -0700)]
Fix gdb debugging for the latest NDK release.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1806343003

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