Commit Graph

16495 Commits

Author SHA1 Message Date
mtklein
22712569a5 Clean up poppler code.
We're not actually using it.

BUG=skia:3362
DOCS_PREVIEW= https://skia.org/?cl=1002493002

Review URL: https://codereview.chromium.org/1002493002
2015-03-11 11:55:14 -07:00
jvanverth
cb251f1d0a Adjust atlas sizes to fix Mali400 precision issues
The previous change to atlas sizes introduced an issue where texture
coordinates for glyphs stored on the right side of the atlas were being
computed in an imprecise manner on Mali400 chips.

The only reasonable fix appears to be to use power-of-two texture sizes.
This widens the glyph atlas to the next power of 2 (or 2048) for A8 glyphs
only, and widens each GrPlot by 2x as well. By doing this, we can fit 3-4 large
distance field glyphs into a single GrPlot, which gives us 100-128 total large
glyphs at one time.

The 565 and 8888 glyph atlases are kept in their original size to preserve
space.

BUG=skia:3523

Review URL: https://codereview.chromium.org/994303003
2015-03-11 11:18:11 -07:00
robertphillips
6ba791f661 Fix debugger's overdraw color filter
The colors seen in the overdraw color filter are not guaranteed to remain the colors from its own table. Looping through the table to find the old overdraw level is error prone and expensive.

Review URL: https://codereview.chromium.org/997913002
2015-03-11 11:18:00 -07:00
qiankun.miao
1c762161d8 Use proper SkFDot6 instead of int
BUG=skia:

Review URL: https://codereview.chromium.org/960353005
2015-03-11 11:12:59 -07:00
dml
f45796ee0e Fix a memory leak when decoding corrupted indexed PNGs.
Commit to branch refs/heads/png-leak

BUG=skia:3457

Committed: https://skia.googlesource.com/skia/+/561a1ca9559a1ea7589ab93350124284fcef3315

Review URL: https://codereview.chromium.org/951663002
2015-03-11 11:12:54 -07:00
reed
180aec4345 Simplify clip inside a layer -- will be applied in restore
This reverts commit 4412465089.

NOTREECHECKS=True
BUG=skia:

Review URL: https://codereview.chromium.org/996233002
2015-03-11 10:39:05 -07:00
joshualitt
d5b98404ec fix for valgrind preAbandonGpuContext
NOTREECHECKS=true

BUG=skia:

Review URL: https://codereview.chromium.org/997923002
2015-03-11 09:11:19 -07:00
reed
9b3aa54bc9 optimization/fix: dirty the clip-bounds when we mod the clip in savelayer
Before the fix, we could use a stale cache of the clipbounds in quickReject. Often this could return false negatives, meaning we would try to draw more than we should (it would eventually be really clipped). Occasionally this could also report false positives (if the layer were outside of the normal canvas bounds, e.g. a layer with an offset imagefilter).

BUG=skia:
NOTREECHECKS=True

Review URL: https://codereview.chromium.org/983243003
2015-03-11 08:47:12 -07:00
mtklein
cc99dbc57b Skip WritePixels on GalaxyS3
TBR=bsalomon@google.com

NOTREECHECKS=true

BUG=skia:

Review URL: https://codereview.chromium.org/994343003
2015-03-11 08:43:43 -07:00
mtklein
a6def476e9 DM: show skipped and --blacklist notes only in verbose mode.
In non-verbose mode, these notes will spin away too fast to read anyway,
unless they're so long they end up leaving junk on the terminal.

NOTREECHECKS=true

BUG=skia:

Review URL: https://codereview.chromium.org/989083002
2015-03-11 07:19:15 -07:00
reed
4412465089 Revert of simplify clip inside a layer -- will be applied in restore (patchset #2 id:20001 of https://codereview.chromium.org/997763002/)
Reason for revert:
slight rebaselines needed in layouttests

http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/51755

Original issue's description:
> simplify clip inside a layer -- will be applied in restore
>
> BUG=skia:
> TBR=
> NOTREECHECKS=True
>
> speculative land to measure performance
>
> Committed: https://skia.googlesource.com/skia/+/c275493d4247a2c5ae845d340c4297258f4684bc

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

Review URL: https://codereview.chromium.org/997103002
2015-03-11 04:02:20 -07:00
reed
c275493d42 simplify clip inside a layer -- will be applied in restore
BUG=skia:
TBR=
NOTREECHECKS=True

speculative land to measure performance

Review URL: https://codereview.chromium.org/997763002
2015-03-10 19:57:10 -07:00
reed
96e657d0e1 remove unused params to DeviceCM constructor
BUG=skia:
TBR=
NOTREECHECKS=True

Review URL: https://codereview.chromium.org/999593002
2015-03-10 17:30:07 -07:00
mtklein
4e2d3be035 Don't run ResourceCache unit test on NexusPlayer.
TBR=bsalomon@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/992203005
2015-03-10 11:55:18 -07:00
jvanverth
be03bb6cef Adjust distance field glyph and font atlas sizes to maximize storage.
Because of high DPI devices, we need more room in the glyph
atlas for the larger glyphs. These settings will allow 4 of
the distance field glyphs to fit in one Plot (increasing
the storage from 32 large glyphs to 128), and still permit
us to handle glyphs up to a 312 point size.

BUG=chromium:458791

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

Committed: https://skia.googlesource.com/skia/+/07e245ffe1ca7f781590fcff904c2922c2269781

Review URL: https://codereview.chromium.org/986343002
2015-03-10 11:53:39 -07:00
jvanverth
c41df8d92d Revert of Adjust distance field glyph and font atlas sizes to maximize storage. (patchset #8 id:140001 of https://codereview.chromium.org/986343002/)
Reason for revert:
Still seeing bad text rendering in GMs with Nexus 2 and Nexus 3.

Original issue's description:
> Adjust distance field glyph and font atlas sizes to maximize storage.
>
> Because of high DPI devices, we need more room in the glyph
> atlas for the larger glyphs. These settings will allow 4 of
> the distance field glyphs to fit in one Plot (increasing
> the storage from 32 large glyphs to 128), and still permit
> us to handle glyphs up to a 312 point size.
>
> BUG=chromium:458791
>
> Committed: https://skia.googlesource.com/skia/+/d2737ad7dd8f4ea94a74034027014fd3d78923cb
>
> Committed: https://skia.googlesource.com/skia/+/07e245ffe1ca7f781590fcff904c2922c2269781

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

Review URL: https://codereview.chromium.org/995863002
2015-03-10 08:23:07 -07:00
mtklein
7e78f3d0e7 Fix bug in Valgrind flags config.
'GPU' is in 'Test-Ubuntu14-GCE-NoGPU-x86_64-Release-Valgrind_CPU' too.

This means we're building it in no-GPU mode, and running it in no-CPU mode.
At least it finishes quite quickly this way (~10 seconds).

BUG=skia:

Review URL: https://codereview.chromium.org/992203004
2015-03-10 08:03:26 -07:00
jvanverth
07e245ffe1 Adjust distance field glyph and font atlas sizes to maximize storage.
Because of high DPI devices, we need more room in the glyph
atlas for the larger glyphs. These settings will allow 4 of
the distance field glyphs to fit in one Plot (increasing
the storage from 32 large glyphs to 128), and still permit
us to handle glyphs up to a 312 point size.

BUG=chromium:458791

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

Review URL: https://codereview.chromium.org/986343002
2015-03-10 06:53:28 -07:00
skia.buildbots
eb1514154d Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=

Review URL: https://codereview.chromium.org/991263002
2015-03-10 06:20:37 -07:00
rmistry
ba98761320 Add pageset for theverge
BUG=skia:3234

TBR=robertphillips
NOTRY=true
NOPRESUBMIT=true

Review URL: https://codereview.chromium.org/994923002
2015-03-10 05:00:08 -07:00
kkinnunen
732a92db49 Increase maximum gpu resources from 1024 to 4096
Pictures with many drawn paths benefit from the increase of the
count. As an example, chalkboard testcase has ~2500 paths, tiger
has ~300.

Bigger objects, like textures, tend to be limited by the cache
byte limit, not item count.

Review URL: https://codereview.chromium.org/991783003
2015-03-09 22:12:29 -07:00
bungeman
167eb17cd6 Use SkTMin and SkTMax for clamp/pin.
This changes SkScalarClampMax and SkScalarPin to use SkTMin and SkTMax.
This change allows compilers to more easily transform these operations
into fast max/min operarations as opposed to conditional branches.

Review URL: https://codereview.chromium.org/993593002
2015-03-09 13:40:15 -07:00
jvanverth
a548593a65 Revert of Adjust distance field glyph and font atlas sizes to maximize storage. (patchset #5 id:80001 of https://codereview.chromium.org/986343002/)
Reason for revert:
There's some weirdness with Tegra2 and Tegra3 GMs (Xoom and Nexus7) that may be related to this.

Original issue's description:
> Adjust distance field glyph and font atlas sizes to maximize storage.
>
> Because of high DPI devices, we need more room in the glyph
> atlas for the larger glyphs. These settings will allow 4 of
> the distance field glyphs to fit in one Plot (increasing
> the storage from 32 large glyphs to 128), and still permit
> us to handle glyphs up to a 312 point size.
>
> BUG=chromium:458791
>
> Committed: https://skia.googlesource.com/skia/+/d2737ad7dd8f4ea94a74034027014fd3d78923cb

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

Review URL: https://codereview.chromium.org/986333005
2015-03-09 12:17:07 -07:00
bsalomon
5baedd6378 Use global GrMemoryPools protected by mutex for GrProcessor/GrBatch
BUG=chromium:464892

Review URL: https://codereview.chromium.org/991943002
2015-03-09 12:15:53 -07:00
jvanverth
d2737ad7dd Adjust distance field glyph and font atlas sizes to maximize storage.
Because of high DPI devices, we need more room in the glyph
atlas for the larger glyphs. These settings will allow 4 of
the distance field glyphs to fit in one Plot (increasing
the storage from 32 large glyphs to 128), and still permit
us to handle glyphs up to a 312 point size.

BUG=chromium:458791

Review URL: https://codereview.chromium.org/986343002
2015-03-09 09:45:40 -07:00
egdaniel
86e31a1980 Allow user to pass in a path for extra dependencies for gpu
BUG=skia:

Review URL: https://codereview.chromium.org/986363002
2015-03-09 09:40:42 -07:00
fmalita
33a4582a25 Remove SK_SUPPORT_LEGACY_ADDOVAL
The flad has been retired from Chromium.

BUG=chromium:458898
R=reed@google.com

Review URL: https://codereview.chromium.org/994533002
2015-03-09 09:40:37 -07:00
borenet
13e51f91ef Run Valgrind bots with --nogpu and --nocpu as appropriate
BUG=skia:3506
NOPRESUBMIT=true

Review URL: https://codereview.chromium.org/986583004
2015-03-09 06:59:16 -07:00
reed
1b110d6bf4 Revert of use colorfilter instead of imagefilter when possible (patchset #6 id:100001 of https://codereview.chromium.org/966233002/)
Reason for revert:
Lots of PDF failures -- need to investigate

Original issue's description:
> use colorfilter instead of imagefilter when possible
>
> big speed win w/ nanobench --match colorfilter_
>
> BUG=skia:
> TBR=
>
> Will require rebaselining, so landing temporarily to trigger layouttests.
>
> Committed: https://skia.googlesource.com/skia/+/f641bd076d29666a5d2a10d5384e4924b0a0e524

TBR=sugoi@google.com,senorblanco@google.com,bsalomon@google.com,reed@google.com,senorblanco@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/991693002
2015-03-08 18:47:13 -07:00
reed
f641bd076d use colorfilter instead of imagefilter when possible
big speed win w/ nanobench --match colorfilter_

BUG=skia:
TBR=

Will require rebaselining, so landing temporarily to trigger layouttests.

Review URL: https://codereview.chromium.org/966233002
2015-03-08 18:34:37 -07:00
reed
cedc36f18b Use ComposColorFilter to collaps hierarchy (when possible).
Clarify asColorFilter ...
1. Rename to isColorFilterNode for DAG reduction
2. Add asAColorFilter for removing the imagefilter entirely (future use-case)

Need layouttest rebaseline suppression before this can land in chrome...
https://codereview.chromium.org/984023004/

BUG=skia:

Review URL: https://codereview.chromium.org/982933002
2015-03-08 04:42:52 -07:00
mtklein
82966b5eed Revert of For consistency, use our homebrew zlib everywhere possible. (patchset #6 id:100001 of https://codereview.chromium.org/971673005/)
Reason for revert:
Reverting in case this is the cause of the non-Windows failures.

Original issue's description:
> For consistency, use our homebrew zlib everywhere possible.
>
> This switches when we build our own zlib from "just Windows" to "everyone, but
> not Android framework of course".
>
> I tested this by building DM for my Mac and for an Android bot config.
> It took minor tweaks to the GYP to get ARM builds working.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/5a8f2257b0b0f954fb74f65e7ea3ada772ed9240

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

Review URL: https://codereview.chromium.org/989873002
2015-03-07 07:47:51 -08:00
reed
8371b7e8ef Revert of Fix a memory leak when decoding corrupted indexed PNGs. (patchset #2 id:20001 of https://codereview.chromium.org/951663002/)
Reason for revert:
speculative revert due to many failures in tree

Original issue's description:
> Fix a memory leak when decoding corrupted indexed PNGs.
> Commit to branch refs/heads/png-leak
>
> BUG=skia:3457
>
> Committed: https://skia.googlesource.com/skia/+/561a1ca9559a1ea7589ab93350124284fcef3315

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

Review URL: https://codereview.chromium.org/980203005
2015-03-07 06:05:51 -08:00
dml
561a1ca955 Fix a memory leak when decoding corrupted indexed PNGs.
Commit to branch refs/heads/png-leak

BUG=skia:3457

Review URL: https://codereview.chromium.org/951663002
2015-03-06 16:25:28 -08:00
schenney
23d8593f81 Update SkPicture cull rects with RTree information
When computed, the RTree for an SkPicture will have a root
bounds that reflects the best bounding information available,
rather than the best estimate at the time the picture recorder
is created. Given that creators frequently don't know ahead of
time what will be drawn, the RTree bound is often tighter.

Perf testing on Chrome indicates a small raster performance
advantage. For upcoming painting changes in Chrome the
performance advantage is much larger.

BUG=

Committed: https://skia.googlesource.com/skia/+/2dd3b6647dc726f36fd8774b3d0d2e83b493aeac

Review URL: https://codereview.chromium.org/971803002
2015-03-06 16:20:28 -08:00
mtklein
a27cdefae1 Make Sk4f(float) constructor explicit.
BUG=skia:

Review URL: https://codereview.chromium.org/985003003
2015-03-06 16:20:22 -08:00
herb
c2ff52920b Fix bit rot in SkGlyphCache validate code.
TESTED
CFLAGS=-DSK_DEBUG_GLYPH_CACHE CPPFLAGS=-DSK_DEBUG_GLYPH_CACHE ./gyp_skia

ninja -C out/Debug dm
out/Debug/dm

Review URL: https://codereview.chromium.org/989683002
2015-03-06 16:15:23 -08:00
mtklein
5a8f2257b0 For consistency, use our homebrew zlib everywhere possible.
This switches when we build our own zlib from "just Windows" to "everyone, but
not Android framework of course".

I tested this by building DM for my Mac and for an Android bot config.
It took minor tweaks to the GYP to get ARM builds working.

BUG=skia:

Review URL: https://codereview.chromium.org/971673005
2015-03-06 16:15:16 -08:00
bsalomon
9ce30e1cd1 Clip scissor to RT bounds
R=joshualitt@google.com

NOTREECHECKS=true

Review URL: https://codereview.chromium.org/985783002
2015-03-06 08:42:34 -08:00
bsalomon
bb3be25a86 Remove rect clip type from grclip.
R=joshualitt@google.com
BUG=skia:
NOTREECHECKS=true

Review URL: https://codereview.chromium.org/989443003
2015-03-06 08:21:39 -08:00
kkinnunen
a9d9a39238 Read pixels in BGRA non-premul mode in few tests
The tests assert on Sk_ColorGREEN, which is in BRGA non-premul. Read the
pixels in same color format.

Currently the tests pass on all platforms because GREEN is fully opaque
and the component stays in the same place both on BGRA and
RGBA. However, hypothetically somebody could copy-paste the assertion
for further tests but use, say, RED. This creates latent error that is
only visible on some platforms like mac.

Review URL: https://codereview.chromium.org/989463002
2015-03-06 07:16:01 -08:00
bsalomon
96e02a8f3f Fix rect clips
R=joshualitt@google.com

Review URL: https://codereview.chromium.org/987653004
2015-03-06 07:13:01 -08:00
mtklein
91fd7371ec SKPMFloat: we can beat the naive loops when clamping
Clamping 4 at a time is now about 15% faster than 1 at a time with SSSE3.
Clamping 4 at a time is now about 20% faster with SSE2,
and this applies to non-clamping too (we still just clamp there).

In all cases, 4 at a time is never worse than 1 at a time,
and not clamping is never slower than clamping.

Here's all the bench results, with the numbers for portable code as a fun point
of reference:

SSSE3:
maxrss  loops   min median  mean    max stddev  samples     config  bench
  10M   2291    4.66ns  4.66ns  4.66ns  4.68ns  0%  ▆█▁▁▁▇▁▇▁▃  nonrendering    SkPMFloat_get_1x
  10M   2040    5.29ns  5.3ns   5.3ns   5.32ns  0%  ▃▆▃▃▁▁▆▃▃█  nonrendering    SkPMFloat_clamp_1x
  10M   7175    4.62ns  4.62ns  4.62ns  4.63ns  0%  ▁▄▃████▃▄▇  nonrendering    SkPMFloat_get_4x
  10M   5801    4.89ns  4.89ns  4.89ns  4.91ns  0%  █▂▄▃▁▃▄█▁▁  nonrendering    SkPMFloat_clamp_4x

SSE2:
maxrss  loops   min median  mean    max stddev  samples     config  bench
  10M   1601    6.02ns  6.05ns  6.04ns  6.08ns  0%  █▅▄▅▄▂▁▂▂▂  nonrendering    SkPMFloat_get_1x
  10M   2918    6.05ns  6.06ns  6.05ns  6.06ns  0%  ▂▇▁▇▇▁▇█▇▂  nonrendering    SkPMFloat_clamp_1x
  10M   3569    5.43ns  5.45ns  5.44ns  5.45ns  0%  ▄█▂██▇▁▁▇▇  nonrendering    SkPMFloat_get_4x
  10M   4168    5.43ns  5.43ns  5.43ns  5.44ns  0%  █▄▇▁▇▄▁▁▁▁  nonrendering    SkPMFloat_clamp_4x

Portable:
maxrss  loops   min median  mean    max stddev  samples     config  bench
  10M   500     27.8ns  28.1ns  28ns    28.2ns  0%  ▃█▆▃▇▃▆▁▇▂  nonrendering    SkPMFloat_get_1x
  10M   770     40.1ns  40.2ns  40.2ns  40.3ns  0%  ▅▁▃▂▆▄█▂▅▂  nonrendering    SkPMFloat_clamp_1x
  10M   1269    28.4ns  28.8ns  29.1ns  32.7ns  4%  ▂▂▂█▂▁▁▂▁▁  nonrendering    SkPMFloat_get_4x
  10M   1439    40.2ns  40.4ns  40.4ns  40.5ns  0%  ▆▆▆█▁▆▅█▅▆  nonrendering    SkPMFloat_clamp_4x

SkPMFloat_neon.h is still one big TODO as far as 4-at-a-time APIs go.

BUG=skia:

Review URL: https://codereview.chromium.org/982123002
2015-03-06 06:15:44 -08:00
tomhudson
cdf34cdfb9 We had zero coverage for SkDrawFilter. This new GM draws two rectangles.
If SkDrawFilter is working, they will not match (have different colors
and one will be blurred). If SkDrawFilter is broken, they will match.

R=scroggo@google.com

Review URL: https://codereview.chromium.org/984883003
2015-03-06 06:15:20 -08:00
sugoi
4ab3dbb636 Adding linear interpolation to rgb->yuv conversion
When the UV planes are smaller than the Y plane, doing the upscaling in nearest mode was creating artefacts, so I changed it to use linear interpolation to fix the issue.

BUG=460380

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

Review URL: https://codereview.chromium.org/973563002
2015-03-06 05:16:52 -08:00
bsalomon
55f0b18ee0 Revert "Don't require AA in order to use shader-based clips"
This reverts commit 2596567793.

TBR=robertphillips@google.com

Review URL: https://codereview.chromium.org/981723009
2015-03-05 17:43:09 -08:00
reed
5c518a8622 Revert of check for inputs before reporting asColorFilter (patchset #7 id:110001 of https://codereview.chromium.org/967833003/)
Reason for revert:
Need to suppress these for rebaselining, so reverting for now.

Regressions: Unexpected image-only failures (5)
  css3/filters/effect-brightness-clamping-hw.html [ ImageOnlyFailure ]
  css3/filters/effect-combined-hw.html [ ImageOnlyFailure ]
  virtual/slimmingpaint/css3/filters/effect-brightness-clamping-hw.html [ ImageOnlyFailure ]
  virtual/slimmingpaint/css3/filters/effect-combined-hw.html [ ImageOnlyFailure ]

Original issue's description:
> Use ComposeColorFilter in factory to collapse consecutive filters (when possible).
> Change asColorFilter to reflect its reliance on the new factory behavior.
>
> patch from issue 967143002 at patchset 80001 (http://crrev.com/967143002#ps80001)
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/dac843bf046c2cd79fd955cb177aee241d7a4b0c

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

Review URL: https://codereview.chromium.org/978923005
2015-03-05 14:47:29 -08:00
joshualitt
4b31de8328 handle null vertex or index buffers in batch
BUG=skia:

Review URL: https://codereview.chromium.org/979343002
2015-03-05 14:33:41 -08:00
bsalomon
cc4d6673a9 Increase default tile sizes in nanobench
R=mtklein@google.com

Review URL: https://codereview.chromium.org/982863003
2015-03-05 13:42:27 -08:00
mtklein
150d3503ed When running under Valgrind, don't draw .webps into .pdfs.
This blacklist entry bans any test with 'pdf' config, any source type, whose
name has '.webp' in it.  In practice, that's 'image' or 'subset' source type
decoding some WEBP file.

BUG=skia:3505

Review URL: https://codereview.chromium.org/982163002
2015-03-05 13:38:17 -08:00