aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkLatticeIter.h
Commit message (Collapse)AuthorAge
* Make the src rects of truths in SkLatticeIter be integral.Gravatar Brian Salomon2018-05-04
| | | | | | | | | | | | | | | This will make the non-bleed gpu implementation more sane as we will know that the input src rects are at integers and if offset by +/-0.5 we will be at pixel centers. No change in behavior, since src rects really were integral all along. Bug: b/77917978 Change-Id: I7193ff0b38de5d10debc24a0121e643573c47cda Reviewed-on: https://skia-review.googlesource.com/125740 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* partial revert of https://skia-review.googlesource.com/c/skia/+/90026 for ↵Gravatar Mike Reed2018-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | android Some errors: frameworks/base/core/jni/android/graphics/Bitmap.cpp:385: error: undefined reference to 'gDitherMatrix_4Bit_16' frameworks/base/core/jni/android/graphics/Bitmap.cpp:397: error: undefined reference to 'gDitherMatrix_4Bit_16' frameworks/base/core/jni/android/graphics/Bitmap.cpp:373: error: undefined reference to 'gDitherMatrix_3Bit_16' frameworks/base/core/jni/android/graphics/Bitmap.cpp:322: error: undefined reference to 'SkPM4f::toF16() const' frameworks/base/core/jni/android/graphics/Bitmap.cpp:333: error: undefined reference to 'SkFloatToHalf(float)' frameworks/base/core/jni/android/graphics/Bitmap.cpp:334: error: undefined reference to 'SkFloatToHalf(float)' frameworks/base/core/jni/android/graphics/Bitmap.cpp:335: error: undefined reference to 'SkFloatToHalf(float)' frameworks/base/core/jni/android/graphics/Bitmap.cpp:336: error: undefined reference to 'SkFloatToHalf(float)' frameworks/base/core/jni/android/graphics/Bitmap.cpp:639: error: undefined reference to 'SkPM4f::toF16() const' frameworks/base/core/jni/android/graphics/Bitmap.cpp:494: error: undefined reference to 'SkPM4f::FromF16(unsigned short const*)' frameworks/base/core/jni/android/graphics/Bitmap.cpp:494: error: undefined reference to 'SkPM4f::unpremul() const' external/skia/src/core/SkUtils.h:24: error: undefined reference to 'SkOpts::memset32' frameworks/base/core/jni/android/graphics/NinePatch.cpp:112: error: undefined reference to 'SkLatticeIter::Valid(int, int, SkCanvas::Lattice const&)' frameworks/base/core/jni/android/graphics/NinePatch.cpp:113: error: undefined reference to 'SkLatticeIter::SkLatticeIter(SkCanvas::Lattice const&, SkRect const&)' frameworks/base/core/jni/android/graphics/NinePatch.cpp:118: error: undefined reference to 'SkLatticeIter::next(SkRect*, SkRect*, bool*, unsigned int*)' frameworks/base/core/jni/android/graphics/NinePatch.cpp:118: error: undefined reference to 'SkLatticeIter::next(SkRect*, SkRect*, bool*, unsigned int*)' frameworks/base/core/jni/android/graphics/NinePatch.cpp:118: error: undefined reference to 'SkLatticeIter::next(SkRect*, SkRect*, bool*, unsigned int*)' external/skia/src/core/SkGeometry.h:427: error: undefined reference to 'SkConic::computeQuadPOW2(float) const' external/skia/src/core/SkGeometry.h:430: error: undefined reference to 'SkConic::chopIntoQuadsPOW2(SkPoint*, int) const' frameworks/base/core/jni/android/graphics/Shader.cpp:77: error: undefined reference to 'SkMakeImageFromRasterBitmap(SkBitmap const&, SkCopyPixelsMode)' Bug: skia:7454 Change-Id: I49b7c0890ac38b576b39e1ce76b22e2420c99889 Reviewed-on: https://skia-review.googlesource.com/90524 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* remove unused declarationsGravatar Mike Reed2018-01-03
| | | | | | | | Bug: skia: Change-Id: If8ca5e3d649dab3cf8b2bdb1cf072ff23cea9465 Reviewed-on: https://skia-review.googlesource.com/90026 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Implement a fast path for solid color lattice rectangleGravatar Stan Iliev2017-12-11
| | | | | | | | | | | | Add a flag that hints, which lattice rectangles are solid colors. Draw solid rectangles and 1x1 rectangles with drawRect. Test: Measured performance of a ninepatch drawn by HWUI Bug: b/69796044 Change-Id: Ib3b00ca608da42fa9f2d2038cc126a978421ec7c Reviewed-on: https://skia-review.googlesource.com/79821 Commit-Queue: Stan Iliev <stani@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com>
* Add SK_API to APIs used by the android framework.Gravatar Derek Sollenberger2017-09-21
| | | | | | | | | | | | | This CL enables us to set the default visibility of the symbols on Android to hidden. It is the intent that all of he SK_APIs that have been added to /src directies should be removed as soon as we can remove their callers within Android. Bug: b/31971097 Change-Id: Ic787f94df0fb0c2b8d941aa7095a12b317c4b5de Reviewed-on: https://skia-review.googlesource.com/49501 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Derek Sollenberger <djsollen@google.com>
* Add a src rect to drawImageLattice() APIGravatar msarett2016-09-30
| | | | | | | | | | This will allow us to draw ninepatches directly from an asset texture without having to upload them individually. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2382893002 Review-Url: https://codereview.chromium.org/2382893002
* Add option to skip rects to drawImageLattice()Gravatar msarett2016-09-02
| | | | | | | | | | | | | | | | HWUI skips transparent rects when drawing. When skia draws using bilerp, we will blend transparent rects with neighboring rects and might draw a bit of a smudge. This CL adds the option to skip rects, allowing us to have compatible behavior with the framework. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2305433002 Review-Url: https://codereview.chromium.org/2305433002
* Batched implementation of drawLattice() for GPUGravatar msarett2016-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bechmarks (Nexus 6P): Src=100x100, Dst=250x250, NumRects=9 Android 77.7us Skia (without patch) 57.2us Skia (with patch) 30.9us Src=100x100, Dst=500x500, NumRects=9 Android 77.0us Skia (without patch) 56.9us Skia (with patch) 31.8us Src=100x100, Dst=1000x1000, NumRects=9 Android 180us Skia (without patch) 96.8us Skia (with patch) 70.5us Src=100x100, Dst=250x250, NumRects=15 Android 208us Skia (without patch) 155us Skia (with patch) 38.2us Src=100x100, Dst=500x500, NumRects=15 Android 207us Skia (without patch) 152us Skia (with patch) 38.4us Src=100x100, Dst=1000x1000, NumRects=15 Android 233us Skia (without patch) 156us Skia (with patch) 99.9us BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255963002 Committed: https://skia.googlesource.com/skia/+/93242c4ae50dfcc0d922cdb3ba80bbc7b4bbe93d Review-Url: https://codereview.chromium.org/2255963002
* Revert of Batched implementation of drawLattice() for GPU (patchset #7 ↵Gravatar msarett2016-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:180001 of https://codereview.chromium.org/2255963002/ ) Reason for revert: Things drawing weird. Original issue's description: > Batched implementation of drawLattice() for GPU > > Bechmarks (Nexus 6P): > > Src=100x100, Dst=250x250, NumRects=9 > Android 77.7us > Skia (without patch) 57.2us > Skia (with patch) 34.7us > > Src=100x100, Dst=500x500, NumRects=9 > Android 77.0us > Skia (without patch) 56.9us > Skia (with patch) 44.5us > > Src=100x100, Dst=1000x1000, NumRects=9 > Android 180us > Skia (without patch) 96.8us > Skia (with patch) 70.5us > > Src=100x100, Dst=250x250, NumRects=15 > Android 208us > Skia (without patch) 155us > Skia (with patch) 55.9us > > Src=100x100, Dst=500x500, NumRects=15 > Android 207us > Skia (without patch) 152us > Skia (with patch) 63.0us > > Src=100x100, Dst=1000x1000, NumRects=15 > Android 233us > Skia (without patch) 156us > Skia (with patch) 99.9us > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255963002 > > Committed: https://skia.googlesource.com/skia/+/93242c4ae50dfcc0d922cdb3ba80bbc7b4bbe93d TBR=bsalomon@google.com,reed@google.com,djsollen@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2255683004
* Batched implementation of drawLattice() for GPUGravatar msarett2016-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bechmarks (Nexus 6P): Src=100x100, Dst=250x250, NumRects=9 Android 77.7us Skia (without patch) 57.2us Skia (with patch) 34.7us Src=100x100, Dst=500x500, NumRects=9 Android 77.0us Skia (without patch) 56.9us Skia (with patch) 44.5us Src=100x100, Dst=1000x1000, NumRects=9 Android 180us Skia (without patch) 96.8us Skia (with patch) 70.5us Src=100x100, Dst=250x250, NumRects=15 Android 208us Skia (without patch) 155us Skia (with patch) 55.9us Src=100x100, Dst=500x500, NumRects=15 Android 207us Skia (without patch) 152us Skia (with patch) 63.0us Src=100x100, Dst=1000x1000, NumRects=15 Android 233us Skia (without patch) 156us Skia (with patch) 99.9us BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255963002 Review-Url: https://codereview.chromium.org/2255963002
* Add drawImageLattice() and drawBitmapLattice() APIsGravatar msarett2016-08-02
The specified image/bitmap is divided into rects, which can be draw stretched, shrunk, or at a fixed size. Will be used by Android to draw 9patch (which are acutally N-patch) images. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1992283002 Review-Url: https://codereview.chromium.org/1992283002