Commit Graph

16909 Commits

Author SHA1 Message Date
kkinnunen
f9310fe2be webpages_playback.py: Avoid crash when retrying to capture skp
Move the .wpr files after recording, in the recording retry loop.
Previously they were moved in the skp capture retry loop.

Review URL: https://codereview.chromium.org/1033223005
2015-03-29 22:33:16 -07:00
reed
7da19014fd use Sk4f for matrix math
Need to land SK_SUPPORT_LEGACY_SCALAR_MAPPOINTS in chrome to suppress Affine
version which causes slight differences (which will need to be rebaselined)

BUG=skia:

Review URL: https://codereview.chromium.org/1045493002
2015-03-29 11:58:48 -07:00
skia.buildbots
a8e2d5b558 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=

Review URL: https://codereview.chromium.org/1046623002
2015-03-29 01:19:04 -07:00
senorblanco
06d3d682b4 Revert "Implement approx-match support in image filter saveLayer() offscreen."
This reverts commit b97dafefe6.

SkLightingImageFilter boundaries are incorrect (see GM:lighting).

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1048583002
2015-03-28 14:50:05 -07:00
senorblanco
b97dafefe6 Implement approx-match support in image filter saveLayer() offscreen.
Currently, the GPU-side image filter implementation creates exact-match
textures for the offscreen backing stores for saveLayer().  This is
because several filters have GPU implementations which depend on the
texture coordinates being 0..1.

The fix is three-fold:

1) Store the actual requested size in the SkGpuDevice, so that when
wrapping it in an SkBitmap for passing to filterImage(), we can give
it the original size.
2) Fix the filters (SkMagnifierImageFilter, more TBD) whose GPU
implementation depends on 0..1 texture coordinates.
3) Remove the exception for GPU-side image filters in
SkCanvas::internalSaveLayer().

N.B.: this change will cause some minor pixel diffs in the
GPU results of the following GMs (and possibly more):
matriximagefilter, matrixconvolution, imagefiltersscaled,
lighting, imagemagnifier, filterfastbounds,
complexclip_aa_Layer_invert, complexclip_aa_layer,
complexclip_bw_layer_invert, complexclip_bw_layer.

BUG=skia:3532

Review URL: https://codereview.chromium.org/1034733002
2015-03-28 13:43:14 -07:00
reed
d8b34c26c2 use table of procs (and unrolling) to speed up mapPts
BUG=skia:

Review URL: https://codereview.chromium.org/1040783002
2015-03-27 14:00:41 -07:00
scroggo
5cffba8d8e Remove SkMemoryStream::peek()
I'd like to add a new API to SkStream for peeking - i.e. reading some
bytes without advancing the stream. This will be implemented for the
streams where it makes sense. I think the function should look
something like the following:

size_t peek(void* buffer, size_t bytesToRead) {
     return this->onPeek(buffer, bytesToRead);
}

virtual size_t onPeek(void* buffer, size_t bytesToRead) {
    return 0;   // unimplemented base class.
}

In order to avoid confusion, I'd like to remove SkMemoryStream::peek(),
which is not currently used internally, by Chrome, or by Android as far
as I can tell. There is also another function does the same thing:
getPosition().

BUG=skia:3257

Review URL: https://codereview.chromium.org/1039373002
2015-03-27 13:27:51 -07:00
mtklein
871ad7a13e Use a black background in imagefiltersgraph so 8888 and 565 look similar.
BUG=skia:

Review URL: https://codereview.chromium.org/1041773003
2015-03-27 12:33:46 -07:00
egdaniel
d588c01c7e Housekeeping to rename GrGL compressed texture formats to match GL specs
BUG=skia:

Review URL: https://codereview.chromium.org/1035243002
2015-03-27 12:22:10 -07:00
tomhudson
573ae01295 Move HWUI boilerplate into utils/android
Duplicate code from the HWUI backends for DM and nanobench
moves into a single place, saving a hundred lines or more of
cut-and-paste.

There's some indication that this increases the incidence of
SkCanvas "Unable to find device for layer." warnings, but no
clear degradation in test results.

R=djsollen@google.com,mtklein@google.com
BUG=skia:3589

Review URL: https://codereview.chromium.org/1036303002
2015-03-27 12:22:01 -07:00
msarett
255dcd1199 WIP: Added support for giflib, updated jpeg and png
BUG=skia:3257

Review URL: https://codereview.chromium.org/1038863003
2015-03-27 12:17:00 -07:00
halcanary
a096d7a6d0 SkCodec: add wbmp class
Review URL: https://codereview.chromium.org/1006583005
2015-03-27 12:16:53 -07:00
halcanary
135b7ecaa8 tools: add sync-and-gyp script
NOTRY=true

Review URL: https://codereview.chromium.org/1035003004
2015-03-27 12:11:49 -07:00
tomhudson
75a0ebb0d0 Minor cleanup in nanobench
Simplify time() by removing conditionals; reduce the amount of
parameter passing.
Add a convenience function to Target.

R=mtklein@google.com
BUG=skia:3595

Review URL: https://codereview.chromium.org/1039253002
2015-03-27 12:11:44 -07:00
borenet
939253e9ee Whitespace change to see if Android bots are fixed
TBR=rmistry
NOTREECHECKS=true
BUG=skia:2073

Review URL: https://codereview.chromium.org/1039023003
2015-03-27 09:46:25 -07:00
borenet
1e37d1762c Update [dm|nanobench]_flags for CPU/GPU split
TBR=mtklein
NOTREECHECKS=true
BUG=skia:2073

Review URL: https://codereview.chromium.org/1036223002
2015-03-27 05:42:18 -07:00
reed
daee7eadd1 impl SkConvertQuadToCubic w/ Sk2s
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1041573002
2015-03-26 20:22:33 -07:00
robertphillips
1d24b8dfe9 Add matrix constructing helpers to SkMatrix
Review URL: https://codereview.chromium.org/1034273002
2015-03-26 19:57:08 -07:00
halcanary
41f88f0251 SkPDF fix object counting error
Review URL: https://codereview.chromium.org/1012483003
2015-03-26 15:35:18 -07:00
senorblanco
e833107a30 Remove some validation and asserts from tessellating path renderer.
In some cases, resolving an intersection can cause a vertex to go
slightly out-of-order with edges which have already been processed.
This doesn't cause any algorithmic errors, but it's difficult to detect
without impacting performance significantly.

Also, the GPU infrastructure fires asserts when attempting
to allocate 0-length vertex buffers. Early-out instead,
since there's nothing to draw.

Review URL: https://codereview.chromium.org/1032253005
2015-03-26 14:52:45 -07:00
halcanary
2edf599eeb Fix DiscardableMemoryPool::free race condition
BUG=skia:3596

Review URL: https://codereview.chromium.org/1017943003
2015-03-26 14:08:56 -07:00
reed
a644116c33 Revert of Make the canvas draw looper setup update the canvas save count (patchset #1 id:1 of https://codereview.chromium.org/1034033004/)
Reason for revert:
makes internalSave and internalSaveLayer inconsistent. Need to find a different solution.

Original issue's description:
> Make the canvas draw looper setup update the canvas save count
>
> Image filter in a paint would leave save count in wrong state
> for normal draws. This could be observed through the canvas
> references during the draw call. An example of this is
> inspecting the canvas during a draw looper.
>
> patch from issue 993863002 at patchset 20001 (http://crrev.com/993863002#ps20001)
>
> BUG=skia:
> TBR=kkinnunen@nvidia.com
>
> Committed: https://skia.googlesource.com/skia/+/fd3a91e1fc4de69611b5297f624a1cd65db4ced1

TBR=kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1037653004
2015-03-26 13:40:09 -07:00
reed
fd3a91e1fc Make the canvas draw looper setup update the canvas save count
Image filter in a paint would leave save count in wrong state
for normal draws. This could be observed through the canvas
references during the draw call. An example of this is
inspecting the canvas during a draw looper.

patch from issue 993863002 at patchset 20001 (http://crrev.com/993863002#ps20001)

BUG=skia:
TBR=kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/1034033004
2015-03-26 13:29:56 -07:00
mtklein
3d4c4a5a9f SkPMFloat::trunc()
Add and test trunc(), which is what get() used to be before rounding.
Using trunc() is a ~40% speedup on our linear gradient bench.

#neon #floats
BUG=skia:3592
#n5
#n9
CQ_INCLUDE_TRYBOTS=client.skia.android:Test-Android-Nexus5-Adreno330-Arm7-Debug-Trybot;client.skia.android:Test-Android-Nexus9-TegraK1-Arm64-Release-Trybot

Review URL: https://codereview.chromium.org/1032243002
2015-03-26 12:32:29 -07:00
tomhudson
d968a6f29e Android HWUI backend Nanobench
Uses filtering canvas from utils/android, shared with DM.
Follow-up plans in https://skbug.com/3589, https://skbug.com/3595

R=djsollen@google.com

Review URL: https://codereview.chromium.org/1029423010
2015-03-26 11:28:06 -07:00
joshualitt
e0b19d4985 small fix for nanobench segfault when not running any tests
BUG=skia:

Review URL: https://codereview.chromium.org/1030353004
2015-03-26 10:41:02 -07:00
egdaniel
9665eee8d5 Remove unused HWAA flag and uniqueID field from GrDrawTargetCaps.
BUG=skia:

Review URL: https://codereview.chromium.org/1019303005
2015-03-26 10:13:05 -07:00
robertphillips
546db46a76 Debugger: remove dead feature (SkPicture offset display) & fix bug (unbalanced indents)
Displaying the offset into an SkPicture hasn't worked for a while so this CL deletes the feature.
When "Save Layer" was renamed to "SaveLayer" the code that computes the indent in the list view was broken. This CL patches the problem.

Review URL: https://codereview.chromium.org/1034733004
2015-03-26 10:08:04 -07:00
scroggo
0eed6df064 Silence PNG warnings from SkPngCodec.
Review URL: https://codereview.chromium.org/1009633005
2015-03-26 10:07:56 -07:00
reed
5501103881 use new faster/vector impl for chopping conics
BUG=skia:

Review URL: https://codereview.chromium.org/1035943002
2015-03-26 09:10:22 -07:00
egdaniel
384181c810 Add support for using alternative backends (like DirectX) when creating a GrGpu.
BUG=skia:

Review URL: https://codereview.chromium.org/1038643002
2015-03-26 09:09:41 -07:00
caryclark
d8bc16b306 add legacy pathop enums; fix uninitialized warning
R=reed@google.com
BUG=skia:3588
NOTREECHECKS=true
NOTRY=true
NOPRESUBMIT=true

Review URL: https://codereview.chromium.org/1034073004
2015-03-26 09:05:12 -07:00
caryclark
54359294a7 cumulative pathops patch
Replace the implicit curve intersection with a geometric curve intersection. The implicit intersection proved mathematically unstable and took a long time to zero in on an answer.

Use pointers instead of indices to refer to parts of curves. Indices required awkward renumbering.

Unify t and point values so that small intervals can be eliminated in one pass.

Break cubics up front to eliminate loops and cusps.

Make the Simplify and Op code more regular and eliminate arbitrary differences.

Add a builder that takes an array of paths and operators.

Delete unused code.

BUG=skia:3588
R=reed@google.com

Review URL: https://codereview.chromium.org/1037573004
2015-03-26 07:52:43 -07:00
reed
c08330f160 remove slower scalar code in favor of vectors
BUG=skia:

Review URL: https://codereview.chromium.org/1001833006
2015-03-26 07:26:08 -07:00
fmalita
65cdb57ae8 Add a paint filter utility canvas (SkPaintFilterCanvas)
Introduce a paint filter proxy base class as a SkDrawFilter replacement,
and convert SkDebugCanvas to use the new approach.

BUG=skia:3587
R=reed@google.com,mtklein@google.com,robertphillips@google.com,tomhudson@google.com

Review URL: https://codereview.chromium.org/1032173002
2015-03-26 07:24:48 -07:00
scroggo
230d4ac701 Use a wrapper for SkDebugf in SkCodec.
It can be silenced or not with one flag.
Always print when building for the android framework.

Also remove the meaningless define of override to override.

BUG=skia:3257

Review URL: https://codereview.chromium.org/1032093004
2015-03-26 07:15:55 -07:00
halcanary
b880d7f87e SkCodec: conditionally remove fInfo
Review URL: https://codereview.chromium.org/1029423005
2015-03-26 06:29:03 -07:00
mtklein
dee3df930b Add a go-fast button to Skia GYP configs.
./gyp_skia -Dskia_fast=1 will
  - always optimize for the current machine as much as possible
  - drop the frame pointer
  - optimize floating point arithmetic ignoring IEEE compliance

This allows things like 3-argument VEX prefix SSE instructions and
NEON autovectorization, and can give some seriously helpful clues
about how to rearrange floating point math for speed.

I've been having trouble with LTO linking, so I'll leave that out for now.

I don't think we should set up bots with this mode.  -ffast-math means
I'm forced to run DM with --match ~Blend ~Path ~Rect ~Math ~Scalar
~Matrix ~Point before it passes, which is a disconcerting chunk of tests
to disable (including all of PathOps).

BUG=skia:

Review URL: https://codereview.chromium.org/1036533003
2015-03-26 05:30:44 -07:00
mtklein
ce86687310 pdf skp tabl_worldjournal.skp took 5 days to run on Valgrind
#notry

BUG=skia:
NOTRY=true

Review URL: https://codereview.chromium.org/1030263003
2015-03-26 05:12:13 -07:00
reed
3756d810d4 remove #if 0 code
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1032273003
2015-03-26 04:15:19 -07:00
reed
83e22e407e use custom search for pathmeasure
BUG=skia:

Review URL: https://codereview.chromium.org/1037653002
2015-03-26 04:13:08 -07:00
mtklein
36352bf5e3 C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}
NOPRESUBMIT=true

BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=1037793002

Review URL: https://codereview.chromium.org/1037793002
2015-03-25 18:17:32 -07:00
mtklein
02fd592c8d hack on linear gradient
Am I going nuts or can we get this down to just adds and converts in the loop?

#floats #n9
BUG=skia:3592
CQ_INCLUDE_TRYBOTS=client.skia.android:Test-Android-Nexus9-TegraK1-Arm64-Release-Trybot

Review URL: https://codereview.chromium.org/1008973004
2015-03-25 18:13:02 -07:00
bungeman
05035d43e7 Remove sfnt dependency from xps gyp tartget.
The xps gyp target depends on skia_lib, which in turn contains
the sfnt target (and re-exports it settings). As a result, it
should not separately depend on the sfnt target. This currently
isn't causing issues because the sfnt target is mostly header only,
but any code in it may be duplicated.

Review URL: https://codereview.chromium.org/1038693003
2015-03-25 14:48:05 -07:00
reed
b25a83bd88 Use Sk4x to speed-up bounds of an array of points
BUG=skia:

Review URL: https://codereview.chromium.org/1015633004
2015-03-25 14:30:49 -07:00
cdalton
e68f7362b1 Add more parameters to GrTextContext::canDraw
Updates canDraw to accept all the same Skia/Gr objects as the drawText
functions, since that information may very well be relevant in
determining whether a context can draw.

Also moves the onDrawTextBlob implementation directly into
drawTextBlob.

BUG=skia:

Review URL: https://codereview.chromium.org/1010113004
2015-03-25 14:02:37 -07:00
scroggo
9c59ebc0db Test scanline decoding in DM.
BUG=skia:3475

Review URL: https://codereview.chromium.org/999173010
2015-03-25 13:48:49 -07:00
djsollen
59f9ec7e9c Replace error checking mutex initializer with the glibc-compatible version
No public API changes.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1038733002
2015-03-25 13:47:13 -07:00
mtklein
15391ee4ac Update 4-at-a-time APIs.
There is no reason to require the 4 SkPMFloats (registers) to be adjacent.
The only potential win in loads and stores comes from the SkPMColors being adjacent.

Makes no difference to existing bench.

BUG=skia:

Review URL: https://codereview.chromium.org/1035583002
2015-03-25 13:43:34 -07:00
joshualitt
2af858354d simple patch to always init SkTextBlob uniqueID
BUG=skia:

Review URL: https://codereview.chromium.org/1036613002
2015-03-25 13:40:13 -07:00