platform/upstream/libSkiaSharp.git
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

8 years agoFix TextBlobTest valgrind error
fmalita [Wed, 14 Oct 2015 15:11:40 +0000 (08:11 -0700)]
Fix TextBlobTest valgrind error

When converting text to glyph IDs, the paint needs to reflect the actual
text encoding.

R=bungeman@google.com,herb@google.com

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

8 years agosmall tidy of benchmarkstream
joshualitt [Wed, 14 Oct 2015 15:04:22 +0000 (08:04 -0700)]
small tidy of benchmarkstream

BUG=skia:

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

8 years agoSupply separate flags for onBuildTileIndex
scroggo [Wed, 14 Oct 2015 14:54:34 +0000 (07:54 -0700)]
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).

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

8 years agochange back to method for localmatrix imagefilter
reed [Wed, 14 Oct 2015 14:49:35 +0000 (07:49 -0700)]
change back to method for localmatrix imagefilter

This method is different from MatrixFilter, in that MatrixFilter does not require a pre-existing
filter, but LocalM does. Also change the comment to be more general, as there is no promise that
we return a different subclass, and certainly not a specific subclass.

This pattern of obj->newWithModifiers() also more closely matches the pattern in SkImage (newSubset).

BUG=skia:

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

8 years agoCreate VisualStreamTimingModule
joshualitt [Wed, 14 Oct 2015 14:49:28 +0000 (07:49 -0700)]
Create VisualStreamTimingModule

BUG=skia:

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

8 years agoImplement SkLocalMatrixImageFilter.
senorblanco [Wed, 14 Oct 2015 11:53:31 +0000 (04:53 -0700)]
Implement SkLocalMatrixImageFilter.

At draw time, this filter simply concatenates the given matrix to the
CTM, and recurses on its input. The matrix is thus applied to any
upstream filter parameters and crop rects.

BUG=skia:

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

8 years agoStop benching PNG buildTileIndex by default
scroggo [Tue, 13 Oct 2015 20:33:33 +0000 (13:33 -0700)]
Stop benching PNG buildTileIndex by default

It leaks memory and kills the bots. Supply an option to run it for
local comparison.

BUG=skia:4360
BUG=skia:3418

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

8 years agoFix dm with Chromium command buffer driver
kkinnunen [Tue, 13 Oct 2015 19:58:37 +0000 (12:58 -0700)]
Fix dm with Chromium command buffer driver

Fix a crash in dm when run with Chromium command buffer driver.

Also removes glCopyTextureCHROMIUM, it does not seem to be used.
This is removed on the grounds that it would need similar change,
if it was used. The variable fCopyTextureCHROMIUM does not seem to
be populated in the Chromium side, either.

BUG=skia:2992

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

8 years agoAdd subsetting to SkScanlineDecoder
msarett [Tue, 13 Oct 2015 19:50:14 +0000 (12:50 -0700)]
Add subsetting to SkScanlineDecoder

This CL allows the SkScanlineDecoder to decode partial
scanlines.

This is a first step in efficiently implementing subsetting
in SkScaledCodec.

BUG=skia:4209

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

8 years agoFix text axis alignment calculation
herb [Tue, 13 Oct 2015 18:47:54 +0000 (11:47 -0700)]
Fix text axis alignment calculation

BUG=skia:

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

8 years ago[SkTextBlob] Remove incorrect builder assert
fmalita [Tue, 13 Oct 2015 15:59:23 +0000 (08:59 -0700)]
[SkTextBlob] Remove incorrect builder assert

At the end of TightRunBounds, glyphPosX cannot exceed the start of the
next run.  But glyphPosY is running ahead of glyphPosX (for
kFull_Positioning) => the glyphPosY assert is incorrect.

Since the two pointers advance in lock-step, there isn't much value in
the glyphPosY assert anyway - we might as well remove it.

BUG=chromium:542643
R=reed@google.com,bungeman@google.com

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

8 years agoWhitespace change to test CQ waiting for l-g-t-m
rmistry [Tue, 13 Oct 2015 11:44:40 +0000 (04:44 -0700)]
Whitespace change to test CQ waiting for l-g-t-m

BUG=skia:

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

8 years agoadjust size of new apply-filter gm
reed [Mon, 12 Oct 2015 21:38:34 +0000 (14:38 -0700)]
adjust size of new apply-filter gm

BUG=skia:
TBR=

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

8 years agoSkBitmapRegionCanvas bug fix
msarett [Mon, 12 Oct 2015 20:33:18 +0000 (13:33 -0700)]
SkBitmapRegionCanvas bug fix

BUG=skia:

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

8 years agopost-commit fixes to applyFilter CL
reed [Mon, 12 Oct 2015 20:17:23 +0000 (13:17 -0700)]
post-commit fixes to applyFilter CL

BUG=skia:

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

8 years agoWhitespace change to turn Android bots green
rmistry [Mon, 12 Oct 2015 20:07:28 +0000 (13:07 -0700)]
Whitespace change to turn Android bots green

BUG=skia:
TBR=borenet

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

8 years agoSkPDF: fall back on paths for unembeddable fonts.
halcanary [Mon, 12 Oct 2015 20:05:04 +0000 (13:05 -0700)]
SkPDF: fall back on paths for unembeddable fonts.

Add GM, SkPDFFont::CanEmbedTypeface

BUG=skia:3866

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

8 years agoadd applyFilter() to SkImage
reed [Mon, 12 Oct 2015 18:30:02 +0000 (11:30 -0700)]
add applyFilter() to SkImage

Result:
- clients can get a filtered version of an image without having to setup a temp drawing environment
- for some cases, the process is more efficient even than (deprecated) drawSprite, since there is no need to draw/copy the result

Impl:
- made Proxy virtual so we don't need to have an existing device to use it

This, in conjunction with LocalMatrixImageFilter, should allow us to simplify and optimize ApplyImageFilter() in cc/output/gl_renderer.cc

BUG=skia:

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

8 years agochange more effects to only expose factories
reed [Mon, 12 Oct 2015 18:10:10 +0000 (11:10 -0700)]
change more effects to only expose factories

BUG=skia:
TBR=

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

8 years agoRemove SK_SUPPORT_LEGACY_GRADIENT_DITHERING from Skia proper
fmalita [Mon, 12 Oct 2015 17:41:48 +0000 (10:41 -0700)]
Remove SK_SUPPORT_LEGACY_GRADIENT_DITHERING from Skia proper

Migrating the flag to embedder defines (Chromium already guarded).

Also augment gradient-focused GMs to generate both dithered/undithered
results.

BUG=skia:4436
R=reed@google.com,robertphillips@google.com

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

8 years agoRemove image usage type enum. Use GrTextureParams instead.
bsalomon [Mon, 12 Oct 2015 17:39:46 +0000 (10:39 -0700)]
Remove image usage type enum. Use GrTextureParams instead.

BUG=skia:

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

8 years agoSkBitmapRegionDecoder clean-up
msarett [Mon, 12 Oct 2015 17:24:38 +0000 (10:24 -0700)]
SkBitmapRegionDecoder clean-up

Use SkCodecPrintf instead of SkDebugf.

Check if the conversion is possible rather than starting many decodes
that will certainly fail.

Small refactor to code that deals with subsets that fall outside
of the image.

BUG=skia:

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

8 years agoSkPDF: Optionally output PDF/A-2b archive format.
halcanary [Mon, 12 Oct 2015 17:11:18 +0000 (10:11 -0700)]
SkPDF: Optionally output PDF/A-2b  archive format.

Note: this format does not yet pass validation tests.

Add skia_pdf_generate_pdfa GYP flag.  Default to off for now.
PDF/A files are not reproducable, so they make correctness
testing harder.

Turn the Metadata struct into te SkPDFMetadata struct.  This
splits out a lot of functionality around both kinds of metadata.

When PDF/A is used, add an ID entry to the trailer.

Add SkPDFObjNumMap::addObjectRecursively.

Test with

    GYP_DEFINES=skia_pdf_generate_pdfa=1 bin/sync-and-gyp
    ninja -C out/Release dm
    out/Release/dm --config pdf --src skp gm -w /tmp/dm

With skia_pdf_generate_pdfa=0, all PDFs generated from GMs and
SKPs are identical.  With skia_pdf_generate_pdfa=1, all PDFs
generated from GMs and SKPs render identically in Pdfium.

BUG=skia:3110

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

8 years agoEnable more testing for scaled webps
msarett [Mon, 12 Oct 2015 15:14:40 +0000 (08:14 -0700)]
Enable more testing for scaled webps

BUG=skia:

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

8 years agoUpdate SKP version
update-skps [Sun, 11 Oct 2015 07:20:57 +0000 (00:20 -0700)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS

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