mtklein
a723b576ae
SkRecordDraw: incorporate clip into BBH
...
NOTREECHECKS=true
BUG=skia:
R=robertphillips@google.com , senorblanco@chromium.org , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/474983002
2014-08-15 11:49:49 -07:00
djsollen
3b6255493e
Remove SkPaintOptionsAndroid
...
Committed: https://skia.googlesource.com/skia/+/f32331ffdb5de0440bb337aa7cbdd6f33e9ff23b
R=reed@google.com , mtklein@google.com , tomhudson@google.com
Author: djsollen@google.com
Review URL: https://codereview.chromium.org/447873003
2014-08-14 06:29:03 -07:00
bsalomon
c15e28a522
Revert of Remove SkPaintOptionsAndroid (patchset #5 of https://codereview.chromium.org/447873003/ )
...
Reason for revert:
Breaks the Chromium build: http://108.170.220.120:10117/builders/Canary-Chrome-Ubuntu13.10-Ninja-x86_64-DRT/builds/2469/steps/BuildContentShell_1/logs/stdio
Original issue's description:
> Remove SkPaintOptionsAndroid
>
> Committed: https://skia.googlesource.com/skia/+/f32331ffdb5de0440bb337aa7cbdd6f33e9ff23b
R=reed@google.com , mtklein@google.com , tomhudson@google.com , djsollen@google.com
TBR=djsollen@google.com , mtklein@google.com , reed@google.com , tomhudson@google.com
NOTREECHECKS=true
NOTRY=true
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/473543004
2014-08-13 15:18:46 -07:00
djsollen
f32331ffdb
Remove SkPaintOptionsAndroid
...
R=reed@google.com , mtklein@google.com , tomhudson@google.com
Author: djsollen@google.com
Review URL: https://codereview.chromium.org/447873003
2014-08-13 13:09:49 -07:00
halcanary
2512372b68
fix win compiler div/zero
...
R=bsalomon@google.com
TBR=bsalomon@google.com
NOTREECHECKS=true
NOTRY=true
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/474433002
2014-08-13 09:20:08 -07:00
halcanary
fbd3576a18
Flate Test tests if compression works
...
- Produce a compressable stream.
- Assert compression ratio > 1
- In verbose mode, print compression ratio.
R=mtklein@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/464373002
2014-08-13 08:07:38 -07:00
tomhudson
2ed49a492b
Mark fallback fonts in new Android font config parser
...
The new Android fonts.xml format doesn't explicitly tag fallback
fonts, or separate them from system fonts by putting them in a
separate file. We're assuming that any nameless font is a fallback
font.
Adds a unit test to track that we see as many fallback fonts as
expected when parsing a file.
BUG=chromium:400801
R=bungeman@google.com , djsollen@google.com , tomhudson@google.com
Author: tomhudson@chromium.org
Review URL: https://codereview.chromium.org/468893002
2014-08-13 07:53:49 -07:00
halcanary
bc677c8015
Fix Flate Test, also cleanup
...
- Remove SkData double-unref to fix assert.
- Re-enable the test with DEBUG (was disabled due to double-unref assert).
- SkRandom instead of rand() for thread-safety.
- General clean up of the test for readability.
Motivation: I am investigating turning on SkFlate::HaveFlate on Windows.
R=mtklein@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/464333002
2014-08-13 07:14:36 -07:00
halcanary
78ee93f545
Revert of SkImage::NewFromGenerator(SkImageGenerator*), and a unit test. ( https://codereview.chromium.org/465823003/ )
...
Reason for revert:
Mac bots are failing
Original issue's description:
> SkImage::NewFromGenerator(SkImageGenerator*), and a unit test.
>
> Committed: https://skia.googlesource.com/skia/+/186f7b04956a1742f185a4ca69b44b52bc50e7fc
R=reed@google.com
TBR=reed@google.com
NOTREECHECKS=true
NOTRY=true
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/453723003
2014-08-12 09:07:08 -07:00
tfarina
35fbd014e3
Migrate SkRTConfRegistry test to DEF_TEST().
...
BUG=None
TEST=dm --tests=true --gms=false
R=mtklein@google.com , bsalomon@google.com
Author: tfarina@chromium.org
Review URL: https://codereview.chromium.org/444303002
2014-08-12 09:03:16 -07:00
halcanary
186f7b0495
SkImage::NewFromGenerator(SkImageGenerator*), and a unit test.
...
R=reed@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/465823003
2014-08-12 08:04:58 -07:00
caryclark
5e27e0eb1d
fix pathops skp-derived bugs; add more failing tests
...
TBR=
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/463883002
2014-08-12 07:46:33 -07:00
caryclark
80a83adaf2
relax quadratic binary search test
...
Extreme implicit quartic equations solve to roots that are different
enough that they appear to have failed. In this case, fall back on
binary searching to find an intersection.
Relax the condition when this happens; don't give up just because the
computed implicit root points aren't remotely the same.
TBR=reed
BUG=skia:2808
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/456383003
2014-08-12 05:49:37 -07:00
tomhudson
d3ddea284e
Parses sample code provided by Android project. Attempts to keep FontFamily data structures produced consistent with expectations of previous versions of Skia.
...
R=bungeman@google.com , djsollen@google.com , palmer@chromium.org , reed@google.com , hcm@google.com , tomhudson@google.com
BUG=400801
Committed: https://skia.googlesource.com/skia/+/07544757c9fcf0f359f1686a3779eb2e75dd5b36
Author: tomhudson@chromium.org
Review URL: https://codereview.chromium.org/446473003
2014-08-11 11:28:01 -07:00
mtklein
534cc4c569
De-parameterize SkNextDatumFunction.
...
Just a simple refactor to make it clear we're only using this
one method and this one type.
BUG=skia:
R=robertphillips@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/465523002
2014-08-11 10:09:34 -07:00
mtklein
5ad6ee1b2c
Plumbing for using a BBH in SkRecordDraw.
...
For now this only creates a degenerate bounding box hierarchy where all ops
just have maximal bounds. I will flesh out FillBounds in future CL(s).
Not quite sure why QuadTree and TileGrid aren't drawing right---haven't even
looked at the diffs yet---so I've disabled those test modes for now. RTree
seems fine, so that'll at least get us coverage for all this new plumbing.
BUG=skia:
R=robertphillips@google.com , mtklein@google.com , reed@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/454123003
2014-08-11 08:08:43 -07:00
mtklein
f4078ad1ec
SkRecord: Strip out cull-skipping and y-only drawPosTextH skipping.
...
These optimizations are outclassed by a general bounding-box hierarchy,
and are just going to make plugging that into SkRecordDraw more complicated.
BUG=skia:
R=robertphillips@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/452983002
2014-08-08 10:05:20 -07:00
joshualitt
bab82ed05b
Pretty print of shaders
...
BUG=skia:
R=bsalomon@chromium.org , senorblanco@chromium.org , bsalomon@google.com
Author: joshualitt@chromium.org
Review URL: https://codereview.chromium.org/437593004
2014-08-08 09:41:42 -07:00
bsalomon
6eb03cc06d
Add option to dump images from nanobench.
...
Add option to set the repeat count to any number, replacs the --runOnce flag.
R=mtklein@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/450743002
2014-08-07 14:28:50 -07:00
krajcevski
95b1b3d82d
Add astcbitmap to gm slides.
...
Add additional ASTC formats.
Add astc image decoder files.
R=reed@google.com , robertphillips@google.com , halcanary@google.com
Author: krajcevski@google.com
Review URL: https://codereview.chromium.org/444093002
2014-08-07 12:58:38 -07:00
reed
2347b62467
change drawPicture in SkRecord to just ref the picture
...
also fix some int/unsigned/size_t warnings
BUG=skia:
R=mtklein@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/449933002
2014-08-07 12:19:50 -07:00
reed
202ab2a5ca
add isRect() check to AAClip, to detect if a soft-clip is really just an irect
...
taken from (https://codereview.chromium.org/445233006/ )
fix: don't assume that the first yoffset is 0, since we may have performed a translate and not
re-alloced our data.
This reverts commit 0aeea6d344
.
TBR=
Author: reed@google.com
Review URL: https://codereview.chromium.org/443353004
2014-08-07 11:48:10 -07:00
krajcevski
7b62448065
Revert of - Add astcbitmap to gm slides ( https://codereview.chromium.org/444093002/ )
...
Reason for revert:
Breaking DM
Original issue's description:
> - Add astcbitmap to gm slides
> - Add additional ASTC formats
> - Add astc image decoder files
>
> Committed: https://skia.googlesource.com/skia/+/2fc05823fed4b9649338f3029cd1ba05ef49a02f
R=reed@google.com , robertphillips@google.com , halcanary@google.com
TBR=halcanary@google.com , reed@google.com , robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
Author: krajcevski@google.com
Review URL: https://codereview.chromium.org/447343002
2014-08-07 11:33:59 -07:00
reed
0aeea6d344
Revert of add isRect() check to AAClip, to detect if a soft-clip is really just an irect ( https://codereview.chromium.org/445233006/ )
...
Reason for revert:
new code asserts on some pictures
Original issue's description:
> add isRect() check to AAClip, to detect if a soft-clip is really just an irect
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/592cb8d552556b1e922887d506d00b64bc5d0547
R=bsalomon@google.com , humper@google.com
TBR=bsalomon@google.com , humper@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: reed@google.com
Review URL: https://codereview.chromium.org/452533002
2014-08-07 11:19:11 -07:00
krajcevski
2fc05823fe
- Add astcbitmap to gm slides
...
- Add additional ASTC formats
- Add astc image decoder files
R=reed@google.com , robertphillips@google.com , halcanary@google.com
Author: krajcevski@google.com
Review URL: https://codereview.chromium.org/444093002
2014-08-07 11:18:09 -07:00
tomhudson
8aed3c151f
Don't fail unit test if resources not found on device.
...
Not 100% sure about the right thing to do here; looks like some other
tests warn but don't officially fail.
R=djsollen@google.com , tomhudson@google.com
Author: tomhudson@chromium.org
Review URL: https://codereview.chromium.org/451703004
2014-08-07 10:20:51 -07:00
reed
592cb8d552
add isRect() check to AAClip, to detect if a soft-clip is really just an irect
...
BUG=skia:
R=bsalomon@google.com , humper@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/445233006
2014-08-07 09:20:12 -07:00
Derek Sollenberger
da7a944e29
Revert "Remove SkPaintOptionsAndroid"
...
This reverts commit 27fb94999b
.
Review URL: https://codereview.chromium.org/450513002
2014-08-06 16:34:40 -04:00
Derek Sollenberger
27fb94999b
Remove SkPaintOptionsAndroid
...
Review URL: https://codereview.chromium.org/447873003
2014-08-06 16:30:51 -04:00
fmalita
b5f7826c51
Explicit tile bounds for SkPictureShader
...
The integer picture size is not granular enough to allow precise tiling
in arbitrary coordinate systems. This CL adds an optional tile bounds
float rect param to control the tile size and location.
(this also allows tile spacing emulation for picture
shaders).
R=reed@google.com , robertphillips@google.com
Author: fmalita@chromium.org
Review URL: https://codereview.chromium.org/437393003
2014-08-06 13:07:15 -07:00
djsollen
1b27704eba
Remove ALL font fallback logic from Skia.
...
R=reed@google.com , bungeman@google.com , caryclark@google.com
Author: djsollen@google.com
Review URL: https://codereview.chromium.org/434623002
2014-08-06 06:58:06 -07:00
tomhudson
07544757c9
Parses sample code provided by Android project. Attempts to keep FontFamily data structures produced consistent with expectations of previous versions of Skia.
...
R=bungeman@google.com , djsollen@google.com , tomhudson@google.com
Author: tomhudson@chromium.org
Review URL: https://codereview.chromium.org/446473003
2014-08-05 13:35:02 -07:00
krajcevski
e90c900ed7
Add ETC1 format to SkTextureCompressor
...
R=robertphillips@google.com
Author: krajcevski@google.com
Review URL: https://codereview.chromium.org/432143002
2014-08-05 07:37:27 -07:00
tomhudson
f79673bbae
Test and generalize font configuration parser
...
Add a basic unit test for the Android font configuration parser.
Add a check for the new LMP file format; on detection, switch to a new
(as-yet unwritten) parser.
R=bungeman@google.com , djsollen@google.com , tomhudson@google.com
Author: tomhudson@chromium.org
Review URL: https://codereview.chromium.org/439813002
2014-08-05 06:36:14 -07:00
krajcevski
50495571df
Revert of Add ETC1 format to SkTextureCompressor ( https://codereview.chromium.org/432143002/ )
...
Reason for revert:
Breaking Chrome.
Original issue's description:
> Add ETC1 format to SkTextureCompressor
>
> Committed: https://skia.googlesource.com/skia/+/5d8b1b44ea7636fc8e98247cb311568f277ce3a5
R=robertphillips@google.com
TBR=robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
Author: krajcevski@google.com
Review URL: https://codereview.chromium.org/438443004
2014-08-04 09:47:32 -07:00
krajcevski
5d8b1b44ea
Add ETC1 format to SkTextureCompressor
...
R=robertphillips@google.com
Author: krajcevski@google.com
Review URL: https://codereview.chromium.org/432143002
2014-08-04 09:08:29 -07:00
halcanary
a0cc8334da
add a libjpeg test
...
This tests for a bug in libjpeg where INT32 is typedefed to long
and memory is written to outside of the array.
BUG=skia:2791
R=djsollen@google.com , mtklein@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/435753002
2014-08-01 10:31:48 -07:00
krajcevski
4ad76e3511
Add initial pipeline for decompressors
...
Committed: https://skia.googlesource.com/skia/+/14a1df0bcd00734e6efbe4a21629fe95118815ef
R=robertphillips@google.com
Author: krajcevski@google.com
Review URL: https://codereview.chromium.org/432503002
2014-07-31 14:12:51 -07:00
robertphillips
0c42332859
Add CTM to the cached layers' key and reduce render target pingponging in layer pre-rendering
...
The CTM is required on the key so we will re-render when necessary.
The SkGpuDevice change ensures big layers in the midst of atlas-able layers don't cause a render target switch.
R=bsalomon@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/433553002
2014-07-31 11:02:38 -07:00
mtklein
1b51d261ec
Revert of Add initial pipeline for decompressors ( https://codereview.chromium.org/432503002/ )
...
Reason for revert:
New test is crashing on Android.
http://108.170.220.21:10117/builders/Test-Android-Nexus10-MaliT604-Arm7-Debug/builds/2509/steps/RunTests/logs/stdio
http://108.170.220.21:10117/builders/Test-Android-Nexus4-Adreno320-Arm7-Debug/builds/2313/steps/RunTests/logs/stdio
Original issue's description:
> Add initial pipeline for decompressors
>
> Committed: https://skia.googlesource.com/skia/+/14a1df0bcd00734e6efbe4a21629fe95118815ef
R=robertphillips@google.com , krajcevski@google.com
TBR=krajcevski@google.com , robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/425223006
2014-07-31 09:34:21 -07:00
krajcevski
14a1df0bcd
Add initial pipeline for decompressors
...
R=robertphillips@google.com
Author: krajcevski@google.com
Review URL: https://codereview.chromium.org/432503002
2014-07-31 08:42:06 -07:00
dneto
3f22e8c44a
Fix end-of-pattern matching for Skia recording optimization.
...
The recorder optimizer's pattern matcher was accepting command sequences
when it shouldn't have.
In the submitted case, and the pattern matcher was looking for:
saveLayer, drawBitmap, restore
and in the rendering for the submitted case, the sequence of commands
were:
saveLayer, drawBitmap, drawBitmap, restore
This sequence was improperly accepted by the matcher, and the optimizer
reduced the sequence to:
drawBitmap, drawBitmap
where the opacity from the saveLayer paint argument was applied
to the first drawBitmap only.
The user-visible effect in Chrome was a flashing effect on an image
caused by incorrect (too-high) opacity.
The patch adds a Skia test to check for pixel colour values in
a similarly structured recording. All other Skia tests pass.
Blink layout tests also pass with this change.
BUG=chromium:344987
R=robertphillips@google.com , reed@google.com , mtklein@google.com
Author: dneto@chromium.org
Review URL: https://codereview.chromium.org/430503004
2014-07-30 15:42:22 -07:00
senorblanco
3d822c29d4
Intersect SkPictureImageFilter bounds against clip bounds.
...
Intersect SkPictureImageFilter bounds against clip bounds
to avoid unnecessary processing. This is how the other
filters work (via applyCropRect()), but SkPictureImageFilter
maintains its own crop.
BUG=skia:
R=bsalomon@google.com
Author: senorblanco@chromium.org
Review URL: https://codereview.chromium.org/428263003
2014-07-30 14:49:31 -07:00
mtklein
e83909f76c
Add some debugging to PremulAlphaRoundTrip test.
...
BUG=skia:2782
R=bensong@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/429313002
2014-07-30 12:37:19 -07:00
senorblanco
55b6d8be99
Implement a persistent uniqueID-based cache for SkImageFilter.
...
Add a unique ID to SkImageFilter, and use it as part
of a persistent cache of image-filtered results. This is used for
caching frame-to-frame coherent filters.
We also keep track of which filter subtrees do not reference the
src input, and use a GenID of zero for the src input in that case.
That way, subtrees which are not dependent on the filter input can be
cached independently of it.
This gives approximately a 4X speedup on
letmespellitoutforyou.com/samples/svg/filter_terrain.svg on Z620
and Nexus10. The cache key consists of the uniqueID of the filter, the
clip bounds, the CTM and the genID of the input bitmap.
Since this does not yet handle the case where the input primitives
(and part of the resulting filter tree) are unchanged, we have
to keep around the external cache for that painting case.
When the work to cache unchanging input primitives is done, the
old cache can be removed, and the new UniqueIDCache will be renamed
to Cache.
R=bsalomon@google.com , mtklein@google.com
Author: senorblanco@chromium.org
Review URL: https://codereview.chromium.org/414483003
2014-07-30 11:26:46 -07:00
mtklein
6d88e6ce51
Fix way-over-allocation in pipe.
...
https://codereview.chromium.org/283093002 fixed some bugs in pipe memory
allocation, but also introduced one of its own: nearly every block requested
from needOpBytes() got its own 16K allocation.
The correct logic is to take the requested size, add four more bytes for a
DrawOp, make sure that's 4-byte aligned, then check to see if there's enough
space for that in the current block. If there's not, allocate at least
MIN_BLOCK_SIZE bytes to fit the request.
The bug is that I moved that round-up-to-MIN_BLOCK_SIZE step before checking
for space in the current block. This means most (all?) blocks will be 16K but
never seem to have room to fit another allocation. You need 8 bytes? You get
16K. You need 8 more bytes? Nope, can't fit that. Here's a new 16K...
This reverts the change to the test I made then, which really should have
tipped me off. It was testing exactly this bug.
BUG=372671
R=tomhudson@chromium.org , tomhudson@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/433463003
2014-07-30 09:17:54 -07:00
krajcevski
b5294e8d45
Bring LATC in line with other formats (i.e. write a blitter and
...
an "optimized" compression routine).
R=robertphillips@google.com
Author: krajcevski@google.com
Review URL: https://codereview.chromium.org/429683003
2014-07-30 08:34:51 -07:00
robertphillips
09dde64628
Now always use Atlas for layer cache
...
This is setup for running cluster telemetry tests
R=bsalomon@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/429593002
2014-07-29 07:14:49 -07:00
robertphillips
8ab8cc07cf
Finish removing GrTHashTable
...
This class is no longer used in Ganesh (in favor of SkTDynamicHash)
R=jvanverth@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/421253003
2014-07-29 06:17:49 -07:00
robertphillips
320c92380f
Add plot-based purging to GrLayerCache
...
This CL allows a GrPlot full of atlased layer to be purged from the atlas to make room for new layers.
R=jvanverth@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/411703003
2014-07-29 06:07:19 -07:00