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
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
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
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
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
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
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
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
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
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/+/711ef4831363fb8cbdf061dc2c36c65b13c0ccf2TBR=bsalomon@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/864833003
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
DGifCloseFile now takes two arugments. The second argument appears to be an
optional out-param with more information on failures.
( c.f. http://giflib.sourceforge.net/gif_lib.html )
PS 1 is the original patch we received from google3. I've updated it a bit to
be pedantically legal C++98.
BUG=skia:
Review URL: https://codereview.chromium.org/860853003
SkFontMgr and SkFontStyle implementations are currently burried in the
old SkFontHost.cpp file. Move these implementations to their own file
so that the implementations are easier to find, and to make clearer that
SkFontHost.cpp needs to be removed.
Review URL: https://codereview.chromium.org/799533004
When running gyp_to_android inside a Skia tree, it uses the gyp program
in third_party/externals. Inside an Android tree, we need to use a
different location for gyp (the Android copy of Skia, in external/skia,
does not contain third_party/externals).
The bot handles this by importing gyp_to_android and running its main
function directly.
Add command line arguments so a human can directly run gyp_to_android.
Review URL: https://codereview.chromium.org/864503002
This will hold us closer to the principle that the test name (and only the test
name) should correspond to expected output. By the same reasoning, mix in the
number of subsets: if that changes, the expected output also changes.
BUG=skia:3255
Review URL: https://codereview.chromium.org/863723002
skiatest::Test class is now a simple struct. Some
functionalty, such as counting errors or timing is now
handled elsewhere.
skiatest:Reporter is now a simpler abstract class. The two
implementations handle test errors.
DM and pathops_unittest updated.
Review URL: https://codereview.chromium.org/830513004
Since only XP's can read dst now, there is no reason to have this query on GrFP.
This also triggered a chain reaction of cleaning up/removing unnecessary code
elsewhere.
BUG=skia:
Review URL: https://codereview.chromium.org/851143003