Added in check for sized internal format.
Made choice between RED and ALPHA orthogonal to HALF_FLOAT and
HALF_FLOAT_OES.
Enabled rendertarget support on ES 2.0.
Review URL: https://codereview.chromium.org/805033002
This CL fixes 5 bugs related to hoisting image filters:
For image filters the src layer (the one prior to filtering) often needs to be
smaller then the final layer. This requires the saveLayer's optional bounds
to be stored (in SkLayerInfo.h and SkRecordDraw.cpp) and then used in
compute_source_rect and carried around in GrCachedLayer.
The image filters can add an extra offset to the final draw operation.
This is now computed in GrLayerHoister::FilterLayer and carried around in
GrCachedLayer.
Filtered layers must use exact matches. This is now done in GrLayerCache::lock.
The filter cache requires a valid matrix so it can compute the correct offset.
This is now done in GrLayerHoister::FilterLayer.
Filtered layers need to be drawn with drawSprite while unfiltered (and therefore
hopefully atlased) layers can be drawn with drawBitmap. This is now done in
draw_replacement_bitmap.
Committed: https://skia.googlesource.com/skia/+/702eb9622102599d94ab6798e6227cf29f48c2d3
Review URL: https://codereview.chromium.org/803183003
Reason for revert:
Breaking DM
Original issue's description:
> Fix layer hoisting image filter corner cases
>
> This CL fixes 5 bugs related to hoisting image filters:
>
> For image filters the src layer (the one prior to filtering) often needs to be
> smaller then the final layer. This requires the saveLayer's optional bounds
> to be stored (in SkLayerInfo.h and SkRecordDraw.cpp) and then used in
> compute_source_rect and carried around in GrCachedLayer.
>
> The image filters can add an extra offset to the final draw operation.
> This is now computed in GrLayerHoister::FilterLayer and carried around in
> GrCachedLayer.
>
> Filtered layers must use exact matches. This is now done in GrLayerCache::lock.
>
> The filter cache requires a valid matrix so it can compute the correct offset.
> This is now done in GrLayerHoister::FilterLayer.
>
> Filtered layers need to be drawn with drawSprite while unfiltered (and therefore
> hopefully atlased) layers can be drawn with drawBitmap. This is now done in
> draw_replacement_bitmap.
>
> Committed: https://skia.googlesource.com/skia/+/702eb9622102599d94ab6798e6227cf29f48c2d3TBR=bsalomon@google.com
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/790643009
This CL fixes 5 bugs related to hoisting image filters:
For image filters the src layer (the one prior to filtering) often needs to be
smaller then the final layer. This requires the saveLayer's optional bounds
to be stored (in SkLayerInfo.h and SkRecordDraw.cpp) and then used in
compute_source_rect and carried around in GrCachedLayer.
The image filters can add an extra offset to the final draw operation.
This is now computed in GrLayerHoister::FilterLayer and carried around in
GrCachedLayer.
Filtered layers must use exact matches. This is now done in GrLayerCache::lock.
The filter cache requires a valid matrix so it can compute the correct offset.
This is now done in GrLayerHoister::FilterLayer.
Filtered layers need to be drawn with drawSprite while unfiltered (and therefore
hopefully atlased) layers can be drawn with drawBitmap. This is now done in
draw_replacement_bitmap.
Review URL: https://codereview.chromium.org/803183003
Reason for revert:
Test-Win7-ShuttleA-HD2000-x86-Debug-GDI
Original issue's description:
> Use SkPaint::getFontBounds() for text bounding boxes in pictures.
>
> Now that SkTextBlobs have landed, this is a perf no-op, but it at least lets us eliminate a bunch of questionable hacks.
>
> CQ_EXTRA_TRYBOTS=client.skia:Test-Win7-ShuttleA-HD2000-x86-Debug-Trybot,Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Debug-Trybot
>
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/02d2b9831579173e783569530ab7bae08de907e9TBR=reed@google.com,mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/789793004
Now that SkTextBlobs have landed, this is a perf no-op, but it at least lets us eliminate a bunch of questionable hacks.
CQ_EXTRA_TRYBOTS=client.skia:Test-Win7-ShuttleA-HD2000-x86-Debug-Trybot,Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Debug-Trybot
BUG=skia:
Review URL: https://codereview.chromium.org/805983003
Remove SkLCGRandom. We already decided the new one was better, which is
why we wrote the new SkRandom.
Convert GMs that were using SkLCGRandom to use the improved SkRandom.
Motivated by the fact that these GMs draw differently on some runs. We
believe this to be a result of using the old SkLCGRandom.
Add each of the tests that were using SkLCGRandom to ignore-tests.txt,
since we expect they'll draw differently using SkRandom.
Move a trimmed down version of SkLCGRandom into SkDiscretePathEffect.
In order to preserve the old behavior, trim down SkLCGRandom to only
the methods used by SkDiscretePathEffect, and hide it in
SkDiscretePathEffect's cpp file.
BUG=skia:3241
Review URL: https://codereview.chromium.org/805963002
When we added the 64K allocation cap, the bots showed we took a perf hit
on some large .skps like desk_pokemonwiki.skp, despite not seeing a local
effect. I'm still not seeing that locally, but I'd like to try removing the cap on
the bots to see what happens. For big monolithic pictures, really packing into
memory tightly is probably not as important as it is for tiny ones.
Similarly, we're probably being too cautious about making tiny allocations.
Today we start at 16 bytes, which isn't really enough to record anything.
Even the smallest picture, say,
save
clipRect
drawRect
restore
requires ~200 bytes, so we might as well move our minimum block size up
near there.
I don't know if 16 bytes is too small to start for GrTextStrikes, so I've left the
behavior the same (though the max is still gone).
Local recording performance is neutral-to-positive:
tabl_deviantart.skp 126us -> 129us 1.02x
tabl_nytimes.skp 110us -> 112us 1.02x
tabl_cuteoverload.skp 521us -> 530us 1.02x
desk_mobilenews.skp 673us -> 682us 1.01x
desk_chalkboard.skp 843us -> 854us 1.01x
desk_sfgate.skp 528us -> 535us 1.01x
desk_silkfinance.skp 68.2us -> 69us 1.01x
desk_youtube.skp 623us -> 629us 1.01x
desk_blogger.skp 472us -> 475us 1.01x
desk_jsfiddlehumperclip.skp 42.2us -> 42.5us 1.01x
desk_espn.skp 255us -> 256us 1.01x
desk_ebay.skp 174us -> 174us 1x
desk_twitter.skp 454us -> 455us 1x
tabl_pravda.skp 200us -> 201us 1x
desk_wordpress.skp 782us -> 784us 1x
desk_samoasvg.skp 762us -> 761us 1x
tabl_mozilla.skp 1.58ms -> 1.58ms 1x
tabl_slashdot.skp 107us -> 107us 1x
tabl_techmeme.skp 102us -> 102us 0.99x
tabl_gamedeksiam.skp 729us -> 724us 0.99x
tabl_nofolo.skp 65.3us -> 64.7us 0.99x
desk_gmailthread.skp 339us -> 336us 0.99x
tabl_sahadan.skp 91us -> 90us 0.99x
desk_yahooanswers.skp 144us -> 142us 0.99x
tabl_cnet.skp 143us -> 141us 0.99x
tabl_googleblog.skp 206us -> 203us 0.99x
tabl_cnn.skp 160us -> 158us 0.99x
tabl_frantzen.skp 50.5us -> 49.6us 0.98x
desk_linkedin.skp 328us -> 323us 0.98x
tabl_digg.skp 790us -> 769us 0.97x
desk_jsfiddlebigcar.skp 40.6us -> 39.5us 0.97x
desk_mapsvg.skp 1.57ms -> 1.52ms 0.97x
tabl_gmail.skp 19.4us -> 18.6us 0.96x
tabl_hsfi.skp 9.81us -> 9.11us 0.93x
BUG=skia:
Review URL: https://codereview.chromium.org/793033002
It's unclear what params should be used for half float alpha
rendertargets, so they are disabled for the moment.
Review URL: https://codereview.chromium.org/799593002
Gives more flexibility to the caller to decide whether to use the
encoded data returned by refEncodedData().
Provides an implementation that supports the old version of
SkPicture::serialize().
TODO: Update Chrome, so we can remove SK_LEGACY_ENCODE_BITMAP entirely
BUG=skia:3190
Review URL: https://codereview.chromium.org/784643002
This includes:
-Having an actual XP stage at the end of the gl pipeline.
-All Blending work is handled by XP until actually setting GL blend states
-GLPrograms test to test XP
BUG=skia:
Review URL: https://codereview.chromium.org/764643004
In addition, NVPR makes this very complicated, and I haven't quite figured out a good way to handle it, so for now color and coverage DO live on optstate, but I will figure out some way to refactor that in future CLs.
BUG=skia:
Review URL: https://codereview.chromium.org/783763002
Reason for revert:
Compilation is failing on some bots
Original issue's description:
> Replace EncodeBitmap with an interface.
>
> Gives more flexibility to the caller to decide whether to use the
> encoded data returned by refEncodedData().
>
> Provides an implementation that supports the old version of
> SkPicture::serialize().
>
> TODO: Update Chrome, so we can remove SK_LEGACY_ENCODE_BITMAP entirely
>
> BUG=skia:3190
>
> Committed: https://skia.googlesource.com/skia/+/0c4aba6edb9900c597359dfa49d3ce4a41bc5dd1TBR=reed@google.com,scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:3190
Review URL: https://codereview.chromium.org/787833002
Gives more flexibility to the caller to decide whether to use the
encoded data returned by refEncodedData().
Provides an implementation that supports the old version of
SkPicture::serialize().
TODO: Update Chrome, so we can remove SK_LEGACY_ENCODE_BITMAP entirely
BUG=skia:3190
Review URL: https://codereview.chromium.org/784643002
Reason for revert:
break many gm's
Original issue's description:
> Make all blending up to GrOptDrawState be handled by the xp/xp factory.
>
> In this cl the blending information is extracted for the xp and stored in the ODS
> which is then used as it currently is. In the follow up cl, an XP backend will be added
> and at that point all blending work will take place inside XP's.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/7c66342a399b529634bed0fabfaa562db2c0dbd4TBR=bsalomon@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/766653008