platform/upstream/libSkiaSharp.git
9 years agoFix end-of-pattern matching for Skia recording optimization.
dneto [Wed, 30 Jul 2014 22:42:22 +0000 (15:42 -0700)]
Fix end-of-pattern matching for Skia recording optimization.

The recorder optimizer's pattern matcher was accepting command sequences
when it shouldn't have.

In the submitted case, and the pattern matcher was looking for:
saveLayer, drawBitmap, restore
and in the rendering for the submitted case, the sequence of commands
were:
saveLayer, drawBitmap, drawBitmap, restore

This sequence was improperly accepted by the matcher, and the optimizer
reduced the sequence to:
drawBitmap, drawBitmap
where the opacity from the saveLayer paint argument was applied
to the first drawBitmap only.

The user-visible effect in Chrome was a flashing effect on an image
caused by incorrect (too-high) opacity.

The patch adds a Skia test to check for pixel colour values in
a similarly structured recording.  All other Skia tests pass.
Blink layout tests also pass with this change.

BUG=chromium:344987
R=robertphillips@google.com, reed@google.com, mtklein@google.com

Author: dneto@chromium.org

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

9 years agoIntersect SkPictureImageFilter bounds against clip bounds.
senorblanco [Wed, 30 Jul 2014 21:49:31 +0000 (14:49 -0700)]
Intersect SkPictureImageFilter bounds against clip bounds.

Intersect SkPictureImageFilter bounds against clip bounds
to avoid unnecessary processing. This is how the other
filters work (via applyCropRect()), but SkPictureImageFilter
maintains its own crop.

BUG=skia:
R=bsalomon@google.com

Author: senorblanco@chromium.org

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

9 years agoRemove kDisableBlend_BlendOptFlag as it is no longer needed
egdaniel [Wed, 30 Jul 2014 20:18:32 +0000 (13:18 -0700)]
Remove kDisableBlend_BlendOptFlag as it is no longer needed

BUG=skia:
R=bsalomon@google.com

Author: egdaniel@google.com

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

9 years agoStart the process of choosing the correct compression format
krajcevski [Wed, 30 Jul 2014 20:08:11 +0000 (13:08 -0700)]
Start the process of choosing the correct compression format

R=robertphillips@google.com

Author: krajcevski@google.com

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

9 years agoAdd some debugging to PremulAlphaRoundTrip test.
mtklein [Wed, 30 Jul 2014 19:37:19 +0000 (12:37 -0700)]
Add some debugging to PremulAlphaRoundTrip test.

BUG=skia:2782
R=bensong@google.com, mtklein@google.com

Author: mtklein@chromium.org

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

9 years agoTest removal of mesa specific version parse
joshualitt [Wed, 30 Jul 2014 18:49:12 +0000 (11:49 -0700)]
Test removal of mesa specific version parse

BUG=skia:
R=bsalomon@google.com

Author: joshualitt@chromium.org

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

9 years agoImplement a persistent uniqueID-based cache for SkImageFilter.
senorblanco [Wed, 30 Jul 2014 18:26:46 +0000 (11:26 -0700)]
Implement a persistent uniqueID-based cache for SkImageFilter.

Add a unique ID to SkImageFilter, and use it as part
of a persistent cache of image-filtered results. This is used for
caching frame-to-frame coherent filters.

We also keep track of which filter subtrees do not reference the
src input, and use a GenID of zero for the src input in that case.
That way, subtrees which are not dependent on the filter input can be
cached independently of it.

This gives approximately a 4X speedup on
letmespellitoutforyou.com/samples/svg/filter_terrain.svg on Z620
and Nexus10. The cache key consists of the uniqueID of the filter, the
clip bounds, the CTM and the genID of the input bitmap.

Since this does not yet handle the case where the input primitives
(and part of the resulting filter tree) are unchanged, we have
to keep around the external cache for that painting case.
When the work to cache unchanging input primitives is done, the
old cache can be removed, and the new UniqueIDCache will be renamed
to Cache.

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

Author: senorblanco@chromium.org

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

9 years agoAdd query for whether or not we have compressedTexSubImage
krajcevski [Wed, 30 Jul 2014 18:25:44 +0000 (11:25 -0700)]
Add query for whether or not we have compressedTexSubImage

R=robertphillips@google.com

Author: krajcevski@google.com

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

9 years agoCorrect Android FontMgr use of ttc index and remove unused code.
bungeman [Wed, 30 Jul 2014 18:05:22 +0000 (11:05 -0700)]
Correct Android FontMgr use of ttc index and remove unused code.

R=djsollen@chromium.org, tomhudson@google.com, djsollen@google.com

Author: bungeman@google.com

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

9 years agoEnabling texture_domain_effect
joshualitt [Wed, 30 Jul 2014 17:31:10 +0000 (10:31 -0700)]
Enabling texture_domain_effect

BUG=skia:
REVIEW=tbr
R=rmistry@google.com

Author: joshualitt@chromium.org

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

9 years agoExplicitly typedef GetUserDefaultLocaleName as WINVER may not be high enough when...
george [Wed, 30 Jul 2014 16:58:17 +0000 (09:58 -0700)]
Explicitly typedef GetUserDefaultLocaleName as WINVER may not be high enough when compiling to allow visibility of the function prototype in windows.h

R=bungeman@google.com, bungeman1

Author: george@mozilla.com

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

9 years agoFix way-over-allocation in pipe.
mtklein [Wed, 30 Jul 2014 16:17:54 +0000 (09:17 -0700)]
Fix way-over-allocation in pipe.

https://codereview.chromium.org/283093002 fixed some bugs in pipe memory
allocation, but also introduced one of its own: nearly every block requested
from needOpBytes() got its own 16K allocation.

The correct logic is to take the requested size, add four more bytes for a
DrawOp, make sure that's 4-byte aligned, then check to see if there's enough
space for that in the current block.  If there's not, allocate at least
MIN_BLOCK_SIZE bytes to fit the request.

The bug is that I moved that round-up-to-MIN_BLOCK_SIZE step before checking
for space in the current block.  This means most (all?) blocks will be 16K but
never seem to have room to fit another allocation.  You need 8 bytes?  You get
16K.  You need 8 more bytes?  Nope, can't fit that.  Here's a new 16K...

This reverts the change to the test I made then, which really should have
tipped me off.  It was testing exactly this bug.

BUG=372671
R=tomhudson@chromium.org, tomhudson@google.com

Author: mtklein@chromium.org

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

9 years agoAdd vertex bounds check for distance field rendering.
jvanverth [Wed, 30 Jul 2014 16:16:33 +0000 (09:16 -0700)]
Add vertex bounds check for distance field rendering.

R=bsalomon@google.com

Author: jvanverth@google.com

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

9 years agoAdd rotated rects benchmarks
bsalomon [Wed, 30 Jul 2014 15:58:20 +0000 (08:58 -0700)]
Add rotated rects benchmarks

R=robertphillips@google.com

Author: bsalomon@google.com

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

9 years agoBring LATC in line with other formats (i.e. write a blitter and
krajcevski [Wed, 30 Jul 2014 15:34:51 +0000 (08:34 -0700)]
Bring LATC in line with other formats (i.e. write a blitter and
an "optimized" compression routine).

R=robertphillips@google.com

Author: krajcevski@google.com

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

9 years agoFix ref counting of cached layer's texture
robertphillips [Wed, 30 Jul 2014 14:31:35 +0000 (07:31 -0700)]
Fix ref counting of cached layer's texture

R=bsalomon@google.com

Author: robertphillips@google.com

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

9 years agoWhitespace change to test the CQ.
rmistry [Wed, 30 Jul 2014 14:24:17 +0000 (07:24 -0700)]
Whitespace change to test the CQ.

(SkipBuildbotRuns)

BUG=skia:
R=bensong@google.com

Author: rmistry@google.com

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

9 years agoMark bleed GM images on GPU configs as baselined but associated with bug 2762
Brian Salomon [Wed, 30 Jul 2014 14:08:09 +0000 (10:08 -0400)]
Mark bleed GM images on GPU configs as baselined but associated with bug 2762

BUG=skia:2762

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

9 years agoRebaseline some images from ignored-tests.txt
Brian Salomon [Wed, 30 Jul 2014 13:40:56 +0000 (09:40 -0400)]
Rebaseline some images from ignored-tests.txt

BUG=skia:

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

9 years agoRebaseline currently failing images. All look better or insignificantly different
Brian Salomon [Wed, 30 Jul 2014 13:27:19 +0000 (09:27 -0400)]
Rebaseline currently failing images. All look better or insignificantly different

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

9 years agoAdd effect caching to distance field text.
jvanverth [Wed, 30 Jul 2014 13:17:59 +0000 (06:17 -0700)]
Add effect caching to distance field text.

This also is a step towards unifying GrDistanceFieldTextureEffect and GrDistanceFieldLCDTextureEffect.

Committed: https://skia.googlesource.com/skia/+/137bac067306c5446bc4f9797bedc3bbaf302822

R=robertphillips@google.com

Author: jvanverth@google.com

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

9 years agoRename GrGLUniformManager to GrGLProgramDataManager
kkinnunen [Wed, 30 Jul 2014 07:04:16 +0000 (00:04 -0700)]
Rename GrGLUniformManager to GrGLProgramDataManager

Rename GrGLUniformManager to GrGLProgramDataManager in anticipation that the
class would be used to manage shader resources that are not uniforms.

This is needed in order to implement NVPR on GLES.

R=bsalomon@google.com

Author: kkinnunen@nvidia.com

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

9 years agoUpdate SKP version to 63
borenet [Wed, 30 Jul 2014 05:57:43 +0000 (22:57 -0700)]
Update SKP version to 63

Automatic commit by the RecreateSKPs bot.

TBR=

Author: borenet@google.com

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

9 years agoIncorporate glStencilThenCover* nvpr methods
cdalton [Tue, 29 Jul 2014 22:25:51 +0000 (15:25 -0700)]
Incorporate glStencilThenCover* nvpr methods

Adds the glStencilThenCover* nvpr methods to GrGLInterface and starts
using them. When drawing multible paths, this will make it so we only
have to send the index/transform data once. It will also allow the
driver to save time internally.

The glStencilThenCover* methods are a newer addition, so they aren't
available on every driver. In the event that they are not present, we
emulate them using the existing glStencil*/glCover* methods.

BUG=skia:
R=markkilgard@gmail.com, bsalomon@google.com

Author: cdalton@nvidia.com

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

9 years agofRight -> fBottom
krajcevski [Tue, 29 Jul 2014 20:19:05 +0000 (13:19 -0700)]
fRight -> fBottom

R=robertphillips@google.com

Author: krajcevski@google.com

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

9 years agoRemove support in the gpu to use hardware AA lines. Current code paths could not...
egdaniel [Tue, 29 Jul 2014 20:15:47 +0000 (13:15 -0700)]
Remove support in the gpu to use hardware AA lines. Current code paths could not reach this code and thus was never used.

The blend opt flag kDisableBlend should now be able to be removed, however it is left in this CL and will removed in its own.

BUG=skia:
R=bsalomon@google.com

Author: egdaniel@google.com

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

9 years agoAdding repeat mode to texture domain
joshualitt [Tue, 29 Jul 2014 19:59:27 +0000 (12:59 -0700)]
Adding repeat mode to texture domain

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

Author: joshualitt@chromium.org

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

9 years agoAdd ability to generate/use FDO profiles for Android
djsollen [Tue, 29 Jul 2014 19:38:25 +0000 (12:38 -0700)]
Add ability to generate/use FDO profiles for Android

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

Author: djsollen@google.com

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

9 years agoadd cubic red option to pathops tool
caryclark [Tue, 29 Jul 2014 19:13:28 +0000 (12:13 -0700)]
add cubic red option to pathops tool

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

Author: caryclark@google.com

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

9 years agoAdd query for block dimensions of a given format
krajcevski [Tue, 29 Jul 2014 18:44:26 +0000 (11:44 -0700)]
Add query for block dimensions of a given format

R=robertphillips@google.com

Author: krajcevski@google.com

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

9 years agoOptimize correct picture in bench_pictures when using --bbh
robertphillips [Tue, 29 Jul 2014 17:37:02 +0000 (10:37 -0700)]
Optimize correct picture in bench_pictures when using --bbh

Almost all PictureRenderer::init implementations have the power to overwrite the picture. Retrieve the correct SkPicture from the renderer for optimization.

R=bsalomon@google.com

Author: robertphillips@google.com

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

9 years agoRevert of Add effect caching to distance field text. (https://codereview.chromium...
bensong [Tue, 29 Jul 2014 17:35:46 +0000 (10:35 -0700)]
Revert of Add effect caching to distance field text. (https://codereview.chromium.org/424103002/)

Reason for revert:
breaking Chrome canary.

Original issue's description:
> Add effect caching to distance field text.
>
> This also is a step towards unifying GrDistanceFieldTextureEffect and GrDistanceFieldLCDTextureEffect.
>
> Committed: https://skia.googlesource.com/skia/+/137bac067306c5446bc4f9797bedc3bbaf302822

R=robertphillips@google.com, jvanverth@google.com
TBR=jvanverth@google.com, robertphillips@google.com
NOTREECHECKS=true
NOTRY=true

Author: bensong@google.com

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

9 years agoRevert of Remove gpu support for willUseHWAALines. (https://codereview.chromium.org...
egdaniel [Tue, 29 Jul 2014 15:52:23 +0000 (08:52 -0700)]
Revert of Remove gpu support for willUseHWAALines. (https://codereview.chromium.org/423943003/)

Reason for revert:
Breaking windows 7 compare gm's

Original issue's description:
> Remove gpu support for willUseHWAALines.
>
> By removing willUseHWAALines, we also no long reference the blend opt flag kDisableBlend so it has been removed
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/e6dfba868c19b00562f8c733b9bf37dd4ec9e68c

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

Author: egdaniel@google.com

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

9 years agoAdd effect caching to distance field text.
jvanverth [Tue, 29 Jul 2014 15:29:50 +0000 (08:29 -0700)]
Add effect caching to distance field text.

This also is a step towards unifying GrDistanceFieldTextureEffect and GrDistanceFieldLCDTextureEffect.

R=robertphillips@google.com

Author: jvanverth@google.com

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

9 years agoenable SKP rendering on 2 platforms, 2 configs each
epoger [Tue, 29 Jul 2014 15:27:11 +0000 (08:27 -0700)]
enable SKP rendering on 2 platforms, 2 configs each

The presence of the expectations file (even if empty) causes the bots to render the SKPs and record results.

2 platforms, 2 configs each should be good for exercising rebaselining tools.

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

Author: epoger@google.com

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

9 years agoSome fixes around GrContext::abandonContext:
bsalomon [Tue, 29 Jul 2014 15:01:52 +0000 (08:01 -0700)]
Some fixes around GrContext::abandonContext:

Fix debug crash when GrResourceCache is destroyed after GrContext is abandoned while GrTextures are in the exlusive list.

Notify debug GL context that GL resources are expected to remain undeleted when context is destroyed after being abandoned.

Stop leaking program cache entries when context is abandoned.

R=robertphillips@google.com

Author: bsalomon@google.com

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

9 years agoRemove gpu support for willUseHWAALines.
egdaniel [Tue, 29 Jul 2014 14:51:02 +0000 (07:51 -0700)]
Remove gpu support for willUseHWAALines.

By removing willUseHWAALines, we also no long reference the blend opt flag kDisableBlend so it has been removed

BUG=skia:
R=bsalomon@google.com

Author: egdaniel@google.com

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

9 years agoAdd function for creating ASTC blitter
krajcevski [Tue, 29 Jul 2014 14:24:58 +0000 (07:24 -0700)]
Add function for creating ASTC blitter

R=robertphillips@google.com

Author: krajcevski@google.com

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

9 years agoPass clip blitter rows preserved request
krajcevski [Tue, 29 Jul 2014 14:21:41 +0000 (07:21 -0700)]
Pass clip blitter rows preserved request

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

Author: krajcevski@google.com

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

9 years agoNow always use Atlas for layer cache
robertphillips [Tue, 29 Jul 2014 14:14:49 +0000 (07:14 -0700)]
Now always use Atlas for layer cache

This is setup for running cluster telemetry tests

R=bsalomon@google.com

Author: robertphillips@google.com

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

9 years agoFix debug output compile error and minor style nits
tomhudson [Tue, 29 Jul 2014 13:52:38 +0000 (06:52 -0700)]
Fix debug output compile error and minor style nits

R=djsollen@google.com, tomhudson@google.com

Author: tomhudson@chromium.org

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

9 years agoFinish removing GrTHashTable
robertphillips [Tue, 29 Jul 2014 13:17:49 +0000 (06:17 -0700)]
Finish removing GrTHashTable

This class is no longer used in Ganesh (in favor of SkTDynamicHash)

R=jvanverth@google.com

Author: robertphillips@google.com

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

9 years agoUse if instead of ifdef SK_SUPPORT_GPU
kkinnunen [Tue, 29 Jul 2014 13:12:49 +0000 (06:12 -0700)]
Use if instead of ifdef SK_SUPPORT_GPU

The SK_SUPPORT_GPU is always defined.

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

Author: kkinnunen@nvidia.com

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

9 years agoAdd plot-based purging to GrLayerCache
robertphillips [Tue, 29 Jul 2014 13:07:19 +0000 (06:07 -0700)]
Add plot-based purging to GrLayerCache

This CL allows a GrPlot full of atlased layer to be purged from the atlas to make room for new layers.

R=jvanverth@google.com

Author: robertphillips@google.com

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

9 years agoUpdate SKP version to 62
borenet [Tue, 29 Jul 2014 07:56:39 +0000 (00:56 -0700)]
Update SKP version to 62

Automatic commit by the RecreateSKPs bot.

TBR=

Author: borenet@google.com

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

9 years agoCleanup: Rename SkOSPath functions.
tfarina [Tue, 29 Jul 2014 02:26:58 +0000 (19:26 -0700)]
Cleanup: Rename SkOSPath functions.

Mostly for brevity and matches better with Python:

Python           | Old C++                 | New C++
os.path.join     | SkOSPath::SkPathJoin    | SkOSPath::Join
os.path.basename | SkOSPath::SkBasename    | SkOSPath::Basename

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

Author: tfarina@chromium.org

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

9 years agoround and bevel hairline rects show the same as miter hairline rects
yunchao.he [Tue, 29 Jul 2014 02:18:49 +0000 (19:18 -0700)]
round and bevel hairline rects show the same as miter hairline rects

So round and bevel hairline rects can generate the vertices and indices the same as miter rects do. The original code behaves the same as bevel rects for round and bevel hairline rects.

This small CL can save (vertices and indices) buffer memory as well as improve performance (draw less triangles).

gm cases show no difference after this CL is applied.

BUG=skia:
R=robertphillips@google.com

Author: yunchao.he@intel.com

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

9 years agoRebaseline needed nvpr gms after text change
cdalton [Mon, 28 Jul 2014 22:39:05 +0000 (15:39 -0700)]
Rebaseline needed nvpr gms after text change

Updates a few nvpr expectations for slight pixel diffs after a change
in the math that positions glyphs.

BUG=skia:
R=jvanverth@google.com, bungeman@google.com

Author: cdalton@nvidia.com

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

9 years agoGeneralize compressed blitter into its own templated class
krajcevski [Mon, 28 Jul 2014 21:14:16 +0000 (14:14 -0700)]
Generalize compressed blitter into its own templated class

R=robertphillips@google.com

Author: krajcevski@google.com

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

9 years agoTest abandoning GL context in dm/nanobench.
bsalomon [Mon, 28 Jul 2014 20:48:36 +0000 (13:48 -0700)]
Test abandoning GL context in dm/nanobench.

Rename GrContext::contextDestroyed to GrContext::abandonContext.

Remove GrContext::resetContext.

R=robertphillips@google.com

Author: bsalomon@google.com

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

9 years agoRevert of Remove relative path to GrColor.h in SkShader.h (https://codereview.chromiu...
bsalomon [Mon, 28 Jul 2014 20:43:02 +0000 (13:43 -0700)]
Revert of Remove relative path to GrColor.h in SkShader.h (https://codereview.chromium.org/422023005/)

Reason for revert:
As Ben suspected, this breaks the chrome build.

Original issue's description:
> Remove relative path to GrColor.h in SkShader.h
>
> Committed: https://skia.googlesource.com/skia/+/939f430f660d26e46116a38d2a8436afbd55dfb9

R=bungeman@google.com, george@mozilla.com
TBR=bungeman@google.com, george@mozilla.com
NOTREECHECKS=true
NOTRY=true

Author: bsalomon@google.com

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

9 years agoRemove relative path to GrColor.h in SkShader.h
bsalomon [Mon, 28 Jul 2014 20:27:35 +0000 (13:27 -0700)]
Remove relative path to GrColor.h in SkShader.h

R=bungeman@google.com, george@mozilla.com

Author: bsalomon@google.com

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

9 years agodisable new test on windows
halcanary [Mon, 28 Jul 2014 17:54:26 +0000 (10:54 -0700)]
disable new test on windows

R=bensong@google.com, djsollen@google.com
TBR=bensong@google.com, djsollen@google.com
CQ_EXTRA_TRYBOTS=tryserver.skia:Test-Win7-ShuttleA-HD2000-x86_64-Release-Trybot
NOTREECHECKS=true

Author: halcanary@google.com

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

9 years agoIf decoder doesn't ouput indexed color, don't check colortable
halcanary [Mon, 28 Jul 2014 15:56:35 +0000 (08:56 -0700)]
If decoder doesn't ouput indexed color, don't check colortable

R=djsollen@google.com, bungeman@google.com
TBR=bungeman@google.com, djsollen@google.com

Author: halcanary@google.com

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

9 years agoSkDiscardablePixelRef returns correct indexed color on relock.
halcanary [Mon, 28 Jul 2014 15:23:55 +0000 (08:23 -0700)]
SkDiscardablePixelRef returns correct indexed color on relock.

R=djsollen@google.com

Author: halcanary@google.com

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

9 years agoOnly lowercase names in Android font config parser.
bungeman [Mon, 28 Jul 2014 15:19:45 +0000 (08:19 -0700)]
Only lowercase names in Android font config parser.

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

Author: bungeman@google.com

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

9 years agoRemove code only used by SkCreateTypefaceForScript which has already been deleted
djsollen [Mon, 28 Jul 2014 14:44:55 +0000 (07:44 -0700)]
Remove code only used by SkCreateTypefaceForScript which has already been deleted

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

Author: djsollen@google.com

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

9 years agodm prints out number of matching skp files
halcanary [Mon, 28 Jul 2014 14:21:24 +0000 (07:21 -0700)]
dm prints out number of matching skp files

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

Author: halcanary@google.com

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

9 years agoRemove redundant helper function as all clients pass locale
Derek Sollenberger [Mon, 28 Jul 2014 14:04:55 +0000 (10:04 -0400)]
Remove redundant helper function as all clients pass locale

R=tomhudson@google.com

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

9 years agoRemove unused code now that the android framework has move this logic elsewhere.
Derek Sollenberger [Mon, 28 Jul 2014 13:54:10 +0000 (09:54 -0400)]
Remove unused code now that the android framework has move this logic elsewhere.

R=tomhudson@google.com

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

9 years agoUpdate SKP version to 60
borenet [Sun, 27 Jul 2014 05:45:10 +0000 (22:45 -0700)]
Update SKP version to 60

Automatic commit by the RecreateSKPs bot.

TBR=

Author: borenet@google.com

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

9 years agoUpdate SKP version to 59
borenet [Sat, 26 Jul 2014 07:32:37 +0000 (00:32 -0700)]
Update SKP version to 59

Automatic commit by the RecreateSKPs bot.

TBR=

Author: borenet@google.com

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

9 years agoAdd vertex color support to distance field text.
jvanverth [Sat, 26 Jul 2014 02:03:34 +0000 (19:03 -0700)]
Add vertex color support to distance field text.

BUG=skia:
R=bsalomon@google.com

Author: jvanverth@google.com

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

9 years agoMove vertex buffer setup out of drawPackedGlyph().
jvanverth [Fri, 25 Jul 2014 23:46:53 +0000 (16:46 -0700)]
Move vertex buffer setup out of drawPackedGlyph().

This gets a very welcome ~10% speedup on my Mac.

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

R=bsalomon@google.com

Author: jvanverth@google.com

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

9 years agoFix thread unsafe mutex initialization.
bungeman [Fri, 25 Jul 2014 22:11:03 +0000 (15:11 -0700)]
Fix thread unsafe mutex initialization.

BUG=skia:2779

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

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

Author: bungeman@google.com

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

9 years agoFix crash in DM/SKPTask
halcanary [Fri, 25 Jul 2014 21:17:35 +0000 (14:17 -0700)]
Fix crash in DM/SKPTask

R=bungeman@google.com

Author: halcanary@google.com

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

9 years agoSend less transform data when drawing text with nvpr
cdalton [Fri, 25 Jul 2014 21:13:57 +0000 (14:13 -0700)]
Send less transform data when drawing text with nvpr

Before this change, GrStencilAndCoverTextContext would send 6-float
affine transforms to drawPaths for every glyph. This updates it to
concat the text scale onto the context matrix, and then only send
2-float translates (or 1-float x-translates when possible).

Also adds a glyph_pos_align test to gm that exercises the newly added
codepaths, and starts ignoring a few gm tests with benign pixel diffs
until we can rebaseline.

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

Author: cdalton@nvidia.com

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

9 years agoFix image decoder memory overwrite bug.
scroggo [Fri, 25 Jul 2014 20:54:43 +0000 (13:54 -0700)]
Fix image decoder memory overwrite bug.

In SkPNGImageDecoder::onDecodeSubset, use png_read_rows to write to
the scratch memory provided. This is what we should have been doing
anyway. Further, writing directly to the bitmap can cause writing
to the wrong memory since the bitmap may not be as big as the
scratch memory in the case of sampling with a short bitmap.

Bug=b/13921093

R=djsollen@google.com

Author: scroggo@google.com

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

9 years agoFix thread unsafe mutex initialization.
bungeman [Fri, 25 Jul 2014 18:52:47 +0000 (11:52 -0700)]
Fix thread unsafe mutex initialization.

BUG=skia:2779
R=robertphillips@google.com, mtklein@google.com, reed@android.com, bsalomon@google.com

Author: bungeman@google.com

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

9 years agoRevert of Move vertex buffer setup out of drawPackedGlyph(). (https://codereview...
jvanverth [Fri, 25 Jul 2014 18:52:16 +0000 (11:52 -0700)]
Revert of Move vertex buffer setup out of drawPackedGlyph(). (https://codereview.chromium.org/414573002/)

Reason for revert:
Breaking Ubuntu and Windows bots.

Original issue's description:
> Move vertex buffer setup out of drawPackedGlyph().
>
> This gets a very welcome ~10% speedup on my Mac.
>
> Committed: https://skia.googlesource.com/skia/+/1d38619389cc1100bd516b9acbf17b7bd42d33ce

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

Author: jvanverth@google.com

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

9 years agoMove vertex buffer setup out of drawPackedGlyph().
jvanverth [Fri, 25 Jul 2014 18:31:13 +0000 (11:31 -0700)]
Move vertex buffer setup out of drawPackedGlyph().

This gets a very welcome ~10% speedup on my Mac.

R=bsalomon@google.com

Author: jvanverth@google.com

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

9 years agoAdded classes SkPatch and SkPatchMesh which help encapsulate and generalize this...
dandov [Fri, 25 Jul 2014 17:44:53 +0000 (10:44 -0700)]
Added classes SkPatch and SkPatchMesh which help encapsulate and generalize this new primitive. The functionality and responsability of each class is better explained in the comments of the files.

Each patch defines a method genMesh that produces the geometry to draw. To do this they receive a SkPatchMesh object which they need to initialize in order to set up how the data is going to be formatted. Later they call function like setColor or pointAt to set the values at a specific index, the SkMeshPatch object handles the indices based on the format and makes it transparent to the client.

Added a slide to sample app to show how to set up this classes and how they interact.

BUG=skia:
R=jvanverth@google.com, egdaniel@google.com, bsalomon@google.com

Author: dandov@google.com

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

9 years agoFix assert in skimage test.
scroggo [Fri, 25 Jul 2014 17:26:32 +0000 (10:26 -0700)]
Fix assert in skimage test.

The width and height may not match expected width and height when
sampleSize is not 1.

R=djsollen@google.com

Author: scroggo@google.com

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

9 years agoSome small ASTC optimizations
krajcevski [Fri, 25 Jul 2014 17:23:42 +0000 (10:23 -0700)]
Some small ASTC optimizations

R=robertphillips@google.com

Author: krajcevski@google.com

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

9 years agoRename GrGpuObject to GrGpuResource
bsalomon [Fri, 25 Jul 2014 15:35:45 +0000 (08:35 -0700)]
Rename GrGpuObject to GrGpuResource

R=robertphillips@google.com

Author: bsalomon@google.com

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

9 years agoFix the other microbench schema
kelvinly [Fri, 25 Jul 2014 15:30:11 +0000 (08:30 -0700)]
Fix the other microbench schema

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

Author: kelvinly@google.com

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

9 years agoAdd preliminary ASTC encoder
krajcevski [Fri, 25 Jul 2014 14:33:01 +0000 (07:33 -0700)]
Add preliminary ASTC encoder

R=robertphillips@google.com

Author: krajcevski@google.com

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

9 years agoMerge GrGpuObject and GrCacheable.
bsalomon [Fri, 25 Jul 2014 14:32:33 +0000 (07:32 -0700)]
Merge GrGpuObject and GrCacheable.

We want to create a new base class for "meta" gr resources as part of the GrResourceCache rewrite and this is an iterim step towards that goal.s

R=robertphillips@google.com

Author: bsalomon@google.com

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

9 years agoAlter Default & Software path renderers to better handle AA hairline paths
robertphillips [Fri, 25 Jul 2014 12:52:38 +0000 (05:52 -0700)]
Alter Default & Software path renderers to better handle AA hairline paths

For some (as yet unknown reason) the guard in ConicPathBench that disables the path_hairline_big_AA_conic case isn't working. As an alternate fix, this CL makes the Default path renderer confess its lack of support for conics and allows the Software path renderer to handle non-AA cases. This will work but the real fix is to enable conics in the Default path renderer.

Here is the situation we're seeing in the path_hairline_big_AA_conic case:

the path is a hairline drawn with AA
the render target is multisampled (so AA on the draw gets disabled)

StencilAndCover path renderer doesn't handle hairlines
AAHairLine path renderer only handles AA paths (but can handle conics)
AAConvexPath renderer also only handles AA paths
Default path renderer only handles non-AA paths (but doesn't handle conics)
Software path renderer - was disallowed from handling non-AA paths

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

Author: robertphillips@google.com

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

9 years agoRebaseline GN & N4 perf trigger flakes
robertphillips [Fri, 25 Jul 2014 11:34:40 +0000 (04:34 -0700)]
Rebaseline GN & N4 perf trigger flakes

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

Author: robertphillips@google.com

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

9 years agoUpdate SKP version to 58
borenet [Fri, 25 Jul 2014 05:58:07 +0000 (22:58 -0700)]
Update SKP version to 58

Automatic commit by the RecreateSKPs bot.

TBR=

Author: borenet@google.com

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

9 years agoAdd initial baselines for varied_text* GMs
Brian Salomon [Thu, 24 Jul 2014 21:23:44 +0000 (17:23 -0400)]
Add initial baselines for varied_text* GMs

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

9 years agoEnable the SSSE3 compile time check on all platforms (4th attempt)
djsollen [Thu, 24 Jul 2014 20:53:56 +0000 (13:53 -0700)]
Enable the SSSE3 compile time check on all platforms (4th attempt)

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

Author: djsollen@google.com

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

9 years agocheck in empty SKP expectations for a single platform
epoger [Thu, 24 Jul 2014 18:46:47 +0000 (11:46 -0700)]
check in empty SKP expectations for a single platform

This should trigger the http://108.170.220.120:10117/builders/Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Debug
to start recording images from the SKPs.

BUG=skia:1942
NOTRY=True
R=rmistry@google.com
TBR=rmistry

Author: epoger@google.com

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

9 years agoroll common DEPS
epoger [Thu, 24 Jul 2014 17:39:01 +0000 (10:39 -0700)]
roll common DEPS

R=borenet@google.com
TBR=borenet

Author: epoger@google.com

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

9 years agoAdd ASTC to list of alpha compressed formats
krajcevski [Thu, 24 Jul 2014 15:16:00 +0000 (08:16 -0700)]
Add ASTC to list of alpha compressed formats

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

Author: krajcevski@google.com

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

9 years agoSkFontMgr for Android.
bungeman [Thu, 24 Jul 2014 15:05:09 +0000 (08:05 -0700)]
SkFontMgr for Android.

Committed: https://skia.googlesource.com/skia/+/4f9a01e03ef3bbe7dd8f9bebdcb3555226087e06

R=djsollen@google.com, tomhudson@google.com, robertphillips@google.com

Author: bungeman@google.com

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

9 years agoskimage expectations for Android-Reference-Unknown
scroggo [Thu, 24 Jul 2014 13:55:31 +0000 (06:55 -0700)]
skimage expectations for Android-Reference-Unknown

Fixes build.

NOTRY=true
R=borenet@google.com, robertphillips@google.com

Author: scroggo@google.com

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

9 years agoSuppress Win8 raster verylargebitmap GM flakes
robertphillips [Thu, 24 Jul 2014 12:30:39 +0000 (05:30 -0700)]
Suppress Win8 raster verylargebitmap GM flakes

BUG=skia:2775

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

Author: robertphillips@google.com

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

9 years agoGet additional DW font metrics when available.
bungeman [Wed, 23 Jul 2014 20:31:06 +0000 (13:31 -0700)]
Get additional DW font metrics when available.

BUG=chromium:395043
R=eae@chromium.org, caryclark@google.com

Author: bungeman@google.com

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

9 years agoRevert of Enable the SSSE3 compile time check on all platforms. (https://codereview...
bungeman [Wed, 23 Jul 2014 18:28:18 +0000 (11:28 -0700)]
Revert of Enable the SSSE3 compile time check on all platforms. (https://codereview.chromium.org/403583002/)

Reason for revert:
This is blocking the roll. Chromium Windows trybots (like win_chromium_x64_rel) are crashing in the SSSE3 code (for example SkCanvasVideoRenderTest.CroppedFrame).

Original issue's description:
> Enable the SSSE3 compile time check on all platforms (3rd attempt)
>
> BUG=skia:2746
>
> Committed: https://skia.googlesource.com/skia/+/933834851f9d48fbd85b728cc92e1f0134bfaa4e

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

Author: bungeman@google.com

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

9 years agoFix some flaky perf triggers
robertphillips [Wed, 23 Jul 2014 11:55:09 +0000 (04:55 -0700)]
Fix some flaky perf triggers

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

Author: robertphillips@google.com

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

10 years agoRevert of SkFontMgr for Android. (https://codereview.chromium.org/414483002/)
robertphillips [Tue, 22 Jul 2014 23:36:13 +0000 (16:36 -0700)]
Revert of SkFontMgr for Android. (https://codereview.chromium.org/414483002/)

Reason for revert:
Reverting to unblock DEPS roll.

Original issue's description:
> SkFontMgr for Android.
>
> Committed: https://skia.googlesource.com/skia/+/4f9a01e03ef3bbe7dd8f9bebdcb3555226087e06

R=djsollen@google.com, tomhudson@google.com, bungeman@google.com
TBR=bungeman@google.com, djsollen@google.com, tomhudson@google.com
NOTREECHECKS=true
NOTRY=true

Author: robertphillips@google.com

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

10 years agoRevert "Update fontmgr expectations."
robertphillips [Tue, 22 Jul 2014 23:34:37 +0000 (16:34 -0700)]
Revert "Update fontmgr expectations."

This reverts commit ff4b56b2d52b0e0042d8b2201fd125a6258dd791.

R=bungeman@gmail.com
TBR=bungeman@gmail.com
NOTRY=true
NOTREECHECKS=true

Author: robertphillips@google.com

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

10 years agoUpdate fontmgr expectations.
bungeman [Tue, 22 Jul 2014 22:21:24 +0000 (18:21 -0400)]
Update fontmgr expectations.

10 years agoNow able to set the localMatrix when creating a SkShader from a SkImage
piotaixr [Tue, 22 Jul 2014 22:02:05 +0000 (15:02 -0700)]
Now able to set the localMatrix when creating a SkShader from a SkImage

BUG=skia:2771
R=junov@chromium.org, reed@chromium.org, bsalomon@chromium.org, bsalomon@google.com

Author: piotaixr@chromium.org

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

10 years agofix android_framework build do to missing library at link time
djsollen [Tue, 22 Jul 2014 20:56:34 +0000 (13:56 -0700)]
fix android_framework build do to missing library at link time

R=scroggo@google.com

Author: djsollen@google.com

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

10 years agoReplace use of GrTHashTable in GrFontCache with SkTDynamicHash.
jvanverth [Tue, 22 Jul 2014 20:25:26 +0000 (13:25 -0700)]
Replace use of GrTHashTable in GrFontCache with SkTDynamicHash.

Searching the font cache for existing text strikes was showing up
as a hotspot on Android. This change reduces that cost.

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

Author: jvanverth@google.com

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

10 years agoRevert "Revert of Use the GrCacheable ID to eliminate the need for notifications...
bsalomon [Tue, 22 Jul 2014 20:09:46 +0000 (13:09 -0700)]
Revert "Revert of Use the GrCacheable ID to eliminate the need for notifications to GrGpuGL when textures and RTs areā€¦ (https://codereview.chromium.org/376703009/)"

This reverts commit 249171e7d29b5559f3eefe9dbd437030bfad3fda.

Uses 32 bit id instead of 64. Renamed instanceID to uniqueID to match existing code.

R=robertphillips@google.com

Author: bsalomon@google.com

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

10 years agoMake nanobench setup configs outside of loop over benchmarks
bsalomon [Tue, 22 Jul 2014 20:09:05 +0000 (13:09 -0700)]
Make nanobench setup configs outside of loop over benchmarks

R=mtklein@google.com

Author: bsalomon@google.com

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