platform/upstream/libSkiaSharp.git
10 years agoRevert of Fix memory leak in "Begin atlasing" (https://codereview.chromium.org...
robertphillips [Mon, 30 Jun 2014 00:04:24 +0000 (17:04 -0700)]
Revert of Fix memory leak in "Begin atlasing"   (https://codereview.chromium.org/361663002/)

Reason for revert:
Sigh

Original issue's description:
> Fix memory leak in (Begin atlasing  https://codereview.chromium.org/354533004/)
>
> TBR=bsalomon@google.com
>
> Committed: https://skia.googlesource.com/skia/+/40d9c0e331fe2b76b4e13ca6cdf1ea50451ba6cc

R=bsalomon@google.com
TBR=bsalomon@google.com
NOTREECHECKS=true
NOTRY=true

Author: robertphillips@google.com

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

10 years agoFix memory leak in (Begin atlasing https://codereview.chromium.org/354533004/)
robertphillips [Sun, 29 Jun 2014 23:38:58 +0000 (16:38 -0700)]
Fix memory leak in (Begin atlasing  https://codereview.chromium.org/354533004/)

R=bsalomon@google.com
TBR=bsalomon@google.com

Author: robertphillips@google.com

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

10 years agoBegin atlasing
robertphillips [Sun, 29 Jun 2014 22:08:31 +0000 (15:08 -0700)]
Begin atlasing

This CL makes it possible for pulled-forward-layers to be atlased. It currently has a couple glaring limitations (which is why it is disabled):

1) the atlased layers cannot be purged nor aged out
2) the texture backing the atlas is not pulled from (or returned to) the resource cache

#1 is on hold until we have a recycling rectanizer

A separate major limitation (the non-atlased layers aren't cached) is blocked until we can transmute entries in the resource cache from scratch to non-scratch while potentially preserving their contents.

R=bsalomon@google.com

Author: robertphillips@google.com

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

10 years agoadd a second interface to the resizer to exactly match what Chrome expects. Will...
humper [Sun, 29 Jun 2014 03:12:45 +0000 (20:12 -0700)]
add a second interface to the resizer to exactly match what Chrome expects.  Will make the migration much cleaner

BUG=skia:
R=mtklein@google.com

Author: humper@google.com

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

10 years agoRemove now-nonexistent SkCountdown.h from public_headers.
senorblanco [Sun, 29 Jun 2014 00:42:55 +0000 (17:42 -0700)]
Remove now-nonexistent SkCountdown.h from public_headers.

Seems to be breaking Chrome's GN build.

R=rmistry@google.com
TBR=rmistry
BUG=skia:

Author: senorblanco@chromium.org

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

10 years agoadd rowbytes option to allocPixels
reed [Sat, 28 Jun 2014 21:26:35 +0000 (14:26 -0700)]
add rowbytes option to allocPixels

TBR=

Author: reed@google.com

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

10 years agoremove SK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS code
reed [Sat, 28 Jun 2014 20:25:31 +0000 (13:25 -0700)]
remove SK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS code

TBR=

Author: reed@google.com

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

10 years agowritepixels needs to bump genID
reed [Sat, 28 Jun 2014 00:47:49 +0000 (17:47 -0700)]
writepixels needs to bump genID

TBR=

Author: reed@google.com

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

10 years agoSome straggler rebaselines for imagefiltersclipped.
senorblanco [Fri, 27 Jun 2014 23:20:03 +0000 (16:20 -0700)]
Some straggler rebaselines for imagefiltersclipped.

NOTRY=true
NOTREECHECKS=true
R=rmistry@google.com
TBR=rmistry
BUG=skia:

Author: senorblanco@chromium.org

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

10 years agoNew baselines for imagefiltersclipped GM after perlin noise change.
senorblanco [Fri, 27 Jun 2014 21:45:30 +0000 (14:45 -0700)]
New baselines for imagefiltersclipped GM after perlin noise change.

R=rmistry@google.com
TBR=rmistry
NOTRY=true
NOTREECHECKS=true
BUG=skia:

Author: senorblanco@chromium.org

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

10 years agoDrop --clone from commands in skia repo.
Mike Klein [Fri, 27 Jun 2014 21:09:39 +0000 (17:09 -0400)]
Drop --clone from commands in skia repo.

--clone, and SkPicture::clone(), are no longer.

CQ_EXTRA_TRYBOTS=tryserver.skia:Housekeeper-PerCommit-Trybot

BUG=skia:
R=rmistry@google.com

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

10 years agoMake perlin noise do CTM-correct scaling.
senorblanco [Fri, 27 Jun 2014 20:35:52 +0000 (13:35 -0700)]
Make perlin noise do CTM-correct scaling.

When drawing perlin noise, generate noise at the resolution determined
by CTM, not by the resolution at construction time. This required moving
the generation of PaintingData to getContext() and asNewEffect() for the
raster and GPU paths, respectively.

It also required adjusting the matrices used during rendering
to be translate-only.

R=sugoi@chromium.org, bsalomon@google.com

Author: senorblanco@chromium.org

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

10 years agoDeprecate SkPicture::clone().
mtklein [Fri, 27 Jun 2014 19:34:44 +0000 (12:34 -0700)]
Deprecate SkPicture::clone().

Chrome will need -DSK_SUPPORT_LEGACY_PICTURE_CLONE.

This removes the modes from our tools that use clone().  No
bots run these.  DM used clone() in a way that we can just
share the picture now.

I plan to bring back the ability to test multithreaded
picture rendering soon.

BUG=skia:2378
R=robertphillips@google.com, mtklein@google.com, bsalomon@google.com

Author: mtklein@chromium.org

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

10 years agoSwitch SkPDFStream's internal storage from SkStream to SkData
halcanary [Fri, 27 Jun 2014 18:36:20 +0000 (11:36 -0700)]
Switch SkPDFStream's internal storage from SkStream to SkData

Motivation: This makes SkPDFStream thread-safe for two threads
serializing it at once, since a SkStream has an internal position.

Updated SkPDFFont, SkPDFGraphicState, and SkPDFPage's use of
SkPDFStream to use the SkData constructor rather than the SkStream
constructor (saving a memcpy).

BUG=skia:2683

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

R=mtklein@google.com, djsollen@google.com, rmistry@google.com, robertphillips@google.com

Author: halcanary@google.com

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

10 years agochange gpudevice and pdfdevice to inherit from basedevice
reed [Fri, 27 Jun 2014 18:34:19 +0000 (11:34 -0700)]
change gpudevice and pdfdevice to inherit from basedevice

BUG=skia:
R=robertphillips@google.com

Author: reed@google.com

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

10 years agoDisable SSE4 code.
mtklein [Fri, 27 Jun 2014 18:28:06 +0000 (11:28 -0700)]
Disable SSE4 code.

Chrome canary failing to link chrome:
http://108.170.220.120:10115/builders/Canary-Chrome-Ubuntu13.10-Ninja-x86_64-ToT/builds/1009/steps/BuildChrome/logs/stdio

BUG=skia:
NOTRY=true
R=mtklein@google.com, rmistry@google.com

Author: mtklein@chromium.org

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

10 years agoRefactor bitmap scaler to make it easier to migrate rest of chrome to use it
humper [Fri, 27 Jun 2014 18:27:03 +0000 (11:27 -0700)]
Refactor bitmap scaler to make it easier to migrate rest of chrome to use it

Previously, the set of platform-specific function pointers to do fast convolution (e.g., neon, SSE) were passed in a structure to the scaler.

I refactored this so that the scaler fills in these function pointers after it's called, so the caller doesn't have to worry about it.

R=mtklein@google.com
TBR=mtklein
NOTRY=True

Author: humper@google.com

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

10 years agoAdd lock to SkPDFDict
halcanary [Fri, 27 Jun 2014 17:37:27 +0000 (10:37 -0700)]
Add lock to SkPDFDict

Add mutex lock to all functions. Remove dictionary iterator, and
replace with new thread-safe functions.

BUG=skia:2683
R=mtklein@google.com, djsollen@google.com

Author: halcanary@google.com

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

10 years agoFix RRect tranform bug
robertphillips [Fri, 27 Jun 2014 15:59:26 +0000 (08:59 -0700)]
Fix RRect tranform bug

When a RRect is an oval transforming the rectangle and the radii separately can result in a non-oval result (i.e., due to numerical issues some tiny straight edges may creep in). This CL remedies the situation by computing the new radii directly from the transformed rect.

BUG=skia:2696
R=caryclark@google.com

Author: robertphillips@google.com

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

10 years agoMark SkBBoxHierarchyRecord destructor as virtual
tomhudson [Fri, 27 Jun 2014 15:19:35 +0000 (08:19 -0700)]
Mark SkBBoxHierarchyRecord destructor as virtual

Immediate parent classes have empty virtual destructors, but farther
up the inheritance tree there is complicated destruction going on.
This change may be unnecessary but makes the polymorphism explicit.

BUG=skia:1734
R=mtklein@google.com, tomhudson@google.com, mtklein

Author: tomhudson@chromium.org

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

10 years agoAdd SSE4 optimization of S32A_Opaque_Blitrow
henrik.smiding [Fri, 27 Jun 2014 15:03:17 +0000 (08:03 -0700)]
Add SSE4 optimization of S32A_Opaque_Blitrow

Adds optimization of Skia S32A_Opaque_Blitrow blitter using SSE4.2 SIMD
instruction set. Special case for when alpha is zero or opaque.

Performance increase of 10%-400% compared to the existing SSE2
optimization (measured on Silvermont architecture).
Noticeable in ~25 different skia bench subtests, especially in
bitmap_8888_*, repeatTile_*, and morph_*.

bitmap_8888_A - 100% faster
bitmap_8888_A_source_transparent - 250% faster
bitmap_8888_A_source_opaque - 25% faster
bitmap_8888_A_scale_bicubic - 75% faster

Signed-off-by: Henrik Smiding <henrik.smiding@intel.com>
Committed: https://skia.googlesource.com/skia/+/e2527b147679b0c43019fae7d59cc3777d2d097e

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

R=reed@google.com, mtklein@google.com, tomhudson@google.com, djsollen@google.com, joakim.landberg@intel.com

Author: henrik.smiding@intel.com

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

10 years agoadd SkSurface::NewRasterDirectReleaseProc
reed [Fri, 27 Jun 2014 13:48:14 +0000 (06:48 -0700)]
add SkSurface::NewRasterDirectReleaseProc

allows for lifetime control of pixel memory on raster surface

BUG=skia:
R=fmalita@google.com, bsalomon@google.com, fmalita@chromium.org

Author: reed@google.com

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

10 years agoremove unnecessary bitmapdevice references
reed [Fri, 27 Jun 2014 12:49:53 +0000 (05:49 -0700)]
remove unnecessary bitmapdevice references

TBR=

Author: reed@google.com

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

10 years agodelete code for SK_SUPPORT_LEGACY_GETTOTALCLIP
reed [Fri, 27 Jun 2014 11:49:12 +0000 (04:49 -0700)]
delete code for SK_SUPPORT_LEGACY_GETTOTALCLIP

TBR=
NOTRY=True

Author: reed@google.com

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

10 years agoUpdate SKP version to 34
borenet [Fri, 27 Jun 2014 08:02:30 +0000 (01:02 -0700)]
Update SKP version to 34

Automatic commit by the RecreateSKPs bot.

TBR=

Author: borenet@google.com

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

10 years agodon't create explicit bitmapdevice when not needed
reed [Fri, 27 Jun 2014 05:12:09 +0000 (22:12 -0700)]
don't create explicit bitmapdevice when not needed

TBR=

Author: reed@google.com

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

10 years agoremove SK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE for chrome
reed [Fri, 27 Jun 2014 01:47:08 +0000 (18:47 -0700)]
remove SK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE for chrome

BUG=skia:
R=robertphillips@google.com, fmalita@google.com, fmalita@chromium.org

Author: reed@google.com

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

10 years agoFix scale type in JSON format
kelvinly [Thu, 26 Jun 2014 22:39:31 +0000 (15:39 -0700)]
Fix scale type in JSON format

BUG=skia:
R=bensong@google.com, jcgregorio@google.com

Author: kelvinly@google.com

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

10 years agoRevert of Switch SkPDFStream's internal storage from SkStream to SkData (https:/...
rmistry [Thu, 26 Jun 2014 21:31:06 +0000 (14:31 -0700)]
Revert of Switch SkPDFStream's internal storage from SkStream to SkData (https://codereview.chromium.org/340783013/)

Reason for revert:
Causes canary failures

Original issue's description:
> Switch SkPDFStream's internal storage from SkStream to SkData
>
> Motivation: This makes SkPDFStream thread-safe for two threads
> serializing it at once, since a SkStream has an internal position.
>
> Updated SkPDFFont, SkPDFGraphicState, and SkPDFPage's use of
> SkPDFStream to use the SkData constructor rather than the SkStream
> constructor (saving a memcpy).
>
> BUG=skia:2683
>
> Committed: https://skia.googlesource.com/skia/+/c1dfa14b645ae274780f026dd86c9b633fbdad06

R=mtklein@google.com, djsollen@google.com, halcanary@google.com
TBR=djsollen@google.com, halcanary@google.com, mtklein@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2683

Author: rmistry@google.com

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

10 years agoSwitch SkPDFStream's internal storage from SkStream to SkData
halcanary [Thu, 26 Jun 2014 21:00:31 +0000 (14:00 -0700)]
Switch SkPDFStream's internal storage from SkStream to SkData

Motivation: This makes SkPDFStream thread-safe for two threads
serializing it at once, since a SkStream has an internal position.

Updated SkPDFFont, SkPDFGraphicState, and SkPDFPage's use of
SkPDFStream to use the SkData constructor rather than the SkStream
constructor (saving a memcpy).

BUG=skia:2683
R=mtklein@google.com, djsollen@google.com

Author: halcanary@google.com

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

10 years agoPromote SkInterpolator unit test to our tests driver.
tfarina [Thu, 26 Jun 2014 20:07:05 +0000 (13:07 -0700)]
Promote SkInterpolator unit test to our tests driver.

BUG=None
TEST=make tests && out/Debug/tests -m Interpolator
R=mtklein@google.com, bsalomon@google.com

Author: tfarina@chromium.org

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

10 years agoMake LTCG optional on windows builds.
bsalomon [Thu, 26 Jun 2014 19:56:28 +0000 (12:56 -0700)]
Make LTCG optional on windows builds.

R=mtklein@google.com

Author: bsalomon@google.com

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

10 years agoAdd trace event when GrBufferAllocPool unmaps a buffer indicating what % of the buffe...
bsalomon [Thu, 26 Jun 2014 19:56:22 +0000 (12:56 -0700)]
Add trace event when GrBufferAllocPool unmaps a buffer indicating what % of the buffer was unwritten.

R=egdaniel@google.com
TBR=egdaniel@google.com

Author: bsalomon@google.com

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

10 years agoRebaseline Test-Android-Logan-Nvidia-Arm7-*
rmistry [Thu, 26 Jun 2014 18:35:33 +0000 (11:35 -0700)]
Rebaseline Test-Android-Logan-Nvidia-Arm7-*

Reviewed both by mtklein and bsalomon in skia:2695.

TBR=
BUG=skia:2695
NOTREECHECKS=true
NOTRY=true

Author: rmistry@google.com

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

10 years agoMake SKP bench JSON ouput better
kelvinly [Thu, 26 Jun 2014 18:26:40 +0000 (11:26 -0700)]
Make SKP bench JSON ouput better

BUG=skia:
NOTREECHECKS=true
R=bensong@google.com, jcgregorio@google.com, bsalomon@google.com, robertphillips@google.com, rmistry@google.com

Author: kelvinly@google.com

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

10 years agoDon't set SK_MALLOC_TEMP in SkAutoTMalloc.
Mike Klein [Thu, 26 Jun 2014 15:04:28 +0000 (11:04 -0400)]
Don't set SK_MALLOC_TEMP in SkAutoTMalloc.

Unlike SkAutoSTMalloc, it doesn't make sense for SkAutoTMalloc to set
SK_MALLOC_TEMP.  See SkAutoMalloc/SkAutoSMalloc for similar in the void*
world.(This change is a documentation-only no-op.  No code pays any
attention to SK_MALLOC_TEMP.)

BUG=skia:
R=halcanary@google.com

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

10 years agoAdd SK_API to SkWriter32
bsalomon [Thu, 26 Jun 2014 15:01:14 +0000 (08:01 -0700)]
Add SK_API to SkWriter32

R=mtklein@google.com, senorblanco@google.com, senorblanco@chromium.org

Author: bsalomon@google.com

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

10 years agoARM Skia NEON patches - 40 - arm64: S32A_D565_Opaque
kevin.petit [Thu, 26 Jun 2014 09:51:29 +0000 (02:51 -0700)]
ARM Skia NEON patches - 40 - arm64: S32A_D565_Opaque

Here are some perf results:

+-------+------------+------------+
| count | Cortex-A53 | Cortex-A57 |
+-------+------------+------------+
|     1 |     -2.54% |     -5.39% |
+-------+------------+------------+
|     2 |     -0.66% |     -2.08% |
+-------+------------+------------+
|     4 |    -11.13% |      0.00% |
+-------+------------+------------+
|     8 |     -5.79% |     -1.30% |
+-------+------------+------------+
|    16 |     71.60% |     93.27% |
+-------+------------+------------+
|    64 |     30.99% |     57.35% |
+-------+------------+------------+
|   256 |     25.41% |     52.59% |
+-------+------------+------------+
|  1024 |     25.56% |     53.76% |
+-------+------------+------------+

Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
BUG=skia:
R=mtklein@google.com, djsollen@google.com

Author: kevin.petit@arm.com

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

10 years agoUpdate SKP version to 33
borenet [Thu, 26 Jun 2014 06:53:02 +0000 (23:53 -0700)]
Update SKP version to 33

Automatic commit by the RecreateSKPs bot.

TBR=

Author: borenet@google.com

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

10 years agoRemove SkBicubicImageFilter, and all related tests.
senorblanco [Wed, 25 Jun 2014 21:39:05 +0000 (14:39 -0700)]
Remove SkBicubicImageFilter, and all related tests.

Now that we have SkResizeImageFilter, and the bicubic
resizing is part of skia proper, there's no need for a
specialized image filter.

BUG=skia:
R=bsalomon@google.com

Author: senorblanco@chromium.org

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

10 years agoAdd nanobench, a fresh look at our microbenchmark harness.
mtklein [Wed, 25 Jun 2014 21:08:00 +0000 (14:08 -0700)]
Add nanobench, a fresh look at our microbenchmark harness.

out/Release/nanobench runs 4-5x faster on my Z620 and ~2x faster on my N5 than out/Release/bench with the same configs.

(Debug isn't really comparable.  I haven't added the Debug -> single loop check.)

BUG=skia:
R=djsollen@google.com, mtklein@google.com

Author: mtklein@chromium.org

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

10 years agotools/git-sync-deps is a stand-alone program, not dependent on synced deps.
halcanary [Wed, 25 Jun 2014 20:28:29 +0000 (13:28 -0700)]
tools/git-sync-deps is a stand-alone program, not dependent on synced deps.

Motivation:  With common repo, we had a chicken-egg problem.

BUG=skia:
R=borenet@google.com, mtklein@google.com

Author: halcanary@google.com

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

10 years agoAdd noinline for GCC 4.6, which seems to vectorize after inlining.
mtklein [Wed, 25 Jun 2014 19:40:51 +0000 (12:40 -0700)]
Add noinline for GCC 4.6, which seems to vectorize after inlining.

GCC 4.7 and 4.8 don't need this, but we're not building with them so it doesn't hurt.

BUG=skia:
R=mtklein@google.com

Author: mtklein@chromium.org

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

10 years ago"interface" is defined in Windows headers, so undef it in GrGLCaps so we don't have...
george [Wed, 25 Jun 2014 19:14:30 +0000 (12:14 -0700)]
"interface" is defined in Windows headers, so undef it in GrGLCaps so we don't have a name collision

R=bsalomon@google.com, mtklein@google.com, bsalomon
BUG=skia:

Author: george@mozilla.com

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

10 years agoNarrow disabled vectorization further to just ConvolveHorizontally.
mtklein [Wed, 25 Jun 2014 18:38:00 +0000 (11:38 -0700)]
Narrow disabled vectorization further to just ConvolveHorizontally.

BUG=skia:2575
R=mtklein@google.com

Author: mtklein@chromium.org

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

10 years agoRename TestSize.cpp to SizeTest.cpp
tfarina [Wed, 25 Jun 2014 17:39:00 +0000 (10:39 -0700)]
Rename TestSize.cpp to SizeTest.cpp

It is the only file where Test is the prefix rather than the sufix.
 This patch fixes that so it matches with the rest of the files
 under tests/ directory.

And separate SkISize test into its own DEF_TEST().

BUG=None
TEST=make tests && out/Debug/tests
R=mtklein@google.com

Author: tfarina@chromium.org

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

10 years agoRebase Test-Ubuntu12-ShuttleA-GTX660-x86-Release.
Mike Klein [Wed, 25 Jun 2014 17:21:56 +0000 (13:21 -0400)]
Rebase Test-Ubuntu12-ShuttleA-GTX660-x86-Release.

BUG=skia:2575

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

10 years agotry release only
Mike Klein [Wed, 25 Jun 2014 16:35:19 +0000 (12:35 -0400)]
try release only

10 years agodisable on nacl
Mike Klein [Wed, 25 Jun 2014 16:23:53 +0000 (12:23 -0400)]
disable on nacl

10 years agoFocus disabled optimizations on just BGRAConvolve2D, and only 32-bit.
mtklein [Wed, 25 Jun 2014 16:14:28 +0000 (09:14 -0700)]
Focus disabled optimizations on just BGRAConvolve2D, and only 32-bit.

Last CL accidentally disabled autovectorization on 64-bit builds too.
This fixes that.

BUG=skia:2575
R=rmistry@google.com, mtklein@google.com

Author: mtklein@chromium.org

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

10 years agoWhitespace fixes for Python tools
borenet [Wed, 25 Jun 2014 15:40:58 +0000 (08:40 -0700)]
Whitespace fixes for Python tools

BUG=skia:
R=rmistry@google.com

Author: borenet@google.com

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

10 years agoTemporarily disable autovectorization in core for 32-bit Linux builds.
mtklein [Wed, 25 Jun 2014 15:27:08 +0000 (08:27 -0700)]
Temporarily disable autovectorization in core for 32-bit Linux builds.

BUG=skia:2575
R=rmistry@google.com, mtklein@google.com

Author: mtklein@chromium.org

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

10 years agoAdd valgrind supp for NV driver.
bsalomon [Wed, 25 Jun 2014 15:25:30 +0000 (08:25 -0700)]
Add valgrind supp for NV driver.

R=mtklein@google.com

Author: bsalomon@google.com

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

10 years agoUse new common tools in Python scripts
Eric Boren [Wed, 25 Jun 2014 15:13:27 +0000 (11:13 -0400)]
Use new common tools in Python scripts

BUG=skia:2682
R=rmistry@google.com

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

10 years agoIgnore degeneratesegments for nvprmsaa4 to unbreak the build
kkinnunen [Wed, 25 Jun 2014 11:30:38 +0000 (04:30 -0700)]
Ignore degeneratesegments for nvprmsaa4 to unbreak the build

Ignore degeneratesegments for nvprmsaa4 to unbreak the build. The result image
seems to be inconsistent with different Linux GTX660 builds. Ignore the test for
Test-Ubuntu12-ShuttleA-GTX660-x86_64-Release.

BUG=skia:2689
R=rmistry@google.com

Author: kkinnunen@nvidia.com

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

10 years agoUpdate SKP version to 32
borenet [Wed, 25 Jun 2014 07:29:50 +0000 (00:29 -0700)]
Update SKP version to 32

Automatic commit by the RecreateSKPs bot.

TBR=

Author: borenet@google.com

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

10 years agoDisable bogus _scaled benches until we can figure out why they're bogus.
mtklein [Tue, 24 Jun 2014 22:19:25 +0000 (15:19 -0700)]
Disable bogus _scaled benches until we can figure out why they're bogus.

BUG=skia:
R=halcanary@google.com, mtklein@google.com

Author: mtklein@chromium.org

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

10 years agoRename GrAtlasMgr to GrAtlas (and other cleanup)
robertphillips [Tue, 24 Jun 2014 22:08:49 +0000 (15:08 -0700)]
Rename GrAtlasMgr to GrAtlas (and other cleanup)

This CL also renames the old GrAtlas to ClientPlotUsage and moves it into the new GrAtlas.

R=jvanverth@google.com

Author: robertphillips@google.com

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

10 years agorebase GMs
Brian Salomon [Tue, 24 Jun 2014 22:08:09 +0000 (18:08 -0400)]
rebase GMs

BUG=skia:

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

10 years agodelete disabled bench
mtklein [Tue, 24 Jun 2014 21:16:50 +0000 (14:16 -0700)]
delete disabled bench

BUG=skia:
R=tomhudson@google.com, mtklein@google.com, junov@google.com

Author: mtklein@chromium.org

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

10 years agoRemove special case gpu transforms for Identity and Translate
egdaniel [Tue, 24 Jun 2014 20:43:12 +0000 (13:43 -0700)]
Remove special case gpu transforms for Identity and Translate

Change will remove some special cases for coord transforms in favor of not needing to compile
a new program if the coord trans changes from one special case to another.

BUG=skia:
R=bsalomon@google.com

Author: egdaniel@google.com

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

10 years agoMove allocation of texture from SkGpuDevice to GrLayerCache
robertphillips [Tue, 24 Jun 2014 20:10:43 +0000 (13:10 -0700)]
Move allocation of texture from SkGpuDevice to GrLayerCache

In order to atlas the layers the GrLayerCache needs to be given more control over where a given layer's texture is allocated (i.e., it could be a raw scratch texture or in the cache).

R=bsalomon@google.com

Author: robertphillips@google.com

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

10 years agoBench: Change default maxMs from 4s to 1s.
borenet [Tue, 24 Jun 2014 19:40:01 +0000 (12:40 -0700)]
Bench: Change default maxMs from 4s to 1s.

Speculative fix for Android crashes.

BUG=skia:2080
R=mtklein@google.com, djsollen@google.com

Author: borenet@google.com

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

10 years agoSupport serialization in SkRecord-backed SkPictures.
mtklein [Tue, 24 Jun 2014 19:28:34 +0000 (12:28 -0700)]
Support serialization in SkRecord-backed SkPictures.

Update DM to test SkRecord through SkPictureRecorder API.

BUG=skia:
R=robertphillips@google.com, mtklein@google.com

Author: mtklein@chromium.org

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

10 years agoMake GrGLShaderBuilder::fragmentPosition() return a vec4, with 1.0 as the zw componen...
bsalomon [Tue, 24 Jun 2014 18:16:52 +0000 (11:16 -0700)]
Make GrGLShaderBuilder::fragmentPosition() return a vec4, with 1.0 as the zw components when in the y-flip case. This works around an Adreno driver bug.

Revert "Stop referencing gl_FragCoord z and w components."

This reverts commit 160a52ba217012ed73c240f6d67b3bbf2b4879d6.

R=jvanverth@google.com

Author: bsalomon@google.com

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

10 years agoAnother iOS fix for SampleApp.
jvanverth [Tue, 24 Jun 2014 18:06:02 +0000 (11:06 -0700)]
Another iOS fix for SampleApp.

R=caryclark@google.com

Author: jvanverth@google.com

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

10 years agoPrune some dead code from SkPicture.cpp.
mtklein [Tue, 24 Jun 2014 17:12:39 +0000 (10:12 -0700)]
Prune some dead code from SkPicture.cpp.

There's no path that makes playback != fPlayback.get() anymore.

BUG=skia:
R=robertphillips@google.com, mtklein@google.com

Author: mtklein@chromium.org

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

10 years agoadd path dump test
caryclark [Tue, 24 Jun 2014 15:30:15 +0000 (08:30 -0700)]
add path dump test

Add a unit test for SkPath::dump(). The unit test exposed a minor
bug (inconsistent CRs) and an unused parameter (title).

R=bsalomon@google.com
TBR=bsalomon
BUG=skia:1836

Author: caryclark@google.com

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

10 years agoTick off some TODOs:
Mike Klein [Tue, 24 Jun 2014 15:29:06 +0000 (11:29 -0400)]
Tick off some TODOs:

  - support fRecord in copy constructor
  - support SkDrawPictureCallback

Moved SkDrawPictureCallback to its own header so
SkRecordDraw can include it without pulling in all of
SkPicture.

Adding an SkAutoSaveRestore to SkRecordDraw was the easiest
way to match the balance guarantees of the callback, and
probably not a bad idea in general.  Updated its tests.

BUG=skia:
R=robertphillips@google.com

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

10 years agoTidy up fOwner in SkMutex_pthread.h.
mtklein [Tue, 24 Jun 2014 15:26:30 +0000 (08:26 -0700)]
Tidy up fOwner in SkMutex_pthread.h.

  - Initialize fOwner to kNoOwner in SkMutex::SkMutex.
  - Note that we're stretching the API with kNoOwner.
  - Use pthread_equal() instead of ==.

BUG=387993
R=halcanary@google.com, mtklein@google.com

Author: mtklein@chromium.org

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

10 years agoadd pathops tight bounds; conform path ops' gyp to unit tests
caryclark [Tue, 24 Jun 2014 14:55:11 +0000 (07:55 -0700)]
add pathops tight bounds; conform path ops' gyp to unit tests

Implement path tight bounds using path ops machinery. This is not
as efficient as it could be; for instance, internally, it creates
a path ops structure more suited to intersection. If this shows
up as a performance bottleneck, it could be improved.

Fix path ops gyp files, which have fallen out of sync with other
tests.

R=mtklein@google.com, bsalomon@google.com
TBR=mtklein
BUG=skia:1712

Author: caryclark@google.com

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

10 years agoPreprend Test to test function name generated by DEF_TEST() macro.
tfarina [Tue, 24 Jun 2014 13:50:39 +0000 (06:50 -0700)]
Preprend Test to test function name generated by DEF_TEST() macro.

That way when declaring a test with DEF_TEST() macro, you don't have to
uniquify the test name because it might colide with the class it is
being testing.

For example, if you are testing SkBase64 and do:

DEF_TEST(SkBase64, reporter) {
}

That will generate an error because the macro will declare a function
named SkBase64 which colides with the type SkBase64.

By adding Test to the function name we avoid this problem.

Fixed the entries found with the following command line:

$ git grep "Test, r" | grep DEF

BUG=None
TEST=make tests && out/Debug/tests
R=mtklein@google.com

Author: tfarina@chromium.org

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

10 years agoInitialize a variable in GrDrawTarget::drawPaths
kkinnunen [Tue, 24 Jun 2014 12:43:21 +0000 (05:43 -0700)]
Initialize a variable in GrDrawTarget::drawPaths

Initialize the device bounds rect variable before use in GrDrawTarget::drawPaths.

R=rmistry@google.com, jvanverth@google.com, mtklein@google.com

Author: kkinnunen@nvidia.com

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

10 years agoRebaseline gm results after "Implement text rendering with NVPR"
kkinnunen [Tue, 24 Jun 2014 11:45:57 +0000 (04:45 -0700)]
Rebaseline gm results after "Implement text rendering with NVPR"

Rebaseline gm results after "Implement text rendering with NVPR".  The text is
rasterized by NV_path_rendering extension, so pixels are expected to be a bit
different.

NOTRY=true
R=rmistry@google.com

Author: kkinnunen@nvidia.com

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

10 years agoImplement text rendering with NVPR
kkinnunen [Tue, 24 Jun 2014 07:12:27 +0000 (00:12 -0700)]
Implement text rendering with NVPR

Use path rendering to render the text from outlines if supported by the
GPU. Implement this in GrStencilAndCoverTextContext by copying chunks of code
from GrBitmapTextContext.

The drawing is implemented with "instanced" path drawing functions.

Moves the creation of the "main" text context from SkGpuDevice to the
GrContext::createTextContext. This is done because the decision of which text
renderer is optimal can be made only with the internal implementation-specific
information of the context.

Remove a windows assertion from SkScalerContext_GDI::getGDIGlyphPath.  The
GetGlyphOutlineW fails in fontmgr_match for the initial space char in the string
" [700] ...". According to MSDN, this is a known problem.  Just return that the
glyph has no path data in these cases.

R=jvanverth@google.com, bsalomon@google.com, mtklein@google.com

Author: kkinnunen@nvidia.com

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

10 years agoNo one uses SkPicture::swap.
Mike Klein [Mon, 23 Jun 2014 19:29:52 +0000 (15:29 -0400)]
No one uses SkPicture::swap.

BUG=skia:
R=robertphillips@google.com

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

10 years agoEnable basic drawing with SkRecord-based pictures.
Mike Klein [Mon, 23 Jun 2014 19:13:26 +0000 (15:13 -0400)]
Enable basic drawing with SkRecord-based pictures.

I've tagged all the functions in SkPicture.cpp is // fRecord TODO or // fRecord
OK, depending on whether or not they're totally broken when used from an
SkRecord-based picture.  Obviously next steps are to eliminate all the TODOs,
then clean up the notes.

I converted SkPicture over to smart pointers too.  It's particularly helpful
that the smart pointers initialize to NULL by default.

For now I've got all the SkRecord-based code jammed in at the bottom of the file.  I figure it'll help me keep things straight for a bit, then we can rearrange later.

BUG=skia:
R=robertphillips@google.com

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

10 years agouse platform-independent font for gm
caryclark [Mon, 23 Jun 2014 18:25:00 +0000 (11:25 -0700)]
use platform-independent font for gm

Create a custom typeface and scaler to render simple paths the
same on all platforms.

GM tests are modified to explicitly select the custom typeface.

R=reed@google.com, mtklein@google.com, bungeman@google.com
TBR=reed

Author: caryclark@google.com

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

10 years agoRemove unneeded return from DirectWrite.
Ben Wagner [Mon, 23 Jun 2014 17:53:26 +0000 (13:53 -0400)]
Remove unneeded return from DirectWrite.

10 years agoRebaseline shadertext2_{gpu,8888} after SkPaint::measureText changes
rmistry [Mon, 23 Jun 2014 17:32:29 +0000 (10:32 -0700)]
Rebaseline shadertext2_{gpu,8888} after SkPaint::measureText changes

These two GMs were missing from https://codereview.chromium.org/347393002/.

This CL is to fix http://108.170.220.121:10117/static/view.html#/view.html?resultsToLoad=%2Fresults%2Ffailures&displayLimitPending=50&showThumbnailsPending&mergeIdenticalRowsPending&imageSizePending=100&sortColumnSubdict=differenceData&sortColumnKey=perceptualDifference&hiddenResultTypes=failure-ignored,no-comparison,succeeded&hiddenConfigs=&builder=Test-Win7-ShuttleA-HD2000-x86-Release&test=

BUG=skia:
R=kkinnunen@nvidia.com, jvanverth@google.com, mtklein@google.com

Author: rmistry@google.com

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

10 years agoUse smart pointers to make SkPictureRecorder lifetimes less manual.
Mike Klein [Mon, 23 Jun 2014 17:29:10 +0000 (13:29 -0400)]
Use smart pointers to make SkPictureRecorder lifetimes less manual.

BUG=skia:
R=robertphillips@google.com

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

10 years agoAdd schemas to Skia repo
kelvinly [Mon, 23 Jun 2014 16:02:38 +0000 (09:02 -0700)]
Add schemas to Skia repo

BUG=skia:
R=bensong@google.com, jcgregorio@google.com

Author: kelvinly@google.com

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

10 years agoRemove suppression of distantclip image differences
robertphillips [Mon, 23 Jun 2014 16:01:51 +0000 (09:01 -0700)]
Remove suppression of distantclip image differences

R=rmistry@google.com, rmistry@chromium.org

Author: robertphillips@google.com

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

10 years agoBetter rendering detection with DirectWrite.
bungeman [Mon, 23 Jun 2014 15:29:23 +0000 (08:29 -0700)]
Better rendering detection with DirectWrite.

When requesting embedded bitmaps, all sizes in a gridfit gasp range with a
bitmap in that range should be gridfit to the fullest extent possible.

R=eae@chromium.org, reed@google.com, mtklein@google.com

Author: bungeman@google.com

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

10 years agoRebaseline shadertext2 after SkPaint::measureText changes
kkinnunen [Mon, 23 Jun 2014 13:59:46 +0000 (06:59 -0700)]
Rebaseline shadertext2 after SkPaint::measureText changes

Rebaseline shadertext2 after commit "Fix SkPaint::measureText for stroked
hairline text".

Unignore ignored shadertext2 for Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug
pdf-poppler.

The label "Filled" in the test moves to the left due to the changes in the
measurement. The SkPaint::measureText will use the "use paths" code path,
similar to the drawing code. This results in different length for the string
"Filled".

As a side-note, the test probably measures either wrong text or uses wrong
paint. This can be fixed separately.

NOTREECHECKS=true
NOTRY=true
R=jvanverth@google.com, mtklein@google.com, rmistry@google.com

Author: kkinnunen@nvidia.com

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

10 years agoRevert of Revert of Fix SkPaint::measureText for stroked hairline text (https://coder...
rmistry [Mon, 23 Jun 2014 13:59:15 +0000 (06:59 -0700)]
Revert of Revert of Fix SkPaint::measureText for stroked hairline text (https://codereview.chromium.org/354433002/)

Reason for revert:
Rebaseline CL is ready to be submitted

Original issue's description:
> Revert of Fix SkPaint::measureText for stroked hairline text (https://codereview.chromium.org/335603003/)
>
> Reason for revert:
> Caused many shadertext GM failures
>
> Original issue's description:
> > Fix SkPaint::measureText for stroked hairline text
> >
> > SkPaint::measureText and text drawing used different criteria for
> > determining whether text should be drawn as paths or not.
> >
> > Adds tests glyph_pos_(h/n)_(s/f/b) to test the text rendering and the glyph
> > positioning in the rendering. Mainly added in order to define what is the
> > expected text rendering when hairline stroke is used with various transform
> > options.
> >
> > The testcase also tries to note or highlight the fact that SkPaint::measureText
> > is not expected to produce intuitively matching results when compared to a
> > rendering, if the rendering is done so that the device ends up having a device
> > transform.
> >
> > This fixes the glyph_pos_h_s (hairline, stroked) test-case.
> >
> > Ignore shadertext2_pdf-poppler.png gm on
> > Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug temporarily, as that fails.
> >
> > Committed: https://skia.googlesource.com/skia/+/196af738027c5e18c3eb792dbcaf90ef27821793
>
> TBR=jvanverth@google.com,reed@google.com,kkinnunen@nvidia.com
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://skia.googlesource.com/skia/+/abc9bb55ddfeb4b1a7acc335a34841fddcd22d27

R=jvanverth@google.com, reed@google.com, kkinnunen@nvidia.com
TBR=jvanverth@google.com, kkinnunen@nvidia.com, reed@google.com
NOTREECHECKS=true
NOTRY=true

Author: rmistry@google.com

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

10 years agoRevert of Support using OpenGL ES context on desktop (https://codereview.chromium...
rmistry [Mon, 23 Jun 2014 13:13:46 +0000 (06:13 -0700)]
Revert of Support using OpenGL ES context on desktop (https://codereview.chromium.org/319043005/)

Reason for revert:
Caused segmentation fault on many builders. Please see reverted CL's msg #21 for details.

Original issue's description:
> Support using OpenGL ES context on desktop
>
> Support using OpenGL ES context on desktop for unix and Android platforms. This
> is mainly useful in development.
>
> Add --gpuAPI flag to gm, dm, bench, bench_pictures and render_pictures. The
> possible parameters for the flag are "gl" and "gles".
>
> Committed: https://skia.googlesource.com/skia/+/74fc727dc88ee24d89f88cb1709f963e9073aeb3

R=bsalomon@google.com, mtklein@google.com, robertphillips@google.com, kkinnunen@nvidia.com
TBR=bsalomon@google.com, kkinnunen@nvidia.com
NOTREECHECKS=true
NOTRY=true

Author: rmistry@google.com

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

10 years agoRevert of Add functions to support NV_path_rendering in OpenGL ES (https://codereview...
rmistry [Mon, 23 Jun 2014 13:06:36 +0000 (06:06 -0700)]
Revert of Add functions to support NV_path_rendering in OpenGL ES (https://codereview.chromium.org/345723002/)

Reason for revert:
Will have to unfortunately revert this CL in order to revert https://codereview.chromium.org/319043005/

Original issue's description:
> Add functions to support NV_path_rendering in OpenGL ES
>
> Add OpenGL ES extension functions needed to support NV_path_rendering in OpenGL
> ES.
>
> The added glProgramPathFragmentInputGenNV call is defined in NV_path_rendering
> revision 30, similar to following:
>
>     Append to the end of the "Shader Inputs" subsection of Section 3.12.2
>     "Shader Execution":
>
>     The command
>
>         void ProgramPathFragmentInputGenNV(uint program,
>                                            int location,
>                                            enum genMode,
>                                            int components,
>                                            const float *coeffs);
>
>     controls how a user-defined (non-built-in) fragment input of a
>     GLSL program object is computed for fragment shading operations that
>     occur as a result of CoverFillPathNV or CoverStrokePathNV.
>
>     /program/ names a GLSL program object.  If /program/ has not been
>     successfully linked, the error INVALID_OPERATION is generated.
>
>     The given fragment input generation state is loaded into the fragment
>     input variable location identified by /location/.  This location
>     is a value returned either by GetProgramResourceLocation with a
>     /programInterface/ of FRAGMENT_INPUT_NV and a given fragment shader
>     input variable name or by GetProgramResourceiv with FRAGMENT_INPUT_NV
>     for the /programInterface/ and LOCATION for the property for a given
>     fragment input resource index.
>
>     ....
>
> glProgramPathFragmentInputGenNV will be used instead of glPathTexGen,
> because the latter depends on fixed function pipeline that is not
> exposed in ES.
>
> Also add glGetProgramResourceLocation from OpenGL 4.3 or
> ARB_program_interface_query.
>
> Also add FRAGMENT_INPUT define to be used with glGetProgramResourceLocation.
>
> The added functions are not used yet, but they're needed when implementing
> NV_path_rendering support for OpenGL ES. They can also be used on OpenGL.
>
> Remove uncalled NV_path_rendering functions, so they do not cause confusion
> or take space in the interface definition. The ones that are later used
> can be re-added when needed.
>
> Remove definitions NV_path_rendering that are for NV_path_rendering function
> parameters that are not used. The ones that are later used
> can be re-added when needed.
>
> Committed: https://skia.googlesource.com/skia/+/4a995dfff2ecf91e8bf999d77e3218cec596232c

R=bsalomon@google.com, kkinnunen@nvidia.com
TBR=bsalomon@google.com, kkinnunen@nvidia.com
NOTREECHECKS=true
NOTRY=true

Author: rmistry@google.com

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

10 years agoRevert of Fix SkPaint::measureText for stroked hairline text (https://codereview...
rmistry [Mon, 23 Jun 2014 12:39:26 +0000 (05:39 -0700)]
Revert of Fix SkPaint::measureText for stroked hairline text (https://codereview.chromium.org/335603003/)

Reason for revert:
Caused many shadertext GM failures

Original issue's description:
> Fix SkPaint::measureText for stroked hairline text
>
> SkPaint::measureText and text drawing used different criteria for
> determining whether text should be drawn as paths or not.
>
> Adds tests glyph_pos_(h/n)_(s/f/b) to test the text rendering and the glyph
> positioning in the rendering. Mainly added in order to define what is the
> expected text rendering when hairline stroke is used with various transform
> options.
>
> The testcase also tries to note or highlight the fact that SkPaint::measureText
> is not expected to produce intuitively matching results when compared to a
> rendering, if the rendering is done so that the device ends up having a device
> transform.
>
> This fixes the glyph_pos_h_s (hairline, stroked) test-case.
>
> Ignore shadertext2_pdf-poppler.png gm on
> Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug temporarily, as that fails.
>
> Committed: https://skia.googlesource.com/skia/+/196af738027c5e18c3eb792dbcaf90ef27821793

R=jvanverth@google.com, reed@google.com, kkinnunen@nvidia.com
TBR=jvanverth@google.com, kkinnunen@nvidia.com, reed@google.com
NOTREECHECKS=true
NOTRY=true

Author: rmistry@google.com

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

10 years agoAdd functions to support NV_path_rendering in OpenGL ES
kkinnunen [Mon, 23 Jun 2014 06:32:32 +0000 (23:32 -0700)]
Add functions to support NV_path_rendering in OpenGL ES

Add OpenGL ES extension functions needed to support NV_path_rendering in OpenGL
ES.

The added glProgramPathFragmentInputGenNV call is defined in NV_path_rendering
revision 30, similar to following:

    Append to the end of the "Shader Inputs" subsection of Section 3.12.2
    "Shader Execution":

    The command

        void ProgramPathFragmentInputGenNV(uint program,
                                           int location,
                                           enum genMode,
                                           int components,
                                           const float *coeffs);

    controls how a user-defined (non-built-in) fragment input of a
    GLSL program object is computed for fragment shading operations that
    occur as a result of CoverFillPathNV or CoverStrokePathNV.

    /program/ names a GLSL program object.  If /program/ has not been
    successfully linked, the error INVALID_OPERATION is generated.

    The given fragment input generation state is loaded into the fragment
    input variable location identified by /location/.  This location
    is a value returned either by GetProgramResourceLocation with a
    /programInterface/ of FRAGMENT_INPUT_NV and a given fragment shader
    input variable name or by GetProgramResourceiv with FRAGMENT_INPUT_NV
    for the /programInterface/ and LOCATION for the property for a given
    fragment input resource index.

    ....

glProgramPathFragmentInputGenNV will be used instead of glPathTexGen,
because the latter depends on fixed function pipeline that is not
exposed in ES.

Also add glGetProgramResourceLocation from OpenGL 4.3 or
ARB_program_interface_query.

Also add FRAGMENT_INPUT define to be used with glGetProgramResourceLocation.

The added functions are not used yet, but they're needed when implementing
NV_path_rendering support for OpenGL ES. They can also be used on OpenGL.

Remove uncalled NV_path_rendering functions, so they do not cause confusion
or take space in the interface definition. The ones that are later used
can be re-added when needed.

Remove definitions NV_path_rendering that are for NV_path_rendering function
parameters that are not used. The ones that are later used
can be re-added when needed.

R=bsalomon@google.com

Author: kkinnunen@nvidia.com

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

10 years agoSupport using OpenGL ES context on desktop
kkinnunen [Mon, 23 Jun 2014 05:56:53 +0000 (22:56 -0700)]
Support using OpenGL ES context on desktop

Support using OpenGL ES context on desktop for unix and Android platforms. This
is mainly useful in development.

Add --gpuAPI flag to gm, dm, bench, bench_pictures and render_pictures. The
possible parameters for the flag are "gl" and "gles".

R=bsalomon@google.com, mtklein@google.com, robertphillips@google.com

Author: kkinnunen@nvidia.com

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

10 years agoUpdate SKP version to 29
borenet [Mon, 23 Jun 2014 05:18:34 +0000 (22:18 -0700)]
Update SKP version to 29

Automatic commit by the RecreateSKPs bot.

TBR=

Author: borenet@google.com

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

10 years agoFix SkPaint::measureText for stroked hairline text
kkinnunen [Mon, 23 Jun 2014 05:18:14 +0000 (22:18 -0700)]
Fix SkPaint::measureText for stroked hairline text

SkPaint::measureText and text drawing used different criteria for
determining whether text should be drawn as paths or not.

Adds tests glyph_pos_(h/n)_(s/f/b) to test the text rendering and the glyph
positioning in the rendering. Mainly added in order to define what is the
expected text rendering when hairline stroke is used with various transform
options.

The testcase also tries to note or highlight the fact that SkPaint::measureText
is not expected to produce intuitively matching results when compared to a
rendering, if the rendering is done so that the device ends up having a device
transform.

This fixes the glyph_pos_h_s (hairline, stroked) test-case.

Ignore shadertext2_pdf-poppler.png gm on
Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug temporarily, as that fails.

R=jvanverth@google.com, reed@google.com

Author: kkinnunen@nvidia.com

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

10 years agoNo need to include ../tools/flags in include_dirs when depending on flags target.
tfarina [Sun, 22 Jun 2014 23:13:00 +0000 (16:13 -0700)]
No need to include ../tools/flags in include_dirs when depending on flags target.

"flags" target does it by direct_dependent_settings which exports the
include_dirs to targets that depend on it.

Along the way fixed the indentation of experimental.gyp and v8.gyp.

BUG=None
TEST=make all
R=mtklein@google.com

Author: tfarina@chromium.org

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

10 years agoUpdate SKP version to 28
borenet [Sun, 22 Jun 2014 06:26:40 +0000 (23:26 -0700)]
Update SKP version to 28

Automatic commit by the RecreateSKPs bot.

TBR=

Author: borenet@google.com

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

10 years agoAdd GYP target for sk_tool_utils.* component.
tfarina [Sat, 21 Jun 2014 17:54:17 +0000 (10:54 -0700)]
Add GYP target for sk_tool_utils.* component.

This declares a static library target in gyp/sk_tool_utils.gyp, so other
targets can depend directly on it instead of including the source file
in their source lists.

BUG=None
TEST=make all
R=mtklein@google.com

Author: tfarina@chromium.org

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

10 years agoUpdate SKP version to 27
borenet [Sat, 21 Jun 2014 06:51:47 +0000 (23:51 -0700)]
Update SKP version to 27

Automatic commit by the RecreateSKPs bot.

TBR=

Author: borenet@google.com

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

10 years agoRe-land "Fix external SkImageFilter caching with clips."
senorblanco [Fri, 20 Jun 2014 22:41:59 +0000 (15:41 -0700)]
Re-land "Fix external SkImageFilter caching with clips."

This reverts commit 9efd66b8451f25465abd1027e09a3bcfa7b9c554.

R=reed@google.com
TBR=reed@google.com
BUG=skia:

Author: senorblanco@chromium.org

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

10 years agospeed up rgn building by inlining memcmp for 32bit values
reed [Fri, 20 Jun 2014 20:59:15 +0000 (13:59 -0700)]
speed up rgn building by inlining memcmp for 32bit values

on mac/clang, using circularclips gm/bench

- before: 400ms
- after:  250ms

BUG=skia:
R=tomhudson@chromium.org, mtklein@google.com

Author: reed@google.com

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

10 years agoRebaseline clip on Win7 ShuttleA HD2000
krajcevski [Fri, 20 Jun 2014 20:07:15 +0000 (13:07 -0700)]
Rebaseline clip on Win7 ShuttleA HD2000

BUG=skia:
R=bsalomon@google.com
TBR=bsalomon@google.com

Author: krajcevski@google.com

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