platform/upstream/libSkiaSharp.git
8 years agooptimize the disable-caching case for SkImage::readPixels
reed [Tue, 24 Nov 2015 19:44:47 +0000 (11:44 -0800)]
optimize the disable-caching case for SkImage::readPixels

If the client wants no caching, and we haven't already cached it, pass the
caller's dst-buffer directly down to the generator, avoiding the (previous)
extra memcpy.

BUG=skia:4594

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

8 years agoWhitespace change to trigger bots after gsutil change
borenet [Tue, 24 Nov 2015 19:36:09 +0000 (11:36 -0800)]
Whitespace change to trigger bots after gsutil change

TBR=rmistry
BUG=556703

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

8 years agoAdd sniff for rect, oval & rrect to SkCanvas::clipPath
robertphillips [Tue, 24 Nov 2015 17:30:12 +0000 (09:30 -0800)]
Add sniff for rect, oval & rrect to SkCanvas::clipPath

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

8 years agoAdd offscreen mode to visualbench
cdalton [Tue, 24 Nov 2015 17:20:24 +0000 (09:20 -0800)]
Add offscreen mode to visualbench

Replaces "nvpr mode" with "offscreen mode" and a flag to enable/
disable nvpr. Assigns new config names to the various combinations of
flags and begins printing them with the bench results in order to match
nanobench.

BUG=skia:

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

8 years agoOptimize visualbench offscreen blits
cdalton [Tue, 24 Nov 2015 16:54:29 +0000 (08:54 -0800)]
Optimize visualbench offscreen blits

Modifies NvprWrappedBenchmark to present its offscreen canvas via
GrContext::copySurface rather than going through the SkCanvas API.
Only copies a subrectangle the size of the benchmark, not the entire
canvas.

BUG=skia:

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

8 years agoChange XPS to use find and place glyph.
herb [Tue, 24 Nov 2015 16:37:01 +0000 (08:37 -0800)]
Change XPS to use find and place glyph.

Testing:
The testing I did is non-standard. I just compared images using XPS viewer.
They all looked the same, but the XPS device is suffering from bit rot.

BUG=skia:

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

8 years agoSniff out rects, ovals & rrects in SkGpuDevice::drawPath
robertphillips [Tue, 24 Nov 2015 15:56:59 +0000 (07:56 -0800)]
Sniff out rects, ovals & rrects in SkGpuDevice::drawPath

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

8 years agoGenerate list of GPU contexts outside ImageTest tests
kkinnunen [Tue, 24 Nov 2015 15:39:40 +0000 (07:39 -0800)]
Generate list of GPU contexts outside ImageTest tests

Use DEF_GPUTEST_FOR_*_CONTEXT macros to obtain the
test GPU context.

Makes changing the context -related classes easier,
since not all tests need to be changed.

BUG=skia:2992

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

8 years agoCherry pick one more commit into libjpeg-turbo
msarett [Tue, 24 Nov 2015 15:14:34 +0000 (07:14 -0800)]
Cherry pick one more commit into libjpeg-turbo

I forgot to add the last fix for the skip scanlines patch.

BUG=skia:

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

8 years agoUpgrade debugger to print more SkPath info (isOval & isRRect)
robertphillips [Tue, 24 Nov 2015 14:34:50 +0000 (06:34 -0800)]
Upgrade debugger to print more SkPath info (isOval & isRRect)

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

8 years agoskia: Holding onto the image in the benchmark causes issues
hendrikw [Tue, 24 Nov 2015 13:50:23 +0000 (05:50 -0800)]
skia: Holding onto the image in the benchmark causes issues

Skia'a nanobench can hold onto an image, that causes the lifetime
of GrGLGpu to extend past that of the GL interface.

Kill reference to surface and image before killing the interface

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

8 years agoClarify when oval & rrects get devolved to paths in SkGpuDevice/GrDrawContext boundary
robertphillips [Tue, 24 Nov 2015 13:36:02 +0000 (05:36 -0800)]
Clarify when oval & rrects get devolved to paths in SkGpuDevice/GrDrawContext boundary

The GrDrawContext drawOval and drawRRect methods are only called from SkGpuDevice so there is no value in delaying the conversion to a path when dashing is involved.

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

8 years agoAdd SK_BEGIN_REQUIRE_DENSE / SK_END_REQUIRE_DENSE.
mtklein [Tue, 24 Nov 2015 13:35:58 +0000 (05:35 -0800)]
Add SK_BEGIN_REQUIRE_DENSE / SK_END_REQUIRE_DENSE.

Use in on a few examples of things we hash.

BUG=skia:

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

8 years agoWhitespace change to trigger android automerger
Derek Sollenberger [Tue, 24 Nov 2015 13:32:36 +0000 (08:32 -0500)]
Whitespace change to trigger android automerger

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

8 years agoAppeasing the compilers
egdaniel [Mon, 23 Nov 2015 23:29:36 +0000 (15:29 -0800)]
Appeasing the compilers

NOTRY=True
NOTREECHECKS=True

TBR=robertphillips@google.com

BUG=skia:

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

8 years agoFix for recent SrcOver XP Change
egdaniel [Mon, 23 Nov 2015 23:12:23 +0000 (15:12 -0800)]
Fix for recent SrcOver XP Change

NOTREECHECKS=True
NOTRY=True

BUG=skia:

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

8 years agoMake stencil and cover path rendering have more reasonable bounds.
bsalomon [Mon, 23 Nov 2015 22:25:19 +0000 (14:25 -0800)]
Make stencil and cover path rendering have more reasonable bounds.

BUG=skia:

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

8 years agoRemove unecessary GetGlyphIdMetrics call
joshualitt [Mon, 23 Nov 2015 22:09:55 +0000 (14:09 -0800)]
Remove unecessary GetGlyphIdMetrics call

BUG=skia:

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

8 years agoMove command line print above parse in VisualBench
joshualitt [Mon, 23 Nov 2015 21:57:46 +0000 (13:57 -0800)]
Move command line print above parse in VisualBench

TBR=bsalomon@google.com
BUG=skia:

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

8 years agoDon't create a GXPFactory when blend is SrcOver
egdaniel [Mon, 23 Nov 2015 21:20:41 +0000 (13:20 -0800)]
Don't create a GXPFactory when blend is SrcOver

BUG=skia:

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

8 years agoMove GrAtlasTextBatch blob regeneration to template
joshualitt [Mon, 23 Nov 2015 21:08:22 +0000 (13:08 -0800)]
Move GrAtlasTextBatch blob regeneration to template

This will remove the runtime branches.  I don't think it makes the
code any harder to read either

BUG=skia:

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

8 years agoscaling API on SkPixmap
reed [Mon, 23 Nov 2015 20:32:16 +0000 (12:32 -0800)]
scaling API on SkPixmap

BUG=skia:4481

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

8 years agoAdd stroking support to distance field path renderer
jvanverth [Mon, 23 Nov 2015 19:50:02 +0000 (11:50 -0800)]
Add stroking support to distance field path renderer

Also slightly increases sizes of paths accepted for distance field
caching.

Committed: https://skia.googlesource.com/skia/+/5ce76efd1c847308c7bcac17bd87d567c42cd786

Committed: https://skia.googlesource.com/skia/+/73ee6770260dbeeabc4a78eee4f13533f0031211

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

8 years agoRestrict query bounds for reduce clip to dev bounds
bsalomon [Mon, 23 Nov 2015 19:14:20 +0000 (11:14 -0800)]
Restrict query bounds for reduce clip to dev bounds

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

8 years agoSwitch Skia's libjpeg-turbo to 1.4.2
msarett [Mon, 23 Nov 2015 19:09:14 +0000 (11:09 -0800)]
Switch Skia's libjpeg-turbo to 1.4.2

The Android security team wants Android to be on the latest version
of libjpeg-turbo, so Skia should test on this version as well.

This shouldn't affect Gold.

I wouldn't be surprised if this causes a few ASAN/valgrind issues
that we need to fix.

BUG=skia:

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

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

8 years agouse malloc/calloc/free instead of moz_malloc/moz_calloc/moz_free in ports/SkMemory_mo...
lsalzman [Mon, 23 Nov 2015 18:30:14 +0000 (10:30 -0800)]
use malloc/calloc/free instead of moz_malloc/moz_calloc/moz_free in ports/SkMemory_mozalloc.cpp

BUG=skia:4560

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

8 years agoRevert of skstd -> std for unique_ptr (patchset #16 id:300001 of https://codereview...
mtklein [Mon, 23 Nov 2015 17:19:37 +0000 (09:19 -0800)]
Revert of skstd -> std for unique_ptr (patchset #16 id:300001 of https://codereview.chromium.org/1436033003/ )

Reason for revert:
Perf-Mac10.9-Clang-MacMini6.2-CPU-AVX-x86_64-Release has not updated yet.

Original issue's description:
> skstd -> std for unique_ptr
>
> TBR=reed@google.com
> No public API changes.
>
> BUG=skia:4564
>
> Committed: https://skia.googlesource.com/skia/+/755c553c17b82bb5de3d9cc8d3b2a866ff9e9e50
>
> CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot,Build-Ubuntu-GCC-x86_64-Debug-CrOS_Link-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/06189155d987db5c7e69015f6ea87c2168d6a065

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

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

8 years agoskstd -> std for unique_ptr
mtklein [Mon, 23 Nov 2015 17:12:31 +0000 (09:12 -0800)]
skstd -> std for unique_ptr

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

BUG=skia:4564

Committed: https://skia.googlesource.com/skia/+/755c553c17b82bb5de3d9cc8d3b2a866ff9e9e50

CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot,Build-Ubuntu-GCC-x86_64-Debug-CrOS_Link-Trybot

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

8 years agoAvoid devolving to a path when conservative clipping with RRects
robertphillips [Mon, 23 Nov 2015 17:00:05 +0000 (09:00 -0800)]
Avoid devolving to a path when conservative clipping with RRects

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

8 years agoTake span len into account when determining whether gradient is vertical
fmalita [Mon, 23 Nov 2015 16:30:23 +0000 (08:30 -0800)]
Take span len into account when determining whether gradient is vertical

R=reed@google.com

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

8 years agoAdd SkPngChunkReader.
scroggo [Mon, 23 Nov 2015 16:14:40 +0000 (08:14 -0800)]
Add SkPngChunkReader.

This class allows a client of SkCodec to read chunks in the data
stream that are not recognized by libpng. This is used by Android
to specify ninepatch data.

Taken from SkImageDecoder::Peeker. Modify the name of the class
and its method to be more specific to their use. Make
SkImageDecoder::Peeker a subclass of the new class, to help stage
the change in Android.

Add a test to verify that it works.

BUG=skia:4574
BUG=skia:3257

Committed: https://skia.googlesource.com/skia/+/3389e00136188800b98ca69488c0418c374fd78b

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

8 years agoRevert of Add SkPngChunkReader. (patchset #9 id:160001 of https://codereview.chromium...
scroggo [Mon, 23 Nov 2015 15:56:38 +0000 (07:56 -0800)]
Revert of Add SkPngChunkReader. (patchset #9 id:160001 of https://codereview.chromium.org/1040453002/ )

Reason for revert:
Busted Chromium builds:

../../third_party/skia/src/ports/SkImageDecoder_empty.cpp:63:17: error: no type
named 'Peeker' in 'SkImageDecoder'
SkImageDecoder::Peeker* SkImageDecoder::setPeeker(Peeker*) {
~~~~~~~~~~~~~~~~^
../../third_party/skia/src/ports/SkImageDecoder_empty.cpp:63:51: error: unknown
type name 'Peeker'
SkImageDecoder::Peeker* SkImageDecoder::setPeeker(Peeker*) {

Original issue's description:
> Add SkPngChunkReader.
>
> This class allows a client of SkCodec to read chunks in the data
> stream that are not recognized by libpng. This is used by Android
> to specify ninepatch data.
>
> Taken from SkImageDecoder::Peeker. Modify the name of the class
> and its method to be more specific to their use. Make
> SkImageDecoder::Peeker a subclass of the new class, to help stage
> the change in Android.
>
> Add a test to verify that it works.
>
> BUG=skia:4574
> BUG=skia:3257
>
> Committed: https://skia.googlesource.com/skia/+/3389e00136188800b98ca69488c0418c374fd78b

TBR=djsollen@google.com,reed@google.com,msarett@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4574

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

8 years agoRevert of Switch Skia's libjpeg-turbo to 1.4.2 (patchset #2 id:160001 of https:/...
msarett [Mon, 23 Nov 2015 15:25:53 +0000 (07:25 -0800)]
Revert of Switch Skia's libjpeg-turbo to 1.4.2 (patchset #2 id:160001 of https://codereview.chromium.org/1469553002/ )

Reason for revert:
Breaking jpeg decodes everywhere.  I need to look into this.

Original issue's description:
> Switch Skia's libjpeg-turbo to 1.4.2
>
> The Android security team wants Android to be on the latest version
> of libjpeg-turbo, so Skia should test on this version as well.
>
> This shouldn't affect Gold.
>
> I wouldn't be surprised if this causes a few ASAN/valgrind issues
> that we need to fix.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/8e8eda9d4d2e6e65e3339eaaaf8144a4ef6c721c

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

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

8 years agoAdd SkPngChunkReader.
scroggo [Mon, 23 Nov 2015 15:20:57 +0000 (07:20 -0800)]
Add SkPngChunkReader.

This class allows a client of SkCodec to read chunks in the data
stream that are not recognized by libpng. This is used by Android
to specify ninepatch data.

Taken from SkImageDecoder::Peeker. Modify the name of the class
and its method to be more specific to their use. Make
SkImageDecoder::Peeker a subclass of the new class, to help stage
the change in Android.

Add a test to verify that it works.

BUG=skia:4574
BUG=skia:3257

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

8 years agoReview URL: https://codereview.chromium.org/1464593004
bsalomon [Mon, 23 Nov 2015 15:09:50 +0000 (07:09 -0800)]
Review URL: https://codereview.chromium.org/1464593004

8 years agoSwitch Skia's libjpeg-turbo to 1.4.2
msarett [Mon, 23 Nov 2015 14:34:25 +0000 (06:34 -0800)]
Switch Skia's libjpeg-turbo to 1.4.2

The Android security team wants Android to be on the latest version
of libjpeg-turbo, so Skia should test on this version as well.

This shouldn't affect Gold.

I wouldn't be surprised if this causes a few ASAN/valgrind issues
that we need to fix.

BUG=skia:

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

8 years agoFix GLInterfaceValidation test after "Remove GrContextFactory::getGLContext"
kkinnunen [Mon, 23 Nov 2015 13:28:08 +0000 (05:28 -0800)]
Fix GLInterfaceValidation test after "Remove GrContextFactory::getGLContext"

Fix GLInterfaceValidation test crash after "Remove
GrContextFactory::getGLContext" commit.

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

8 years agoRemove GrContextFactory::getGLContext
kkinnunen [Mon, 23 Nov 2015 07:23:53 +0000 (23:23 -0800)]
Remove GrContextFactory::getGLContext

Remove GrContextFactory::getGLContext, it is problematic:

It has the bug of not checking for the context type.

It also is error-prone, since the GL context is not made
current, but it is callers may assume it is current.

It is also not used very much.

Clients can use GrContextFactory::getContextInfo.

BUG=skia:

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

8 years agoInitial version of external_oes texture support and unit test
bsalomon [Sun, 22 Nov 2015 22:51:00 +0000 (14:51 -0800)]
Initial version of external_oes texture support and unit test

Committed: https://skia.googlesource.com/skia/+/27a048700778d4cebfc23301d1780649791b0e03

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

8 years agouse pinned value during lerp for vertical gradients
reed [Sun, 22 Nov 2015 21:00:04 +0000 (13:00 -0800)]
use pinned value during lerp for vertical gradients

slight formatting clean up on associated gm

BUG=skia:

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

8 years agoSkPDF: add `final` keyword to leaf classes
halcanary [Sun, 22 Nov 2015 20:55:04 +0000 (12:55 -0800)]
SkPDF: add `final` keyword to leaf classes

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

8 years agoUpdate SKP version
update-skps [Sun, 22 Nov 2015 20:54:57 +0000 (12:54 -0800)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS

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

8 years agoRevert of Add stroking support to distance field path renderer (patchset #8 id:160001...
fmalita [Sun, 22 Nov 2015 16:45:13 +0000 (08:45 -0800)]
Revert of Add stroking support to distance field path renderer (patchset #8 id:160001 of https://codereview.chromium.org/1460873002/ )

Reason for revert:
Valgrind failures:

http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind/builds/420/steps/dm/logs/stdio

==7062== Use of uninitialised value of size 8
==7062==    at 0x8ECA9A: AADistanceFieldPathBatch::onPrepareDraws(GrVertexBatch::Target*) (SkTDynamicHash.h:94)
==7062==    by 0x90DCF5: GrVertexBatch::onPrepare(GrBatchFlushState*) (GrVertexBatch.cpp:16)
==7062==    by 0x8B592A: GrDrawTarget::prepareBatches(GrBatchFlushState*) (GrBatch.h:100)
==7062==    by 0x8B51EA: GrDrawingManager::flush() (GrDrawingManager.cpp:78)
==7062==    by 0x8AE568: GrContext::flush(int) (GrContext.cpp:191)
==7062==    by 0x6C118A: GrContext::getTestTarget(GrTestTarget*, GrRenderTarget*) (GrTest.cpp:56)
==7062==    by 0x4F4D82: GrDrawingManager::ProgramUnitTest(GrContext*, int) (GLProgramsTest.cpp:360)
==7062==    by 0x4F58EC: test_GLPrograms(skiatest::Reporter*, GrContextFactory*) (GLProgramsTest.cpp:450)
==7062==    by 0x40925E: run_test(skiatest::Test*) (DM.cpp:1022)
==7062==    by 0x40BAC2: run_enclave_and_gpu_tests(SkTArray<Task, false>*) (DM.cpp:1033)
==7062==    by 0x7621A9: SkTaskGroup::wait() (SkTaskGroup.cpp:88)
==7062==    by 0x40B756: dm_main() (DM.cpp:1124)
==7062==    by 0x40BA5F: main (DM.cpp:1211)
==7062==  Uninitialised value was created by a stack allocation
==7062==    at 0x8DB484: GrTest::TestStrokeRec(SkRandom*) (GrTestUtils.cpp:232)
==7062==
{
   <insert_a_suppression_name_here>
   Memcheck:Value8
   fun:_ZN24AADistanceFieldPathBatch14onPrepareDrawsEPN13GrVertexBatch6TargetE
   fun:_ZN13GrVertexBatch9onPrepareEP17GrBatchFlushState
   fun:_ZN12GrDrawTarget14prepareBatchesEP17GrBatchFlushState
   fun:_ZN16GrDrawingManager5flushEv
   fun:_ZN9GrContext5flushEi
   fun:_ZN9GrContext13getTestTargetEP12GrTestTargetP14GrRenderTarget
   fun:_ZN16GrDrawingManager15ProgramUnitTestEP9GrContexti
   fun:_ZL15test_GLProgramsPN8skiatest8ReporterEP16GrContextFactory
   fun:_ZL8run_testPN8skiatest4TestE
   fun:_ZL25run_enclave_and_gpu_testsP8SkTArrayI4TaskLb0EE
   fun:_ZN11SkTaskGroup4waitEv
   fun:_Z7dm_mainv
   fun:main
}

Original issue's description:
> Add stroking support to distance field path renderer
>
> Also slightly increases sizes of paths accepted for distance field
> caching.
>
> Committed: https://skia.googlesource.com/skia/+/5ce76efd1c847308c7bcac17bd87d567c42cd786
>
> Committed: https://skia.googlesource.com/skia/+/73ee6770260dbeeabc4a78eee4f13533f0031211

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

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

8 years agoRevert[2] of "quick-accept clipRect calls"
reed [Sat, 21 Nov 2015 20:39:45 +0000 (12:39 -0800)]
Revert[2] of "quick-accept clipRect calls"

This reverts commit ac8cabd729c75fdf774c0701b6ea7fd3ea5b9382.

BUG=skia:
TBR=

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

8 years agoRevert of Initial version of external_oes texture support and unit test (patchset...
bsalomon [Sat, 21 Nov 2015 04:24:31 +0000 (20:24 -0800)]
Revert of Initial version of external_oes texture support and unit test (patchset #14 id:260001 of https://codereview.chromium.org/1451683002/ )

Reason for revert:
Error wrapping external texture in GrTexture on some devices.

Original issue's description:
> Initial version of external_oes texture support and unit test
>
> Committed: https://skia.googlesource.com/skia/+/27a048700778d4cebfc23301d1780649791b0e03

TBR=joshualitt@google.com,egdaniel@google.com,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

8 years agoInitial version of external_oes texture support and unit test
bsalomon [Sat, 21 Nov 2015 03:34:37 +0000 (19:34 -0800)]
Initial version of external_oes texture support and unit test

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

8 years agoRevert of option to quick-accept clipRect calls (patchset #3 id:40001 of https:/...
bsalomon [Sat, 21 Nov 2015 02:53:07 +0000 (18:53 -0800)]
Revert of option to quick-accept clipRect calls (patchset #3 id:40001 of https://codereview.chromium.org/1458913005/ )

Reason for revert:
Breaking tests on Android:

D/skia    ( 4469):
D/skia    ( 4469): Failures:
D/skia    ( 4469):  ../../../tests/CanvasStateTest.cpp:325 clipStackBounds.width() == WIDTH
D/skia    ( 4469):  ../../../tests/CanvasStateTest.cpp:326 clipStackBounds.height() == HEIGHT
D/skia    ( 4469): 2 failures

http://build.chromium.org/p/client.skia.android/builders/Test-Android-GCC-NexusPlayer-CPU-SSE4-x86-Debug/builds/1387/steps/dm/logs/stdio

Original issue's description:
> option to quick-accept clipRect calls
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/90ba095c459e38581353073826785074b5953b8c

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

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

8 years agoRevert of Make specialized SrcOver XPFactory (patchset #3 id:40001 of https://coderev...
egdaniel [Fri, 20 Nov 2015 23:12:59 +0000 (15:12 -0800)]
Revert of Make specialized SrcOver XPFactory (patchset #3 id:40001 of https://codereview.chromium.org/1455273006/ )

Reason for revert:
breaking some builds

Original issue's description:
> Make specialized SrcOver XPFactory
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/a7006d45217d128a94fa53cb4b827cca79bc7049

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

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

8 years agofix pathops coincidence fuzz bug
caryclark [Fri, 20 Nov 2015 22:06:28 +0000 (14:06 -0800)]
fix pathops coincidence fuzz bug

Simplifying a series of rects with very large bounds
triggers a coincidence bug where, after one of the
intersection points that marks a coincident range
has been deleted, it is referenced.

Both the deletion and reference is (probably) happening
in the SkOpCoincidence::AddExpanded() phase of
HandleCoincidence(), and may signify a bug that could
happen with usable input data, but I haven't been
able to determine that.

For now, abort the Simplify() when the erroneous
condition is detected.

TBR=reed@google.com
BUG=558281

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

8 years agoAdd stroking support to distance field path renderer
jvanverth [Fri, 20 Nov 2015 22:06:14 +0000 (14:06 -0800)]
Add stroking support to distance field path renderer

Also slightly increases sizes of paths accepted for distance field
caching.

Committed: https://skia.googlesource.com/skia/+/5ce76efd1c847308c7bcac17bd87d567c42cd786

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

8 years agoCreate GrGLSLVaryingHandler class for program building
egdaniel [Fri, 20 Nov 2015 22:01:22 +0000 (14:01 -0800)]
Create GrGLSLVaryingHandler class for program building

BUG=skia:

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

8 years agoMake specialized SrcOver XPFactory
egdaniel [Fri, 20 Nov 2015 22:01:07 +0000 (14:01 -0800)]
Make specialized SrcOver XPFactory

BUG=skia:

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

8 years agoTiny linear gradient GM
fmalita [Fri, 20 Nov 2015 21:58:24 +0000 (13:58 -0800)]
Tiny linear gradient GM

A GM to expose issues with vertical linear gradients when points
and/or positions are too close.

R=reed@google.com

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

8 years agoFix UB in SkDivBits
mtklein [Fri, 20 Nov 2015 21:58:18 +0000 (13:58 -0800)]
Fix UB in SkDivBits

This used to:
  DIVBITS_ITER was shifting bits up into the sign bit, which is a no-no.
  This turns numer into a uint32_t to make those defined, and adds a few notes.

  x >= 0 is always true for unsigned x, so we needed a few small logic refactors.

Instead it now:
  Only call SkDivBits if the old behavior is required.
  Usually, just do the divide with /.

BUG=skia:3562

Committed: https://skia.googlesource.com/skia/+/988adddd48322bfa3e3cb0c017cfce71fbbf1123

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

TBR=reed@google.com
No API change.

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

8 years agoAdd SkNx_cast().
mtklein [Fri, 20 Nov 2015 21:53:19 +0000 (13:53 -0800)]
Add SkNx_cast().

SkNx_cast() can cast between any of our vector types,
provided they have the same number of elements.

Any types should work with the default implementation,
and we can drop in specializations as needed, like the
SSE and NEON Sk4f -> Sk4i I included here as an example.

To make this work, I made some internal name changes:
    SkNi<N,T> -> SkNx<N, T>
    SkNf<N>   -> SkNx<N, float>
User aliases (Sk4f, Sk16b, etc.) stay the same.
We can land this first (it's PS1) if that makes things easier.

BUG=skia:
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

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

8 years agoMove glyph choosing to the find and place glyph code.
herb [Fri, 20 Nov 2015 21:53:12 +0000 (13:53 -0800)]
Move glyph choosing to the find and place glyph code.

This duplicates the functionality of the (private)
SkPaint::getDrawCacheProc method into
SkFindAndPlaceGlyph::LookupGlyph. Eventually LookupGlyph
should replace getDrawCacheProc, at which point it should be
removed. The remaining users are gpu and pdf.

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

8 years agoSkFontConfigInterface::createTypeface()
fmalita [Fri, 20 Nov 2015 21:47:55 +0000 (13:47 -0800)]
SkFontConfigInterface::createTypeface()

BUG=524578
R=bungeman@google.com,reed@google.com

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

8 years agoEliminate SkFILE: it always is the same as FILE.
halcanary [Fri, 20 Nov 2015 21:47:49 +0000 (13:47 -0800)]
Eliminate SkFILE: it always is the same as FILE.

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

8 years agooption to quick-accept clipRect calls
reed [Fri, 20 Nov 2015 21:42:47 +0000 (13:42 -0800)]
option to quick-accept clipRect calls

BUG=skia:

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

8 years agoenable conservative raster clipping
reed [Fri, 20 Nov 2015 21:42:42 +0000 (13:42 -0800)]
enable conservative raster clipping

There may be other (better?) ways to enable this. For example, if we queried the device *before* we init our root DeviceCM, we wouldn't need this flag in InitFlags, since the device already has a virtual to opt-in ...

BUG=skia:

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

8 years agoInitialize memory for BitMask and Clip test.
herb [Fri, 20 Nov 2015 21:37:37 +0000 (13:37 -0800)]
Initialize memory for BitMask and Clip test.

BUG=skia:

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

8 years agoFactor out GrAtlasTextBatch fromt GrAtlasTextContext
joshualitt [Fri, 20 Nov 2015 21:37:32 +0000 (13:37 -0800)]
Factor out GrAtlasTextBatch fromt GrAtlasTextContext

BUG=skia:

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

8 years agoPack and align SkStrokeRec to 4-byte boundary.
jvanverth [Fri, 20 Nov 2015 21:32:32 +0000 (13:32 -0800)]
Pack and align SkStrokeRec to 4-byte boundary.

The new key for the distance field path cache will contain an
SkStrokeRec. This change guarantees that we don't have any hidden
padding that has garbage values, thereby preventing apparently
equal keys from hashing to two different values. This also has
the nice effect of reducing the size of SkStrokeRec from 24 bytes
to 16 bytes.

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

8 years agoGenerate list of GPU contexts outside SurfaceTest tests
kkinnunen [Fri, 20 Nov 2015 21:32:24 +0000 (13:32 -0800)]
Generate list of GPU contexts outside SurfaceTest tests

Add support for feeding the tests with contexts directly to the unit
test framework.

This fixes the problem where tests are more complex than needed just in
order to run the test code with multiple backends.

Also makes it possible to change the logic how contexts are
created. Instead of direct numbering, the different testable contexts
may be generated from filtered cross-product of context options. For
example: currently NVPR is a type of context. However, it could be also
an on/off feature of any context. In order to test this kind of context,
the enumeration can not be just of context type. It's simpler
to move the enumeration out of the tests.

A test targeting both normal and GPU backends would look like:

static void test_obj_behavior(skiatest::Reporter* reporter,
    SkObj* obj, [other params] ) {
    ... test with obj and param ..
}
DEF_TEST(ObjBehavior, reporter) {
    for (auto& object : generate_object) {
        for (auto& other_param : generate_other_variant) {
   test_obj_behavior(reporter, object, other_param);
}
    }
}
#if SK_SUPPORT_GPU
DEF_GPUTEST_FOR_ALL_CONTEXTS(ObjBehavior_Gpu, reporter, context) {
    for (auto& object : generate_gpu_object) {
        for (auto& other_param : generate_other_variant) {
   test_obj_behavior(reporter, object, other_param);
}
    }
}
#endif

Uses the feature in SurfaceTests as an example.

Moves SkSurface -related tests from ImageTest to SurfaceTest.

BUG=skia:2992

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

8 years agoRevert of Fix UB in SkDivBits (patchset #4 id:50001 of https://codereview.chromium...
stephana [Fri, 20 Nov 2015 15:13:27 +0000 (07:13 -0800)]
Revert of Fix UB in SkDivBits (patchset #4 id:50001 of https://codereview.chromium.org/1455163004/ )

Reason for revert:
This likely causes unit tests to break in depsroll.

See error:

http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/137723/steps/cc_unittests%20%28with%20patch%29/logs/stdio

 RUN      ] ImageScaledRenderSurface.ImageRenderSurfaceScaled_Software

[4616:3480:1119/165044:41067403:ERROR:pixel_comparator.cc(175)] Percentage of pixels with an error: 11.3967

[4616:3480:1119/165044:41067403:ERROR:pixel_comparator.cc(177)] Percentage of pixels with errors not greater than 0: 0

[4616:3480:1119/165044:41067403:ERROR:pixel_comparator.cc(180)] Average absolute error (excluding identical pixels): R=0.0600565 G=238.962 B=238.934 A=0

[4616:3480:1119/165044:41067403:ERROR:pixel_comparator.cc(185)] Largest absolute error: R=1 G=255 B=255 A=0

[4616:3480:1119/165044:41067403:ERROR:pixel_comparator.cc(203)] Error Bounding Box : 47,47 206x206

[4616:3480:1119/165044:41067419:ERROR:pixel_test_utils.cc(79)] Pixels do not match!

[4616:3480:1119/165044:41067419:ERROR:pixel_test_utils.cc(80)] Actual: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAJ1klEQVR4nO3dwXEbxxaG0eYr76kMaEVAMQJYEUiOQHIEJCMQlQGcAZWBMjAcgZiB4QygCPAWKLloWiIBzgx6/u5zNtp4MVWs+nwB9PQ92W632wIQ4H+1HwBgX4IFxBAsIIZgATEEC4ghWEAMwQJiCBYQQ7CAGIIFxBAsIIZgATEEC4ghWEAMwQJiCBYQQ7CAGIIFxBAsIIZgATEEC4ghWEAMwQJiCBYQQ7CAGIIFxBAsIIZgATEEC4ghWEAMwQJiCBYQQ7CAGIIFxBAsIIZgATEEC4ghWEAMwQJiCBYQQ7CAGIIFxBAsIIZgATEEC4ghWEAMwerFZlP7CWAwwerBZlPK7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3VbN2OO8UWEhSdfbqj8cT9cGwXvBrBFYSNo0Y2x8ccnC6quOToYYuBJCxmPbqhl7nD8qLMh4aFu1v90krApAhQVZfnhk1u+bXV7SxlAIAgvy/PiEWVeFILAAyOAbFgAZBBYAGQQWABkEFgAZBBYAGQQWABkEFgAZBBYAGQQWABkEFgAZBBYAGQQWABkEFgAZBBYAGQQWABkEFgAZBBYAGQQWABkEFgAZBBYAGQQWABkEFgAZBBYAGQQWABkEFgAZBBYAGQQWABkEFgAZBBYAGQQWABkEFgAZBBYAGQQWABkEFgAZBBYAGQQWABkEFgAZBBYAGQQWABkEFgAZBBYAGQQWABkEFgAZBBYAGQQWABkEFgAZ/wfucCe/0zz35wAAAABJRU5ErkJggg==

e:\b\build\slave\win\build\src\cc\test\layer_tree_pixel_test.cc(116): error: Value of: MatchesPNGFile(*result_bitmap_, ref_file_path, *pixel_comparator_)

  Actual: false

Expected: true

[  FAILED  ] ImageScaledRenderSurface.ImageRenderSurfaceScaled_Software (57 ms)

Original issue's description:
> Fix UB in SkDivBits
>
> DIVBITS_ITER was shifting bits up into the sign bit, which is a no-no.
> This turns numer into a uint32_t to make those defined, and adds a few notes.
>
> x >= 0 is always true for unsigned x, so we needed a few small logic refactors.
>
> BUG=skia:3562
>
> Committed: https://skia.googlesource.com/skia/+/988adddd48322bfa3e3cb0c017cfce71fbbf1123
>
> Committed: https://skia.googlesource.com/skia/+/6c7b104b4c08ae2332a6ce3c8c906da4e8c51e5f

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

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

8 years agoImplement SkGifCodec::onSkipScanlines()
msarett [Thu, 19 Nov 2015 23:29:26 +0000 (15:29 -0800)]
Implement SkGifCodec::onSkipScanlines()

This should give a performance improvment because we are able to skip
swizzling pixels.

This should also fix valgrind failures caused by color table lookups
with uninitialized memory.

BUG=skia:4270

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

8 years agoadd SkPath::isRRect
caryclark [Thu, 19 Nov 2015 22:47:43 +0000 (14:47 -0800)]
add SkPath::isRRect

Add helper to track when a round rect was added to a path,
and then return the SkRRect specification that describes it.

Move the implementation for SkPath::RawIter to SkPathRef so it can be used there as well.

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

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

8 years agoAvoid geometric ninepatch if rendertarget has MSAA
joshualitt [Thu, 19 Nov 2015 22:29:30 +0000 (14:29 -0800)]
Avoid geometric ninepatch if rendertarget has MSAA

BUG=skia:4586

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

8 years agoAdd more batch information printouts
robertphillips [Thu, 19 Nov 2015 22:00:02 +0000 (14:00 -0800)]
Add more batch information printouts

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

8 years agoRevert of Add stroking support to distance field path renderer (patchset #7 id:120001...
jvanverth [Thu, 19 Nov 2015 21:18:46 +0000 (13:18 -0800)]
Revert of Add stroking support to distance field path renderer (patchset #7 id:120001 of https://codereview.chromium.org/1460873002/ )

Reason for revert:
Asserting in nanobench and dm.

Original issue's description:
> Add stroking support to distance field path renderer
>
> Also slightly increases sizes of paths accepted for distance field
> caching.
>
> Committed: https://skia.googlesource.com/skia/+/5ce76efd1c847308c7bcac17bd87d567c42cd786

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

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

8 years agoAdd stroking support to distance field path renderer
jvanverth [Thu, 19 Nov 2015 20:47:09 +0000 (12:47 -0800)]
Add stroking support to distance field path renderer

Also slightly increases sizes of paths accepted for distance field
caching.

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

8 years agoRecord concat as Concat.
mtklein [Thu, 19 Nov 2015 20:08:24 +0000 (12:08 -0800)]
Record concat as Concat.

This seems to cause very slight diffs on GMs.
https://gold.skia.org/search2?issue=1462983002&unt=true&query=source_type%3Dgm&master=false

I'm not sure I understand why.
The diffs to at least pictureshader look like improvements.

BUG=skia:4584

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

8 years agoFix nearly-vertical gradient assert
fmalita [Thu, 19 Nov 2015 18:35:34 +0000 (10:35 -0800)]
Fix nearly-vertical gradient assert

Use a SkScalarNearlyZero(dx) test instead of !SkScalarIsFinite(invDx).

R=reed@google.com

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

8 years agoadd SkRecordOptimize2 and an experimental API for more aggressive opts
reed [Thu, 19 Nov 2015 18:31:08 +0000 (10:31 -0800)]
add SkRecordOptimize2 and an experimental API for more aggressive opts

BUG=skia:

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

8 years agoRemove unsigned < signed comparison.
mtklein [Thu, 19 Nov 2015 17:53:21 +0000 (09:53 -0800)]
Remove unsigned < signed comparison.

This triggers -Wsign-compare on some builds.
Not sure why none of those builds have -Werror set.

BUG=skia:4561

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

8 years agoParametric contour start GM
fmalita [Thu, 19 Nov 2015 17:47:12 +0000 (09:47 -0800)]
Parametric contour start GM

A GM to capture the newly added SkPath API.

BUG=chromium:315277
R=caryclark@google.com,reed@google.com

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

8 years agoFix UB in SkDivBits
mtklein [Thu, 19 Nov 2015 17:40:48 +0000 (09:40 -0800)]
Fix UB in SkDivBits

DIVBITS_ITER was shifting bits up into the sign bit, which is a no-no.
This turns numer into a uint32_t to make those defined, and adds a few notes.

x >= 0 is always true for unsigned x, so we needed a few small logic refactors.

BUG=skia:3562

Committed: https://skia.googlesource.com/skia/+/988adddd48322bfa3e3cb0c017cfce71fbbf1123

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

8 years agoFix GpuDrawPathTest on ANGLE and enable it
kkinnunen [Thu, 19 Nov 2015 17:37:02 +0000 (09:37 -0800)]
Fix GpuDrawPathTest on ANGLE and enable it

Fix GpuDrawPathTest on ANGLE by avoiding a crash
if MSAA surface creation fails.

Enable the test.

BUG=skia:4581

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

8 years agoRevert float xfermodes back to Sk4f (from Sk8f).
mtklein [Thu, 19 Nov 2015 17:10:33 +0000 (09:10 -0800)]
Revert float xfermodes back to Sk4f (from Sk8f).

Generally this was a performance win, even on devices without AVX due
to unrolling, but on ARM+NEON it looks like that unrolling hurt a bit.

    while (...) { blend a pixel }
~~~>
    while (...) { blend two pixels }
    if (n % 2) { blend last pixel }

BUG=chromium:555278
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

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

8 years agoFix BMP RLE bug: attempt 2
msarett [Thu, 19 Nov 2015 16:59:12 +0000 (08:59 -0800)]
Fix BMP RLE bug: attempt 2

BUG=skia:

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

8 years agoModernize SkRecordPattern.h
mtklein [Thu, 19 Nov 2015 16:53:27 +0000 (08:53 -0800)]
Modernize SkRecordPattern.h

  - Fold Or, Or3, Or4 into one flexible Or.
  - Fold Pattern1...Pattern7 into one flexible Pattern.
  - Rename Star Greedy

Still fighting with a flexible get<N>() method instead of first, second, third, etc.

BUG=skia:

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

8 years agoFix maybe unintialized warning for GrAutoLocaleSetter
kkinnunen [Thu, 19 Nov 2015 16:45:30 +0000 (08:45 -0800)]
Fix maybe unintialized warning for GrAutoLocaleSetter

In function void test_GLPrograms(skiatest::Reporter*, GrContextFactory*):
../../../src/gpu/GrAutoLocaleSetter.h:47:35: error:
als.GrAutoLocaleSetter::fOldLocale may be used uninitialized in this
function [-Werror=maybe-uninitialized]

From Build-Ubuntu-GCC-x86_64-Release-Trybot

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

8 years agoadd --write option to dump_record
reed [Thu, 19 Nov 2015 16:18:04 +0000 (08:18 -0800)]
add --write option to dump_record

BUG=skia:

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

8 years agoChange prealloc number of child FPs be 1 rather than 2
Brian Salomon [Thu, 19 Nov 2015 16:04:48 +0000 (11:04 -0500)]
Change prealloc number of child FPs be 1 rather than 2

TBR=joshualitt@google.com

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

8 years agoPreallocate room for 2 child processors in FPs
bsalomon [Thu, 19 Nov 2015 16:02:09 +0000 (08:02 -0800)]
Preallocate room for 2 child processors in FPs

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

8 years agoShift up bottom path in smallpaths GM.
jvanverth [Thu, 19 Nov 2015 15:46:07 +0000 (07:46 -0800)]
Shift up bottom path in smallpaths GM.

This stops it from being cut off in the image.

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

8 years agoUnit test for conic weight GrPath key collision
fmalita [Thu, 19 Nov 2015 15:28:50 +0000 (07:28 -0800)]
Unit test for conic weight GrPath key collision

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

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

8 years agoAdd SkRecord::defrag().
mtklein [Thu, 19 Nov 2015 15:23:49 +0000 (07:23 -0800)]
Add SkRecord::defrag().

Called by SkRecordOptimize(), this moves all the NoOps to the end and
slices them off.

This implementation with std::remove_if() is linear and doesn't malloc.

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

BUG=skia:

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

8 years agoMove glsl onto EmitArgs struct for emitCode
egdaniel [Thu, 19 Nov 2015 15:23:45 +0000 (07:23 -0800)]
Move glsl onto EmitArgs struct for emitCode

BUG=skia:

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

8 years agoFix leak in drawBitmapNine
egdaniel [Thu, 19 Nov 2015 14:52:50 +0000 (06:52 -0800)]
Fix leak in drawBitmapNine

NOTREECHECKS=true

BUG=skia:

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

8 years ago[Reland] Fix NVPR assert for equivalent ovals
fmalita [Thu, 19 Nov 2015 04:12:56 +0000 (20:12 -0800)]
[Reland] Fix NVPR assert for equivalent ovals

For oval paths, GrPath ignores the point order and only uses the bounds
when building its key.  This is problematic because

1) point order is important when dashing
2) GrStencilAndCoverPathRenderer asserts that the lookup SkPath is equal
   to the cached SkPath - which is not the case for ovals with different
   directions/different point order.

With this CL we no longer use the reduced oval key when dashing, and
instead fall through to the more general path cases.  The assert is
adjusted to accommodate "equivalent" ovals (when not dashing).

Also re-enabled & updated the GpuDrawPath unit test (disabled in
https://codereview.chromium.org/1456463003/, presumably due to the use
of uninitialized SkRects).

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

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

8 years agoMake SkTLList prealloc its first block of nodes
bsalomon [Thu, 19 Nov 2015 03:48:50 +0000 (19:48 -0800)]
Make SkTLList prealloc its first block of nodes

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

8 years agoMake block size a template parameter of SkTLList
bsalomon [Thu, 19 Nov 2015 03:01:12 +0000 (19:01 -0800)]
Make block size a template parameter of SkTLList

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

8 years agoRevert SkBlitMask_opts.h back to hand-coded NEON.
mtklein [Thu, 19 Nov 2015 02:59:18 +0000 (18:59 -0800)]
Revert SkBlitMask_opts.h back to hand-coded NEON.

SkPx has triggered a bunch of small (2-9%) regressions on NEON devices.

BUG=skia:
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

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

8 years agoRevert of Fix NVPR assert for equivalent ovals (patchset #1 id:1 of https://coderevie...
stephana [Thu, 19 Nov 2015 02:35:56 +0000 (18:35 -0800)]
Revert of Fix NVPR assert for equivalent ovals (patchset #1 id:1 of https://codereview.chromium.org/1457073002/ )

Reason for revert:
Causes failures on Android and Win8:

...
( 137/1245MB      9) 73.9ms unit test  GpuLayerCachec:\0\build\slave\workdir\build\skia\include\private\skuniqueptr.h:164: failed assertion "get() != pointer()"

Caught exception 2147483651 EXCEPTION_BREAKPOINT
...

Original issue's description:
> Fix NVPR assert for equivalent ovals
>
> For oval paths, GrPath ignores the point order and only uses the bounds
> when building its key.  This is problematic because
>
> 1) point order is important when dashing
> 2) GrStencilAndCoverPathRenderer asserts that the lookup SkPath is equal
>    to the cached SkPath - which is not the case for ovals with different
>    directions/different point order.
>
> With this CL we no longer use the reduced oval key when dashing, and
> instead fall through to the more general path cases.  The assert is
> adjusted to accommodate "equivalent" ovals (when not dashing).
>
> Also re-enabled & updated the GpuDrawPath unit test (disabled in
> https://codereview.chromium.org/1456463003/, presumably due to the use
> of uninitialized SkRects).
>
> R=bsalomon@google.com,robertphillips@google.com,cdalton@nvidia.com
>
> Committed: https://skia.googlesource.com/skia/+/f9b1577d763988ebc043ddabf80674f71571ecff

TBR=bsalomon@google.com,cdalton@nvidia.com,robertphillips@google.com,fmalita@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

8 years agosimplify insertion methods for SkTLList
bsalomon [Wed, 18 Nov 2015 22:11:08 +0000 (14:11 -0800)]
simplify insertion methods for SkTLList

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

8 years agoFix NVPR assert for equivalent ovals
fmalita [Wed, 18 Nov 2015 22:07:13 +0000 (14:07 -0800)]
Fix NVPR assert for equivalent ovals

For oval paths, GrPath ignores the point order and only uses the bounds
when building its key.  This is problematic because

1) point order is important when dashing
2) GrStencilAndCoverPathRenderer asserts that the lookup SkPath is equal
   to the cached SkPath - which is not the case for ovals with different
   directions/different point order.

With this CL we no longer use the reduced oval key when dashing, and
instead fall through to the more general path cases.  The assert is
adjusted to accommodate "equivalent" ovals (when not dashing).

Also re-enabled & updated the GpuDrawPath unit test (disabled in
https://codereview.chromium.org/1456463003/, presumably due to the use
of uninitialized SkRects).

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

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

8 years agoRevert of Fix UB in SkDivBits (patchset #2 id:10002 of https://codereview.chromium...
mtklein [Wed, 18 Nov 2015 22:01:07 +0000 (14:01 -0800)]
Revert of Fix UB in SkDivBits (patchset #2 id:10002 of https://codereview.chromium.org/1455163004/ )

Reason for revert:
Need to reland with #define guards for tiny layout test changes. (Yikes!)

Original issue's description:
> Fix UB in SkDivBits
>
> DIVBITS_ITER was shifting bits up into the sign bit, which is a no-no.
> This turns numer into a uint32_t to make those defined, and adds a few notes.
>
> x >= 0 is always true for unsigned x, so we needed a few small logic refactors.
>
> BUG=skia:3562
>
> Committed: https://skia.googlesource.com/skia/+/988adddd48322bfa3e3cb0c017cfce71fbbf1123

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

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

8 years agoIn BUILD.public, remove compile-time dependency on GL.
benjaminwagner [Wed, 18 Nov 2015 21:48:47 +0000 (13:48 -0800)]
In BUILD.public, remove compile-time dependency on GL.

BUG=skia:

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

8 years agoAdd small paths GM
jvanverth [Wed, 18 Nov 2015 21:40:15 +0000 (13:40 -0800)]
Add small paths GM

Used to testing caching and quality of distance field paths.

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