This reverts commit fc8dc3194a.
Reason for revert: Breaks Build-Mac-Clang-Arm7-{Debug,Release}-iOS builds.
Example tasks:
* https://chromium-swarm.appspot.com/task?id=3322f668620b9e10&refresh=10
* https://chromium-swarm.appspot.com/task?id=332296146331e810&refresh=10
Original change's description:
> WIP: Skia support library for ICC tasks
>
> As a starting point, this would be mostly trivial to implement using
> SkColorSpace.
>
> This also would give us the flexibility to begin to move all of
> the ICC related code from SkColorSpace to SkICC.
>
> What are the advantages of moving this away from SkColorSpace?
> (1) A long term goal (once Chrome uses SkCodec), might be to
> move SkColorSpace::MakeICC() out of the public API. That way,
> we can guarantee that we can draw to/from *any* SkColorSpace.
> (2) Keeps SkColorSpace separate from ICC-specific representations
> like SkColorSpaceTransferFn etc.
>
> BUG=skia:
>
> Change-Id: Iddeb9903221fb57fbfc01218d8641c928b4a5165
> Reviewed-on: https://skia-review.googlesource.com/5676
> Commit-Queue: Matt Sarett <msarett@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
>
TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: Ibdf272fce25892402bd3e85595fb8814cdf59856
Reviewed-on: https://skia-review.googlesource.com/6232
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Change-Id: I776f37e42dcab8b16535c48df9c405b1f211f6c9
Reviewed-on: https://skia-review.googlesource.com/6165
Commit-Queue: Brian Salomon <brian@thesalomons.net>
Reviewed-by: Brian Osman <brianosman@google.com>
This intermediary change only exists to make the actual class rename change readable on gerrit due to gerrit not recognizing file renames correctly.
Change-Id: I919f84837fb17191ca49f00f82e56330f84766da
Reviewed-on: https://skia-review.googlesource.com/6190
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Visualizations for gamma curves were added.
Tool now outputs at the end following 9 ='s a list of all output images.
BUG=skia:
Change-Id: Id934c4c8cceec68291527554c2c951be08593ef5
Reviewed-on: https://skia-review.googlesource.com/6085
Commit-Queue: Robert Aftias <raftias@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Pathops is very well exercised with winding paths,
but less so with xor (even odd) paths.
Rewrite the xor main loop to look like the winding
one to take advantage of the latter's bug fixes.
TBR=reed@google.com
BUG=skia:6041
Change-Id: Ied8d522254a327b1817b54f0abbf4414f5fab7da
Reviewed-on: https://skia-review.googlesource.com/6228
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
BUG=skia:
Change-Id: Id29c47cb4bec6a6d70d6514d18fa4ab9bd31b1e2
Reviewed-on: https://skia-review.googlesource.com/6200
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
As a starting point, this would be mostly trivial to implement using
SkColorSpace.
This also would give us the flexibility to begin to move all of
the ICC related code from SkColorSpace to SkICC.
What are the advantages of moving this away from SkColorSpace?
(1) A long term goal (once Chrome uses SkCodec), might be to
move SkColorSpace::MakeICC() out of the public API. That way,
we can guarantee that we can draw to/from *any* SkColorSpace.
(2) Keeps SkColorSpace separate from ICC-specific representations
like SkColorSpaceTransferFn etc.
BUG=skia:
Change-Id: Iddeb9903221fb57fbfc01218d8641c928b4a5165
Reviewed-on: https://skia-review.googlesource.com/5676
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
The fuzzer triggered relatively new code that
missized the split cubic array, i.e., if a cubic
is split in three places it makes four cubics.
The fuzzer triggered other relative new code
that permits a contour to be empty. This happens
when a line crosses over itself but doesn't
enclose anything.
R=kjlubick@google.com
BUG=skia:6061
Change-Id: I0c04d0d390ff1092f7b3bb28ebbfca517451f497
Reviewed-on: https://skia-review.googlesource.com/6223
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
None of the small details have changed, just some high level
reorganization:
(1) Check for XYZ spaces before A2B.
(2) If we fail to parse the XYZ space, fallback by trying to
parse the A2B space.
This should cause no image diffs on Gold.
There is an image from the ICC website that is *supposed* to
test that we parse the A2B tag before the XYZ tag. Our
behavior on this image will actually not change - the XYZ
tag is invalid (non-D50 matrix), so we fall back to A2B
anyway. I think this behavior is ok.
BUG:674584
Change-Id: I271fd990937268e03e98f5037a0837a574e775ef
Reviewed-on: https://skia-review.googlesource.com/6143
Reviewed-by: Robert Aftias <raftias@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
Recent changes (crrev.com/2045293002) made it so that a GIF may not
support index 8. In that case, make SkAndroidCodec not suggest index 8.
Add a test and a new test file. randPixelsOffset.gif is the same as
randPixels.gif, except its frame is offset. Since it does not have a
transparent index, we have to decode to kN32.
Change-Id: I1c09ab9094083de3dfc436632b3c26dbde1dccbd
Reviewed-on: https://skia-review.googlesource.com/6196
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Change-Id: Ie21e18b631daa24e70df630b9f910213f62bdbdf
Reviewed-on: https://skia-review.googlesource.com/6164
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This method does the same thing as ::bytesWritten but has a confusing
name. It appears there are no external users, so remove it.
Change-Id: I06aed269200c34c2dda36605092f8ea37fcec693
Reviewed-on: https://skia-review.googlesource.com/6188
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
SkPath::dump() and SkPath::dumpHex() dump the fill type
in addition to the data so that the original path can
be faithfully reconstructed.
This may be a small part of why some error cases
aren't reproduced.
R=reed@google.com
BUG=skia:6041
Change-Id: Ice86bf08ea907a6b87ceef182a9316a3c979af0b
Reviewed-on: https://skia-review.googlesource.com/6185
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
This gives a picture image a preferred "native" color space, which
facilitates caching and other things.
BUG=skia:
Change-Id: I95988c14d17f96d7d870b3d1c3b723c36e2c170d
Reviewed-on: https://skia-review.googlesource.com/6158
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
For SkFilterQuality we get:
High - repros for GPU
Medium - repros for both!
Low - repros for both!
None - doesn't repro
For AA quality (with filter quality fixed at High) we get:
AA - repros for GPU
BW - repros for GPU
BUG=673261
Change-Id: Ibf0644352bfa9d9c0e2d166e396ce9e9799b6d9d
Reviewed-on: https://skia-review.googlesource.com/6187
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Change-Id: I6410eae41f051ce38bef6f38d670924c3483c325
Reviewed-on: https://skia-review.googlesource.com/6163
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: Ideab66b7ca227057a767be48aba3ea69a0a19115
Reviewed-on: https://skia-review.googlesource.com/6161
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I9df450f2bce51d4f803d419bef863ca3a3314f09
Reviewed-on: https://skia-review.googlesource.com/6162
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: Iaa5551d3efe33b8b679b1913a19119ee3ed2e9b6
Reviewed-on: https://skia-review.googlesource.com/6159
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Before my recent CL, these were not run at all (because the decode
color type was gray and the bitmap color type was alpha).
https://skia-review.googlesource.com/c/6088/
Now that these are being run, we should mark the bitmap as
gray so they draw correctly.
BUG=skia:
Change-Id: I9bdfe97671a60da2bcbef55377e1c1b2bd326f8f
Reviewed-on: https://skia-review.googlesource.com/6160
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
Otherwise they look funny when we draw them to srgb (drawing
untagged srcs to srgb canvas is undefined).
The image generator tests were recently changed to run on srgb.
BUG=skia:
Change-Id: I6ec07dbf736ed2a16a5db89b4028a44a98037f70
Reviewed-on: https://skia-review.googlesource.com/6182
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
This reverts commit ada12ab055.
Reason for revert: Google3 needs it:
https://test.corp.google.com/ui#id=OCL:142184832:BASE:142184975:1481839118985:32fde8ef
Original change's description:
> Remove all KTX support
>
> It is untested and unused.
>
> Change-Id: I010ff4ad942738f362d42a99af4edbbb1cb0cd71
> Reviewed-on: https://skia-review.googlesource.com/6142
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
>
TBR=mtklein@chromium.org,mtklein@google.com,robertphillips@google.com,scroggo@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I1ea2f9487eb2212efbfcc514122792b70c9e8737
Reviewed-on: https://skia-review.googlesource.com/6181
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
The automatic DEPS hook doesn't actually work with the checkout instructions we have on the site.
BUG=skia:6058
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=6180
Change-Id: Ib1caa617791d3de2b60ddf00fed24d28fd9f83d1
Reviewed-on: https://skia-review.googlesource.com/6180
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
MSAA, Default, and ConvexLinearizing.
Change-Id: I0c6ccf4f135741c2ae96a3801bd042471863a27f
Reviewed-on: https://skia-review.googlesource.com/6155
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
BUG=skia:
Change-Id: Ic2fd767927172646c35dc6a4219717f7b71224ff
Reviewed-on: https://skia-review.googlesource.com/6097
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Started failing due to https://skia-review.googlesource.com/c/5758/
Explanation from scroggo@:
"""
The problem is that the image is truncated before receiving the color
table, which I recently changed (here) from resulting in
kIncompleteInput (which get_images_from_skps determines to be okay) to
resulting in kInvalidInput (which is a failure).
I downloaded the failed image (attached), and it looks as expected
(truncated prior to the color table).
"""
BUG=skia:
Change-Id: I1a0d2e4618afd8abb302d5e268984bb2641756b7
Reviewed-on: https://skia-review.googlesource.com/6145
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
In SkBmpCodec, if the header size does not match a known header,
stop trying to create an SkCodec. We do not know of any BMPs with
arbitrarily sized headers, so this should not cause any real
regressions.
In addition, this fixes a bug where we attempt to read too much data
from a file. Since we attempt to read the header size in one read,
and a size reported by the "BMP" may be larger than SSIZE_MAX, this
will crash when reading from a file.
Add a test.
BUG:b/33651913
Change-Id: I0f3292db3124dc5ac5cbdbc07196bda130a49ba7
Reviewed-on: https://skia-review.googlesource.com/6150
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Don't know why I thought this had to be so complicated before.
BUG=skia:6053
Change-Id: Ie714fed1cb47e9add166d4227d3d31f95eba2411
Reviewed-on: https://skia-review.googlesource.com/6121
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This also removes the "batch tracker" structs from the Op classes. Some tracker fields weren't used and some values were being stored per-path even though onCombineIfPossible assured they were the same. This also backs away from the generic "geometry" naming of batched items in favor of "path" or "shape".
Change-Id: Iabaa0cedf2bdf09ad135fc382ddfba8e5e94e4be
Reviewed-on: https://skia-review.googlesource.com/6152
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
It is untested and unused.
Change-Id: I010ff4ad942738f362d42a99af4edbbb1cb0cd71
Reviewed-on: https://skia-review.googlesource.com/6142
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
generateBitmap was used in one test, so it's easily converted to
tryGenerateBitmap. Then, all calls to tryGenerateBitmap supplied
an image info, so we don't need it to be optional.
BUG=skia:
Change-Id: I19e8f9da7e442a2d37af68b029b5ec85228766f7
Reviewed-on: https://skia-review.googlesource.com/6149
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Exclude complexclip4_bw and complexclip4_aa tests from tile_rt
config, because these tests invoke Skia API that does not support
picture recording.
BUG=skia:
Change-Id: Ia9c04b78b03819e7a060badf9c0fd138b7d66b75
Reviewed-on: https://skia-review.googlesource.com/6095
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
- move bytesWritten calculation to query the tail, allowing write() to be faster since it doesn't have to update anything extra per-write.
- enforce that all blocks are multiple-of-4 bytes big
- update the minimum block size to 4K
Before: 30ms
After: 23ms for non-4-bytes writes
13ms for 4-bytes writes
BUG=skia:
Change-Id: Id06ecad3b9fe426747e02accf1393595e3356ce3
Reviewed-on: https://skia-review.googlesource.com/6087
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
We'd like to fix bugs and make performance improvements to our hash tables. It's a lot easier if we can focus on one implementation, so I'd like to move users of SkTDynamicHash to SkTHashTable, SkTHashMap, or SkTHashSet. This is roughly outlined in the attached Skia bug.
In this case, the conversion from SkTDynamicHash to SkTHashTable is pretty trivial. The main change is that the values stored in the table are no longer assumed to be pointers, so we just need to sprinkle in a couple of * and ->.
SkResourceCache is particularly interesting as the locus of the attached Chromium bug. Porting this now means SkResourceCache will get any fixes we make as soon as we make them.
BUG=skia:6053,chromium:429375
Change-Id: If5dc8d331c62f1d4449fb8f9a7f7e9c746070213
Reviewed-on: https://skia-review.googlesource.com/5984
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Checking to invalidate this on every write() call has a measurable cost, so removing it both simplifies the class and speeds it up.
BUG=skia:
Change-Id: Idf0baa265c9a0b5d26d82fce948c61ed9b0810b1
Reviewed-on: https://skia-review.googlesource.com/6096
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
BUG=skia:
Change-Id: I09c99c58be39f5ce9b772265a469ce33e87b8ad8
Reviewed-on: https://skia-review.googlesource.com/6144
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Change-Id: I409048988cccb68daaeb66828e2772fcb6a0cb06
Reviewed-on: https://skia-review.googlesource.com/6104
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
BUG=skia:
Change-Id: I2328190da7fc1f2db10bb87684fb3a3e95751ec5
Reviewed-on: https://skia-review.googlesource.com/6111
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Remove the tests for gyp_to_android.py, which is going away anyway.
With a .bp file in the Android source tree, the Android build system
attempts and fails to build them.
Do not attempt to run the deleted tests.
Change-Id: Idfecd79917bf6e6d70b601bf36b0f1bdf69c90b6
Reviewed-on: https://skia-review.googlesource.com/6112
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Chromium may ask us to read back from locked IOSurfaces. Calling the command buffer's
glGetIntegerv() with GL_IMPLEMENTATION_COLOR_READ_FORMAT/_TYPE causes the command buffer
to make a call to check the framebuffer status which can hang the driver. So in Mac Chromium
we always use a temporary surface to test for glReadPixels format/type support.
BUG=chromium:662802
Change-Id: I034e24faf3d780b6243f95af66d03dd68e12633c
Reviewed-on: https://skia-review.googlesource.com/6113
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I5934e189f72cbc9c1f306c719b4d6e3f5178a046
Reviewed-on: https://skia-review.googlesource.com/6101
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Hooked up existing to/from srgb, and to_2dot2 stages into
SkColorSpaceXform_A2B. Added a from_2dot2 stage to the raster pipeline
to complete the other direction.
BUG=skia:
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
Change-Id: I3887af3f59f67329d7e843e7355ff54e22cc4ed0
Reviewed-on: https://skia-review.googlesource.com/5840
Commit-Queue: Robert Aftias <raftias@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Matt Sarett <msarett@google.com>
This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext).
There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added.
This is a reland of https://skia-review.googlesource.com/c/5773/ (Add a deferred copy surface)
Change-Id: Ib8fd96d0569274ef781366eb900ed8ee839ae9bd
Reviewed-on: https://skia-review.googlesource.com/6109
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Move the body of simple functions
out of line if they are used in
pointer to member function expressions.
This may fix a chromeos-reported bug.
TBR=reed@google.com
BUG=674047
Change-Id: Id2a080a6d047103a48ebe2319abdae444de413e3
Reviewed-on: https://skia-review.googlesource.com/6110
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
Change-Id: I9930381465ebad690206e2251171004f9579fbcd
Reviewed-on: https://skia-review.googlesource.com/6100
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>