mtklein
d910f54443
Fix saveLayer() with a pixel-moving filter vs SkBBoxHierarchyRecord / SkRecordDraw
...
In SkBBoxHierarchyRecord:
Since the bounds we pass to saveLayer are in the pre-filtering
coordinate space, they aren't correct for determining the actual
device pixels touched by the saveLayer in this case.
The easiest fix for now is to pass the clip bounds, since the final
draw done in restore() will never draw outside the clip.
In SkRecordDraw:
We do adjust the bounds passed to saveLayer, so we just need to make
sure that when we're using a paint that may affect transparent black,
we ignore the calculated bounds of draw ops and use the clip intersected
with those adjusted bounds.
See originally crrev.com/497773002
BUG=skia:
R=reed@google.com , senorblanco@chromium.org , junov@chromium.org , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/496963003
2014-08-22 09:06:34 -07:00
fmalita
51bf9573b8
Add some text blob bounds unit tests.
...
R=robertphillips@google.com
Author: fmalita@chromium.org
Review URL: https://codereview.chromium.org/498693002
2014-08-22 07:50:46 -07:00
joshualitt
30ba436f04
Initial refactor of shaderbuilder to prepare for geometry shaders
...
gitignore for eclipse
BUG=skia:
R=bsalomon@google.com , bsalomon@chromium.org
Author: joshualitt@chromium.org
Review URL: https://codereview.chromium.org/491673002
2014-08-21 20:18:45 -07:00
fmalita
c6765d69e3
Add some SkTextBlob builder tests.
...
R=reed@google.com , robertphillips@google.com
Author: fmalita@chromium.org
Review URL: https://codereview.chromium.org/493443004
2014-08-21 15:03:04 -07:00
mtklein
c92e550d36
Install a hook to swap between SkPicture backends with a single define.
...
BUG=skia:
R=robertphillips@google.com , reed@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/492023002
2014-08-21 13:07:27 -07:00
reed
04617139f7
expose generalized imagecache key
...
BUG=skia:
R=mtklein@google.com , halcanary@google.com , qiankun.miao@intel.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/483493003
2014-08-21 09:46:49 -07:00
mtklein
53fecfb15d
Our SkPicture::Analysis visitors should recurse into nested pictures.
...
BUG=skia:
R=tomhudson@google.com , mtklein@google.com , reed@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/495793002
2014-08-21 09:11:38 -07:00
reed
9fa60daad4
Simplify flattening to just write enough to call the factory/public-constructor for the class. We want to *not* rely on private constructors, and not rely on calling through the inheritance hierarchy for either flattening or unflattening(CreateProc).
...
Refactoring pattern:
1. guard the existing constructor(readbuffer) with the legacy build-flag
2. If you are a instancable subclass, implement CreateProc(readbuffer) to create a new instances from the buffer params (or return NULL).
If you're a shader subclass
1. You must read/write the local matrix if your class accepts that in its factory/constructor, else ignore it.
R=robertphillips@google.com , mtklein@google.com , senorblanco@google.com , senorblanco@chromium.org , sugoi@chromium.org
Author: reed@google.com
Review URL: https://codereview.chromium.org/395603002
2014-08-21 07:59:51 -07:00
djsollen
a8d2c4adb8
Temporarily adjust Matrix.isSimilarity test tolerance on 64-bit ARM devices
...
BUG=skia:2405
R=halcanary@google.com , jvanverth@google.com , reed@google.com
Author: djsollen@google.com
Review URL: https://codereview.chromium.org/494113002
2014-08-21 07:40:43 -07:00
mtklein
c551d9fcae
Implement SkPicture::hasText() for SkRecord backend.
...
Plus, some small tweaks to the existing code surrounding it. Just proposals,
will undo whatever you don't like.
BUG=skia:
R=mtklein@google.com , tomhudson@google.com , reed@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/494683003
2014-08-20 08:09:46 -07:00
reed
b88813683c
fix Image::isOpaque test to not leak
...
BUG=skia:
R=halcanary@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/495523002
2014-08-20 07:24:01 -07:00
tomhudson
3a0f279167
Move the code over using the same template type approach previously used for willPlayBackBitmaps in http://skbug.com/2702 .
...
Also unifies that flag and this one into a struct so they and others can be computed together. The struct is stored const to enforce lifetime expectations. Adds a few new cases to the unit test.
BUG=skia:2700
R=mtklein@google.com , reed@google.com , robertphillips@google.com , tomhudson@google.com
Committed: https://skia.googlesource.com/skia/+/60c2a79cfa8ceebcbafc243407564dc71f5e3b4f
Author: tomhudson@chromium.org
Review URL: https://codereview.chromium.org/364823009
2014-08-20 05:29:41 -07:00
piotaixr
d2a3522503
Add the method isOpaque() to SkImage
...
BUG=skia:2766
R=junov@chromium.org , halcanary@google.com , scroggo@google.com , reed@google.com , bsalomon@google.com
Author: piotaixr@chromium.org
Review URL: https://codereview.chromium.org/406673003
2014-08-19 14:29:02 -07:00
caryclark
38dd9f2e41
remove unused SkIntToFloatCast_NoOverflowCheck
...
R=reed@google.com , reed
BUG=skia:2849
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/483273003
2014-08-19 07:39:41 -07:00
halcanary
97d2c0a216
Move SkReadBuffer.h and SkReader32.h out of include.
...
Committed: https://skia.googlesource.com/skia/+/2a51d7c74cec217195f861677de8998b382b39e4
R=mtklein@google.com , reed@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/481053002
2014-08-19 06:27:53 -07:00
Mike Klein
27dc17c297
Revert "Move the code over using the same template type approach previously used for willPlayBackBitmaps in http://skbug.com/2702 ."
...
This reverts commit 60c2a79cfa
.
BUG=skia:
Review URL: https://codereview.chromium.org/481173003
2014-08-18 18:35:16 -04:00
tomhudson
60c2a79cfa
Move the code over using the same template type approach previously used for willPlayBackBitmaps in http://skbug.com/2702 .
...
Also unifies that flag and this one into a struct so they and others can be computed together. The struct is stored const to enforce lifetime expectations. Adds a few new cases to the unit test.
BUG=skia:2700
R=mtklein@google.com , reed@google.com , robertphillips@google.com , tomhudson@google.com
Author: tomhudson@chromium.org
Review URL: https://codereview.chromium.org/364823009
2014-08-18 15:07:13 -07:00
halcanary
f128f53a5b
Revert "Move SkReadBuffer.h and SkReader32.h out of include."
...
This reverts commit 2a51d7c74c
.
Breaking Blink
NOTRY=true
R=bungeman@google.com
TBR=bungeman@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/472303006
2014-08-18 13:48:13 -07:00
mtklein
3e8232b6ef
Counterproposal for skirting the BBH when the query fully contains the picture.
...
BUG=skia:
R=reed@google.com , robertphillips@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/485703002
2014-08-18 13:39:11 -07:00
halcanary
2a51d7c74c
Move SkReadBuffer.h and SkReader32.h out of include.
...
R=mtklein@google.com , reed@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/481053002
2014-08-18 13:04:59 -07:00
ajuma
750ae26745
Expose API for whether an SkPicture contains text
...
BUG=chromium:399728
R=reed@google.com , nduca@chromium.org
Author: ajuma@chromium.org
Review URL: https://codereview.chromium.org/478673002
2014-08-18 12:59:55 -07:00
mtklein
62b67ae96e
Start actually bounding some draw ops.
...
This covers most of the common draws.
BUG=skia:
R=robertphillips@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/469213007
2014-08-18 11:10:37 -07:00
robertphillips
6617d509ab
Rename GPUAccelData to GrAccelData
...
This is calved off of (Add new API to allow layer hoisting/atlasing across picture piles
- https://codereview.chromium.org/474623002/ )
R=bsalomon@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/482773002
2014-08-18 09:39:34 -07:00
robertphillips
6f294af43b
Refactor GrLayerCache for new API
...
The only substantive change in this CL is skipping atlasing
for any layers that are involved in nesting. Prior versions
have allowed nesting layers to be atlased.
--------------------------------------------------------
All times are on Windows with a repeat count of 200.
Format is: <time in ms> (<# of glBindframebuffer calls>)
How to interpret this:
For the boogie page:
both columns should be the same (since boogie has no
nested layers)
without the new API the tiled case doesn't show any real
benefit from hoisting
For the carsvg page:
The nesting change does increase the number of FBO
switches but doesn't kill performance
Because of the location & size of the layers the
tile case does show some improvement (even
without the new API)
boogie
-------
w/o nested change w/ nested change
simple 5.62 (811) N/A
tiled 7.72 (811) N/A
simple w/ hoisting 5.23 (409) 5.77 (409)
(but no caching)
tiled w/ hoisting 7.57 (809) 7.49 (809)
(but no caching)
carsvg
------
w/o nested change w/ nested change
simple 60.37 (141990) N/A
tiled 115.13 (256929) N/A
simple w/ hoisting 41.57 (64570) 42.82 (72279)
(but no caching)
tiled w/ hoisting 84.24 (154352) 84.71 (165630)
(but no caching)
R=bsalomon@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/476833004
2014-08-18 08:50:03 -07:00
halcanary
ea4673fde6
SkImage::NewFromGenerator(SkImageGenerator*), and a unit test.
...
R=reed@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/465823003
2014-08-18 08:27:09 -07:00
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