platform/upstream/libSkiaSharp.git
9 years agoFix SkTileImageFilter when srcRect is a superset of bitmap bounds.
senorblanco [Mon, 11 Jan 2016 22:09:09 +0000 (14:09 -0800)]
Fix SkTileImageFilter when srcRect is a superset of bitmap bounds.

If the input bitmap passed to SkTileImageFilter does not fill the
srcRect, we were tiling this incorrectly (see the first sample
from tileimage filter -- it draws from a srcRect of 12,12 50x50
to a dstRect of 0,0 50x50. There should be no tiling at all
in this case!)

In order to fix this, we need to pad the bitmap out to srcRect,
and tile with that. In order to tile correctly in the GPU case,
we need to request a tileable texture.

NOTE: this will change the results of the tileimagefilter GM (correctness,
and added src / dest rects).

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

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

9 years agoSkPaintFilterCanvas skip-draw support
fmalita [Mon, 11 Jan 2016 21:58:29 +0000 (13:58 -0800)]
SkPaintFilterCanvas skip-draw support

At the time SkPaintFilterCanvas was introduced as a SkDrawFilter replacement,
no clients were relying on the draw veto logic.  Now Chromium does.

To facilitate migrating off SkDrawFilter, let's augment SkPaintFilterCanvas
with skip-draw semantics.

A side effect of the CL is that now we call the filter virtual even for null
paints.

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

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

9 years agoGuard SkGpuDevice
joshualitt [Mon, 11 Jan 2016 21:29:31 +0000 (13:29 -0800)]
Guard SkGpuDevice

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

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

9 years agoSkSwizzler: Factor skipping zeros out into a helper function.
mtklein [Mon, 11 Jan 2016 21:13:55 +0000 (13:13 -0800)]
SkSwizzler: Factor skipping zeros out into a helper function.

I figure something like this lets us not worry about it in the new opts.

This skips only leading zeros per-scanline, not all zeros, but my bet is that
leading zeros are all that matters: it's got to be rare that a scanline is both
larger than 1024 pixels and has runs of 1024 transparent pixels in the middle.
I bet the big bang for the buck comes from skipping full scanlines (or even
multiple adjacent scanlines).

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

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

9 years agoremove external header for SkModeColorFilter
reed [Mon, 11 Jan 2016 21:08:59 +0000 (13:08 -0800)]
remove external header for SkModeColorFilter

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

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

9 years agomove declaration of CreateLightingFilter into SkColorMatrixFilter
reed [Mon, 11 Jan 2016 20:34:04 +0000 (12:34 -0800)]
move declaration of CreateLightingFilter into SkColorMatrixFilter

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

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

9 years agoFix BitmapCopy_Texture test on iOS
Brian Salomon [Mon, 11 Jan 2016 20:15:46 +0000 (15:15 -0500)]
Fix BitmapCopy_Texture test on iOS

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

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

9 years agoUpdate our version of jsoncpp to fix a memory alignment bug in the library.
djsollen [Mon, 11 Jan 2016 19:36:33 +0000 (11:36 -0800)]
Update our version of jsoncpp to fix a memory alignment bug in the library.

This upgrades the library to 1.0.0 instead of the most recent release, since more recent releases require exceptions to be enabled.

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

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

9 years agoHave nanobench report bench median sample time too.
mtklein [Mon, 11 Jan 2016 19:28:26 +0000 (11:28 -0800)]
Have nanobench report bench median sample time too.

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

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

9 years agoMake SkBitmap::CopyTo respect requested dst color type when bitmap is texture backed.
bsalomon [Mon, 11 Jan 2016 19:14:17 +0000 (11:14 -0800)]
Make SkBitmap::CopyTo respect requested dst color type when bitmap is texture backed.

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

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

9 years agorestore lost optimization when the shader can report const_in_y
reed [Mon, 11 Jan 2016 19:02:27 +0000 (11:02 -0800)]
restore lost optimization when the shader can report const_in_y

accidentally lost we I landed https://codereview.chromium.org/1556003003

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

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

9 years agoremove imagefilter::sizeconstraint
reed [Mon, 11 Jan 2016 18:56:59 +0000 (10:56 -0800)]
remove imagefilter::sizeconstraint

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

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

9 years agoChange to wire up opnames in SkGpuDevice
joshualitt [Mon, 11 Jan 2016 18:39:11 +0000 (10:39 -0800)]
Change to wire up opnames in SkGpuDevice

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

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

9 years agoRemove Google3 scripts.
benjaminwagner [Mon, 11 Jan 2016 18:35:46 +0000 (10:35 -0800)]
Remove Google3 scripts.

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

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

9 years agoFix uninit texture key with odd number of textures
bsalomon [Mon, 11 Jan 2016 17:17:52 +0000 (09:17 -0800)]
Fix uninit texture key with odd number of textures
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1575993003

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

9 years agoapply --match to image file names too, like we do for .skps
mtklein [Mon, 11 Jan 2016 17:04:21 +0000 (09:04 -0800)]
apply --match to image file names too, like we do for .skps

This should make skipping an image much cheaper.

Before:
   $ time out/Release/nanobench --images resources/ --match sdkjlfasjlfds
        4.65 real         4.41 user         0.19 sys
   $ time out/Release/nanobench --images resources/ --match sdkjlfasjlfds
        0.05 real         0.03 user         0.01 sys

The effect should be much more dramatic when there are more images to skip (e.g. on the bots).
This cuts about 6 minutes off the Debug CQ trybot.

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

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

9 years agoMove atomicinc in GrTracing to behind branch
joshualitt [Mon, 11 Jan 2016 16:30:47 +0000 (08:30 -0800)]
Move atomicinc in GrTracing to behind branch

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

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

9 years agoReland of Add guards to GrTextureProvider (patchset #1 id:1 of https://codereview...
joshualitt [Mon, 11 Jan 2016 16:27:48 +0000 (08:27 -0800)]
Reland of Add guards to GrTextureProvider (patchset #1 id:1 of https://codereview.chromium.org/1565313003/ )

Reason for revert:
should be fixed

Original issue's description:
> Revert of Add guards to GrTextureProvider (patchset #5 id:80001 of https://codereview.chromium.org/1567983002/ )
>
> Reason for revert:
> breaking asan bot
>
> Original issue's description:
> > Add guards to GrTextureProvider
> >
> > TBR=bsalomon@google.com
> > BUG=skia:
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567983002
> >
> > Committed: https://skia.googlesource.com/skia/+/b30dd1db1d914b85a691b4724713ba1b0f16cd6c
>
> TBR=robertphillips@google.com,joshualitt@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/9a9515e081c54efdd5a0b0
f662c013cbeef6d63f

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

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

9 years agoFix radii calculation code to handle large radii.
herb [Mon, 11 Jan 2016 16:08:56 +0000 (08:08 -0800)]
Fix radii calculation code to handle large radii.

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

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

9 years agodocs: Fix link to 'How to submit a patch'.
jcgregorio [Mon, 11 Jan 2016 15:42:33 +0000 (07:42 -0800)]
docs: Fix link to 'How to submit a patch'.

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

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

9 years agoDelete reallyHasAlpha() from SkCodec
msarett [Mon, 11 Jan 2016 15:23:23 +0000 (07:23 -0800)]
Delete reallyHasAlpha() from SkCodec

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

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

9 years agoMake SkROBuffer::Iter::size() work when exhausted
scroggo [Mon, 11 Jan 2016 14:38:00 +0000 (06:38 -0800)]
Make SkROBuffer::Iter::size() work when exhausted

According to the documentation, this method will return 0 when the Iter
is exhausted. Prior to this CL, it crashes instead.

Prevent a crash with a null fHead, and add a test to verify the
behavior.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1574603002

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

9 years agoblacklist cpu cacherator tests in replay modes
mtklein [Mon, 11 Jan 2016 14:30:47 +0000 (06:30 -0800)]
blacklist cpu cacherator tests in replay modes

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE-Trybot,Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86-Debug-Trybot

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

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

9 years agoMight as well inline these premultiplies.
mtklein [Mon, 11 Jan 2016 14:16:26 +0000 (06:16 -0800)]
Might as well inline these premultiplies.

We're paying quite a bit of function-call overhead per pixel.

On one test image we spend 3.5% of our total time in swizzle_rgba_to_n32_premul() and 8.8% of our total time in SkPreMultiplyARGB().  That turns into just 8.8% of our total time in swizzle_rgba_to_n32_premul() after inlining.

That's about a 30% speedup.

This will make SIMD procs look worse, so it's nice to land this first.

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

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

9 years agoUpdate SKP version
update-skps [Sun, 10 Jan 2016 08:35:26 +0000 (00:35 -0800)]
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=1576773002

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

9 years agoremove SkImage::applyFilter() -- unused, can always re-add later
reed [Sat, 9 Jan 2016 01:21:47 +0000 (17:21 -0800)]
remove SkImage::applyFilter() -- unused, can always re-add later

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

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

9 years agoImplement an SkPaint-based image filter
ajuma [Fri, 8 Jan 2016 22:58:35 +0000 (14:58 -0800)]
Implement an SkPaint-based image filter

This implements SkPaintImageFilter, and is intended to replace
SkRectShaderImageFilter. By allowing a paint and not just a
shader as input, this allows consumers to control dithering.

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

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

9 years agoAdd --zero_init to simulate zero-initialized memory in CodecBench
mtklein [Fri, 8 Jan 2016 22:20:36 +0000 (14:20 -0800)]
Add --zero_init to simulate zero-initialized memory in CodecBench

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

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

9 years agoFixed an assertion error in GrAAConvexTessellator. While adding a new point, it would...
ethannicholas [Fri, 8 Jan 2016 22:09:18 +0000 (14:09 -0800)]
Fixed an assertion error in GrAAConvexTessellator. While adding a new point, it would check that the new point was not a duplicate of the previous point. It would then drop the previous point if it was in the middle of a straight line, and proceed to add the new point.

Unfortunately, floating point precision issues mean that sometimes, after dropping the previous point, we'd end up with the newly-added point as a duplicate of the new previous point, tripping an assertion failure.

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

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

9 years agoRemove work from constructors to facilitate debugging.
herb [Fri, 8 Jan 2016 21:48:43 +0000 (13:48 -0800)]
Remove work from constructors to facilitate debugging.

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

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

9 years agoAdd a class representing texture swizzle.
bsalomon [Fri, 8 Jan 2016 21:20:12 +0000 (13:20 -0800)]
Add a class representing texture swizzle.

Store config swizzle GrGLCaps and shader swizzles in GrGLSLCaps.

Remove GrTextureAccess's swizzle and update users of it to swizzle in their shader code.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567733005

Committed: https://skia.googlesource.com/skia/+/1a1efeacf7cc94a8c2977114dfe230fed3efc105

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

9 years agoClean up order of arguments to d,s[,aa].
mtklein [Fri, 8 Jan 2016 20:12:43 +0000 (12:12 -0800)]
Clean up order of arguments to d,s[,aa].

This gets rid of those unsightly lambdas,
and makes the file more consistent both with itself and with Sk4px.

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

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

9 years agoRevert of Add a class representing texture swizzle. (patchset #6 id:100001 of https...
mtklein [Fri, 8 Jan 2016 20:11:39 +0000 (12:11 -0800)]
Revert of Add a class representing texture swizzle. (patchset #6 id:100001 of https://codereview.chromium.org/1567733005/ )

Reason for revert:
Shader compilation failures when implicitly converting vec4 to float.

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Win8-MSVC-ShuttleA-GPU-GTX960-x86_64-Debug/builds/3266/steps/dm/logs/stdio

https://uberchromegw.corp.google.com/i/client.skia.android/builders/Test-Android-GCC-Nexus6-GPU-Adreno420-Arm7-Debug/builds/3154/steps/dm/logs/stdio

Original issue's description:
> Add a class representing texture swizzle.
>
> Store config swizzle GrGLCaps and shader swizzles in GrGLSLCaps.
>
> Remove GrTextureAccess's swizzle and update users of it to swizzle in their shader code.
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567733005
>
> Committed: https://skia.googlesource.com/skia/+/1a1efeacf7cc94a8c2977114dfe230fed3efc105

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

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

9 years agoClean up SkXfermode_opts.h
mtklein [Fri, 8 Jan 2016 19:45:21 +0000 (11:45 -0800)]
Clean up SkXfermode_opts.h

It seems that MSVC + __vectorcall don't play well together,
so back ourselves out into a situation where we don't need it.

   - Inline transfermode functions.  This removes the need for SK_VECTORCALL.
   - Remove 565 destination specializations.
     Blending into 565 is not speed-critical enough to merit the code bloat.
   - Removing 565 specializations means a bunch of Sk4px code is now dead.

8888 xfermodes generally speed up a bit from inlining, smoothly ranging from no change down to 0.65x for the fastest functions like Plus or Modulate.

565 xfermodes generally slow down because we're doing 565 -> 8888 and 8888->565 conversion serially[1] and using the stack, smoothly ranging from no change up to 2x slower for the fastest functions like Plus and Modulate.

[1] the 565->8888 conversion is actually being autovectorized

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

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

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

9 years agoAdd a class representing texture swizzle.
bsalomon [Fri, 8 Jan 2016 19:38:41 +0000 (11:38 -0800)]
Add a class representing texture swizzle.

Store config swizzle GrGLCaps and shader swizzles in GrGLSLCaps.

Remove GrTextureAccess's swizzle and update users of it to swizzle in their shader code.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567733005

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

9 years agofix opacity check in SkBitmapDevice::Create
lsalzman [Fri, 8 Jan 2016 19:20:14 +0000 (11:20 -0800)]
fix opacity check in SkBitmapDevice::Create

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

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

9 years agoUse ::std for is_empty, is_class, add_xxx_reference, remove decay.
bungeman [Fri, 8 Jan 2016 19:05:09 +0000 (11:05 -0800)]
Use ::std for is_empty, is_class, add_xxx_reference, remove decay.

SkTLogic.h contains implemenetations of is_empty, is_class, decay,
decay_t, add_lvalue_reference, add_rvalue_reference, and
add_rvalue_reference_t. The declaration of is_class is only used by
is_empty. The current implementation of is_empty will not work
correctly with 'final'. The current implementation of
add_lvalue_reference does not support clarifications in c++17. No Skia
code is currently using decay, decay_t, add_rvalue_reference, and
add_rvalue_reference_t. In addition, there are no known issues with
any of these in ::std with any supported compiler.

The implementations of is_function and is_convertible are commented to
note why they are still present.

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

9 years agoDM: more invariants
mtklein [Fri, 8 Jan 2016 18:19:35 +0000 (10:19 -0800)]
DM: more invariants

  - add ViaPicture
  - run ViaPicture on most bots
  - run ViaSecondPicture (tests SkPictureRecorder reuse) and ViaTwice (tests caching) on some bots
  - extend ViaSerialization reference checking to ViaPicture, ViaSecondPicture,
    ViaSingletonPictures, and ViaTwice
  - suppress current reference check failures with --blacklist

I'm open to following up on changing how those suppressions work.

Passing --nocheck turns off these invariant checks, letting us debug failures with normal image diff tools.

CQ_EXTRA_TRYBOTS=client.skia:Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot

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

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

9 years agoReland of Make a single GrSingleOwner in GrContext (patchset #1 id:1 of https://coder...
joshualitt [Fri, 8 Jan 2016 18:09:13 +0000 (10:09 -0800)]
Reland of Make a single GrSingleOwner in GrContext (patchset #1 id:1 of https://codereview.chromium.org/1565303003/ )

Reason for revert:
trying again

Original issue's description:
> Revert of Make a single GrSingleOwner in GrContext (patchset #3 id:40001 of https://codereview.chromium.org/1563703004/ )
>
> Reason for revert:
> breaking asan
>
> Original issue's description:
> > Make a single GrSingleOwner in GrContext
> >
> > TBR=bsalomon@google.com
> > BUG=skia:
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1563703004
> >
> > Committed: https://skia.googlesource.com/skia/+/f9bc796e0dbd31674c22b34761913ee6e8fdd66a
>
> TBR=robertphillips@google.com,joshualitt@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/94da292e39db0d41da08b1d6055ca5e0d6b498cc

TBR=robertphillips@google.com,joshualitt@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/1572653002

9 years agoRemove "unused" parameter from filterInputGPU
robertphillips [Fri, 8 Jan 2016 17:28:23 +0000 (09:28 -0800)]
Remove "unused" parameter from filterInputGPU
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1569553007

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

9 years agounify how canvas checks for null on skia objects (images, blobs, pictures)
reed [Fri, 8 Jan 2016 17:18:44 +0000 (09:18 -0800)]
unify how canvas checks for null on skia objects (images, blobs, pictures)

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

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

9 years agoMove config texturability/renderability to config table.
bsalomon [Fri, 8 Jan 2016 17:12:44 +0000 (09:12 -0800)]
Move config texturability/renderability to config table.

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

Committed: https://skia.googlesource.com/skia/+/32a3cd2f2860b15a842a6aa49e4e6a3bed04f949

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

9 years agoremove MPD for now, to simplify things
reed [Fri, 8 Jan 2016 16:23:19 +0000 (08:23 -0800)]
remove MPD for now, to simplify things

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

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

9 years agoCreate stub GrAuditTrail class
joshualitt [Fri, 8 Jan 2016 15:19:47 +0000 (07:19 -0800)]
Create stub GrAuditTrail class

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

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

9 years agotest+bench new swizzle SkOpts
mtklein [Fri, 8 Jan 2016 14:32:52 +0000 (06:32 -0800)]
test+bench new swizzle SkOpts

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

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

9 years agoFix unref order in SkGpuDevice
joshualitt [Fri, 8 Jan 2016 14:32:31 +0000 (06:32 -0800)]
Fix unref order in SkGpuDevice

GrContext should be unrefed after GrDrawContext.

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

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

9 years agoremove SkGPipe
reed [Fri, 8 Jan 2016 14:30:14 +0000 (06:30 -0800)]
remove SkGPipe

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

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

9 years agodon't leak test filters and shaders
reed [Fri, 8 Jan 2016 01:56:33 +0000 (17:56 -0800)]
don't leak test filters and shaders

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

TBR=

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

9 years agoRevert of Move config texturability/renderability to config table (patchset #8 id...
egdaniel [Fri, 8 Jan 2016 01:06:04 +0000 (17:06 -0800)]
Revert of Move config texturability/renderability to config table (patchset #8 id:140001 of https://codereview.chromium.org/1563443002/ )

Reason for revert:
speculative revert for breaking iOS writePixels tests

Original issue's description:
> Move config texturability/renderability to config table.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1563443002
>
> Committed: https://skia.googlesource.com/skia/+/32a3cd2f2860b15a842a6aa49e4e6a3bed04f949

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

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

9 years agoadd SkShader::newWithColorFilter
reed [Thu, 7 Jan 2016 23:47:29 +0000 (15:47 -0800)]
add SkShader::newWithColorFilter

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

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

9 years agoMake CodecBench test kPremul and kUnpremul
msarett [Thu, 7 Jan 2016 22:20:20 +0000 (14:20 -0800)]
Make CodecBench test kPremul and kUnpremul

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

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

9 years agoRevert of Fix handling of radii scaling to force the result to always be less (patchs...
robertphillips [Thu, 7 Jan 2016 22:17:20 +0000 (14:17 -0800)]
Revert of Fix handling of radii scaling to force the result to always be less (patchset #14 id:250001 of https://codereview.chromium.org/1567723004/ )

Reason for revert:
Fear and doubt of NexusPlayer

Original issue's description:
> Fix handling of radii scaling to force the result to always be less
> than a given side.
> BUG=472147
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567723004
>
> Committed: https://skia.googlesource.com/skia/+/f96bf1a2d091a917bb93f9e9a3a8d53bb39d068e

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

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

9 years agoSet up some hooks for premul/swizzzle opts.
mtklein [Thu, 7 Jan 2016 21:48:21 +0000 (13:48 -0800)]
Set up some hooks for premul/swizzzle opts.

  You can call these as SkOpts::premul_xxxa, SkOpts::swaprb_xxxa, etc.

  For now, I just backed the function pointers with some (untested) portable
  code, which may autovectorize.  We can override with optimized versions in
  Init_ssse3() (in SkOpts_ssse3.cpp), Init_neon() (SkOpts_neon.cpp), etc.

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

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

9 years agoBroke GrTessellatingPathRenderer's tessellator out into a separate file.
ethannicholas [Thu, 7 Jan 2016 21:34:16 +0000 (13:34 -0800)]
Broke GrTessellatingPathRenderer's tessellator out into a separate file.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1557083002

Committed: https://skia.googlesource.com/skia/+/8b05cb8a00bdb82e100f1ba74bf4de4a504cceea

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

9 years agoRevert of Make a single GrSingleOwner in GrContext (patchset #3 id:40001 of https...
joshualitt [Thu, 7 Jan 2016 21:22:24 +0000 (13:22 -0800)]
Revert of Make a single GrSingleOwner in GrContext (patchset #3 id:40001 of https://codereview.chromium.org/1563703004/ )

Reason for revert:
breaking asan

Original issue's description:
> Make a single GrSingleOwner in GrContext
>
> TBR=bsalomon@google.com
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1563703004
>
> Committed: https://skia.googlesource.com/skia/+/f9bc796e0dbd31674c22b34761913ee6e8fdd66a

TBR=robertphillips@google.com,joshualitt@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/1565303003

9 years agoRevert of Add guards to GrTextureProvider (patchset #5 id:80001 of https://codereview...
joshualitt [Thu, 7 Jan 2016 21:17:38 +0000 (13:17 -0800)]
Revert of Add guards to GrTextureProvider (patchset #5 id:80001 of https://codereview.chromium.org/1567983002/ )

Reason for revert:
breaking asan bot

Original issue's description:
> Add guards to GrTextureProvider
>
> TBR=bsalomon@google.com
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567983002
>
> Committed: https://skia.googlesource.com/skia/+/b30dd1db1d914b85a691b4724713ba1b0f16cd6c

TBR=robertphillips@google.com,joshualitt@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/1565313003

9 years agoRename SkGifCodec, SkIcoCodec, SkWbmpCodec
msarett [Thu, 7 Jan 2016 21:17:19 +0000 (13:17 -0800)]
Rename SkGifCodec, SkIcoCodec, SkWbmpCodec

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

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

9 years agoMove config texturability/renderability to config table.
bsalomon [Thu, 7 Jan 2016 21:00:11 +0000 (13:00 -0800)]
Move config texturability/renderability to config table.

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

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

9 years agoAdd guards to GrTextureProvider
joshualitt [Thu, 7 Jan 2016 20:52:05 +0000 (12:52 -0800)]
Add guards to GrTextureProvider

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

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

9 years agoMore <type_traits> for SkTLogic.h.
bungeman [Thu, 7 Jan 2016 20:39:11 +0000 (12:39 -0800)]
More <type_traits> for SkTLogic.h.

SkTLogic.h specifies a number of declarations now found in
<type_traits>. This removes some of these declarations from SkTLogic.h
in favor of the ::std versions. These declarations are fairly safe to
change as the implementations are striaght forward and no known stl
implementations are known to have issues with them.

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

9 years agoFix handling of radii scaling to force the result to always be less
herb [Thu, 7 Jan 2016 19:53:16 +0000 (11:53 -0800)]
Fix handling of radii scaling to force the result to always be less
than a given side.
BUG=472147
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567723004

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

9 years agotest & doc for SkUnitCubicInterp
caryclark [Thu, 7 Jan 2016 19:33:15 +0000 (11:33 -0800)]
test & doc for SkUnitCubicInterp

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

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

9 years agoMake a single GrSingleOwner in GrContext
joshualitt [Thu, 7 Jan 2016 19:32:39 +0000 (11:32 -0800)]
Make a single GrSingleOwner in GrContext

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

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

9 years agoRevert[2] of "add backdrop option to SaveLayerRec"
reed [Thu, 7 Jan 2016 19:28:08 +0000 (11:28 -0800)]
Revert[2] of "add backdrop option to SaveLayerRec"

Reverted because of picture/serialization failure

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

TBR=mtklein

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

9 years agoStore ninepatch chunks in the png header in CodexTest
msarett [Thu, 7 Jan 2016 19:03:25 +0000 (11:03 -0800)]
Store ninepatch chunks in the png header in CodexTest

We are making a change in Android to store ninepatch chunks in the
png header.  Thus, our ninepatch test should match the Android
framework's use.
https://googleplex-android-review.git.corp.google.com/#/c/832067/

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

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

9 years agoSkTreatAsSprite should take AA into account
fmalita [Thu, 7 Jan 2016 18:34:46 +0000 (10:34 -0800)]
SkTreatAsSprite should take AA into account

Currently we always call SkTreatAsSprite with 0 subpixel bits, which means
subpixel translations are ignored.  This is incorrect for the anti-aliased
case (drawSprite always pixel-snaps, so we lose edge AA).

The CL updates SkTreatAsSprite to take an SkPaint argument and use 8 subpixel
bits when AA is requested.

Also remove unused SkTreatAsSpriteFilter.

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

Committed: https://skia.googlesource.com/skia/+/983dc2541a729609037a05eba731b3eb9788c517

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

9 years agoAdd sentinel to GrMemoryPool's block header
robertphillips [Thu, 7 Jan 2016 18:12:16 +0000 (10:12 -0800)]
Add sentinel to GrMemoryPool's block header

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

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

9 years agoRevert of SkTreatAsSprite should take AA into account (patchset #5 id:80001 of https...
reed [Thu, 7 Jan 2016 17:15:20 +0000 (09:15 -0800)]
Revert of SkTreatAsSprite should take AA into account (patchset #5 id:80001 of https://codereview.chromium.org/1566943002/ )

Reason for revert:
Need to use SkLeftShift since the arg could be negative

Original issue's description:
> SkTreatAsSprite should take AA into account
>
> Currently we always call SkTreatAsSprite with 0 subpixel bits, which means
> subpixel translations are ignored.  This is incorrect for the anti-aliased
> case (drawSprite always pixel-snaps, so we lose edge AA).
>
> The CL updates SkTreatAsSprite to take an SkPaint argument and use 8 subpixel
> bits when AA is requested.
>
> Also remove unused SkTreatAsSpriteFilter.
>
> BUG=skia:4761
> R=reed@google.com
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1566943002
>
> Committed: https://skia.googlesource.com/skia/+/983dc2541a729609037a05eba731b3eb9788c517

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

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

9 years agoRevert of add backdrop option to SaveLayerRec (patchset #14 id:260001 of https:/...
reed [Thu, 7 Jan 2016 16:15:10 +0000 (08:15 -0800)]
Revert of add backdrop option to SaveLayerRec (patchset #14 id:260001 of https://codereview.chromium.org/1523053003/ )

Reason for revert:
serialized != direct, will investigate

Original issue's description:
> add backdrop option to SaveLayerRec
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1523053003
>
> Committed: https://skia.googlesource.com/skia/+/247415969a9a5ed6c83cc09395472416c4b7de7f

TBR=robertphillips@google.com,bsalomon@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:

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

9 years agoSkTreatAsSprite should take AA into account
fmalita [Thu, 7 Jan 2016 16:02:25 +0000 (08:02 -0800)]
SkTreatAsSprite should take AA into account

Currently we always call SkTreatAsSprite with 0 subpixel bits, which means
subpixel translations are ignored.  This is incorrect for the anti-aliased
case (drawSprite always pixel-snaps, so we lose edge AA).

The CL updates SkTreatAsSprite to take an SkPaint argument and use 8 subpixel
bits when AA is requested.

Also remove unused SkTreatAsSpriteFilter.

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

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

9 years agoRemove SK_SUPPORT_LEGACY_BITMAP_SAMPLER_BIAS
fmalita [Thu, 7 Jan 2016 15:58:10 +0000 (07:58 -0800)]
Remove SK_SUPPORT_LEGACY_BITMAP_SAMPLER_BIAS

No longer defined in Chromium.

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

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

9 years agoadd backdrop option to SaveLayerRec
reed [Thu, 7 Jan 2016 15:44:35 +0000 (07:44 -0800)]
add backdrop option to SaveLayerRec

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

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

9 years agoDM: add a pixel check to serialize
mtklein [Thu, 7 Jan 2016 15:38:29 +0000 (07:38 -0800)]
DM: add a pixel check to serialize

If we're running through serialize and then drawing into some raster target (e.g. serialize-8888 like we run on the bots), make sure the serialized version is identical to what we'd get if we just drew into the rest of the pipeline (i.e. 8888).

Start by blacklisting all current failures.  This at least prevents further regression.

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

Committed: https://skia.googlesource.com/skia/+/6eb4e36a93ea695e7adb771ea9ac3326680a8e98

CQ_EXTRA_TRYBOTS=client.skia:Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot

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

9 years agoAdd missing include for sleep
scroggo [Thu, 7 Jan 2016 15:28:47 +0000 (07:28 -0800)]
Add missing include for sleep

This fixes the AOSP mips build. Mirrors the same change needed in DM.cpp at crrev.com/1425843003

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

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

9 years agoFix crash when ETC1 codec is not supported.
djsollen [Thu, 7 Jan 2016 15:22:47 +0000 (07:22 -0800)]
Fix crash when ETC1 codec is not supported.

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

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

9 years agoRemove codecs and images from iOS Bazel build.
iroth [Thu, 7 Jan 2016 15:11:39 +0000 (07:11 -0800)]
Remove codecs and images from iOS Bazel build.

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

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

9 years agocmake: set SK_RELEASE to 0 if not a Release build
mtklein [Thu, 7 Jan 2016 14:56:11 +0000 (06:56 -0800)]
cmake: set SK_RELEASE to 0 if not a Release build

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

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

9 years agoremove dead code from SkColorMatrixFilter
reed [Thu, 7 Jan 2016 14:23:48 +0000 (06:23 -0800)]
remove dead code from SkColorMatrixFilter

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

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

9 years agoRevert of DM: add a pixel check to serialize (patchset #4 id:60001 of https://coderev...
caryclark [Thu, 7 Jan 2016 13:12:08 +0000 (05:12 -0800)]
Revert of DM: add a pixel check to serialize (patchset #4 id:60001 of https://codereview.chromium.org/1561993003/ )

Reason for revert:
breaks windows bots; additional windows specific failures need to be blacklisted

Original issue's description:
> DM: add a pixel check to serialize
>
> If we're running through serialize and then drawing into some raster target (e.g. serialize-8888 like we run on the bots), make sure the serialized version is identical to what we'd get if we just drew into the rest of the pipeline (i.e. 8888).
>
> Start by blacklisting all current failures.  This at least prevents further regression.
>
> BUG=skia:4095
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1561993003
>
> Committed: https://skia.googlesource.com/skia/+/6eb4e36a93ea695e7adb771ea9ac3326680a8e98

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

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

9 years agoRevert of Broke GrTessellatingPathRenderer's tessellator out into a separate file...
caryclark [Thu, 7 Jan 2016 13:09:48 +0000 (05:09 -0800)]
Revert of Broke GrTessellatingPathRenderer's tessellator out into a separate file. (patchset #8 id:240001 of https://codereview.chromium.org/1557083002/ )

Reason for revert:
broke valgrind bot

Original issue's description:
> Broke GrTessellatingPathRenderer's tessellator out into a separate file.
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1557083002
>
> Committed: https://skia.googlesource.com/skia/+/8b05cb8a00bdb82e100f1ba74bf4de4a504cceea

TBR=bsalomon@google.com,joshualitt@chromium.org,senorblanco@chromium.org,ethannicholas@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

9 years agoMake SkGLContext lifetime more well-defined
kkinnunen [Thu, 7 Jan 2016 07:49:30 +0000 (23:49 -0800)]
Make SkGLContext lifetime more well-defined

Remove refcounting from SkGLContext.

SkGLContext is expected to behave like GrContextFactory would own
it, as implied by the GrContextFactory function.

If it is refcounted, this does not hold.

Also other use sites, such as in SkOSWindow_win (command buffer gl
object), confirm the behavior. The object is explicitly owned and
destroyed, not shared.

Also fixes potential crashes from using GL context of an abandoned
context.

Also fixes potential crashes in DM/nanobench, if the GrContext lives
longer than GLContext through internal refing of GrContext.

Moves the non-trivial implementations from GrContextFactory.h to
.cpp, just for consistency sake.

Changes pathops_unittest.gyp. The pathops_unittest uses
GrContextFactory, but did not link to its implementation. The reason
they worked was that the implementation used (constructors, destructors)
happened to be in the .h file.

This works towards being able to use command buffer and NVPR from
the SampleApp.

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

Committed: https://skia.googlesource.com/skia/+/830e012187f951d49d7e46e196ac8d1e653a25da

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

9 years agoDM: add a pixel check to serialize
mtklein [Wed, 6 Jan 2016 22:20:29 +0000 (14:20 -0800)]
DM: add a pixel check to serialize

If we're running through serialize and then drawing into some raster target (e.g. serialize-8888 like we run on the bots), make sure the serialized version is identical to what we'd get if we just drew into the rest of the pipeline (i.e. 8888).

Start by blacklisting all current failures.  This at least prevents further regression.

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

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

9 years agoFor Google3, enable SK_SUPPORT_LEGACY_SAVEFLAGS; required by legacy webkit_headless.
benjaminwagner [Wed, 6 Jan 2016 20:51:58 +0000 (12:51 -0800)]
For Google3, enable SK_SUPPORT_LEGACY_SAVEFLAGS; required by legacy webkit_headless.

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

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

9 years agoBroke GrTessellatingPathRenderer's tessellator out into a separate file.
ethannicholas [Wed, 6 Jan 2016 19:44:34 +0000 (11:44 -0800)]
Broke GrTessellatingPathRenderer's tessellator out into a separate file.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1557083002

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

9 years agoFix DM tests in the Android Framework
djsollen [Wed, 6 Jan 2016 19:38:14 +0000 (11:38 -0800)]
Fix DM tests in the Android Framework
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567693002

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

9 years agoReenable testing webp to PDF on Valgrind
scroggo [Wed, 6 Jan 2016 19:28:26 +0000 (11:28 -0800)]
Reenable testing webp to PDF on Valgrind

The errors were probably due to skbug.com/4038, which has been fixed.
Reenable the test.

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

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

9 years agoAdd Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Release to the CQ
borenet [Wed, 6 Jan 2016 18:54:50 +0000 (10:54 -0800)]
Add Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Release to the CQ

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

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

9 years agoFix some SkCodecPrintfs
scroggo [Wed, 6 Jan 2016 17:53:34 +0000 (09:53 -0800)]
Fix some SkCodecPrintfs

Silence the warning about peeking. Until we implement peeking for the
stream often used, it will always print, cluttering the logs.

Add some more information to the warning about failing to rewind.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1564843002

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

9 years agoOptimize SkTileImageFilter destination bitmap size.
senorblanco [Wed, 6 Jan 2016 17:46:24 +0000 (09:46 -0800)]
Optimize SkTileImageFilter destination bitmap size.

The destination bitmap size was not being clipped by the clip bounds,
so tiled rendering (ie., clipping to a small region and rendering
a SkTileImageFilter with a large dstRect) was much slower than
non-tiled rendering.

Correctness is covered by unit test ImageFilterDrawTiled, and
performance by TileImageFilterBench.

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

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

9 years agoAdd additional assert to GrSingleOwner
joshualitt [Wed, 6 Jan 2016 17:25:13 +0000 (09:25 -0800)]
Add additional assert to GrSingleOwner

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

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

9 years agoSkPDF: Change handling of large-numbers in matricies.
halcanary [Wed, 6 Jan 2016 17:02:25 +0000 (09:02 -0800)]
SkPDF: Change handling of large-numbers in matricies.

re-do http://crrev.com/1438503002 right.

Also, add a unit test that asserts without this change.

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

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

9 years agoAdd skstd::remove_pointer_t and use it.
bungeman [Wed, 6 Jan 2016 16:30:59 +0000 (08:30 -0800)]
Add skstd::remove_pointer_t and use it.

This replaces an existing incomplete implementation. This also makes
it easier to update the current use in the future when switching to
<type_traits>.

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

9 years agoadd comment
caryclark [Wed, 6 Jan 2016 16:27:44 +0000 (08:27 -0800)]
add comment

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

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

9 years agoCreate debug only SkSingleOwner
joshualitt [Wed, 6 Jan 2016 16:26:09 +0000 (08:26 -0800)]
Create debug only SkSingleOwner

This is so Gpu code can guard against improper multithreaded usage in
debug builds

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

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

9 years agofix valgrind
caryclark [Wed, 6 Jan 2016 16:15:44 +0000 (08:15 -0800)]
fix valgrind

(A recently added fuzzer test broke the valgrind bot, intentionally,
to isolate an uninitialized memory bug.)

If the conic has ordered points, but cannot be broken into parts,
treat it as if it were monotonic.

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

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

9 years agoAdd debug sentinel to GrMemoryPool to check for memory stomping
robertphillips [Wed, 6 Jan 2016 15:04:46 +0000 (07:04 -0800)]
Add debug sentinel to GrMemoryPool to check for memory stomping

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

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

9 years agoIn Google3 build, use SK_SFNTLY_SUBSETTER define to enable/disable sfntly.
benjaminwagner [Wed, 6 Jan 2016 01:00:04 +0000 (17:00 -0800)]
In Google3 build, use SK_SFNTLY_SUBSETTER define to enable/disable sfntly.

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

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

9 years agoStart using <type_traits> and <utility> (C++11).
bungeman [Tue, 5 Jan 2016 22:59:40 +0000 (14:59 -0800)]
Start using <type_traits> and <utility> (C++11).

SkUtility.h and SkTLogic.h implement a number of type traits now
available through <type_traits> and <utility>. This removes SkUtility.h,
replacing it with <utility>, and moves a number of traits in
SkTLogic.h to use the std:: equivelents. This change only uses C++11
parts of the standard library; SkTLogic.h will continue to provide
C++14 and beyond for now in the skstd namespace.

The changes to SkTLogic.h are being done gradually so that safe changes
may be landed confidently, with more risky changes in the future.

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

9 years agoAdd a bench to test SkTileImageFilter.
senorblanco [Tue, 5 Jan 2016 21:27:43 +0000 (13:27 -0800)]
Add a bench to test SkTileImageFilter.

Tests in three modes: no tiling, 32x32 tiled rendering, and 64x64 tiled
rendering.

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

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

9 years agofix nexus player
caryclark [Tue, 5 Jan 2016 20:36:09 +0000 (12:36 -0800)]
fix nexus player

The path contains test has such large numbers that it is indeterminate
whether it will return true or false. Allow either result, ensuring
that the test itself doesn't crash.

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

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