Looks great (imperceptibly different) but ~10% slower on both ARMv8 and x86-64. Probably need to hide the table-or-math logic behind Sk4f/Sk8f unless we find faster math.
I do like the new look of the pipeline stages though. A lot clearer.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2880
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Change-Id: I44952237d56ba167445b07d4830eb8959c4d47b7
Reviewed-on: https://skia-review.googlesource.com/2880
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Matt Sarett <msarett@google.com>
Reason for revert:
Causing problems on Mac & Windows bots.
Original issue's description:
> Make GrResourceCache dynamically change between LRU and random replacement strategies.
>
> Random performs significantly better when each frame exceeds the budget by a small margin whereas LRU has worst case behavior.
>
> The decision of which to use is made based on the history from a few frames of the ratio of total unique key cache misses to unique key cache misses of resources purged in the last 2 frames.
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2321563006
>
> Committed: https://skia.googlesource.com/skia/+/0f147ac2ae575bbad3515a526f13700bc5c8e9d7TBR=bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://codereview.chromium.org/2386993004
Adds a device space texture decal effect to use for clipping.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2870
Change-Id: Ifcc7617ea87f5a86e301995cba9dfc30a4b0e2c5
Reviewed-on: https://skia-review.googlesource.com/2870
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Random performs significantly better when each frame exceeds the budget by a small margin whereas LRU has worst case behavior.
The decision of which to use is made based on the history from a few frames of the ratio of total unique key cache misses to unique key cache misses of resources purged in the last 2 frames.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2321563006
Review-Url: https://codereview.chromium.org/2321563006
TBR=bsalomon@google.com (Testing-only API change)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2876
Change-Id: I0ca26da0307848cdfc8ffaac2d042601663ab00b
Reviewed-on: https://skia-review.googlesource.com/2876
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Added helper to create random GrColorSpaceXforms in unit tests, and
hooked it up for the FPs that currently accept one.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2873
Change-Id: Iaf93e379e405fbf745f5e0fd23b4daf017355966
Reviewed-on: https://skia-review.googlesource.com/2873
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Fix imagealphathreshold_surface GM to test gamut conversion.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2867
Change-Id: Id9aaebe72d1dadc613ef1a8d17d066b51049300f
Reviewed-on: https://skia-review.googlesource.com/2867
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Currently, Chromium stores segmented data in a SharedBuffer and appends
to SkRWBuffer one segment at a time:
const char* segment = 0;
for (size_t length = data->getSomeData(segment, m_rwBuffer->size());
length; length = data->getSomeData(segment, m_rwBuffer->size())) {
m_rwBuffer->append(segment, length, remaining);
}
This can yield a bunch of just-above-4k allocations => wasted RAM due to
internal fragmentation.
Ideally, we'd want a SkRWBuffer::reserve(size_t bytes) API, but the
current internals don't support that trivially.
Alternatively, the caller can pass a reserve hint at append() time.
BUG=chromium:651698
R=scroggo@google.com,reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2385803002
Review-Url: https://codereview.chromium.org/2385803002
I started fixing more effects and realized I needed something like this.
Wanted to land it separately. After this, I'll add the DC's cached xform
from sRGB to AsFPArgs, so that we can easily leverage this code in more
places (mostly GrConstColorProcessor, or any effect that falls back to
that based on invariants, etc...)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2844
Change-Id: I335546f02a6c49620494d736140a72c14441b35d
Reviewed-on: https://skia-review.googlesource.com/2844
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
- Replace SkImageBitmap with SkImageSubset
- SkBitmapKey becomes trivial for simplicity.
- SkPDFCanvas::onDraw(Bitmap|Image)Rect now clip and call
SkCanvas::onDraw(Bitmap|Image)Rect.
- SkPDFDevice::draw(Bitmap|BitmapRect|Sprite) now convert bitmap
into SkImageSubset via make_image_subset function.
- SkPDFDevice::draw(Image|Bitmap)Rect now implemented again.
- SkPDFDevice::internalDrawImage now performs image subsetting
as needed, while still deduping properly.
BUG=633528
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2785
Change-Id: I063346d12b0e9c6b6c0c4943ee25400c88aa1a44
Reviewed-on: https://skia-review.googlesource.com/2785
Reviewed-by: Ben Wagner <bungeman@google.com>
Haswell brought a whole slew of handy new instructions for us (AVX2, FMA, BMI1+BMI2) and also feature F16C, which came one generation earlier on Ivybridge. We work with integers often enough that we really want to target AVX2 instead of AVX, and this means it's pretty practical to ask for all those other goodies along with it.
Chrome's GN files and Google3's BUILD file will need an update, before or after this CL.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2840
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Change-Id: I826daf77b5104664c5d31ddaabee347e287b87a2
Reviewed-on: https://skia-review.googlesource.com/2840
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>