platform/upstream/libSkiaSharp.git
8 years agoRevert of Suppression for valgrind bug (patchset #1 id:1 of https://codereview.chromi...
scroggo [Thu, 22 Oct 2015 14:23:21 +0000 (07:23 -0700)]
Revert of Suppression for valgrind bug (patchset #1 id:1 of https://codereview.chromium.org/1410953002/ )

Reason for revert:
We believe this was suppressing an out of date error that was being triggered because the valgrind bot was not rebuilding nanobench. The valgrind bot has been fixed (is there a bug tracking that?), so this suppression is probably not necessary.

Original issue's description:
> Suppression for valgrind bug
>
> TBR=msarett@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> BUG=skia:4478
>
> Committed: https://skia.googlesource.com/skia/+/82e341ff8764ef6168a0c9322089c391d657ae7f

TBR=msarett@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4478

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

8 years agoRevert of Add version string and force highp NDS transfrom to GLSLCaps (patchset...
egdaniel [Thu, 22 Oct 2015 14:08:37 +0000 (07:08 -0700)]
Revert of Add version string and force highp NDS transfrom to GLSLCaps (patchset #3 id:40001 of https://codereview.chromium.org/1417993004/ )

Reason for revert:
breaking bots

Original issue's description:
> Add version string and force highp NDS transfrom to GLSLCaps
>
> This also include the use of any() in the shaders.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/cef4bce8e260b49bf3417eadbac806cf7d39cdc8

TBR=bsalomon@google.com,jvanverth@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

8 years agoStop running nanobench on GalaxyS4
borenet [Thu, 22 Oct 2015 14:06:28 +0000 (07:06 -0700)]
Stop running nanobench on GalaxyS4

BUG=skia:3214

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

8 years agoAdd version string and force highp NDS transfrom to GLSLCaps
egdaniel [Thu, 22 Oct 2015 13:54:15 +0000 (06:54 -0700)]
Add version string and force highp NDS transfrom to GLSLCaps

This also include the use of any() in the shaders.

BUG=skia:

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

8 years agoRevert of Dependencies are now added between the drawTargets in GrPipeline (patchset...
robertphillips [Thu, 22 Oct 2015 12:31:32 +0000 (05:31 -0700)]
Revert of Dependencies are now added between the drawTargets in GrPipeline (patchset #6 id:120001 of https://codereview.chromium.org/1414903002/ )

Reason for revert:
Breaking bots

Original issue's description:
> Dependencies are now added between the drawTargets in GrPipeline
>
> This CL relies on https://codereview.chromium.org/1414773002/ (Add the machinery to GrDrawTarget to enable topological sorting)
>
> BUG=skia:4094
>
> Committed: https://skia.googlesource.com/skia/+/45a1c34f607a970933e5cd05e1df6cd8090db1be
>
> Committed: https://skia.googlesource.com/skia/+/869c5e82a725a6928a45cd1fa6945ac783b8b3d8

TBR=bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4094

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

8 years agoDependencies are now added between the drawTargets in GrPipeline
robertphillips [Thu, 22 Oct 2015 12:19:50 +0000 (05:19 -0700)]
Dependencies are now added between the drawTargets in GrPipeline

This CL relies on https://codereview.chromium.org/1414773002/ (Add the machinery to GrDrawTarget to enable topological sorting)

BUG=skia:4094

Committed: https://skia.googlesource.com/skia/+/45a1c34f607a970933e5cd05e1df6cd8090db1be

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

8 years agoAdd lighter weight lock guards.
herb [Thu, 22 Oct 2015 02:11:13 +0000 (19:11 -0700)]
Add lighter weight lock guards.

BUG=skia:

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

8 years agoFix uninitialized memory on kIndex8 divisor tests in Gold
msarett [Wed, 21 Oct 2015 20:26:59 +0000 (13:26 -0700)]
Fix uninitialized memory on kIndex8 divisor tests in Gold

Turns out bitmap.eraseColor() does nothing if the bitmap
is kIndex8.  We need a more reliable way to initialize
all of the pixels that we look at in Gold.

The input SkCanvas* is always zero initialized, so let's
only draw pixels to the canvas if we have initialized them.

BUG=skia:

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

8 years agoOmit Math from DM on Google3 because it fails under the MSAN config.
benjaminwagner [Wed, 21 Oct 2015 20:07:07 +0000 (13:07 -0700)]
Omit Math from DM on Google3 because it fails under the MSAN config.

BUG=skia:

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

8 years agoSkRemote: more refactoring
mtklein [Wed, 21 Oct 2015 19:34:01 +0000 (12:34 -0700)]
SkRemote: more refactoring

    - move Client / Server definitions to .cpp
    - rename Client / Server to Canvas / Decoder

No diffs:
https://gold.skia.org/search2?issue=1409113005&unt=true&query=source_type%3Dgm&master=false&include=true

BUG=skia:

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

8 years agoMove SkChecksum::Murmur3 out of the header.
mtklein [Wed, 21 Oct 2015 18:53:27 +0000 (11:53 -0700)]
Move SkChecksum::Murmur3 out of the header.

As we use this more and more, we end up with more and more inline copies.
On my desktop, this makes Skia ~16K smaller.

Boy perf trybots would be neat.

BUG=skia:

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

8 years agoRevert of Remove SkDEPRECATED_InstallDiscardablePixelRef from SkPictureShader (patchs...
caryclark [Wed, 21 Oct 2015 18:39:06 +0000 (11:39 -0700)]
Revert of Remove SkDEPRECATED_InstallDiscardablePixelRef from SkPictureShader (patchset #3 id:40001 of https://codereview.chromium.org/1405103003/ )

Reason for revert:
Test to see if patch fixes Nexus 6.

Original issue's description:
> Remove SkDEPRECATED_InstallDiscardablePixelRef from SkPictureShader
>
> Use an SkImage generator/shader instead.
>
> R=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/fa694ad067976a5b713eec0b6f92ba5efeb0aa9d

TBR=reed@google.com,fmalita@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

8 years agoSkRemote: refactoring
mtklein [Wed, 21 Oct 2015 17:46:02 +0000 (10:46 -0700)]
SkRemote: refactoring

  - Cache becomes CachingEncoder that wraps another Encoder
  - Encoders provide IDs
  - syntaxy improvements to Client
  - ID isn't really protocol sensitive.
  - I don't think we need Type::kNone.

No diffs.
https://gold.skia.org/search2?issue=1418863002&unt=true&query=source_type%3Dgm&master=false&include=true

BUG=skia:

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

8 years agoMove GrGLShaderVar to GrGLSL
egdaniel [Wed, 21 Oct 2015 17:45:48 +0000 (10:45 -0700)]
Move GrGLShaderVar to GrGLSL

BUG=skia:

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

8 years agoCreate an SkAndroidCodec API separate from SkCodec
msarett [Wed, 21 Oct 2015 17:27:10 +0000 (10:27 -0700)]
Create an SkAndroidCodec API separate from SkCodec

We will implement this API using SkCodecs.

SkAndroidCodecs will be used to implement the
BitmapRegionDecoder Java API (and possibly
BitmapFactory).

BUG=skia:

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

8 years agoAdd a mutex to protect the DWrite calls.
herb [Wed, 21 Oct 2015 16:24:37 +0000 (09:24 -0700)]
Add a mutex to protect the DWrite calls.

BUG=skia:4479

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

8 years agoForce VisualBench to reset GLContext on GrContext reset
joshualitt [Wed, 21 Oct 2015 15:04:24 +0000 (08:04 -0700)]
Force VisualBench to reset GLContext on GrContext reset

BUG=skia:

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

8 years agoFix build targets for some bots
borenet [Wed, 21 Oct 2015 14:50:57 +0000 (07:50 -0700)]
Fix build targets for some bots

Valgrind bot is not building nanobench. Some bots are building nanobench and then not running it.

BUG=skia:

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

8 years agoMove shader precision modifier check onto GLSLCaps
egdaniel [Wed, 21 Oct 2015 14:14:17 +0000 (07:14 -0700)]
Move shader precision modifier check onto GLSLCaps

BUG=skia:

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

8 years agoStop creating static GrProcessor instances
bsalomon [Wed, 21 Oct 2015 13:57:30 +0000 (06:57 -0700)]
Stop creating static GrProcessor instances

R=joshualitt@google.com

BUG=skia:4483

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

8 years agoRevert of Dependencies are now added between the drawTargets in GrPipeline (patchset...
caryclark [Wed, 21 Oct 2015 11:16:19 +0000 (04:16 -0700)]
Revert of Dependencies are now added between the drawTargets in GrPipeline (patchset #5 id:100001 of https://codereview.chromium.org/1414903002/ )

Reason for revert:
this may have broken the TSAN and ASAN bots

Original issue's description:
> Dependencies are now added between the drawTargets in GrPipeline
>
> This CL relies on https://codereview.chromium.org/1414773002/ (Add the machinery to GrDrawTarget to enable topological sorting)
>
> BUG=skia:4094
>
> Committed: https://skia.googlesource.com/skia/+/45a1c34f607a970933e5cd05e1df6cd8090db1be

TBR=bsalomon@google.com,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4094

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

8 years agoRevert of path ops: fix conic weight and partial coincidence (patchset #5 id:80001...
caryclark [Wed, 21 Oct 2015 11:02:51 +0000 (04:02 -0700)]
Revert of path ops: fix conic weight and partial coincidence (patchset #5 id:80001 of https://codereview.chromium.org/1413763002/ )

Reason for revert:
path ops change breaks svg clipping layout tests -- conic is now more accurate, changing edge of circle in clip

These need to be rebaselined

svg/clip-path/clip-path-child-clipped.svg
svg/clip-path/clip-path-nonzero.svg
svg/clip-path/clip-path-evenodd-nonzero.svg
svg/clip-path/clip-path-nonzero-evenodd.svg

Original issue's description:
> The remaining 1m skp bugs are asserts that can be harmlessly
> suppressed and bugs around conics.
>
> The conic calculation for a subdivided w was just wrong.
>
> Also added debugging to template intersection to initialize
> reused structures and dump additional data.
>
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/ef33b1e739b23a1201100ff17a572da85b03d9af

TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

8 years agoValgrind experiment
msarett [Tue, 20 Oct 2015 23:45:56 +0000 (16:45 -0700)]
Valgrind experiment

I don't really expect this to fix the errors, but I think
it's worth it to try shaking up the valgrind bot overnight.
There's some strange behavior with regard to color type on
the valgrind bot that I can't reproduce and that we aren't
seeing on any of the other bots.

TBR=mtklein,scroggo

BUG=skia:

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

8 years agoSkRemote: shaders
mtklein [Tue, 20 Oct 2015 22:04:22 +0000 (15:04 -0700)]
SkRemote: shaders

https://gold.skia.org/search2?issue=1417703003&unt=true&query=source_type%3Dgm&master=false&include=true&limit=60

BUG=skia:

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

8 years agoUse the current OpengGL standard to determine blur precision, rather than kGLES
Brian Salomon [Tue, 20 Oct 2015 21:33:26 +0000 (17:33 -0400)]
Use the current OpengGL standard to determine blur precision, rather than kGLES

TBR=ethannicholas@google.com,robertphillips@google.com

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

8 years agoClean up some dead code.
mtklein [Tue, 20 Oct 2015 21:29:10 +0000 (14:29 -0700)]
Clean up some dead code.

This cleans up tools/ code, or code that should have been in tools/.

The only interesting code change trims features off of PictureRenderer.
It's still in use by a few useful-looking tools.

BUG=skia:

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

8 years agoThe remaining 1m skp bugs are asserts that can be harmlessly
caryclark [Tue, 20 Oct 2015 20:42:25 +0000 (13:42 -0700)]
The remaining 1m skp bugs are asserts that can be harmlessly
suppressed and bugs around conics.

The conic calculation for a subdivided w was just wrong.

Also added debugging to template intersection to initialize
reused structures and dump additional data.

TBR=reed@google.com

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

8 years agoDependencies are now added between the drawTargets in GrPipeline
robertphillips [Tue, 20 Oct 2015 20:41:16 +0000 (13:41 -0700)]
Dependencies are now added between the drawTargets in GrPipeline

This CL relies on https://codereview.chromium.org/1414773002/ (Add the machinery to GrDrawTarget to enable topological sorting)

BUG=skia:4094

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

8 years agoInclude resources directory in google3 sync.
benjaminwagner [Tue, 20 Oct 2015 20:00:48 +0000 (13:00 -0700)]
Include resources directory in google3 sync.

Also other minor improvements in sync scripts.

In BUILD.public, include all files under resources as data dependencies for DM. Omit newly failing DM tests and add newly passing DM tests.

Adds the OpenClipart "license" to LICENSE per comment in google3 CL 100158380.

Corresponding google3 CL is 105602927.

BUG=skia:

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

8 years agoremove debug statement
caryclark [Tue, 20 Oct 2015 18:09:41 +0000 (11:09 -0700)]
remove debug statement

R=djsollen@google.com

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

8 years agoRemove SkThread::setProcessorAffinity()
mtklein [Tue, 20 Oct 2015 18:05:06 +0000 (11:05 -0700)]
Remove SkThread::setProcessorAffinity()

It's only used by a couple unit tests.  We have other ways of getting
the same quality testing of our ref-count code now (e.g. TSAN).

BUG=skia:
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/1408213005

8 years agoImage filters: Replace all use of tryAllocPixels() with createDevice().
senorblanco [Tue, 20 Oct 2015 17:17:34 +0000 (10:17 -0700)]
Image filters: Replace all use of tryAllocPixels() with createDevice().

In order to have a central pinch point for bitmap allocation, change all
filters to use Proxy::createDevice() instead of allocating memory
directly with SkBitmap::tryAllocPixels().

This will aid in moving filter backing stores and caches to
discardable memory.

BUG=skia:

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

8 years agoRevert of Update feSpotLight to match spec (patchset #2 id:20001 of https://coderevie...
caryclark [Tue, 20 Oct 2015 17:04:03 +0000 (10:04 -0700)]
Revert of Update feSpotLight to match spec (patchset #2 id:20001 of https://codereview.chromium.org/1403403003/ )

Reason for revert:
re-land once layout test have been disabled (so they can be rebased)

Original issue's description:
> Update feSpotLight to match spec
>
> This change updates feSpotLight to match the spec via two changes:
>
> 1) specularExponent is ignored if the spotlight has no coneAngle (GPU
>    bug only). This change updates the GPU path so that it matches the
>    CPU path and the spec in this regard.
>
> 2) specularExponent is clamped to the 1-128 range. The spec does not
>    specify a clamp for the specularExponent attribute of feSpotLight.
>    Note that the spec *does* specify this clamp for the
>    specularExponent attribute of feSpecularLighting. It looks like we
>    incorrectly applied this to both specularExponent attributes.
>
>    This change (along with a parallel change in Blink) allows us to pass
>    the SVG filter effects conformance test here:
>    http://www.w3.org/Graphics/SVG/Test/20110816/harness/htmlObject/filters-light-01-f.html
>
>    Additionally, this brings our behavior in line with Safari and Edge’s
>    behavior on this filter.
>
> Two new cases were added to gm/lighting.cpp to catch these issues:
> - The existing spotlight case exercised the path where our specular
>   exponent was between 1-128 and had a limiting cone angle.
> - The first new spotlight case exercises the path where our specular
>   exponent is between 1-128 and we do not have a limiting cone angle.
> - The second new spotlight case exercises the path where the specular
>   exponent is not within the 1-128 range, to ensure that we don’t
>   incorrectly clip to this range.
>
> BUG=472849
>
> Committed: https://skia.googlesource.com/skia/+/c84ccb070258db2803a9e8f532bfe7239a737063

TBR=senorblanco@google.com,senorblanco@chromium.org,bsalomon@google.com,ericrk@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=472849

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

8 years agouse (temp) gpu-imagefilter-cache for applyFilter
reed [Tue, 20 Oct 2015 16:56:52 +0000 (09:56 -0700)]
use (temp) gpu-imagefilter-cache for applyFilter

BUG=skia:

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

8 years agoMove GrDrawingManager methods to their own .cpp file
robertphillips [Tue, 20 Oct 2015 16:54:32 +0000 (09:54 -0700)]
Move GrDrawingManager methods to their own .cpp file

Small cleanup

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

8 years agoSkRemote: add xfermodes
mtklein [Tue, 20 Oct 2015 15:26:54 +0000 (08:26 -0700)]
SkRemote: add xfermodes

Note this changes the default ID for each type from a valid non-null value to a nullptr.
All the ()++ are now ++(), so we always work with non-null IDs when we define things.

Some of this is prematurely generalized with an eye for supporting other effects and ref-counted things.

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

BUG=skia:

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

8 years agoRewrite GrTextureMaker to disentangle bitmap case from base class and give GPU object...
bsalomon [Tue, 20 Oct 2015 14:58:01 +0000 (07:58 -0700)]
Rewrite GrTextureMaker to disentangle bitmap case from base class and give GPU object a say in what copying needs to be done.

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

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

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

8 years agoAdd debugging helper to GrDrawTarget
robertphillips [Tue, 20 Oct 2015 14:50:00 +0000 (07:50 -0700)]
Add debugging helper to GrDrawTarget

This CL relies on https://codereview.chromium.org/1414773002/ (Add the machinery to GrDrawTarget to enable topological sorting)

BUG=skia:4094

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

8 years agonanobench: Add some Valgrind failure paranoia.
mtklein [Tue, 20 Oct 2015 14:45:29 +0000 (07:45 -0700)]
nanobench: Add some Valgrind failure paranoia.

Trying to figure out

http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Valgrind/builds/586/steps/nanobench/logs/stdio

BUG=skia:4482

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

8 years agoAdd the machinery to GrDrawTarget to enable topological sorting
robertphillips [Tue, 20 Oct 2015 14:37:58 +0000 (07:37 -0700)]
Add the machinery to GrDrawTarget to enable topological sorting

This relies on https://codereview.chromium.org/1414503003/ (Add SkTTopoSort) landing first.

BUG=skia:4094

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

8 years agoUpdate feSpotLight to match spec
ericrk [Mon, 19 Oct 2015 21:44:56 +0000 (14:44 -0700)]
Update feSpotLight to match spec

This change updates feSpotLight to match the spec via two changes:

1) specularExponent is ignored if the spotlight has no coneAngle (GPU
   bug only). This change updates the GPU path so that it matches the
   CPU path and the spec in this regard.

2) specularExponent is clamped to the 1-128 range. The spec does not
   specify a clamp for the specularExponent attribute of feSpotLight.
   Note that the spec *does* specify this clamp for the
   specularExponent attribute of feSpecularLighting. It looks like we
   incorrectly applied this to both specularExponent attributes.

   This change (along with a parallel change in Blink) allows us to pass
   the SVG filter effects conformance test here:
   http://www.w3.org/Graphics/SVG/Test/20110816/harness/htmlObject/filters-light-01-f.html

   Additionally, this brings our behavior in line with Safari and Edge’s
   behavior on this filter.

Two new cases were added to gm/lighting.cpp to catch these issues:
- The existing spotlight case exercised the path where our specular
  exponent was between 1-128 and had a limiting cone angle.
- The first new spotlight case exercises the path where our specular
  exponent is between 1-128 and we do not have a limiting cone angle.
- The second new spotlight case exercises the path where the specular
  exponent is not within the 1-128 range, to ensure that we don’t
  incorrectly clip to this range.

BUG=472849

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

8 years agoThe SkArithmeticMode_gpu GL filters support clamping to valid
ericrk [Mon, 19 Oct 2015 21:41:11 +0000 (14:41 -0700)]
The SkArithmeticMode_gpu GL filters support clamping to valid
premultiplied colors, however the flag for whether or not to do this,
which is present in their parent filters, is dropped when creating the
GL implementations. This change adds logic to forward the value from
the parent filter to the GL implementation.

This makes GPU behavior match software and fixes a WebKit
LayoutTest. See referenced bug.

BUG=473186

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

8 years agoSkRemote: fix Misc hash function.
mtklein [Mon, 19 Oct 2015 21:39:45 +0000 (14:39 -0700)]
SkRemote: fix Misc hash function.

Misc only has data in the first 10 bytes of its 12 byte layout.
We need to stop hashing at 10 bytes.

C.f. http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Valgrind/builds/581

BUG=skia:

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

8 years agoModifications to get 'blaze build -c opt //third_party/skia/HEAD/...' to work.
benjaminwagner [Mon, 19 Oct 2015 20:55:55 +0000 (13:55 -0700)]
Modifications to get 'blaze build -c opt //third_party/skia/HEAD/...' to work.

BUG=skia:

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

8 years agoAdd SkTTopoSort
robertphillips [Mon, 19 Oct 2015 19:15:55 +0000 (12:15 -0700)]
Add SkTTopoSort

BUG=skia:4094

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

8 years agoRevert recent CLs around GrTextureMaker/GrTextureParamsAdjuster
Brian Salomon [Mon, 19 Oct 2015 19:12:32 +0000 (15:12 -0400)]
Revert recent CLs around GrTextureMaker/GrTextureParamsAdjuster

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

8 years agoUpload stretched bmp rather than original after doing CPU stretch for min texture...
Brian Salomon [Mon, 19 Oct 2015 18:22:51 +0000 (14:22 -0400)]
Upload stretched bmp rather than original after doing CPU stretch for min texture size

BUG=skia:

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

8 years agoSkRemote: DrawPaint is an inverse empty path.
mtklein [Mon, 19 Oct 2015 17:41:15 +0000 (10:41 -0700)]
SkRemote: DrawPaint is an inverse empty path.

Drawing with SkRect::MakeLargest() isn't actually working.

This appears to work correctly, and even be correct.
(It's a case explicitly handled by SkCanvas::onDrawPath).

BUG=skia:

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

8 years agoMove definitions of GrGL basic types (e.g. GrGLenum) to their own header.
bsalomon [Mon, 19 Oct 2015 16:03:23 +0000 (09:03 -0700)]
Move definitions of GrGL basic types (e.g. GrGLenum) to their own header.

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

8 years agoAdd override to Bitmap_GrTextureParamsAdjuster::refOriginalTexture
Brian Salomon [Mon, 19 Oct 2015 15:53:40 +0000 (11:53 -0400)]
Add override to Bitmap_GrTextureParamsAdjuster::refOriginalTexture

TBR=caryclark@google.com

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

8 years agoFix for GM:bigblurs not actually blurring some of the rectangles on Nexus 10.
ethannicholas [Mon, 19 Oct 2015 15:38:16 +0000 (08:38 -0700)]
Fix for GM:bigblurs not actually blurring some of the rectangles on Nexus 10.

BUG=skia:2860

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

8 years agoMisc: Don't run etc1 bench with invalid image and fix VS2015 build warning
bsalomon [Mon, 19 Oct 2015 15:29:16 +0000 (08:29 -0700)]
Misc: Don't run etc1 bench with invalid image and fix VS2015 build warning

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

8 years agochange SkImage_Gpu to handle all filters (w/ and w/o gpu support
reed [Mon, 19 Oct 2015 15:24:21 +0000 (08:24 -0700)]
change SkImage_Gpu to handle all filters (w/ and w/o gpu support

The result is that the set of "generic" imagefilters (e.g. SkColorFilterImageFilter) that use drawing commands to return their results will now stay in the same domain as their src (i.e. gpu-src --> gpu-dst).

ApplyFilterGM exercises this, and now asserts this same-domain invariant.

BUG=skia:4467

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

8 years agoRewrite GrTextureMaker to disentangle bitmap case from base class and give GPU object...
bsalomon [Mon, 19 Oct 2015 15:24:08 +0000 (08:24 -0700)]
Rewrite GrTextureMaker to disentangle bitmap case from base class and give GPU object a say in what copying needs to be done.

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

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

8 years agoRemove unused member variables in GrGLProgram
egdaniel [Mon, 19 Oct 2015 14:23:02 +0000 (07:23 -0700)]
Remove unused member variables in GrGLProgram

BUG=skia:

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

8 years agoAdd imgblur tool to assist BlurMaskFilter debugging
robertphillips [Mon, 19 Oct 2015 13:39:17 +0000 (06:39 -0700)]
Add imgblur tool to assist BlurMaskFilter debugging

imgblur is intended to establish a ground truth for debugging mask blur issues. It performs a brute force (non-separable) Gaussian blur of the provided image.

The blur code itself is in sk_tools_utils so it can be more easily used programmatically in other places (e.g., blur unit tests).

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

8 years agoskia: Make the validate match interface for *_draw_instanced
hendrikw [Mon, 19 Oct 2015 13:13:55 +0000 (06:13 -0700)]
skia: Make the validate match interface for *_draw_instanced

For whatever reason, on the Mac, the command buffer is reporting
ARB_draw_instanced as a valid extension. This is probably a bug in the
command buffer and I'll look into this later.

In Skia, we don't check for ARB_draw_instanced in GLES2 when building
the interface, but during the validate, we do, so we ended up failing
the validation.

Looking a bit further at the specs, ARB_draw_instanced is GL only,
whereas EXT_draw_instanced is both GL and GLES.  I've updated the code
to reflect this.

See:
https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/specs/ARB/draw_instanced.txt
https://www.opengl.org/registry/specs/EXT/draw_instanced.txt

Everything above also applies to ARB/EXT_instanced_arrays

https://www.khronos.org/registry/gles/extensions/EXT/EXT_instanced_arrays.txt
https://www.opengl.org/registry/specs/ARB/instanced_arrays.txt

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

8 years agoSkRemote: impl drawRRect
halcanary [Sun, 18 Oct 2015 12:12:58 +0000 (05:12 -0700)]
SkRemote:  impl drawRRect

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

8 years agoUpdate SKP version
update-skps [Sun, 18 Oct 2015 07:23:36 +0000 (00:23 -0700)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS

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

8 years agoSkRemote: simple impl of onDraw*Text*
halcanary [Sat, 17 Oct 2015 22:46:29 +0000 (15:46 -0700)]
SkRemote:  simple impl of onDraw*Text*

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

8 years agoSkRemote: impl onDrawDRRect
halcanary [Sat, 17 Oct 2015 22:18:35 +0000 (15:18 -0700)]
SkRemote: impl onDrawDRRect

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

8 years agoTest SkRemote on GCE bots.
mtklein [Sat, 17 Oct 2015 16:25:21 +0000 (09:25 -0700)]
Test SkRemote on GCE bots.

This will get us gathering GM images.
I will set up ignores on gold.skia.org so no one's bothered.

BUG=skia:

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

8 years agoRemove DrawingMgr shims from GrContext
robertphillips [Sat, 17 Oct 2015 14:43:27 +0000 (07:43 -0700)]
Remove DrawingMgr shims from GrContext

BUG=skia:4094

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

8 years agoSkRemote: impl drawPaint()
halcanary [Sat, 17 Oct 2015 13:11:52 +0000 (06:11 -0700)]
SkRemote: impl drawPaint()

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

8 years agoLookupScope does not need to be in SkRemote.h
mtklein [Fri, 16 Oct 2015 22:33:18 +0000 (15:33 -0700)]
LookupScope does not need to be in SkRemote.h

It's only used by Cache and Client.
This moves it to SkRemote.cpp, where they live.

BUG=skia:

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

8 years agoSuppression for valgrind bug
scroggo [Fri, 16 Oct 2015 21:42:47 +0000 (14:42 -0700)]
Suppression for valgrind bug

TBR=msarett@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

BUG=skia:4478

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

8 years agoRevert of Rewrite GrTextureMaker to disentangle bitmap case from base class and give...
egdaniel [Fri, 16 Oct 2015 20:59:14 +0000 (13:59 -0700)]
Revert of Rewrite GrTextureMaker to disentangle bitmap case from base class and give GPU object a say in what… (patchset #4 id:60001 of https://codereview.chromium.org/1409163002/ )

Reason for revert:
breaking nanobench

Original issue's description:
> Rewrite GrTextureMaker to disentangle bitmap case from base class and give GPU object a say in what copying needs to be done.
>
> Committed: https://skia.googlesource.com/skia/+/fcffaf22d697f06f903c3193308f9dc54a959f79

TBR=reed@google.com,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

8 years agoRewrite GrTextureMaker to disentangle bitmap case from base class and give GPU object...
bsalomon [Fri, 16 Oct 2015 20:35:10 +0000 (13:35 -0700)]
Rewrite GrTextureMaker to disentangle bitmap case from base class and give GPU object a say in what copying needs to be done.

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

8 years agoMove some code around to make another diff cleaner
bsalomon [Fri, 16 Oct 2015 19:01:18 +0000 (12:01 -0700)]
Move some code around to make another diff cleaner

TBR=reed@google.com

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

8 years agoAdd docs on how to install iOS test tools
stephana [Fri, 16 Oct 2015 18:47:37 +0000 (11:47 -0700)]
Add docs on how to install iOS test tools

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

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

8 years agoImage filters: refactor input GPU processing into filterInputGPU().
senorblanco [Fri, 16 Oct 2015 18:35:14 +0000 (11:35 -0700)]
Image filters: refactor input GPU processing into filterInputGPU().

(analog of CPU version here: https://codereview.chromium.org/1404743005/)

No change in behaviour; this is a straight refactoring.

BUG=skia:3194

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

8 years agoFix SkSwizzler bug
msarett [Fri, 16 Oct 2015 17:54:12 +0000 (10:54 -0700)]
Fix SkSwizzler bug

Now, that we are subsetting, fX0 is not necessarily less than
fSrcWidth (since fSrcWidth is really the subset width).

Ex: We may want a 10 pixel subset starting twenty pixels from the
left edge.  In that case, fX0=20 and fSrcWidth=10.

Let's rename the width as fSubsetWidth to avoid confusion
and remove the check.

BUG=skia:

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

8 years agoSkRemote
mtklein [Fri, 16 Oct 2015 17:29:41 +0000 (10:29 -0700)]
SkRemote

BUG=skia:

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

8 years agoLoosen requirement that there be only one GrDrawTarget
robertphillips [Fri, 16 Oct 2015 16:07:06 +0000 (09:07 -0700)]
Loosen requirement that there be only one GrDrawTarget

BUG=skia:4094

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

8 years agoEnabling clip stack flattening exercises path ops.
caryclark [Fri, 16 Oct 2015 16:03:38 +0000 (09:03 -0700)]
Enabling clip stack flattening exercises path ops.
Iterating through the 903K skps that represent the
imagable 1M top web pages triggers a number of
bugs, some of which are addressed here.

Some web pages trigger intersecting cubic
representations of arc with their conic
counterparts. This exposed a flaw in coincident
detection that caused an infinite loop. The loop
alternatively extended the coincident section and,
determining the that the bounds of the curve pairs
did not overlap, deleted the extension.

Track the number of times the coincident detection
is called, and if it exceeds an empirically found
limit, assume that the curves are coincident and
force it to be so.

The loop count limit can be determined by enabling
DEBUG_T_SECT_LOOP_COUNT and running all tests. The
largest count is reported on completion.

Another class of bugs was caused by concident
detection duplicating nearly identical points that
had been merged earlier. To track these bugs, the
'handle coincidence' code was duplicated as a
const debug variety that reported if one of a
dozen or so irregularities are present; then it is
easier to see when a block of code that fixes one
irregularity regresses another.

Creating the debug const code version exposed some
non-debug code that could be const, and some that
was experimental and could be removed. Set
DEBUG_COINCIDENCE to track coincidence health and
handling.

For running on Chrome, DEBUG_VERIFY checks the
result of pathops against the same operation
using SkRegion to verify that the results are
nearly the same.

When visualizing the pathops work using
tools/pathops_visualizer.htm, set
DEBUG_DUMP_ALIGNMENT to see the curves after
they've been aligned for coincidence.

Other bugs fixed include detecting when a
section of a pair of curves have devolved into
lines and are coincident.

TBR=reed@google.com

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

8 years agoRemove check for whole image in the cache in SkGpuDevice::shouldTileImage
bsalomon [Fri, 16 Oct 2015 14:49:42 +0000 (07:49 -0700)]
Remove check for whole image in the cache in SkGpuDevice::shouldTileImage

This was never that well justified.

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

8 years agoRemove SkDEPRECATED_InstallDiscardablePixelRef from SkPictureShader
fmalita [Fri, 16 Oct 2015 14:39:33 +0000 (07:39 -0700)]
Remove SkDEPRECATED_InstallDiscardablePixelRef from SkPictureShader

Use an SkImage generator/shader instead.

R=reed@google.com

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

8 years agoClean up iOS build files
jvanverth [Thu, 15 Oct 2015 20:20:34 +0000 (13:20 -0700)]
Clean up iOS build files

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

8 years agoSupply separate flags for onBuildTileIndex
msarett [Thu, 15 Oct 2015 20:18:05 +0000 (13:18 -0700)]
Supply separate flags for onBuildTileIndex

This is a follow up to:
https://codereview.chromium.org/1401283003/

Supply separate flags for onBuildTileIndex

Since png and jpeg's implementations of onBuildTileIndex rely on
modifications to their underlying libraries, rather than whether we are
running on Android, use separate flags that can be disabled
independently.

This will allow us to easily turn off the feature. It also is a step
towards building and running on other platforms for testing (e.g.
valgrind/ASAN to find memory leaks etc).

BUG=skia:

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

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

8 years agoSkTHash: hash from fnptr to functor type
mtklein [Thu, 15 Oct 2015 19:23:01 +0000 (12:23 -0700)]
SkTHash: hash from fnptr to functor type

Passing &SkGoodHash to SkTHashMap and SkTHashSet doesn't guarantee that it's actually instantiated.  Using a functor does.

BUG=skia:

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

8 years agoImage Filters: refactor all CPU input processing into a filterInput helper function.
senorblanco [Thu, 15 Oct 2015 19:15:13 +0000 (12:15 -0700)]
Image Filters: refactor all CPU input processing into a filterInput helper function.

No change in behaviour; this is a straight refactoring.

BUG=skia:3194

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

8 years agoRemove params from Cacherator_GrTextureMaker
bsalomon [Thu, 15 Oct 2015 19:14:55 +0000 (12:14 -0700)]
Remove params from Cacherator_GrTextureMaker

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

8 years agoMove an #include out of a namespace.
thakis [Thu, 15 Oct 2015 17:52:23 +0000 (10:52 -0700)]
Move an #include out of a namespace.

This is required to build Chromium's ui_base target with -fmodules, but it
seems like a good change regardless.  Including a header in a namespace is
weird.

BUG=chromium:543704

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

8 years agoUpdate iOS docs
jvanverth [Thu, 15 Oct 2015 17:31:51 +0000 (10:31 -0700)]
Update iOS docs

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

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

8 years agoAdd NVPR to VisualBench
joshualitt [Thu, 15 Oct 2015 16:49:31 +0000 (09:49 -0700)]
Add NVPR to VisualBench

BUG=skia:

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

8 years agoFix -Winconsistent-missing-override in SkCodec_libgif.h
mtklein [Thu, 15 Oct 2015 15:55:33 +0000 (08:55 -0700)]
Fix -Winconsistent-missing-override in SkCodec_libgif.h

Follow up to https://codereview.chromium.org/1400343005
This warning only triggers on a few configs, like the coverage bot.

TBR=msarett@google.com

BUG=skia:

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

8 years agoAdd dm target to BUILD and refactor BUILD file. The corresponding google3 BUILD file...
benjaminwagner [Thu, 15 Oct 2015 15:09:44 +0000 (08:09 -0700)]
Add dm target to BUILD and refactor BUILD file. The corresponding google3 BUILD file changes are in google3 cl/105413829.

Fix blaze compilation errors. The default compilation options for blaze require that the initialization list must list fields in initialization order. Also deal with differing versions of libjpeg.

The BUILD changes were started by melanielc in google3 cl/102860957.

BUG=skia:

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

8 years agoGrDrawContext now holds GrRenderTarget pointer
robertphillips [Thu, 15 Oct 2015 15:01:48 +0000 (08:01 -0700)]
GrDrawContext now holds GrRenderTarget pointer

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

8 years agoRenable image benchmarking
scroggo [Thu, 15 Oct 2015 14:51:28 +0000 (07:51 -0700)]
Renable image benchmarking

- Remove --images '' to renable image benchmarking
- Add a flag to disable testing JPEG's buildTileIndex, since it also leaks memory
- Do not run images on GPU
- Do not run large interlaced images on 32 bit bots
- When buildTileIndex is not being used in the subset benches, do not use it for BRD

BUG=skia:3418
BUG=skia:4469
BUG=skia:4471
BUG=skia:4360

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

8 years agosmall tidy of benchmarkstream
joshualitt [Thu, 15 Oct 2015 14:18:29 +0000 (07:18 -0700)]
small tidy of benchmarkstream

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/691b6af907e55250a29a7a2a346b63c2026011c3

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

8 years agoReenable warnings in src/codec
msarett [Thu, 15 Oct 2015 13:41:06 +0000 (06:41 -0700)]
Reenable warnings in src/codec

BUG=skia:

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

8 years agoAdd a comment to explain clip intersection in crop rects.
senorblanco [Thu, 15 Oct 2015 12:04:27 +0000 (05:04 -0700)]
Add a comment to explain clip intersection in crop rects.

BUG=skia:
R=robertphillips

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

8 years agoFix floating point data loss in SkPictureShader
ericrk [Thu, 15 Oct 2015 00:33:29 +0000 (17:33 -0700)]
Fix floating point data loss in SkPictureShader

SkPictureShader had an invalid use of SkMax32 on two SkScalars which
ended up converting the result to an integer which caused us to lose
necessary floating point data.

BUG=473166

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

8 years agoRevert of Supply separate flags for onBuildTileIndex (patchset #1 id:1 of https:...
msarett [Wed, 14 Oct 2015 22:21:11 +0000 (15:21 -0700)]
Revert of Supply separate flags for onBuildTileIndex (patchset #1 id:1 of https://codereview.chromium.org/1402783008/ )

Reason for revert:
Missing an important line.

Original issue's description:
> Supply separate flags for onBuildTileIndex
>
> This is a follow up to:
> https://codereview.chromium.org/1401283003/
>
> Supply separate flags for onBuildTileIndex
>
> Since png and jpeg's implementations of onBuildTileIndex rely on
> modifications to their underlying libraries, rather than whether we are
> running on Android, use separate flags that can be disabled
> independently.
>
> This will allow us to easily turn off the feature. It also is a step
> towards building and running on other platforms for testing (e.g.
> valgrind/ASAN to find memory leaks etc).
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/fc06e9c0e621744654e231ae6fa4460d88c0e27e

TBR=scroggo@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

8 years agoDon't abort analytic clipping if using MSAA until elements are examined
bsalomon [Wed, 14 Oct 2015 22:01:50 +0000 (15:01 -0700)]
Don't abort analytic clipping if using MSAA until elements are examined

TBR=joshualitt@google.com

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

8 years agoRevert of small tidy of benchmarkstream (patchset #2 id:20001 of https://codereview...
joshualitt [Wed, 14 Oct 2015 21:45:07 +0000 (14:45 -0700)]
Revert of small tidy of benchmarkstream (patchset #2 id:20001 of https://codereview.chromium.org/1395703002/ )

Reason for revert:
Breaks visualbench

Original issue's description:
> small tidy of benchmarkstream
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/691b6af907e55250a29a7a2a346b63c2026011c3

TBR=robertphillips@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

8 years agoSupply separate flags for onBuildTileIndex
msarett [Wed, 14 Oct 2015 21:42:44 +0000 (14:42 -0700)]
Supply separate flags for onBuildTileIndex

This is a follow up to:
https://codereview.chromium.org/1401283003/

Supply separate flags for onBuildTileIndex

Since png and jpeg's implementations of onBuildTileIndex rely on
modifications to their underlying libraries, rather than whether we are
running on Android, use separate flags that can be disabled
independently.

This will allow us to easily turn off the feature. It also is a step
towards building and running on other platforms for testing (e.g.
valgrind/ASAN to find memory leaks etc).

BUG=skia:

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

8 years agoStore texture target on GrGLTexture. This is in preparation for using texture targets...
bsalomon [Wed, 14 Oct 2015 19:54:52 +0000 (12:54 -0700)]
Store texture target on GrGLTexture. This is in preparation for using texture targets other than 2D.

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

8 years agoRemove unnecessary allocation in nanobench
scroggo [Wed, 14 Oct 2015 16:00:35 +0000 (09:00 -0700)]
Remove unnecessary allocation in nanobench

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

8 years agoFix clipping when all analytic FP creations can be skipped
bsalomon [Wed, 14 Oct 2015 15:31:34 +0000 (08:31 -0700)]
Fix clipping when all analytic FP creations can be skipped

BUG=skia:

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