Commit Graph

19112 Commits

Author SHA1 Message Date
halcanary
8b2bc252fa SkPDF: when drawing stroked path, draw using SVG rules for zero-length segments
The "zeroPath" and emptystroke GMs capture this issue.

This CL changes the following PDF GMs: emptystroke dashing4
lineclosepath dashing3 zeroPath linepath
complexclip3_complex complexclip3_simple roundrects
degeneratesegments filltypes strokerect pathfill
inverse_paths desk_chalkboard.skp

After this change, all PDF GMs look better (closer to 8888).
The dashing4, emptystroke, and zeroPath GMs still need a lot
of work to make them look right.

BUG=538726

Review URL: https://codereview.chromium.org/1374383004
2015-10-06 09:41:47 -07:00
bsalomon
4a33952961 Bye bye processor data manager.
Review URL: https://codereview.chromium.org/1388113002
2015-10-06 08:40:51 -07:00
joshualitt
e1f8296999 Fix for visualbench loops forever
TBR=robertphillips@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1387823004
2015-10-06 08:25:15 -07:00
joshualitt
5a74afebb7 nvpr removal from VisualBench base context
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1391633002
2015-10-06 08:05:10 -07:00
msarett
4aa02d8e73 Fix SkGifCodec to handle gifs where frameSize != imageSize
These are quite rare, causing us to miss a few bugs in how
we deal with these images.

Additionally, there is a behavior change.  If the imageSize
is not large enough to contain the frame, we will "fix" the
image by increasing the image size.

SkScaledCodec is still buggy with regard to these gifs.
See skbug.com/4421. We will fix that after 1332053002
lands.

BUG=skia:

Review URL: https://codereview.chromium.org/1386973002
2015-10-06 07:46:03 -07:00
herb
39e2e75f73 Remove duplicate .cpp which should have been a .h
Review URL: https://codereview.chromium.org/1389923002
2015-10-06 07:42:53 -07:00
robertphillips
2d70dcbe5c Dynamically allocate the GrDrawContexts
This CL moves the allocation and storage of the GrTextContexts into the DrawingManager. The GrDrawContexts now just get their GrTextContext from the DrawingManager.

Review URL: https://codereview.chromium.org/1375153007
2015-10-06 07:38:23 -07:00
fmalita
b0cd8b7146 [SkDebugger] Handle path empty-bounds gracefully
Paths with empty bounds crash the debugger: mapping their bounds onto
the shapshot area gets the canvas into an unhappy state.

R=robertphillips@google.com

Review URL: https://codereview.chromium.org/1387173003
2015-10-06 07:24:03 -07:00
mtklein
8d57faf318 Revert of Stop using SkScalerContext::getAdvance() in SkGlyphCache. (patchset #2 id:20001 of https://codereview.chromium.org/1321243004/ )
Reason for revert:
Suspect this is the cause of regressions in crbug.com/527445.  It's triggering on Windows and Linux, where getting advances does less than getting full metrics.  It's not triggering on Mac, where this CL was a no-op.

Original issue's description:
> Stop using SkScalerContext::getAdvance() in SkGlyphCache.
>
> We think it'll simplify things to just always get the full metrics.
> On most platforms, it's no different, and we think the platforms that
> do differ (FreeType) will be nearly just as cheap.
>
> Removing this distinction helps us make SkGlyphCaches concurrent by
> removing a state (we-have-only-advances) from its logical state machine.
>
> We see no significant changes running SKPs before and after this CL.
> That makes sense, of course, because the SKPs bake some of this into drawPosText.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/518a2923f11b819fa44ed5cff54155326959540f

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

Review URL: https://codereview.chromium.org/1383403003
2015-10-06 07:00:45 -07:00
cdalton
d1201058bf Make path range loading explicit
Requires the caller to explicitly preload paths within a range before
calling drawPaths. This allows us to remove the implicit lazy load,
thereby eliminating a redundant check on every redraw of a text blob.

BUG=skia:

Review URL: https://codereview.chromium.org/1382013002
2015-10-05 15:56:34 -07:00
cdalton
cdd7907a3d Implement cached nvpr text blobs
BUG=skia:

Review URL: https://codereview.chromium.org/1381073002
2015-10-05 15:37:35 -07:00
cdalton
02015e51d9 Use SkTextBlob for nvpr color bitmap fallbacks
BUG=skia:

Review URL: https://codereview.chromium.org/1381873003
2015-10-05 15:28:21 -07:00
cdalton
3bd909a44c Add TextRun object to nvpr text
Adds a TextRun object that defines a resolution-independent, paint-
indepent draw for a string of nvpr text.

BUG=skia:

Review URL: https://codereview.chromium.org/1375353004
2015-10-05 14:57:20 -07:00
msarett
cc7f305c69 SkScaledCodec should implement onRewind()
This is a bug fix.  I'm also adding a test.

BUG=skia:

Review URL: https://codereview.chromium.org/1385703002
2015-10-05 14:20:27 -07:00
joshualitt
cb54e8ed45 Cleanup timing state machine
BUG=skia:

Review URL: https://codereview.chromium.org/1386933002
2015-10-05 13:58:26 -07:00
herb
1562855b19 Add more .h files to the .gypi
BUG=skia:

Review URL: https://codereview.chromium.org/1386963002
2015-10-05 13:28:59 -07:00
joshualitt
dc5db59514 move visual bench interactive module to timing state machine
BUG=skia:

Review URL: https://codereview.chromium.org/1382883003
2015-10-05 13:24:55 -07:00
fmalita
92d976c3ad Validate text blob runs after SkTextBlob construction.
This avoids tripping CFI when casting uninitialized SkTextBlob ptrs.

BUG=chromium:538754
R=bungeman@google.com,reed@google.com,krasin@google.com

Review URL: https://codereview.chromium.org/1388543005
2015-10-05 11:09:58 -07:00
jvanverth
2f5bb3abfa Add ship sample
BUG=skia:

Review URL: https://codereview.chromium.org/1359033005
2015-10-05 11:05:07 -07:00
scroggo
303fa35012 Specify bench_type & source_type for image benches
This will allow us to use perf filtering for comparing SkImageDecoder
to SkCodec.

BUG=skia:3418

Review URL: https://codereview.chromium.org/1387863002
2015-10-05 11:03:34 -07:00
mtklein
1f7039c6c5 Pass --images '' to nanobench to disable image benchmarking.
Enabling image benchmarking has caused most nanobench runs to fail,
both Debug and Release.

BUG=skia:3418
NOTREECHECKS=true
TBR=scroggo@google.com

Review URL: https://codereview.chromium.org/1381703003
2015-10-05 10:24:59 -07:00
egdaniel
c00389e45a Fix gpu dashing for case where all intervals are 0.
BUG=skia:4409

Review URL: https://codereview.chromium.org/1381803005
2015-10-05 08:11:49 -07:00
mtklein
6f6264fbbc Force cache SkTestScalerContext path bounds.
Looks like a race on this:

http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN/builds/2608/steps/dm/logs/stdio

BUG=skia:

Review URL: https://codereview.chromium.org/1373363007
2015-10-05 07:29:22 -07:00
joshualitt
98d2e2f095 Factor out VisualBench timing code into a helper class
BUG=skia:

Review URL: https://codereview.chromium.org/1375363003
2015-10-05 07:23:30 -07:00
robertphillips
d8982d7e92 Revert of Have GrRectBlurEffect use Linear filtering (rather than Nearest Neighbor) (patchset #2 id:20001 of https://codereview.chromium.org/1378023004/ )
Reason for revert:
Trial run confirmed layout test expectations - will reland after suppressions

Original issue's description:
> Have GrRectBlurEffect use Linear filtering (rather than Nearest Neighbor)
>
> Committed: https://skia.googlesource.com/skia/+/2d70bcccc9ba8f3898a7ae506ba7410ed8e9c9db
>
> Committed: https://skia.googlesource.com/skia/+/5175b9563055926b4969d57f06e4ae49b86e055b

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

Review URL: https://codereview.chromium.org/1378813004
2015-10-04 12:21:33 -07:00
reed
af3fbfca0a SkImage doesn't use props, so don't need to store it
BUG=skia:
TBR=bsalomon

Review URL: https://codereview.chromium.org/1372153006
2015-10-04 11:28:36 -07:00
robertphillips
588b9cab10 Fix memory leak in ClipMaskManager
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1385823002
2015-10-04 08:40:31 -07:00
robertphillips
5175b95630 Have GrRectBlurEffect use Linear filtering (rather than Nearest Neighbor)
Committed: https://skia.googlesource.com/skia/+/2d70bcccc9ba8f3898a7ae506ba7410ed8e9c9db

Review URL: https://codereview.chromium.org/1378023004
2015-10-04 08:36:51 -07:00
update-skps
1f7e7ec195 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS

Review URL: https://codereview.chromium.org/1390433002
2015-10-04 00:22:10 -07:00
cdalton
7d5c950e85 Simplify nvpr text
- Drops device-space glyphs in favor of perf/simplicity.

- Removes residual complexities that would flip glyphs vertically for
  compatibility with nvpr glyph loading, which is no longer used.

- Drops hairline support since they required new paths for every draw
  matrix, and could only be supported under certain circumstances.

- Quits checking for color bitmap fonts in canDrawText since the
  normal color emoji fallback will handle them anyway.

BUG=skia:

Review URL: https://codereview.chromium.org/1380973002
2015-10-03 13:28:35 -07:00
msarett
19ae315dd0 Stop calling jpeg_finish_decompress()
jpeg_finish_decompress() does several things:
(1) Reads to the end of the image stream.
(2) Calls term_src(), a client provided function that
indicates we are done with the memory stream.  Our current
implementation of term_src() does nothing.
(3) Calls jpeg_abort() which aborts the decode and cleans
up some memory.

I don't think we need to call this anymore.

(1) seems irrelevant.

It seems a little dangerous to get rid of (2), but it is
fine while our implementation of term_src() does nothing.

(3) We will call jpeg_destroy() on destruction of the
JpegDecoderManager.  This should free all the memory,
making it unnecessary to call jpeg_abort() beforehand.

BUG=skia:4040

Review URL: https://codereview.chromium.org/1370323004
2015-10-02 13:44:13 -07:00
scroggo
e7fc14b55b Move all knowledge of X sampling into SkScaledCodec
Prior to this CL, each SkCodec subclass that allows sampling does an
extra check in onStartScanlineDecode to determine whether the X dimension
is supported for sampling. Remove this check, and provide a way for
SkScaledCodec to directly access the SkSwizzler, and update it to do
sampling. This way, the SkCodec knows nothing of sampling, but we can
still save the extra step of sampling afterwards.

FIXME: SkBmpRLECodec still calls SkScaledCodec::DimensionsSupported. It
seems like it could directly support sampling, rather than dealing with
SkScaledCodec (partially).

Add a new base class for SkSwizzler. It allows updating the swizzler
after it was created, which is done by SkScaledCodec. Modify SkSwizzler's
constructor/factory function to stop taking any info about sampling,
assume the sample size is one, and move modifying that into a virtual
function overridden from the base class.

BUG=skia:4284

Review URL: https://codereview.chromium.org/1372973002
2015-10-02 13:14:46 -07:00
halcanary
65f7c9fa7e SkPDF: remove suppression
Review URL: https://codereview.chromium.org/1379183005
2015-10-02 12:15:55 -07:00
joshualitt
f6d259bd96 Incrementally flush GrDrawTarget
BUG=skia:

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

Review URL: https://codereview.chromium.org/1386463004
2015-10-02 11:27:15 -07:00
jvanverth
41518ebc82 Fix CrOS SampleApp
Add compile-time check for GPU build when using GPU flag

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

Review URL: https://codereview.chromium.org/1376423004
2015-10-02 10:42:36 -07:00
joshualitt
0737f61f23 Revert of Incrementally flush GrDrawTarget (patchset #8 id:130001 of https://codereview.chromium.org/1386463004/ )
Reason for revert:
breaking bots

Original issue's description:
> Incrementally flush GrDrawTarget
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/a7e878064509ef96b54d5507dab0b50def66dc13

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

Review URL: https://codereview.chromium.org/1386683002
2015-10-02 10:16:03 -07:00
jvanverth
44dcb8a84b Some iOS fixes to make SampleApp work better.
Changes:
- Rebuild argc and argv so we can process command line arguments
- Remove unnecessary SimpleiOSApp files
- Add support for reading files from the app bundle
- Add gpu flag so we can start up directly into OpenGL

Review URL: https://codereview.chromium.org/1382943004
2015-10-02 09:12:05 -07:00
joshualitt
a7e8780645 Incrementally flush GrDrawTarget
BUG=skia:

Review URL: https://codereview.chromium.org/1386463004
2015-10-02 09:06:39 -07:00
bsalomon
db9f66472e Add work around for devices/API filters that claim GL_KHR_debug support but don't provide functions
Review URL: https://codereview.chromium.org/1383763004
2015-10-02 08:34:29 -07:00
bsalomon
473addf176 Remove separate cache for clip mask textures
Review URL: https://codereview.chromium.org/1377943003
2015-10-02 07:49:06 -07:00
joshualitt
399dd05962 Revert of Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373 (patchset #1 id:1 of https://codereview.chromium.org/1375733003/ )
Reason for revert:
Reverting, optimistically fixed

Original issue's description:
> Reland of Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373 (patchset #1 id:1 of https://codereview.chromium.org/1382933002/ )
>
> Reason for revert:
> Not fixed. :-(
>
> Original issue's description:
> > Revert of Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373 (patchset #1 id:1 of https://codereview.chromium.org/1365683003/ )
> >
> > Reason for revert:
> > should hopefully be fixed, please reland if not.
> >
> > Original issue's description:
> > > Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373
> > >
> > > BUG=skia:4373
> > >
> > > Committed: https://skia.googlesource.com/skia/+/3420d2796bad5ce553efb9909790ea72e578dc47
> >
> > TBR=borenet@google.com,benjaminwagner@google.com
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=skia:4373
> >
> > Committed: https://skia.googlesource.com/skia/+/52f8deba607fd67558b57551cd43406c8b743072
>
> TBR=borenet@google.com,joshualitt@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:4373
>
> Committed: https://skia.googlesource.com/skia/+/9442ab8a40dd0effde253e3b2d166bcf47222e92

TBR=borenet@google.com,benjaminwagner@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4373

Review URL: https://codereview.chromium.org/1385633002
2015-10-02 06:56:25 -07:00
joshualitt
b235168f55 S4 only has 8 texture units on the GLContext we create
BUG=skia:4373

Review URL: https://codereview.chromium.org/1386643002
2015-10-02 06:49:23 -07:00
hendrikw
b1ac52fb0f Skia: Add Command Buffer support to Linux/Mac
Code added to load libcommand_buffer_gles2.so on linux or
mac.

Review URL: https://codereview.chromium.org/1346423002
2015-10-01 18:29:34 -07:00
benjaminwagner
9442ab8a40 Reland of Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373 (patchset #1 id:1 of https://codereview.chromium.org/1382933002/ )
Reason for revert:
Not fixed. :-(

Original issue's description:
> Revert of Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373 (patchset #1 id:1 of https://codereview.chromium.org/1365683003/ )
>
> Reason for revert:
> should hopefully be fixed, please reland if not.
>
> Original issue's description:
> > Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373
> >
> > BUG=skia:4373
> >
> > Committed: https://skia.googlesource.com/skia/+/3420d2796bad5ce553efb9909790ea72e578dc47
>
> TBR=borenet@google.com,benjaminwagner@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:4373
>
> Committed: https://skia.googlesource.com/skia/+/52f8deba607fd67558b57551cd43406c8b743072

TBR=borenet@google.com,joshualitt@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4373

Review URL: https://codereview.chromium.org/1375733003
2015-10-01 16:25:51 -07:00
mtklein
e14937e7c4 Update Android toolchains and streamline process.
- This updates to r10e / API v21 everywhere.
  - This has each host machine fetch the NDK,
    run make-standalone-toolchain.sh, and copy gdbserver itself.

(It will do all this once per $ARCH, which is a little inefficient, but it
washes out in steady state.)

BUG=skia:

Review URL: https://codereview.chromium.org/1385463002
2015-10-01 13:24:23 -07:00
ssid
60df542afc Strip font name of special characters before dumping
The font name can contain special characters in some OS that is
considered as delimiters ('/') by the traces. This causes error in the
dump name. This CL strips the fone name obtained before adding it to
traces.

This also adds discardable memory size for resources in cache.

BUG=532838

Review URL: https://codereview.chromium.org/1346993006
2015-10-01 12:41:35 -07:00
bungeman
77a53de20d Base SkAutoTUnref on skstd::unique_ptr.
To further consolidate the various unique owning classes, this bases
SkAutoTUnref on skstd::unique_ptr. Users are updated because of two
breaking changes, swap now takes a reference and reset no longer
returns its argument.

Review URL: https://codereview.chromium.org/1370803002
2015-10-01 12:28:49 -07:00
joshualitt
52f8deba60 Revert of Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373 (patchset #1 id:1 of https://codereview.chromium.org/1365683003/ )
Reason for revert:
should hopefully be fixed, please reland if not.

Original issue's description:
> Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373
>
> BUG=skia:4373
>
> Committed: https://skia.googlesource.com/skia/+/3420d2796bad5ce553efb9909790ea72e578dc47

TBR=borenet@google.com,benjaminwagner@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4373

Review URL: https://codereview.chromium.org/1382933002
2015-10-01 12:09:17 -07:00
mtklein
c6f5cac9bb Basic CPU support for VisualBench.
BUG=skia:

Review URL: https://codereview.chromium.org/1378393002
2015-10-01 11:56:56 -07:00
joshualitt
b90de31355 Fix for texture width or height are greater than 2^16
BUG=skia:3467
TBR=

Review URL: https://codereview.chromium.org/1380153002
2015-10-01 11:54:34 -07:00