Commit Graph

18668 Commits

Author SHA1 Message Date
hendrikw
885bf09255 skia: add ability to load command_buffer_gles2
BUG=skia:

Review URL: https://codereview.chromium.org/1306823003
2015-08-27 10:38:39 -07:00
ssid
33c594c961 [tracing] Add support for skia caches to dump memory stats
Dump the memory statistics of resource cache and glyph cache using the
SkTraceMemoryDump interface.

BUG=chromium:503168

Review URL: https://codereview.chromium.org/1313793004
2015-08-27 09:23:54 -07:00
bsalomon
8504717550 By default purge resources that haven't been used for 64 flushes
BUG=skia:4258

Review URL: https://codereview.chromium.org/1316233003
2015-08-27 08:47:47 -07:00
halcanary
aaf951d537 nullptr isn't an int; this is what we want
Review URL: https://codereview.chromium.org/1306753006
2015-08-27 08:32:26 -07:00
halcanary
96fcdcc219 Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002

Review URL: https://codereview.chromium.org/1316233002
2015-08-27 07:41:16 -07:00
mtklein
435af2f736 SkColorCubeFilter_opts: start with a statically-initializable zero.
SkPMFloat(0) and SkPMFloat(0,0,0,0) end up with the same value,
but the first goes through math to get there.  The second is a lot more
transparent to the compiler, and  should compile all the way down to
just `xorps xmmN,xmmN` or even be optimized away.

Didn't measure any additional benefit from hoisting the zero outside
the loop and writing `SkPMFloat color = zero;`.

Perf win is <2%.

BUG=skia:

Review URL: https://codereview.chromium.org/1314763007
2015-08-27 06:46:03 -07:00
chinmaygarde
fe495f0bae Fix assertion about GPU memory size when the target is not FBO 0
Review URL: https://codereview.chromium.org/1313783007
2015-08-27 06:36:33 -07:00
bsalomon
ac856c97ac Remove GrStagedProcessor, remove the word Stage as it applies to FPs
Committed: https://skia.googlesource.com/skia/+/24243446cdf7b7e4e132c2a0c387c7723777e0c7

Review URL: https://codereview.chromium.org/1307223004
2015-08-27 06:30:17 -07:00
mdempsky
a04c650459 Remove deprecated usage of SkNEW and SkDELETE
Review URL: https://codereview.chromium.org/1311713003
2015-08-26 15:27:59 -07:00
senorblanco
7b7ecfc046 Fix clipped lighting image filters.
The CPU path for lighting image filters was not adjusting the filter
matrix to accommodate srcOffset, resulting in incorrectly-positioned
lights.  (The GPU path was doing this correctly.)

This change adds a new test case to the imagefiltersclipped GM,
so it will need new baselines.

BUG=skia:

Review URL: https://codereview.chromium.org/1310053004
2015-08-26 14:26:40 -07:00
reed
d5c448fd85 make cacherator thread-safe
hoisted from https://codereview.chromium.org/1282363002 as that CL is going to take a while to finish

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1313423002
2015-08-26 14:16:43 -07:00
mtklein
9c84b112aa Add white variants to TextBench
Might be worth a look.

BUG=skia:

Review URL: https://codereview.chromium.org/1319503003
2015-08-26 13:41:31 -07:00
halcanary
385fe4d4b6 Style Change: SkNEW->new; SkDELETE->delete
DOCS_PREVIEW= https://skia.org/?cl=1316123003

Review URL: https://codereview.chromium.org/1316123003
2015-08-26 13:07:49 -07:00
mtklein
5015176adf trifurcate blit_mask_d32_a8 into _black, _opaque, _general.
We used to split the NEON code this way, and just had one path for SSE.
It's unclear to me testing locally if there's any major win here, but there's at least a small one.

No pixel diffs or even any math changes, just folding constants through.

BUG=skia:4117

Review URL: https://codereview.chromium.org/1304373006
2015-08-26 12:35:14 -07:00
joshualitt
e46cf96ef5 Write a gm to verify append large glyph as path works
BUG=chromium:522846

Review URL: https://codereview.chromium.org/1316443006
2015-08-26 11:19:56 -07:00
bungeman
897640e4ca Add HangingS.ttf to test large flourish caps.
This is designed to allow local testing of the related bug.

BUG=chromium:522846

Review URL: https://codereview.chromium.org/1315983002
2015-08-26 10:44:48 -07:00
caryclark
5cb00a9573 zero-length cap fix
Re-land; layout tests are suppressed and gm differences are understood.
A merge conflict prevented a automatic reland.

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.

TBR=reed@google.com
BUG=422974

Review URL: https://codereview.chromium.org/1314213002
2015-08-26 09:04:55 -07:00
mtklein
a16af21b17 Have SkPicture::willPlayBackBitmaps() count SkImages too.
New unit test fails at head but passes with this patch.

BUG=skia:4225

Review URL: https://codereview.chromium.org/1319723002
2015-08-26 08:14:52 -07:00
joshualitt
bcf33d5c06 Rename GrBWFillRectBatch to GrNonAAFillRectBAtch
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1319733002
2015-08-26 08:10:35 -07:00
rmistry
4bf69f7bbc Revert of Remove GrStagedProcessor, remove the word Stage as it applies to FPs (patchset #6 id:90001 of https://codereview.chromium.org/1307223004/ )
Reason for revert:
Causes bot failures:

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug/builds/1639

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/1702

https://uberchromegw.corp.google.com/i/client.skia.android/builders/Test-Android-GCC-NexusPlayer-GPU-PowerVR-x86-Debug/builds/1223

Original issue's description:
> Remove GrStagedProcessor, remove the word Stage as it applies to FPs
>
> Committed: https://skia.googlesource.com/skia/+/24243446cdf7b7e4e132c2a0c387c7723777e0c7

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

Review URL: https://codereview.chromium.org/1306803003
2015-08-26 06:48:27 -07:00
joshualitt
8cce8f139e Modify GrBWFillRectBatch to use GrQuad
BUG=skia:

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

Review URL: https://codereview.chromium.org/1311793002
2015-08-26 06:23:39 -07:00
mtklein
002c2ce66b stray malloc/free -> sk_malloc/sk_free
BUG=skia:

TBR=bungeman@google.com

Review URL: https://codereview.chromium.org/1315123002
2015-08-26 05:43:22 -07:00
bsalomon
24243446cd Remove GrStagedProcessor, remove the word Stage as it applies to FPs
Review URL: https://codereview.chromium.org/1307223004
2015-08-26 05:39:18 -07:00
bungeman
60e0fee6d4 Remove include of stdlib.h from SkTypes.h.
Unfortunately, immintrin.h (which is also included by SkTypes)
includes xmmintrin.h which includes mm_malloc.h which includes
stdlib.h for malloc even though, from the implementation, it is
difficult to see why.

Fortunately, arm_neon.h does not seem to be involved in such
shenanigans, so building for Android will keep things sane.

TBR=reed@google.com
Doesn't change Skia API, just moves an include.

Review URL: https://codereview.chromium.org/1313203003
2015-08-26 05:15:46 -07:00
rmistry
8d624bd44e Add markdown for Infra troopers
BUG=skia:4251
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1313993002

Review URL: https://codereview.chromium.org/1313993002
2015-08-25 13:39:41 -07:00
caryclark
45398dff71 Reland of ix zero-length tangent (patchset #1 id:1 of https://codereview.chromium.org/1312243002/ )
Reason for revert:
Layout suppression has landed, and verified that Skia gm test changes are correct.

Original issue's description:
> Revert of fix zero-length tangent (patchset #2 id:20001 of https://codereview.chromium.org/1311273002/ )
>
> Reason for revert:
> causes layout test to draw differently -- new drawing is more correct. Reverting until layout test ignore is landed.
>
> Original issue's description:
> > 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
> >
> > Committed: https://skia.googlesource.com/skia/+/7544124fb8ee744f68f549a353f8a9163cd7432d
>
> TBR=reed@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:4191
>
> Committed: https://skia.googlesource.com/skia/+/91298b47c547b2ab4697038c04685af957bd1416

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

Review URL: https://codereview.chromium.org/1320473002
2015-08-25 13:19:06 -07:00
joshualitt
b5fb5af573 Fix for MSAN unintialized value
BUG=524094

Review URL: https://codereview.chromium.org/1320433002
2015-08-25 12:10:54 -07:00
bungeman
afd7c74972 Remove SK_OFFSETOF from SkTypes, clean up offsetof usage.
The motivation for this was to remove SK_OFFSETOF from SkTypes, but
this CL is mostly about cleaning up our use of offsetof generally.

SK_OFFSETOF is removed to SkTypes and added to the two places it is
actually used (for the non standard behavior of finding the offset of
fields in types which are not standard layout).

Older versions of gcc required POD for offsetof to be used without
warning. Newer versions require the more relaxed standard layout.
Now that we no longer build on older versions of gcc, remove the
old warning suppressions.

PODMatrix is renamed to AggregateMatrix. SkMatrix is already POD
(trivial and standard layout). The PODMatrix name implies that the
POD-ness is needed for the offsetof, but it is actually the aggregate
attribute which is needed for compile time constant initialization.
This makes it more obvious that this can be revisited after we can
rely on constexpr constructors.

This also adds skstd::declval since this allows removal of existing
awkward code which casts a constant to a pointer to find the size of
a field.

TBR=reed@google.com
No API change, only removes unused macro.

Review URL: https://codereview.chromium.org/1309523003
2015-08-25 12:05:55 -07:00
joshualitt
0fe04a240b Fix for distance field draw large glyph as paths
BUG=skia:

Review URL: https://codereview.chromium.org/1315933002
2015-08-25 12:05:50 -07:00
mtklein
c64137c245 DM: "wb" (binary mode) may matter on Windows
I suspect we might be doing some funky /n -> /r/n translations without 'b'.
This kills the PNG.

BUG=skia:

NOTREECHECKS=true

Review URL: https://codereview.chromium.org/1303063008
2015-08-25 10:56:08 -07:00
caryclark
91298b47c5 Revert of fix zero-length tangent (patchset #2 id:20001 of https://codereview.chromium.org/1311273002/ )
Reason for revert:
causes layout test to draw differently -- new drawing is more correct. Reverting until layout test ignore is landed.

Original issue's description:
> 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
>
> Committed: https://skia.googlesource.com/skia/+/7544124fb8ee744f68f549a353f8a9163cd7432d

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

Review URL: https://codereview.chromium.org/1312243002
2015-08-25 10:02:46 -07:00
robertphillips
6ec8b7cee7 Speculative valgrind fix
I wasn't able to repro locally but it seems like it has to be this.

Review URL: https://codereview.chromium.org/1309653003
2015-08-25 09:53:10 -07:00
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