Commit Graph

18686 Commits

Author SHA1 Message Date
caryclark
7544124fb8 fix zero-length tangent
If the end point and the control point are the same, computing
the tangent will result in (0, 0). In this case, use the prior
control point instead.

R=reed@google.com

BUG=skia:4191

Review URL: https://codereview.chromium.org/1311273002
2015-08-25 08:03:01 -07:00
borenet
cf72ed6a3e Skip scaled_tilemodes_npot on Galaxy S4
It's hanging.

BUG=skia:3932

Review URL: https://codereview.chromium.org/1318503003
2015-08-25 06:53:37 -07:00
mtklein
85533968a8 Add build targets for advanced Intel instruction sets (1.5 of 3)
This is a follow-up to https://codereview.chromium.org/1290423007/,
with a couple small changes:

   - turn on AVX and AVX2 for Windows using /arch ('EnabledEnhancedInstructionSet')
   - reformat and de-conditionalize where possible / irrelevant

Picked up this while poking around in libvpx's Chrome GYPs.

And yes, AVX = 3, AVX2 = 5.  Don't even ask what 4 means...

BUG=skia:4117

Review URL: https://codereview.chromium.org/1309253002
2015-08-25 06:30:07 -07:00
djsollen
ab5d5de420 Enable debug builds in the Android framework
Review URL: https://codereview.chromium.org/1297093004
2015-08-24 14:21:23 -07:00
mtklein
fccb77d59e DM: use SkBitmap::reset()
BUG=skia:

Review URL: https://codereview.chromium.org/1310373004
2015-08-24 14:13:29 -07:00
mtklein
a5114d7f26 Have DM manually encode its .png outputs.
This eliminates some variability on various axes: different PNG encoders, different libpng versions, different formats (RGB, indexed), different unpremultiplication, different sRGB tags.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/3cc0dfffb70c0bd08ed8899efcd2e98da86a6ec7

CQ_EXTRA_TRYBOTS=client.skia:Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Debug-Trybot

Review URL: https://codereview.chromium.org/1304443002
2015-08-24 13:27:01 -07:00
borenet
98f7e334e7 Add buildbot_spec info for Appurify bot
BUG=skia:4093

Review URL: https://codereview.chromium.org/1296593003
2015-08-24 12:50:59 -07:00
mtklein
ab374cf894 Explicitly friend ::SkPrivateEffectInitializer to flattenables.
Looks like the -Wmicrosoft warnings in the bug are coming up specificically
because many the effects in SkLightingImageFilter are defined inside an
anonymous namespace (spanning, I think, lines 33-702 today).

BUG=skia:4091

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

Review URL: https://codereview.chromium.org/1311783004
2015-08-24 12:33:19 -07:00
msarett
0e6ff3882d Update giflib to 5.1.1 (AOSP hash)
This also disables warnings in giflib and fixes
compile warnings in icu, in order to fix a skia
bug.

BUG=skia:4220

Review URL: https://codereview.chromium.org/1314633002
2015-08-24 12:00:15 -07:00
mtklein
5141d90796 Add build targets for advanced Intel instruction sets (1 of 3).
CL (1 of 3) adds empty lists in our .gypi,
and builds the files in those empty lists with the appropriate flags.

CL (2 of 3) will have Chrome's GYP and GN files read these lists,
and build them with the appropriate flags.

CL (3 of 3) will add runtime detection and stub files to the lists
with empty Init_sse42(), Init_avx(), Init_avx2() methods.

After that, we should be able to use SSE 4.2, AVX, and AVX2 if desired.

Some motivation:
  - SSE 4.2 adds some sweet string-oriented methods that
    can help us write fast high quality 32-bit hashes.
  - AVX is SSE doubled, e.g. 8 floats or two SkPMFloat at a time.
  - AVX2 is SSE2 doubled, e.g. 8 pixels at a time.

BUG=skia:4117

Review URL: https://codereview.chromium.org/1290423007
2015-08-24 10:32:02 -07:00
joshualitt
26db32bc9a Revert of Modify GrBWFillRectBatch to use GrQuad (patchset #3 id:40001 of https://codereview.chromium.org/1311793002/ )
Reason for revert:
on some bots this patch creates bad diffs

Original issue's description:
> Modify GrBWFillRectBatch to use GrQuad
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/c611b5afbef6df6c02e949fdf092aab2bb7e0e2e

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

Review URL: https://codereview.chromium.org/1313683002
2015-08-24 10:26:01 -07:00
joshualitt
c611b5afbe Modify GrBWFillRectBatch to use GrQuad
BUG=skia:

Review URL: https://codereview.chromium.org/1311793002
2015-08-24 08:43:13 -07:00
robertphillips
80af64519b Update debugger print out of drawImageRect information
Review URL: https://codereview.chromium.org/1311523003
2015-08-24 08:27:38 -07:00
egdaniel
06a7f9c73b Remove unused calcPOIs with color/coverage input.
BUG=skia:

Review URL: https://codereview.chromium.org/1311763003
2015-08-24 06:42:32 -07:00
rmistry
bda7da8ea6 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS

Review URL: https://codereview.chromium.org/1309783003
2015-08-23 00:19:30 -07:00
caryclark
21b998b181 Revert of experiment with zero-length round capped line segments (patchset #4 id:60001 of https://codereview.chromium.org/1309753002/ )
Reason for revert:
More GMs changed than I expected. Will probably affect layout tests as well; reverting until I can verify that the changes are correct.

Original issue's description:
> experiment with zero-length round capped line segments
>
> If the endcap is not butt, draw the endcaps even when the line
> has zero length.
>
> If the dash length is zero, generate a zero length line segment.
>
> Treat a move followed by a close as a move followed by a zero-length
> line.
>
> R=reed@google.com,schenney@google.com
> BUG=422974
>
> Committed: https://skia.googlesource.com/skia/+/dd3c165828fffb369d0f4b13b48381169a0249a9

TBR=reed@google.com,schenney@google.com,schenney@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=422974

Review URL: https://codereview.chromium.org/1304163008
2015-08-21 13:47:06 -07:00
caryclark
dd3c165828 experiment with zero-length round capped line segments
If the endcap is not butt, draw the endcaps even when the line
has zero length.

If the dash length is zero, generate a zero length line segment.

Treat a move followed by a close as a move followed by a zero-length
line.

R=reed@google.com,schenney@google.com
BUG=422974

Review URL: https://codereview.chromium.org/1309753002
2015-08-21 13:27:37 -07:00
joshualitt
1cbdcde911 Fix for copy surface not handling dirty context
BUG=521943

Review URL: https://codereview.chromium.org/1304263003
2015-08-21 11:53:29 -07:00
joshualitt
7f9c9eb91e wire up reduced atlas and zero textblob cache to test
BUG=skia:

Review URL: https://codereview.chromium.org/1300813007
2015-08-21 11:08:00 -07:00
joshualitt
d2b23e0ee6 Standardize BW to NonAA
TBR=bsalomon@google.com, robertphillips@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1310533004
2015-08-21 10:53:34 -07:00
joshualitt
2244c27ea4 fill rect batch refactor into separate batches
BUG=skia:

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

Review URL: https://codereview.chromium.org/1295773003
2015-08-21 10:33:15 -07:00
joshualitt
b6b513b805 Create separate entry points for the various flavors of drawRect
BUG=skia:

Review URL: https://codereview.chromium.org/1308503002
2015-08-21 10:25:18 -07:00
herb
ea73fa529f Add instructions to authenticate for fetch.
BUG=skia:

Review URL: https://codereview.chromium.org/1305143002
2015-08-21 08:38:06 -07:00
robertphillips
850f2d9c09 Return failure if getInputResultsGPU fails in SkXfermodeImageFilter
SkXfermodeImageFilter::filterImageGPU is the only call site that does anything fancy when getInputResultsGPU fails. It seems like we can just return like everyone else (for uniformity).

Review URL: https://codereview.chromium.org/1302033004
2015-08-21 08:24:22 -07:00
caryclark
b4fd893fb0 add old fix for iOS SampleApp
TBR=jvanverth@google.com
BUG=skia:3845

Review URL: https://codereview.chromium.org/1302413003
2015-08-21 08:08:07 -07:00
halcanary
2f0a728e5a GMs: change some GMs to use SkImage over SkBitmap
Also, add GetResourceAsImage() to Resources.h

Motivation:  test drawImage() as much as we test drawBitmap()

Review URL: https://codereview.chromium.org/1306133003
2015-08-21 07:47:23 -07:00
msarett
b30e9d3960 Clean up ifdefs in SkGifCodec
Since codec uses the same version of giflib everywhere,
I believe these are unnecessary.

BUG=skia:

Review URL: https://codereview.chromium.org/1309763002
2015-08-21 06:58:43 -07:00
wangyix
a71170cce8 This code should've been part of the CL that added registerChildProcessor(); without updating fUsesLocalCoords in the parent when a child proc is registered, batching will not work properly.
BUG=skia:4182

Review URL: https://codereview.chromium.org/1308513004
2015-08-21 06:56:49 -07:00
vbuzinov
c5d58f07aa Use stencil ops that don't issue writes whenever possible
Minimize the number of stencil writes by using GL_KEEP whenever possible.
This can positively affect the HW performance of the stencil test.

BUG=skia:3952

Review URL: https://codereview.chromium.org/1288923005
2015-08-21 05:24:24 -07:00
reed
499ababa52 add gm for image->newShader
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1302943004
2015-08-20 12:30:20 -07:00
fmalita
d028180f03 SkCanvas::onDrawPicture() quick-reject
R=reed@google.com,mtklein@google.com

Review URL: https://codereview.chromium.org/1264133003
2015-08-20 12:08:18 -07:00
senorblanco
0abdf766d3 Reland of Implement canComputeFastBounds() for image filters. (patchset #1 id:1 of https://codereview.chromium.org/1300403003/ )
Reason for revert:
The Mac compile issue was fixed here: fdd331a42a

Original issue's description:
> Revert of Implement canComputeFastBounds() for image filters. (patchset #8 id:130001 of https://codereview.chromium.org/1296943002/ )
>
> Reason for revert:
> This causes a syntax error.
>
> http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/87819/steps/compile%20%28with%20patch%29/logs/stdio
>
> Original issue's description:
> > Implement canComputeFastBounds() for image filters.
> >
> > Image filters have never implemented this check, which means that
> > filters which affect transparent black falsely claim they can compute
> > their bounds.
> >
> > Implemented an affectsTransparentBlack() virtual for image
> > filters, and a similar helper function for color filters.
> >
> > This will affect the following GMs: imagefiltersscaled
> > (lighting, perlin noise now filter to clip),
> > colorfilterimagefilter (new test case), imagefiltersclipped
> > (perlin noise now filters to clip).
> >
> > Note: I de-inlined SkPaint::canComputeFastBounds() to avoid adding
> > a dependency from SkPaint.h to SkImageFilter.h.h. Skia benches show
> > no impact from this change, but will watch the perf bots carefully.
> >
> > BUG=4212
> >
> > Committed: https://skia.googlesource.com/skia/+/915881fe743f9a789037695f543bc6ea189cd0cb
>
> TBR=reed@google.com,senorblanco@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=4212
>
> Committed: https://skia.googlesource.com/skia/+/12d8472d31ea5edb636d7d5214db253570115c40

TBR=reed@google.com,herb@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=4212

Review URL: https://codereview.chromium.org/1301823005
2015-08-20 11:10:41 -07:00
caryclark
02833bf055 fix override
TBR=herb@google.com

Review URL: https://codereview.chromium.org/1301763006
2015-08-20 10:53:13 -07:00
caryclark
05424f77fa fix cubic clip in y
Follow on to https://codereview.chromium.org/1299243002/

Clip using a geometric solution if the algebraic solution
fails in Y as well as in X.

If the root finder discovers real roots that are sufficiently
far apart, the root in the range of 0..1 can contain so much
error that it is computed to be slightly smaller than 0 or
larger than 1.

In this case, binary search the mono curve for the actual
answer.

R=reed@google.com

Review URL: https://codereview.chromium.org/1303873003
2015-08-20 10:35:43 -07:00
robertphillips
63926683c5 Add ANGLE workaround to prefer flushes over VRAM usage
On the whole, https://codereview.chromium.org/1286203002/ (Defer flushes if kPreferNoIO is specified) improved performance but it did cause a performance regression on ANGLE. This CL disables the deferral of flushes on ANGLE until we can add a separate incremental flushing mechanism.

TBR=bsalomon@google.com

BUG=skia:4201
BUG=521529

Review URL: https://codereview.chromium.org/1287193008
2015-08-20 09:39:02 -07:00
herb
12d8472d31 Revert of Implement canComputeFastBounds() for image filters. (patchset #8 id:130001 of https://codereview.chromium.org/1296943002/ )
Reason for revert:
This causes a syntax error.

http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/87819/steps/compile%20%28with%20patch%29/logs/stdio

Original issue's description:
> Implement canComputeFastBounds() for image filters.
>
> Image filters have never implemented this check, which means that
> filters which affect transparent black falsely claim they can compute
> their bounds.
>
> Implemented an affectsTransparentBlack() virtual for image
> filters, and a similar helper function for color filters.
>
> This will affect the following GMs: imagefiltersscaled
> (lighting, perlin noise now filter to clip),
> colorfilterimagefilter (new test case), imagefiltersclipped
> (perlin noise now filters to clip).
>
> Note: I de-inlined SkPaint::canComputeFastBounds() to avoid adding
> a dependency from SkPaint.h to SkImageFilter.h.h. Skia benches show
> no impact from this change, but will watch the perf bots carefully.
>
> BUG=4212
>
> Committed: https://skia.googlesource.com/skia/+/915881fe743f9a789037695f543bc6ea189cd0cb

TBR=reed@google.com,senorblanco@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=4212

Review URL: https://codereview.chromium.org/1300403003
2015-08-20 09:28:45 -07:00
borenet
877a52ae61 VisualBenchTest: Write JSON output
BUG=skia:4093

Review URL: https://codereview.chromium.org/1302103002
2015-08-20 09:12:39 -07:00
fmalita
ddbbddabef SkImage method for detecting lazy decoding
BUG=skia:4224
R=reed@google.com

Review URL: https://codereview.chromium.org/1305453007
2015-08-20 08:47:26 -07:00
caryclark
7d173403f4 subdivide path when side-clipping fails
Please review concept; I'm OK not to check this in.

If the root finder fails, subdivide the curve and try again.
This is complicated by the reversed nature of the curves;
maybe it can be simpler, but how to do that escapes me.

R=reed@google.com
BUG=514246

Review URL: https://codereview.chromium.org/1299243002
2015-08-20 08:23:52 -07:00
halcanary
725c620543 SkPDF: Memory improvements for PDF Streams
ΔMEM = -15%
    ΔCPU = -7%

BUG=skia:3030

Review URL: https://codereview.chromium.org/1227913008
2015-08-20 08:09:37 -07:00
primiano
9a5bd7e860 Introduce interface for memory dumps
BUG=chromium:503168

Review URL: https://codereview.chromium.org/1300103004
2015-08-20 08:00:32 -07:00
bungeman
99fe822606 Use static_assert instead of SK_COMPILE_ASSERT.
Now that static_assert is allowed, there is no need to use a non-
standard compile time assertion

Review URL: https://codereview.chromium.org/1306443004
2015-08-20 07:57:52 -07:00
senorblanco
915881fe74 Implement canComputeFastBounds() for image filters.
Image filters have never implemented this check, which means that
filters which affect transparent black falsely claim they can compute
their bounds.

Implemented an affectsTransparentBlack() virtual for image
filters, and a similar helper function for color filters.

This will affect the following GMs: imagefiltersscaled
(lighting, perlin noise now filter to clip),
colorfilterimagefilter (new test case), imagefiltersclipped
(perlin noise now filters to clip).

Note: I de-inlined SkPaint::canComputeFastBounds() to avoid adding
a dependency from SkPaint.h to SkImageFilter.h.h. Skia benches show
no impact from this change, but will watch the perf bots carefully.

BUG=4212

Review URL: https://codereview.chromium.org/1296943002
2015-08-20 07:42:11 -07:00
wangyix
a7f4c435bc For a frag proc, its key will be a concatenation of all its descendant procs' keys in postorder traversal.
BUG=skia:4182

Review URL: https://codereview.chromium.org/1297503007
2015-08-20 07:25:02 -07:00
joshualitt
87e4752fc1 Revert "fill rect batch refactor into separate batches"
This reverts commit ae41b38343.

TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1301203002
2015-08-20 07:22:42 -07:00
robertphillips
2f0dbc761a Update SkLightingShader to support rotation
This also:
makes the SkLightingShader handle normal maps where the rects aren't aligned between the diffuse and normal maps.

adds a light aggregating class (Lights) to SkLightingShader (along with a Builder nested class).

Split out of https://codereview.chromium.org/1261433009/ (Add SkCanvas::drawLitAtlas call)

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

Review URL: https://codereview.chromium.org/1291783003
2015-08-20 05:15:07 -07:00
mtklein
d1c6b7c500 SkColorCubeFilter: require alpha == 0xFF.
This is about a 12% improvement on my desktop, from 134 to 118ms on our bench.

BUG=skia:

Review URL: https://codereview.chromium.org/1295873004
2015-08-19 18:56:50 -07:00
mtklein
3679c1bbe7 Bug fix: we're using SkPMFloat methods on SkColor.
Annoyingly our test bot that forces SkPMFloat_none is a Linux bot using
BGRA SkPMColors, so we'd never notice the bug there.

BUG=skia:

Review URL: https://codereview.chromium.org/1296383006
2015-08-19 17:06:36 -07:00
mtklein
3a30cc1cbb Thou shalt use override consistently.
TBR=herb@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1285973006
2015-08-19 14:01:42 -07:00
herb
ab42ec79d5 Add asserts for shared mutex.
BUG=skia:

Review URL: https://codereview.chromium.org/1285973003
2015-08-19 13:40:12 -07:00