This CL still keeps the weird diamond shape we have for all our ProgramBuilders.
However, the GrGLSL base class will allow us to pull multiple other parts
of our program setup away from GL which will eventually allow us to break up
the diamond.
As part of this all ShaderBuilder subclass have been made gl independent,
however I will move them to GLSL files/class names in a follow on CL.
BUG=skia:
Review URL: https://codereview.chromium.org/1416423003
Rename SkCodecTools.h to SkBitmapRegionDecoderPriv.h
Move BRD code to its own directory in tools. This
allows us to not need to expose the entire tools
directory in Android.
BUG=skia:
Review URL: https://codereview.chromium.org/1417393004
This makes texture-backed images and bitmaps down a new code path. It adds a pinch point via the texture adjuster that will be used to handle copied necessary for different texture targets. It also fixes bugs in the existing code exhibited by recent updates to the bleed GM. The plan is to move the the sw/generator-backed imgs/bmps on to this code path with future changes.
Review URL: https://codereview.chromium.org/1424313010
Disable SkImageDecoder's code which relies on Android's customized
libpng and libjpeg. Build standard versions of libpng and libjpeg-turbo
everywhere. The SkImageDecoder code has been replaced with SkCodec, which
can decode subsets using standard library APIs
BUG=skia:
Review URL: https://codereview.chromium.org/1406153015
We no longer need to worry about namespace
conflicts SkBitmapRegionDecoder in Android (which
we are replacing).
Additionally, the static Create() function does not
need to repeat the name BitmapRegionDecoder.
BUG=skia:
Review URL: https://codereview.chromium.org/1415243007
The utility SubsetPath removes parts of a potentially very large path to isolate a minimal test case. SubsetPath is very useful for debugging path ops, but is not path ops specific.
PathOpsBuilderConicTest compares the output of the Path Ops Builder, sequential calls to Simplify, and SkRegions for some number of rotated ovals.
Some tests caused path ops to hang. It was caught adding a loop of curves because the head was not found by the tail. Even though the root cause has been fixed, SkSegment::addCurveTo callers now abort the path op if the same curve was added twice.
The subdivided conic weight was been computed anew. Fortunately, it's a simpler computation that the one it replaces.
Some Simplify() subroutines returned false to signal that the results needed assembling. Change these to abort the current operation instead.
Coincident curve intersection triggered two small bugs; one where no perpendicular could be found for coincident curves, and one where no coincident curves remain after looping.
The SixtyOvals test can be run through multiple processes instead of multiple threads. This strategy allows a 48 core machine to saturate all cores at 100%.
The DEBUG_VISUALIZE_CONICS code in PathOpsConicIntersectionTest acknowleges that it is easier to visualize conics with Skia than with script and html canvas. This test also verifies that path ops subdivision matches geometry chopping.
TBR=reed@google.com
Review URL: https://codereview.chromium.org/1405383004
Logically this CL:
Moves the PathRendererChain from GrContext to GrDrawManager
- this was needed to untangled the Path-Chain/Renderer header mess
- this entailed adding getDrawingMgr so the CMM could access the PathRenderingChain
- this also entailed re-adding freeGpuResources to the GrDrawingMgr
Moves the CanDrawArgs struct up stack
Removes the GrPipelineBuilder from the CanDrawArgs struct
Review URL: https://codereview.chromium.org/1407883004
It's absurdly slow.
We can turn it back on with
skia> python gyp_skia -Dskia_win_ltcg=1
The bots will automatically define skia_is_bot and skia_win_ltcg.
BUG=skia:
Review URL: https://codereview.chromium.org/1407043009
The extension on the mac is .dylib, updated the name.
EGL.h isn't available on mac (unless we include skia_angle.h).
I've got a somewhat bad hack of defining the types that I need
to get this running.
GetProcedureAddress was somehow successfully grabbing gl
functions from another lib. Removed this call, I copied it
from ANGLE impl, but it isn't required.
lib load path works differently, fixed in GYP
BUG=skia:2992
Review URL: https://codereview.chromium.org/1403153002
Update FreeType to a newer version. Because this caused issues in
finding the correct ftoptions.h and ftmodule.h [1], be sure to state
the ones we want explicitly.
This also add gzip.c which is needed for WOFF support [2].
[1] FreeType "Simplify header file hierarchy."
fae382076409db198dfbff36ac4cbb97b05b30a1
[2] FreeType "[gzip] New function `FT_Gzip_Uncompress'."
dc240524ff31891a442225430b28e9620c1fa89f
Review URL: https://codereview.chromium.org/833103004
Recent house cleaning has broken the debugger - mainly around the defunct profiling feature. This makes CL it even more defunct.
Review URL: https://codereview.chromium.org/1416723006
We've migrated SkHwuiRenderer into the Android Framework as
android::uirenderer::TestWindowContext in response to an internal
bug; we now delete that class and change our build references here.
R=djsollen@google.com
Review URL: https://codereview.chromium.org/1407053009
- Move high-precision wall timers from tools/timer to SkTime.
- Implement SkTime::GetMSecs() in terms of SkTime::GetNSecs().
- Delete unused tools/timer code.
I have no idea what's going on there in src/animator.
I don't intend to investigate.
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/70084cbc16ee8162649f2601377feb6e49de0217
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Debug-CrOS_Link-Trybot
Review URL: https://codereview.chromium.org/1422513003
Reason for revert:
broke chromeos
Original issue's description:
> SkTime::GetNSecs()
>
> - Move high-precision wall timers from tools/timer to SkTime.
> - Implement SkTime::GetMSecs() in terms of SkTime::GetNSecs().
> - Delete unused tools/timer code.
>
> I have no idea what's going on there in src/animator.
> I don't intend to investigate.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/70084cbc16ee8162649f2601377feb6e49de0217TBR=reed@google.com,mtklein@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1420923003
- Move high-precision wall timers from tools/timer to SkTime.
- Implement SkTime::GetMSecs() in terms of SkTime::GetNSecs().
- Delete unused tools/timer code.
I have no idea what's going on there in src/animator.
I don't intend to investigate.
BUG=skia:
Review URL: https://codereview.chromium.org/1422513003
As we use this more and more, we end up with more and more inline copies.
On my desktop, this makes Skia ~16K smaller.
Boy perf trybots would be neat.
BUG=skia:
Review URL: https://codereview.chromium.org/1415133003
We will implement this API using SkCodecs.
SkAndroidCodecs will be used to implement the
BitmapRegionDecoder Java API (and possibly
BitmapFactory).
BUG=skia:
Review URL: https://codereview.chromium.org/1406223002
This cleans up tools/ code, or code that should have been in tools/.
The only interesting code change trims features off of PictureRenderer.
It's still in use by a few useful-looking tools.
BUG=skia:
Review URL: https://codereview.chromium.org/1416913003
It's only used by a couple unit tests. We have other ways of getting
the same quality testing of our ref-count code now (e.g. TSAN).
BUG=skia:
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot
Review URL: https://codereview.chromium.org/1408213005
imgblur is intended to establish a ground truth for debugging mask blur issues. It performs a brute force (non-separable) Gaussian blur of the provided image.
The blur code itself is in sk_tools_utils so it can be more easily used programmatically in other places (e.g., blur unit tests).
Review URL: https://codereview.chromium.org/1384203002
Iterating through the 903K skps that represent the
imagable 1M top web pages triggers a number of
bugs, some of which are addressed here.
Some web pages trigger intersecting cubic
representations of arc with their conic
counterparts. This exposed a flaw in coincident
detection that caused an infinite loop. The loop
alternatively extended the coincident section and,
determining the that the bounds of the curve pairs
did not overlap, deleted the extension.
Track the number of times the coincident detection
is called, and if it exceeds an empirically found
limit, assume that the curves are coincident and
force it to be so.
The loop count limit can be determined by enabling
DEBUG_T_SECT_LOOP_COUNT and running all tests. The
largest count is reported on completion.
Another class of bugs was caused by concident
detection duplicating nearly identical points that
had been merged earlier. To track these bugs, the
'handle coincidence' code was duplicated as a
const debug variety that reported if one of a
dozen or so irregularities are present; then it is
easier to see when a block of code that fixes one
irregularity regresses another.
Creating the debug const code version exposed some
non-debug code that could be const, and some that
was experimental and could be removed. Set
DEBUG_COINCIDENCE to track coincidence health and
handling.
For running on Chrome, DEBUG_VERIFY checks the
result of pathops against the same operation
using SkRegion to verify that the results are
nearly the same.
When visualizing the pathops work using
tools/pathops_visualizer.htm, set
DEBUG_DUMP_ALIGNMENT to see the curves after
they've been aligned for coincidence.
Other bugs fixed include detecting when a
section of a pair of curves have devolved into
lines and are coincident.
TBR=reed@google.com
Review URL: https://codereview.chromium.org/1394503003
At draw time, this filter simply concatenates the given matrix to the
CTM, and recurses on its input. The matrix is thus applied to any
upstream filter parameters and crop rects.
BUG=skia:
Review URL: https://codereview.chromium.org/1392833005
Migrating the flag to embedder defines (Chromium already guarded).
Also augment gradient-focused GMs to generate both dithered/undithered
results.
BUG=skia:4436
R=reed@google.com,robertphillips@google.com
Review URL: https://codereview.chromium.org/1400813006
Note: this format does not yet pass validation tests.
Add skia_pdf_generate_pdfa GYP flag. Default to off for now.
PDF/A files are not reproducable, so they make correctness
testing harder.
Turn the Metadata struct into te SkPDFMetadata struct. This
splits out a lot of functionality around both kinds of metadata.
When PDF/A is used, add an ID entry to the trailer.
Add SkPDFObjNumMap::addObjectRecursively.
Test with
GYP_DEFINES=skia_pdf_generate_pdfa=1 bin/sync-and-gyp
ninja -C out/Release dm
out/Release/dm --config pdf --src skp gm -w /tmp/dm
With skia_pdf_generate_pdfa=0, all PDFs generated from GMs and
SKPs are identical. With skia_pdf_generate_pdfa=1, all PDFs
generated from GMs and SKPs render identically in Pdfium.
BUG=skia:3110
Review URL: https://codereview.chromium.org/1394263003
Reason for revert:
SkMD5 is not really part of the Skia library. This is breaking the roll by using it, since Chromium doesn't build it.
Original issue's description:
> SkPDF: Optionally output PDF/A-2b archive format.
>
> Note: this format does not yet pass validation tests.
>
> Add skia_pdf_generate_pdfa GYP flag. Default to off for now.
> PDF/A files are not reproducable, so they make correctness
> testing harder.
>
> Turn the Metadata struct into te SkPDFMetadata struct. This
> splits out a lot of functionality around both kinds of metadata.
>
> When PDF/A is used, add an ID entry to the trailer.
>
> Add SkPDFObjNumMap::addObjectRecursively.
>
> Test with
>
> GYP_DEFINES=skia_pdf_generate_pdfa=1 bin/sync-and-gyp
> ninja -C out/Release dm
> out/Release/dm --config pdf --src skp gm -w /tmp/dm
>
> With skia_pdf_generate_pdfa=0, all PDFs generated from GMs and
> SKPs are identical. With skia_pdf_generate_pdfa=1, all PDFs
> generated from GMs and SKPs render identically in Pdfium.
>
> BUG=skia:3110
>
> Committed: https://skia.googlesource.com/skia/+/939c0fe51f157104758bcb268643c8b6d317a530TBR=tomhudson@google.com,halcanary@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:3110
Review URL: https://codereview.chromium.org/1398193002
Note: this format does not yet pass validation tests.
Add skia_pdf_generate_pdfa GYP flag. Default to off for now.
PDF/A files are not reproducable, so they make correctness
testing harder.
Turn the Metadata struct into te SkPDFMetadata struct. This
splits out a lot of functionality around both kinds of metadata.
When PDF/A is used, add an ID entry to the trailer.
Add SkPDFObjNumMap::addObjectRecursively.
Test with
GYP_DEFINES=skia_pdf_generate_pdfa=1 bin/sync-and-gyp
ninja -C out/Release dm
out/Release/dm --config pdf --src skp gm -w /tmp/dm
With skia_pdf_generate_pdfa=0, all PDFs generated from GMs and
SKPs are identical. With skia_pdf_generate_pdfa=1, all PDFs
generated from GMs and SKPs render identically in Pdfium.
BUG=skia:3110
Review URL: https://codereview.chromium.org/1394263003
Rather than implementing some sort of "fill" in every
SkCodec subclass for incomplete images, let's make the
parent class handle this situation.
This includes an API change to SkCodec.h
SkCodec::getScanlines() now returns the number of lines it
read successfully, rather than an SkCodec::Result enum.
getScanlines() most often fails on an incomplete input, in
which case it is useful to know how many lines were
successfully decoded - this provides more information than
kIncomplete vs kSuccess. We do lose information when the
API is used improperly, as we are no longer able to return
kInvalidParameter or kScanlineNotStarted.
Known Issues:
Does not work for incomplete fFrameIsSubset gifs.
Does not work for incomplete icos.
BUG=skia:
Review URL: https://codereview.chromium.org/1332053002
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
drawImage calls now properly embeds the original jpeg.
NOTE: drawBitmap*() calls no longer embed JPEG files when
possible (this is in advance of eliminating bitmaps backed
by encoded data). Chromium has already moved from
drawBitmap to drawImage.
Comparisons:
control:
total PDF drawImage/drawBitmap calls: 8010
total PDF jpeg images: 0
total PDF regular images: 3581
experiament:
total PDF drawImage/drawBitmap calls: 8014
total PDF jpeg images: 271
total PDF regular images: 3311
total PDF regular images: 3582 (271 + 3311)
When comparing rendered output there were perceptual
differences in the following four GMs: colorcube, emboss,
colormatrix, and tablecolorfilter. All of these differences
were improvements (that is, closer to the 8888 rendering)
due fixing a bug with colorfilters and forgetting to call
notifyPixelsChanged.
No SKPs had perceptual differences.
Total PDF size dropped from 133964 kB to 126276 kB, a 5.7%
improvement (mostly due to restoring use of JPG images in
SKPs).
BUG=skia:4370
Review URL: https://codereview.chromium.org/1372783003
Benefits:
- This mimics other decoding APIs (including the ones SkCodec relies
on, e.g. a png_struct, which can be used to decode an entire image or
one line at a time).
- It allows a client to ask us to do what we can do efficiently - i.e.
start from encoded data and either decode the whole thing or scanlines.
- It removes the duplicate methods which appeared in both SkCodec and
SkScanlineDecoder (some of which, e.g. in SkJpegScanlineDecoder, just
call fCodec->sameMethod()).
- It simplifies moving more checks into the base class (e.g. the
examples in skbug.com/4284).
BUG=skia:4175
BUG=skia:4284
=====================================================================
SkScanlineDecoder.h/.cpp:
Removed.
SkCodec.h/.cpp:
Add methods, enums, and variables which were previously in
SkScanlineDecoder.
Default fCurrScanline to -1, as a sentinel that start has not been
called.
General changes:
Convert SkScanlineDecoders to SkCodecs.
General changes in SkCodec subclasses:
Merge SkScanlineDecoder implementation into SkCodec. Most (all?) owned
an SkCodec, so they now call this-> instead of fCodec->.
SkBmpCodec.h/.cpp:
Replace the unused rowOrder method with an override for
onGetScanlineOrder.
Make getDstRow const, since it is called by onGetY, which is const.
SkCodec_libpng.h/.cpp:
Make SkPngCodec an abstract class, with two subclasses which handle
scanline decoding separately (they share code for decoding the entire
image). Reimplement onReallyHasAlpha so that it can return the most
recent result (e.g. after a scanline decode which only decoded part
of the image) or a better answer (e.g. if the whole image is known to
be opaque).
Compute fNumberPasses early, so we know which subclass to instantiate.
Make SkPngInterlaceScanlineDecoder use the base class' fCurrScanline
rather than a separate variable.
CodexTest.cpp:
Add tests for the state changes in SkCodec (need to call start before
decoding scanlines; calling getPixels means that start will need to
be called again before decoding more scanlines).
Add a test which decodes in stripes, currently only used for an
interlaced PNG.
TODO: Add tests for onReallyHasAlpha.
Review URL: https://codereview.chromium.org/1365313002
Reason for revert:
Need to somehow get access to encoders in chrome -- link error on the roll since SkImageEncoder is not built as part of chrome.
Original issue's description:
> change pixel-serializer to support reencoding existing data
>
> Trying to evolve this interface so it can
> - support rich set of backend-encoders (including ones like ETC1 that can cheaply convert to KXT
> - allow for encoding images as well as bitmaps (e.g. for picture serialization)
> - perhaps replace SkImageEncoder as an API (assuming we create a factory that returns a serializer given a format)
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/13f48dc85aa68a60da66aaf39c93d527d11d1278TBR=scroggo@google.com,msarett@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1371983003
Trying to evolve this interface so it can
- support rich set of backend-encoders (including ones like ETC1 that can cheaply convert to KXT
- allow for encoding images as well as bitmaps (e.g. for picture serialization)
- perhaps replace SkImageEncoder as an API (assuming we create a factory that returns a serializer given a format)
BUG=skia:
Review URL: https://codereview.chromium.org/1373683003
One side effect is that the SkShader's (or implicit shader's) fragment processor is responsible for the transition from an unpremul paint color to a premul color.
Review URL: https://codereview.chromium.org/1348583002
To avoid breaking existing SKPs, add a deserialization stub which
unflattens SkBitmapSource records to SkImageSources.
R=reed@google.com,mtklein@google.com,robertphillips@google.com
Review URL: https://codereview.chromium.org/1363913002
This implementation improves performance of SkMutex acquire / release pair from 42ns -> 13 ns.
SkSharedMutex and SkSpinlock have the same performance.
It also removes specialized windows and linux/mac code.
BUG=skia:
Review URL: https://codereview.chromium.org/1359733002
SkBitmapRegionDecoderInterface provides an interface
for multiple implementations of Android's
BitmapRegionDecoder.
We already have correctness tests in DM that will enable us
to compare the quality of our various BRD implementations.
We also need these performance tests to compare the speed
of our various implementations.
BUG=skia:4357
Review URL: https://codereview.chromium.org/1344993003
Reason for revert:
Failing ImageNewShaderTest on both Android (Tegra3 GPU) and iOS bots.
e.g.
/Users/chrome-bot/buildbot/skiabot-ipad4-000/build/slave/workdir/build/skia/tests/
ImageNewShaderTest.cpp:24 0 == memcmp(bm1.getPixels(), bm2.getPixels(), bm1.getSize())
ImageNewShaderTest.cpp:95 0xFFFF0000 == bmt.getColor(0, y)
ImageNewShaderTest.cpp:98 0xFFDEDEDE == bmt.getColor(x, y)
ImageNewShaderTest.cpp:98 0xFFDEDEDE == bmt.getColor(x, y)
ImageNewShaderTest.cpp:98 0xFFDEDEDE == bmt.getColor(x, y)
ImageNewShaderTest.cpp:98 0xFFDEDEDE == bmt.getColor(x, y)
ImageNewShaderTest.cpp:95 0xFFFF0000 == bmt.getColor(0, y)
...
Original issue's description:
> add ImageShader, sharing code with its Bitmap cousin
>
> This is done by having abstracted the BitmapShaderContext to take a BitmapProvider, instead of just a bitmap. This allows us to share all of that code between SkBitmap and SkImage, since both are valid providers.
>
> It also means that we can simplify SkImage_Base to not need a virtual for onNewShader, since ALL images can uniformly be turned into a shader now.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/0b93e3149d2cb30860c51f9f3204ae811d9a97caTBR=fmalita@chromium.org,bsalomon@google.com,robertphillips@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1355863002
This is done by having abstracted the BitmapShaderContext to take a BitmapProvider, instead of just a bitmap. This allows us to share all of that code between SkBitmap and SkImage, since both are valid providers.
It also means that we can simplify SkImage_Base to not need a virtual for onNewShader, since ALL images can uniformly be turned into a shader now.
BUG=skia:
Review URL: https://codereview.chromium.org/1342113002
The new FP is used to implement SkXM::Mode color filters and SkXM::Mode image filters. Also, these now support all advanced SkXM::Mode xfermodes.
Review URL: https://codereview.chromium.org/1334293003
Adds an entry point to GrContext to allow enumeration and tracing of GPU resources
via the newly added SkTraceMemoryDump.
Plan is for Chrome to call this on each of its GrContexts.
Dumps both the total size of GPU resources, as well as the total purgeable size.
BUG=526261
Review URL: https://codereview.chromium.org/1313743002
This makes the blurcircles bench go from ~33us to ~8us on Windows desktop.
It will require layout test suppressions
Review URL: https://codereview.chromium.org/1311583005
Blink is migrating away from SkBitmaps, so we need an SkImage-based
SkImageFilter source. This is pretty much a 1-1 equivalent of
SkBitmapSource.
To avoid duplication, relocate the SkImage deserialization logic
from SkPictureData to SkReadBuffer.
R=reed@google.com,robertphillips@google.com,senorblanco@chromium.org
Review URL: https://codereview.chromium.org/1343703005
Possible follow-up changes to consider
1. Roll SkImage_Raster and _Gpu into _Generator, where the generator (or cacherator) is backed by a pre-existing texture or raster.
2. Evolve SkImageUsageType into a verb requiring stretching, and have the caller (common code) digest the caps() and usage, so that subclasses are just told what to do (stretch or not)
3. Common code/utility to convert an unstretched texture into a stretch one (and cache it) if the generator can only make an unstretched one.
BUG=skia:
Review URL: https://codereview.chromium.org/1282363002
To match Chrome, make sure we've disabled thread-safe statics, RTTI, and exceptions. Linux needed -fno-threadsafe-statics, Mac needed all three.
Nothing important triggered this CL. I just got confused when I saw exception handling (calls to delete, stack unwinding) in some generated code on my laptop.
BUG=skia:
Review URL: https://codereview.chromium.org/1323533003
The newly created VisualLightweightBenchModule is just the old VisualBench.cpp, but gutted to only include timing code.
Future CLs will harden this abstraction, but for this CL the module owns a backpointer to VisualBench.cpp for a couple of calls.
BUG=skia:
Review URL: https://codereview.chromium.org/1304083007
The million SKPs generated require >5T of storage. A good deal
of that are copies of system fonts.
Chrome built with
#DEFINE SK_WHITELIST_SERIALIZED_TYPEFACES
will omit the font data if the font matches a precomputed
checksum.
The captured SKP prepends sk_ to the names of fonts that
have their data omitted. The SKP consumer can either add
renamed fonts from the recording machine, or add
gDeserializeTypefaceDelegate = WhitelistDeserializeTypeface;
which strips the sk_ prefix when deserializing typefaces.
whitelist_typefaces --check
Computes the checksums of fallback
fonts and returns 0 if the checksums match the checked-in
file SkWhitelistChecksum.cpp.
whitelist_typefaces --generate
Writes an updated version of SkWhitelistChecksum.cpp.
(Added Mike since this modifies a public header)
R=bungeman@google.com,rmistry@google.com,reed@google.com
Review URL: https://codereview.chromium.org/1317913005
The motivation for this was to remove SK_OFFSETOF from SkTypes, but
this CL is mostly about cleaning up our use of offsetof generally.
SK_OFFSETOF is removed to SkTypes and added to the two places it is
actually used (for the non standard behavior of finding the offset of
fields in types which are not standard layout).
Older versions of gcc required POD for offsetof to be used without
warning. Newer versions require the more relaxed standard layout.
Now that we no longer build on older versions of gcc, remove the
old warning suppressions.
PODMatrix is renamed to AggregateMatrix. SkMatrix is already POD
(trivial and standard layout). The PODMatrix name implies that the
POD-ness is needed for the offsetof, but it is actually the aggregate
attribute which is needed for compile time constant initialization.
This makes it more obvious that this can be revisited after we can
rely on constexpr constructors.
This also adds skstd::declval since this allows removal of existing
awkward code which casts a constant to a pointer to find the size of
a field.
TBR=reed@google.com
No API change, only removes unused macro.
Review URL: https://codereview.chromium.org/1309523003
This is a follow-up to https://codereview.chromium.org/1290423007/,
with a couple small changes:
- turn on AVX and AVX2 for Windows using /arch ('EnabledEnhancedInstructionSet')
- reformat and de-conditionalize where possible / irrelevant
Picked up this while poking around in libvpx's Chrome GYPs.
And yes, AVX = 3, AVX2 = 5. Don't even ask what 4 means...
BUG=skia:4117
Review URL: https://codereview.chromium.org/1309253002
This also disables warnings in giflib and fixes
compile warnings in icu, in order to fix a skia
bug.
BUG=skia:4220
Review URL: https://codereview.chromium.org/1314633002
CL (1 of 3) adds empty lists in our .gypi,
and builds the files in those empty lists with the appropriate flags.
CL (2 of 3) will have Chrome's GYP and GN files read these lists,
and build them with the appropriate flags.
CL (3 of 3) will add runtime detection and stub files to the lists
with empty Init_sse42(), Init_avx(), Init_avx2() methods.
After that, we should be able to use SSE 4.2, AVX, and AVX2 if desired.
Some motivation:
- SSE 4.2 adds some sweet string-oriented methods that
can help us write fast high quality 32-bit hashes.
- AVX is SSE doubled, e.g. 8 floats or two SkPMFloat at a time.
- AVX2 is SSE2 doubled, e.g. 8 pixels at a time.
BUG=skia:4117
Review URL: https://codereview.chromium.org/1290423007
SkTemplates.h contains a number of Skia specific utilities which are
not designed for external use. In addition to reducing the external
support burden, this will allow Skia to freely refactor this file.
Review URL: https://codereview.chromium.org/1272293004
This also:
makes the SkLightingShader handle normal maps where the rects aren't aligned between the diffuse and normal maps.
adds a light aggregating class (Lights) to SkLightingShader (along with a Builder nested class).
Split out of https://codereview.chromium.org/1261433009/ (Add SkCanvas::drawLitAtlas call)
Review URL: https://codereview.chromium.org/1291783003
Reason for revert:
derek + Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Debug
Original issue's description:
> Have DM manually encode its .png outputs.
>
> This eliminates some variability on various axes: different PNG encoders, different libpng versions, different formats (RGB, indexed), different unpremultiplication, different sRGB tags.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/3cc0dfffb70c0bd08ed8899efcd2e98da86a6ec7TBR=stephana@google.com,msarett@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1297383002
This eliminates some variability on various axes: different PNG encoders, different libpng versions, different formats (RGB, indexed), different unpremultiplication, different sRGB tags.
BUG=skia:
Review URL: https://codereview.chromium.org/1304443002
It's sort of pointless: all our clients that will have SSE2 at runtime have it
unconditionally at compile time, so the functions in namespace portable will
pick up the SSE2 code. The procs in SkOpts_sse2.o were just duplicate code.
A couple of the procs we had in _sse2.cpp can benefit slightly when compiled
with SSSE3. I've moved those to _ssse3.cpp. This should lead to small speedups
on platforms like Linux and Windows that have a baseline of SSE2.
Similarly, I've removed the call to Init_neon() when NEON is available globally... it's a no-op.
Renaming namespace portable to something clearer is TBD.
BUG=skia:4117
Review URL: https://codereview.chromium.org/1294213002
Reason for revert:
This will make the google3 roll awkward. Reverting.
Original issue's description:
> Depend on ETC1 via DEPS instead of a direct third_party checkin.
>
> Yes, this does mean we'll check out ~40M of code for 2 files...
>
> I think these trybots are moot... they gclient sync before patching.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/ca01d179347b5e848ded97c8228b79ffc6b5e7bfTBR=robertphillips@google.com,djsollen@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1290913008
Yes, this does mean we'll check out ~40M of code for 2 files...
I think these trybots are moot... they gclient sync before patching.
BUG=skia:
Review URL: https://codereview.chromium.org/1296253003
Many of these were excluded from the build for bots that no longer exist.
Will fix up anything that starts failing using dm_flags.py.
BUG=skia:2326,skia:2313, skia:1978
Review URL: https://codereview.chromium.org/1290943004
To do this, create SkImageCacherator, which wraps a generator and provides an
interface to get a cached answer for either the raster or texture output of
the generator.
BUG=skia:
Review URL: https://codereview.chromium.org/1291803002
Rename to SkDeflate so Chromium builders continue to work
Next, we change remove SkFlate from Chromium build files, then we can delete SkFlate.
Review URL: https://codereview.chromium.org/1285913002
When possible use run-time checks (via SkDocument::CreatePDF)
When PDF is disabled, do not compile tests/PDF*.cpp
Review URL: https://codereview.chromium.org/1278403006
Compile SkJpegCodec and SkImageDecoder_libjpeg with
chromium's libjpeg-turbo. SkImageDecoder_libjpeg still uses
libjpeg on Android and the Android framework. SkJpegCodec is
still not compiled on the Android framework.
BUG=skia:
Review URL: https://codereview.chromium.org/1275773004
libwebp has a fix for [1]. Update to the commit that contains the fix.
Update libwebp.gypi, corresponding to libwebp's latest makefile.
Turn back on DM testing for scaled webp, now that it should no longer
use uninitialized memory.
Fix a warning in config.h
[1] https://code.google.com/p/webp/issues/detail?id=254
BUG=skia:4038
Review URL: https://codereview.chromium.org/1280073002
Will regress behavior on gold on test32bfv4.bmp, where we
will no longer fix transparent decodes.
TODO: Start fixing transparent decodes again, or decide
that we don't want to fix them and remove isTransparent
from SkSwizzler. I think this may become more clear when I
start implementing the scanline decoder.
BUG=skia:
Review URL: https://codereview.chromium.org/1258863008
Pretty vanilla translation. I cleaned up who calls whom a little.
Used to be utils -> opts -> utils, now it's just utils -> opts.
I may follow up with a pass over the NEON code for readability
and to clean up dead code.
This turns on NEON A8->R11EAC conversion for ARMv8.
Unit tests which now hit the NEON code still pass.
I can't find any related bench.
BUG=skia:4117
Review URL: https://codereview.chromium.org/1273103002
Traditionally, SkTraceEvent.h was manually kept in sync with base/trace_event/trace_event.h, with project-specific parts intermixed, and tended to drift out of sync a lot (mainly in Blink, less so in Skia).
The SkTraceEventCommon.h now has only the cross-project parts, and can be copy-pasted verbatim between projects (it's an identical copy of base/trace_event/trace_event_common.h), meaning SkTraceEvent.h shouldn't go out of sync as it has before.
BUG=skia:
[mtklein mucking around below here]
NOPRESUBMIT=true
CQ_EXCLUDE_TRYBOTS=client.skia.fyi:skia_presubmit-Trybot
Review URL: https://codereview.chromium.org/1270783002
Nothing too fancy.
Direction enums become enum classes so they don't get all confused. An
alternative is to create one single Direction enum that both blur and
morphology opts use.
BUG=skia:4117
Review URL: https://codereview.chromium.org/1267343004
Motivation: maintaining this code doesn't seem worth the time,
since no one seems to be using it. If someone wants to use it
in the future, just revert this CL.
Review URL: https://codereview.chromium.org/1266093003
Prior to this CL, if a client wanted to decode scanlines, they had to
create an SkCodec in order to get an SkScanlineDecoder. This introduces
complications if input data is not easily shared between the two
objects.
Instead, add methods to SkScanlineDecoder for creating a new one from
input data, and remove the creation functions from SkCodec.
Update DM and tests.
Review URL: https://codereview.chromium.org/1267583002
+268 -535 lines
I also rearranged the code a little bit to encapsulate itself better,
mostly replacing static helper functions with lambdas. This also
let me merge the SSE2 and SSE4.1 code paths.
BUG=skia:4117
Review URL: https://codereview.chromium.org/1264103004
Renames Sk4pxXfermode.h to SkXfermode_opts.h,
and refactors it a tiny bit internally.
This moves xfermode optimization from being "compile-time everywhere but NEON"
to simply "runtime everywhere". I don't anticipate any effect on perf or
correctness.
BUG=skia:4117
Review URL: https://codereview.chromium.org/1264543006
With this new arrangement, the benefits of inlining sk_memset16/32 have changed.
On x86, they're not significantly different, except for small N<=10 where the inlined code is significantly slower.
On ARMv7 with NEON, our custom code is still significantly faster for N>10 (up to 2x faster). For small N<=10 inlining is still significantly faster.
On ARMv7 without NEON, our custom code is still ridiculously faster (up to 10x) than inlining for N>10, though for small N<=10 inlining is still a little faster.
We were not using the NEON memset16 and memset32 procs on ARMv8. At first blush, that seems to be an oversight, but if so it's an extremely lucky one. The ARMv8 code generation for our memset16/32 procs is total garbage, leaving those methods ~8x slower than just inlining the memset, using the compiler's autovectorization.
So, no need to inline any more on x86, and still inline for N<=10 on ARMv7. Always inline for ARMv8.
BUG=skia:4117
Review URL: https://codereview.chromium.org/1270573002
SDL isn't an OS anyway, it's just a library views can use. Remaining
support for Brew was removed some time ago, and there are currently
no uses of SK_BUILD_FOR_PALM.
Review URL: https://codereview.chromium.org/1268573002
There is more than one way to skin this SkPathPriv.h cat.
These constructors are large enough that they probably shouldn't have
been inlined like this anyway.
BUG=skia:4126
Review URL: https://codereview.chromium.org/1253963004
Additionally this CL:
forces the light colors to be opaque
forces the light direction to be normalized
adds a raster implementation
adds a gm
Review URL: https://codereview.chromium.org/1245883003
include/views/SkOSWindow_Win.h includes it.
To move SkTHash.h to include/private, SkChecksum.h needs to go there too. To move SkChecksum.h to include/private, SkTLogic needs to go there too.
This adds a bunch of -Iinclude/private to tools.gyp I missed in the last CL.
No public API changes.
TBR=reed@google.com
BUG=skia:4126
Review URL: https://codereview.chromium.org/1260613006
I'll be moving headers from src/core to include/private, so this guarantees
that anyone who was finding them via -Isrc/core can now find them via
-Iinclude/private.
This is purely mechanical, mostly to preserve my sanity, so it's likely
(harmless) overkill.
Chromium's GYP and GN builds already set -Iinclude/private for Skia builds.
BUG=skia:4126
Review URL: https://codereview.chromium.org/1265443002