Commit Graph

15953 Commits

Author SHA1 Message Date
bsalomon
1ea1ebce10 Remove GrBinHashKey
Review URL: https://codereview.chromium.org/861323002
2015-01-23 06:46:16 -08:00
kkinnunen
016dffb7b3 Compile fix after Add specialized content key class for resources
gcc (Ubuntu/Linaro 4.6.4-1ubuntu1~12.04) 4.6.4
error: comparison between signed and unsigned integer expressions

Review URL: https://codereview.chromium.org/871013002
2015-01-23 06:43:05 -08:00
halcanary
530ea8e24b More changes to SkPDFShader to eliminate multiple inheritance!
Review URL: https://codereview.chromium.org/873543002
2015-01-23 06:17:35 -08:00
reed
f803da12cf add newImage API
BUG=skia:3277
related bug: skbug.com/3276

Review URL: https://codereview.chromium.org/821083002
2015-01-23 05:58:07 -08:00
mtklein
a17241bd0a Write dm.json periodically instead of only once at the end.
This way if a bot crashes, we might get some partial results in gold rather
than none.  We do the same sort of thing in nanobench for perf.

BUG=skia:3255

Review URL: https://codereview.chromium.org/872443003
2015-01-23 05:48:00 -08:00
mtklein
2f6bb6b852 minor readability / refactors
I have been hacking at this test trying to understand why the N5 is
still sometimes crashy (it seems, less but not zero now). No luck so far.

But, while I've been reading and hacking at it, I think I've made a
few small improvements, mostly to readability.

BUG=skia:

Review URL: https://codereview.chromium.org/870803002
2015-01-23 05:47:55 -08:00
reed
7983bf914a more reinforcement that images never have zero width or height
BUG=skia:

Review URL: https://codereview.chromium.org/869743002
2015-01-23 04:24:16 -08:00
bsalomon
24db3b1c35 Add specialized content key class for resources.
Review URL: https://codereview.chromium.org/858123002
2015-01-23 04:24:05 -08:00
skia.buildbots
f98f2bb0e7 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=

Review URL: https://codereview.chromium.org/866383002
2015-01-23 04:19:00 -08:00
halcanary
bc59ac6b12 Simplify SkPDFShader class. Now invalid objects are never created.
"Constructors should not do real work"

I have verified that all test PDFs render identically.

Review URL: https://codereview.chromium.org/862113004
2015-01-23 04:18:53 -08:00
mtklein
cada95ad9b Move FP texture test buffers to heap.
This is a speculative fix for the crashing N5 bots.  It looks like the bots are
always failing in or around FloatingPointTextureTest.

It looks like sometimes they're hitting a SIGBUS, which I suspect is stack
overflow.  FloatingPointTextureTest allocates ~320K on the stack, which may
be too much.  This CL moves those buffers to the heap.  For consistency I did
the same with the half-float tests, though they're only using ~1/8th the stack.

It looks like sometimes the bots are failing to malloc.  I don't understand that,
and this CL doesn't address that directly.  But it's possible this is still a stack
overflow, just trashing RAM and causing arbitrary mayhem instead of a SIGBUS.

I have no idea why this is a problem only on the N5.  I have been unable to
reproduce this locally, neither with a K N5 nor an L N5, but the bots are pretty
reliable.

NOTREECHECKS=true
BUG=skia:

Review URL: https://codereview.chromium.org/871623002
2015-01-22 13:50:35 -08:00
reed
5c05a1b137 remove unnecessary guard flags for android (for conics)
BUG=skia:
NOTREECHECKS=True

Review URL: https://codereview.chromium.org/868783002
2015-01-22 13:41:00 -08:00
mtklein
2d63859f6f android_run_skia: dump logcat on failure
logcat -c clears the log before we run.
logcat -d dumps the log stdout and exits.

BUG=skia:

Review URL: https://codereview.chromium.org/870643002
2015-01-22 10:43:34 -08:00
dongseong.hwang
8f25c667ea Initialize the pad memory in GrBufferAllocPool.
Msan bot detects Use-of-uninitialized-value on the pad.

BUG=445745

Review URL: https://codereview.chromium.org/865913002
2015-01-22 10:40:20 -08:00
mtklein
75de4f827f Put close_gif() in an anonymous namespace.
Not a big deal, but matches the intention of it being a file-scoped function
better.  This mirrors a recent google3 change for clients who don't use C++11.

BUG=skia:

Review URL: https://codereview.chromium.org/865243002
2015-01-22 10:32:25 -08:00
scroggo
6d7e47a8e0 Muck with the right cinfo.
In SkImageDecoder_libjpeg, modify cinfo *after* destroying it and
creating a new one in its place.

Should fix build breakage.

Committed: https://skia.googlesource.com/skia/+/3629865bac20ae8092177f519594f79f89d09fb0

Review URL: https://codereview.chromium.org/858333002
2015-01-22 10:27:25 -08:00
egdaniel
8dd688b756 Rename GrOptDrawState to GrPipeline and GrDrawState to GrPipelineBuilder
BUG=skia:

Review URL: https://codereview.chromium.org/858343002
2015-01-22 10:16:09 -08:00
reed
e44acc9617 remove more dead code
BUG=skia:

Review URL: https://codereview.chromium.org/865873003
2015-01-22 09:37:46 -08:00
reed
b0dfb546f5 remove (unused) GatherPixelRefs
BUG=skia:

Review URL: https://codereview.chromium.org/869463002
2015-01-22 09:03:25 -08:00
mtklein
50282b4390 fLuminance is unsed unless SK_GAMMA_APPLY_TO_A8 is defined
BUG=skia:

Review URL: https://codereview.chromium.org/865103002
2015-01-22 07:59:52 -08:00
bungeman
44af7ba4bc Fix SkIStream nits.
Fix comment, constness of one field, and delete already checks for NULL.

TBR=reed@google.com
Trivial change to debatably public api.

Review URL: https://codereview.chromium.org/868643003
2015-01-22 07:33:51 -08:00
joshualitt
2fdeda0498 XPFactory lazily initializie in drawstate / GrPaint
BUG=skia:

Review URL: https://codereview.chromium.org/866573002
2015-01-22 07:11:45 -08:00
egdaniel
dcfb7cf336 Remove the need for asCoeff in SkXfermode.
BUG=skia:

Review URL: https://codereview.chromium.org/864833002
2015-01-22 06:52:29 -08:00
bungeman
2dca817edb Remove staging SkStream::unref().
SkStream::unref() was added to ease transitioning off of SkStream
deriving from SkRefCnt. It is no longer needed, remove it.

TBR=reed@google.com

Review URL: https://codereview.chromium.org/861413002
2015-01-22 06:08:31 -08:00
skia.buildbots
faff2c4598 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=

Review URL: https://codereview.chromium.org/807263005
2015-01-21 23:09:41 -08:00
mtklein
4daa6f613c Don't require -DSK_USE_POSIX_THREADS.
To compile SkCondVar, we already require either pthreads or Windows.  This
simplifies that code to not need SK_USE_POSIX_THREADS to be explicitly defined.
We'll just look to see if we're targeting Windows, and if not, assume pthreads.

Both before and after this CL, that code will fail to compile if we're not on
Windows and don't have pthreads.

BUG=skia:

Review URL: https://codereview.chromium.org/869443003
2015-01-21 19:51:27 -08:00
mtklein
55e88b226c More natural way to serialize GPU tasks and tests.
This basically takes out the Windows-only hacks and promotes them to
cross-platform behavior driven by --gpu_threading.
    - When --gpu_threading is false (the default), this puts GPU tasks and tests
      together in the same GPU enclave.  They all run serially.
    - When --gpu_threading is true, both the tests and the tasks run totally
      independently, just like the thread-safe CPU-bound work.

BUG=skia:3255

Review URL: https://codereview.chromium.org/847273005
2015-01-21 15:50:13 -08:00
bungeman
aa7079b4a1 Revert of Muck with the right cinfo. (patchset #2 id:20001 of https://codereview.chromium.org/858333002/)
Reason for revert:
Appears to cause Android dm to segfault.

Original issue's description:
> Muck with the right cinfo.
>
> In SkImageDecoder_libjpeg, modify cinfo *after* destroying it and
> creating a new one in its place.
>
> Should fix build breakage.
>
> Committed: https://skia.googlesource.com/skia/+/3629865bac20ae8092177f519594f79f89d09fb0

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

Review URL: https://codereview.chromium.org/858323003
2015-01-21 15:08:10 -08:00
scroggo
3629865bac Muck with the right cinfo.
In SkImageDecoder_libjpeg, modify cinfo *after* destroying it and
creating a new one in its place.

Should fix build breakage.

Review URL: https://codereview.chromium.org/858333002
2015-01-21 14:04:57 -08:00
mtklein
968f18cba5 Easy DM TODO: LazyDecodeBitmap does not help (or hinder).
BUG=skia:3255

Review URL: https://codereview.chromium.org/859303003
2015-01-21 13:48:57 -08:00
mtklein
7edca21226 Don't test pipe modes nobody uses.
SkDeferredCanvas uses a simple pipe: no cross-process, no shared-address, etc.
(see src/utils/SkDeferredCanvas.cpp:306).

We could just remove these modes from the bot configs, but I'd like to take the
opportunity to simplify the DM code too.  I'll happily volunteer to put things
back should we decide we want to test these modes.

BUG=skia:

Review URL: https://codereview.chromium.org/861303003
2015-01-21 13:18:51 -08:00
mtklein
a64c48f4f9 Move sync code to include/, switch from using platform define to a proxy header in core/
This fixes two problems:
  1)  #include SK_SOME_DEFINE doesn't work well for all our clients.
  2)  Things in include/ are #including things in src/, which we don't like.

TBR=reed@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/862983002
2015-01-21 13:13:31 -08:00
halcanary
e6ea244717 Use SkLazyPtr in SkPDFGraphicState.cpp
Motivation: currently we rely on mutexes for guarding static
initialization.  These mutexes will go away.

Review URL: https://codereview.chromium.org/815223005
2015-01-21 13:13:22 -08:00
scroggo
28b44e8f27 And change SkAutoTUnref<const SkStream to SkAutoTDelete.
Should have been included with https://codereview.chromium.org/860353005/

TBR=bungeman@google.com
NOTRY=true
NOTREECHECKS=true

Review URL: https://codereview.chromium.org/844193007
2015-01-21 12:33:29 -08:00
scroggo
e58898ee3a Remove another caller of SkRef(SkStream)
TBR=bungeman@google.com
NOTRY=true
NOTREECHECKS=true

Review URL: https://codereview.chromium.org/860353005
2015-01-21 12:23:20 -08:00
djsollen
eae7fc09c6 Update the version of cpu-features that we use for testing.
Review URL: https://codereview.chromium.org/858233003
2015-01-21 12:11:00 -08:00
scroggo
a1193e4b0e Make SkStream *not* ref counted.
SkStream is a stateful object, so it does not make sense for it to have
multiple owners. Make SkStream inherit directly from SkNoncopyable.

Update methods which previously called SkStream::ref() (e.g.
SkImageDecoder::buildTileIndex() and SkFrontBufferedStream::Create(),
which required the existing owners to call SkStream::unref()) to take
ownership of their SkStream parameters and delete when done (including
on failure).

Switch all SkAutoTUnref<SkStream>s to SkAutoTDelete<SkStream>s. In some
cases this means heap allocating streams that were previously stack
allocated.

Respect ownership rules of SkTypeface::CreateFromStream() and
SkImageDecoder::buildTileIndex().

Update the comments for exceptional methods which do not affect the
ownership of their SkStream parameters (e.g.
SkPicture::CreateFromStream() and SkTypeface::Deserialize()) to be
explicit about ownership.

Remove test_stream_life, which tested that buildTileIndex() behaved
correctly when SkStream was a ref counted object. The test does not
make sense now that it is not.

In SkPDFStream, remove the SkMemoryStream member. Instead of using it,
create a new SkMemoryStream to pass to fDataStream (which is now an
SkAutoTDelete).

Make other pdf rasterizers behave like SkPDFDocumentToBitmap.

SkPDFDocumentToBitmap delete the SkStream, so do the same in the
following pdf rasterizers:

SkPopplerRasterizePDF
SkNativeRasterizePDF
SkNoRasterizePDF

Requires a change to Android, which currently treats SkStreams as ref
counted objects.

Review URL: https://codereview.chromium.org/849103004
2015-01-21 12:09:53 -08:00
hcm
fd1ad48d4d Add Contributing to Skia section of docs
BUG=skia:

Review URL: https://codereview.chromium.org/844433004
2015-01-21 12:05:47 -08:00
bungeman
ec7e12f3cf Lcd request early check in SkFontHost_FreeType::onFilterRec.
If the user didn't request lcd, don't spend any time checking if the
FT_Library supports it.

Review URL: https://codereview.chromium.org/864903002
2015-01-21 11:55:16 -08:00
joshualitt
17e7314e0e remove drawtype
BUG=skia:

Review URL: https://codereview.chromium.org/862933005
2015-01-21 11:52:36 -08:00
bungeman
d4742fa550 Reduce overhead of SkFontHost_FreeType::onFilterRec.
The current code is using AutoFTAccess just to access the FT_Library.
However, it does not need to resolve the FT_Face, just the FT_Library.
This unecessary overhead and is removed by this change.
The longer term solution is for SkFontMgr to initialize FreeType.

Review URL: https://codereview.chromium.org/835583003
2015-01-21 11:19:22 -08:00
joshualitt
b77e4b6bf0 remove drawType from optState
BUG=skia:

Review URL: https://codereview.chromium.org/864853002
2015-01-21 10:16:18 -08:00
halcanary
fb62b3d423 SkPDFCanon
SkPDFCanon's fields and methods will eventually become part of
SkPDFDocument/SkDocument_PDF.  For now, it exists as a singleton to
preflight that transition.  This replaces three global arrays in
SkPDFFont, SkPDFShader, and SkPDFGraphicsContext.  This code is still
thread-unsafe (http://skbug.com/2683), but moving this functionality
into SkPDFDocument will fix that.

This CL does not change pdf output from either GMs or SKPs.

This change also simplifies some code around the SkPDFCanon methods.

BUG=skia:2683

Review URL: https://codereview.chromium.org/842253003
2015-01-21 09:59:14 -08:00
bsalomon
1c60dfe7ca Reland https://codereview.chromium.org/860333002 with fix for test failures.
Revert "Revert of Make GrScratchKey memory buffer correct size on copy (patchset #1 id:1 of https://codereview.chromium.org/860333002/)"

This reverts commit 988018c817.

BUG=skia:

Review URL: https://codereview.chromium.org/863983003
2015-01-21 09:32:40 -08:00
mtklein
a092d2eaf8 Remove another GM reference.
This should make the android self-tests start passing again.
Rebaselined with:
  $ python makefile_writer_tests.py --rebaseline

BUG=skia:

Review URL: https://codereview.chromium.org/860333004
2015-01-21 08:48:03 -08:00
mtklein
988018c817 Revert of Make GrScratchKey memory buffer correct size on copy (patchset #1 id:1 of https://codereview.chromium.org/860333002/)
Reason for revert:
Our Valgrind bot just spewed out a weird error.  I don't know if it's related, but it looks at least like one of the stacks was in the right area, so I'm going to revert this precautionarily.  Sorry if this is a false positive.

http://build.chromium.org/p/client.skia/builders/Test-Ubuntu12-ShuttleA-GTX550Ti-x86_64-Release-Valgrind/builds/266/steps/dm/logs/stdio

Original issue's description:
> Make GrScratchKey memory buffer correct size on copy
>
> Scratch key memory buffer of a copy of a key was too big. The (new) copy
> was N times uint32_t bytes instead of N bytes.
>
> Adds few tests to resource cache. These tests would not catch the too
> big buffer. This is just a precaution for too small buffers. The main
> idea of the test change is that the scratch key should contain some
> information, so that lookup with a scratch key can also return no
> match. Otherwise testing of scratch lookup result is not indicative of
> correct code (eg. no-information scratch key will always match).
>
> Committed: https://skia.googlesource.com/skia/+/711ef4831363fb8cbdf061dc2c36c65b13c0ccf2

TBR=bsalomon@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/864833003
2015-01-21 08:05:55 -08:00
jcgregorio
0f2e055580 Add docs for prettify.
Preview here: http://skia.org/dev/tools/markdown?cl=862933002

BUG=skia:

Review URL: https://codereview.chromium.org/862933002
2015-01-21 08:02:45 -08:00
Mike Klein
6a04c8c917 Remove tools/tests.
BUG=skia:
R=bsalomon@google.com

Review URL: https://codereview.chromium.org/796813004
2015-01-21 10:56:40 -05:00
kkinnunen
711ef48313 Make GrScratchKey memory buffer correct size on copy
Scratch key memory buffer of a copy of a key was too big. The (new) copy
was N times uint32_t bytes instead of N bytes.

Adds few tests to resource cache. These tests would not catch the too
big buffer. This is just a precaution for too small buffers. The main
idea of the test change is that the scratch key should contain some
information, so that lookup with a scratch key can also return no
match. Otherwise testing of scratch lookup result is not indicative of
correct code (eg. no-information scratch key will always match).

Review URL: https://codereview.chromium.org/860333002
2015-01-21 06:39:14 -08:00
skia.buildbots
034e94877b Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=

Review URL: https://codereview.chromium.org/859193002
2015-01-20 23:04:12 -08:00