Commit Graph

36728 Commits

Author SHA1 Message Date
Greg Daniel
3860cfd151 Remove caching of textures in GrAHardwareBufferImageGenerator.
We will rely on the UniqueKey system controlled up the stack by
SkImage_Lazy to avoid making redudent GrTextureProxies.

Bug: skia:
Change-Id: I64ee38ecd8651cc7d5e062b6d47a1871b752772a
Reviewed-on: https://skia-review.googlesource.com/152384
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-09-07 16:03:54 +00:00
skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com
300b6197e3 Roll skia/third_party/skcms 54b6cee88c40..52df767ea52b (1 commits)
https://skia.googlesource.com/skcms.git/+log/54b6cee88c40..52df767ea52b

2018-09-07 mtklein@google.com Op_noop is pointless


The AutoRoll server is located here: https://autoroll.skia.org/r/skcms-skia-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.



CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel
TBR=jvanverth@google.com

Change-Id: I8268153c7c2cf15bdbf5832d459e26c33c12fb39
Reviewed-on: https://skia-review.googlesource.com/152603
Reviewed-by: skcms-skia-autoroll <skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: skcms-skia-autoroll <skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
2018-09-07 15:47:36 +00:00
Mike Klein
c471151721 missed a place to clamp
We have a fast path where we can use a memset for constant colors.
That wasn't being gamut-clamped until now.

Some refactoring to allow append_color_pipeline() to be called
without a this pointer.

Change-Id: I8a10e537d579235e80633a5e480f1e38c7932014
Reviewed-on: https://skia-review.googlesource.com/152583
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-09-07 15:43:59 +00:00
Mike Reed
41b67730a1 Use the unique_ptr variant of MakeFromStream (the other is deprecated)
This reverts commit 0b80e62a14.

Bug: skia:
Change-Id: I2c8d68e06b7c7f4f2fb1f3f6aa1eed0e12dc8455
Reviewed-on: https://skia-review.googlesource.com/152582
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-09-07 15:40:19 +00:00
angle-skia-autoroll
40906eeadd Roll third_party/externals/angle2 801719235b13..d84b6737fa10 (1 commits)
801719235b..d84b6737fa


git log 801719235b13..d84b6737fa10 --date=short --no-merges --format='%ad %ae %s'
2018-09-07 jmadill@chromium.org Cache ValidateDrawStates.


Created with:
  gclient setdep -r third_party/externals/angle2@d84b6737fa10

The AutoRoll server is located here: https://autoroll.skia.org/r/angle-skia-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE
TBR=jvanverth@google.com

Change-Id: I17f75b2ef0f2853a58af743332913a2947e6b753
Reviewed-on: https://skia-review.googlesource.com/152601
Reviewed-by: <angle-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: <angle-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
2018-09-07 15:15:54 +00:00
skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com
5eaa5acfbf Roll skia/third_party/skcms da4870efd7b7..54b6cee88c40 (1 commits)
https://skia.googlesource.com/skcms.git/+log/da4870efd7b7..54b6cee88c40

2018-09-07 brianosman@google.com Set alpha to 1 when loading gray


The AutoRoll server is located here: https://autoroll.skia.org/r/skcms-skia-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.



CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel
TBR=jvanverth@google.com

Change-Id: Ia7ce296a2856dd0bd54a981efd973eeff40e8c60
Reviewed-on: https://skia-review.googlesource.com/152602
Commit-Queue: skcms-skia-autoroll <skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Reviewed-by: skcms-skia-autoroll <skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
2018-09-07 14:59:51 +00:00
Michael Ludwig
d0440195d5 Revert "Redo how extra emit code flushing operates"
This reverts commit 9b8181b05a.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Redo how extra emit code flushing operates
> 
> The previous implementation of flushEmittedCode(), that flushed on
> demand when a process() was encountered, was brittle and susceptible to
> mangling the expected sksl when fOut was modified outside of its
> control. Given that writeFunction() and generateCode() in the parent
> class all do this, it's possible to generate a simple SkSL snippet that
> would generate a CPP file that builds invalid final SkSL:
> 
> ```
> in fragmentProcessor child;
> bool someGlobalVar = ...;
> void main() {
>     if (someGlobalVar) {
>         sk_OutColor = process(child, sk_InColor);
>     } else {
>         sk_OutColor = half4(1);
>     }
> }
> ```
> 
> The CPP generated code *should* insert 'bool someGlobalVar' at the start
> but because of the early flush from the child process and because of
> how fOut was overwritten, someGlobalVar's declaration is put into a
> stream that is not visible to the flush and ends up being inserted into
> the output sksl in an incorrect location (namely after the if condition
> that depends on it).
> 
> This CL updates the extra emitted code logic to support multiple blocks
> of extra CPP code. When a flush point occurs in SkSL writing, a special
> token is inserted into the SkSL and a new CPP code buffer is associated
> with that token. Then once all of the SkSL is accumulated into the root
> output stream, it is processed into sections for each extra CPP block.
> Special logic is done so that the SkSL that is emitted before the next
> CPP block terminates at the end of the last valid statement before the
> special token.
> 
> A unit test demonstrating this failure condition is added to SkSLFPTest
> and the CL properly passes. Since this bug did not trigger on existing
> .fp files, the updated generator does not modify the generated FPs.
> 
> Bug: skia:
> Change-Id: Ib74911942080f1b964159807a06805bc52898789
> Reviewed-on: https://skia-review.googlesource.com/152321
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>

TBR=ethannicholas@google.com,michaelludwig@google.com

Change-Id: Id0f908453b596873f43b86a1c14eed48b2474a76
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/152660
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2018-09-07 14:25:10 +00:00
Michael Ludwig
9b8181b05a Redo how extra emit code flushing operates
The previous implementation of flushEmittedCode(), that flushed on
demand when a process() was encountered, was brittle and susceptible to
mangling the expected sksl when fOut was modified outside of its
control. Given that writeFunction() and generateCode() in the parent
class all do this, it's possible to generate a simple SkSL snippet that
would generate a CPP file that builds invalid final SkSL:

```
in fragmentProcessor child;
bool someGlobalVar = ...;
void main() {
    if (someGlobalVar) {
        sk_OutColor = process(child, sk_InColor);
    } else {
        sk_OutColor = half4(1);
    }
}
```

The CPP generated code *should* insert 'bool someGlobalVar' at the start
but because of the early flush from the child process and because of
how fOut was overwritten, someGlobalVar's declaration is put into a
stream that is not visible to the flush and ends up being inserted into
the output sksl in an incorrect location (namely after the if condition
that depends on it).

This CL updates the extra emitted code logic to support multiple blocks
of extra CPP code. When a flush point occurs in SkSL writing, a special
token is inserted into the SkSL and a new CPP code buffer is associated
with that token. Then once all of the SkSL is accumulated into the root
output stream, it is processed into sections for each extra CPP block.
Special logic is done so that the SkSL that is emitted before the next
CPP block terminates at the end of the last valid statement before the
special token.

A unit test demonstrating this failure condition is added to SkSLFPTest
and the CL properly passes. Since this bug did not trigger on existing
.fp files, the updated generator does not modify the generated FPs.

Bug: skia:
Change-Id: Ib74911942080f1b964159807a06805bc52898789
Reviewed-on: https://skia-review.googlesource.com/152321
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2018-09-07 14:08:59 +00:00
Greg Daniel
2ad0820b23 Have SkImage_Base send out UniqueKey invalidations to GPU backend when destroyed.
This CL currently only adds invalidation messages for texture proxies created
through SkImage_Lazy.

Bug: skia:
Change-Id: I7f53e5b4d40e9fdb4941edc80656c86690e4e4a9
Reviewed-on: https://skia-review.googlesource.com/152323
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-09-07 13:40:52 +00:00
Michael Ludwig
7b429aed84 Implement boolean short circuit folding in SkSL
Bug: skia:
Change-Id: I0bb0506bbe6973c004ced22648588d82d2bac497
Reviewed-on: https://skia-review.googlesource.com/151820
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2018-09-07 13:31:05 +00:00
Jim Van Verth
0b80e62a14 Reland "Revert "update to new MakeFromStream signature""
This reverts commit 8695539654.

Reason for revert: Breaking the Housekeeper bot.

Original change's description:
> Revert "Revert "update to new MakeFromStream signature""
> 
> This reverts commit 71f8475a0d.
> 
> Modified to still expose old signature (until we update google3 and flutter)
> 
> Bug: skia:
> Change-Id: Ie51e6227d5c6961d90006a015a5292cebd49e2a2
> Reviewed-on: https://skia-review.googlesource.com/152560
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=reed@google.com

Change-Id: I731108dac57aac090420594dc19e42c217f51b06
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/152600
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-09-07 12:44:47 +00:00
Mike Reed
8695539654 Revert "Revert "update to new MakeFromStream signature""
This reverts commit 71f8475a0d.

Modified to still expose old signature (until we update google3 and flutter)

Bug: skia:
Change-Id: Ie51e6227d5c6961d90006a015a5292cebd49e2a2
Reviewed-on: https://skia-review.googlesource.com/152560
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-09-07 11:46:55 +00:00
angle-skia-autoroll
b090b2b268 Roll third_party/externals/angle2 dff32a0da1de..801719235b13 (3 commits)
dff32a0da1..801719235b


git log dff32a0da1de..801719235b13 --date=short --no-merges --format='%ad %ae %s'
2018-09-06 courtneygo@google.com Add rules file for ANGLE apk
2018-09-06 ianelliott@google.com Add A4A opt-in/out logic
2018-09-06 jmadill@chromium.org Fix JSON cpp DEPS.


Created with:
  gclient setdep -r third_party/externals/angle2@801719235b13

The AutoRoll server is located here: https://autoroll.skia.org/r/angle-skia-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE
TBR=jvanverth@google.com

Change-Id: Ieb7881d91949f1177056aec06a5fef6ad31606db
Reviewed-on: https://skia-review.googlesource.com/152520
Reviewed-by: <angle-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: <angle-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
2018-09-07 01:27:02 +00:00
swiftshader-skia-autoroll
106d04e907 Roll third_party/externals/swiftshader 108f3e10f093..a062f321768d (1 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/108f3e10f093..a062f321768d


git log 108f3e10f093..a062f321768d --date=short --no-merges --format='%ad %ae %s'
2018-09-06 capn@google.com Use custom executable memory allocator.


Created with:
  gclient setdep -r third_party/externals/swiftshader@a062f321768d

The AutoRoll server is located here: https://autoroll.skia.org/r/swiftshader-skia-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
TBR=jvanverth@google.com

Change-Id: I35b9909627662f6682ad87bfa65a2beb185480e7
Reviewed-on: https://skia-review.googlesource.com/152441
Reviewed-by: swiftshader-skia-autoroll <swiftshader-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: swiftshader-skia-autoroll <swiftshader-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
2018-09-06 20:57:23 +00:00
Brian Osman
00c5d0fd60 Only run image tests on Windows once
The Windows filesystem is case insensitive, so by asking for all .xxx
files and then all .XXX files, we ended up processing every file twice.

Bug: skia:
Change-Id: I2b9e8bff988eefa32c40e58eef5b297cd0166231
Reviewed-on: https://skia-review.googlesource.com/152382
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-09-06 20:35:55 +00:00
Mike Klein
b1c77e4753 clean up legacy flags
Never needed to use them.

Change-Id: I871e262386365c4fbb4de519277fa84d313387c9
Reviewed-on: https://skia-review.googlesource.com/152460
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-09-06 20:06:02 +00:00
swiftshader-skia-autoroll
ec52ddf64d Roll third_party/externals/swiftshader 787e3d5b4cb5..108f3e10f093 (1 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/787e3d5b4cb5..108f3e10f093


git log 787e3d5b4cb5..108f3e10f093 --date=short --no-merges --format='%ad %ae %s'
2018-09-06 chrisforbes@google.com Fix GL resource access thread safety


Created with:
  gclient setdep -r third_party/externals/swiftshader@108f3e10f093

The AutoRoll server is located here: https://autoroll.skia.org/r/swiftshader-skia-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
TBR=jvanverth@google.com

Change-Id: I28963b3ea81614e331c0ce06755155382a76187a
Reviewed-on: https://skia-review.googlesource.com/152440
Reviewed-by: swiftshader-skia-autoroll <swiftshader-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: swiftshader-skia-autoroll <swiftshader-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
2018-09-06 19:58:35 +00:00
Herb Derby
307d6fd4b8 Calculate numPlotsY from height
Add a compensating change to make A8 plot
size 512x512.

Change-Id: Iaca4327d07c629143ec7dfb9e294b8fed4b8135a
Reviewed-on: https://skia-review.googlesource.com/152420
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-09-06 19:42:57 +00:00
Mike Klein
fc9624cb84 clamp after color pipeline when dst is normalized
Most code working with unorm values doesn't expect to see out-of-gamut
colors, but unorms _can_ store some out-of-gamut colors when
premultiplied and alpha is <1.

Clamping after the color (= shader + color filter) pipeline prevents us
from creating those values.  This CL does appear to fix the problem we
were seeing with xfermodes2 in the narrow config.

I've kept scalepixels_unpremul working by using our old trick,
remembering that unpremul->unpremul involves the same steps as
premul->opaque.  We'll take the unpremul pixels, pun them to premul to
avoid data loss, scale them up, and then avoid unpremul on the way out
by punning the surface as opaque.  It all kind of just barely hangs
together.

Change-Id: I677d00ecfe4692ba7799ae963d8b8d1ccd4b00ac
Reviewed-on: https://skia-review.googlesource.com/152200
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
2018-09-06 19:08:19 +00:00
Mike Klein
06a215b768 add profile->profile mode to imgcvt
E.g.

out/imgcvt /System/Library/ColorSync/Profiles/ITU-2020.icc ~/skcms/profiles/mobile/sRGB_parametric.icc
(0, 0, 0) --> (+0.0000, +0.0000, +0.0000)
(1, 1, 1) --> (+0.9998, +0.9998, +0.9998)
(1, 0, 0) --> (+1.2481, -0.3879, -0.1435)
(0, 1, 0) --> (-0.7903, +1.0561, -0.3501)
(0, 0, 1) --> (-0.2992, -0.0886, +1.0503)
(0, 1, 1) --> (-0.8325, +1.0527, +1.0077)
(1, 0, 1) --> (+1.2239, -0.4000, +1.0428)
(1, 1, 0) --> (+1.0312, +1.0035, -0.3791)

Change-Id: Ieb38a3b519f00ae56491c3265ed9725888b692e9
Reviewed-on: https://skia-review.googlesource.com/152360
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-09-06 18:54:19 +00:00
swiftshader-skia-autoroll
a9564d6dae Roll third_party/externals/swiftshader ad5c2952ca88..787e3d5b4cb5 (1 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/ad5c2952ca88..787e3d5b4cb5


git log ad5c2952ca88..787e3d5b4cb5 --date=short --no-merges --format='%ad %ae %s'
2018-09-06 chrisforbes@google.com Fix eglChooseConfig behavior to match CTS expectation


Created with:
  gclient setdep -r third_party/externals/swiftshader@787e3d5b4cb5

The AutoRoll server is located here: https://autoroll.skia.org/r/swiftshader-skia-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
TBR=jvanverth@google.com

Change-Id: Ie9d0c7c3a162678dc8cde0bb34917965224a0fc0
Reviewed-on: https://skia-review.googlesource.com/152340
Reviewed-by: swiftshader-skia-autoroll <swiftshader-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: swiftshader-skia-autoroll <swiftshader-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
2018-09-06 18:10:51 +00:00
Cary Clark
e8161dd154 bookmaker self documentation
Clean up the documentation a bit.
Clean up old bugs.
Fix deprecated and experimental wording.

TBR=caryclark@skia.org
Docs-Preview: https://skia.org/?cl=151361
Bug: skia:
Change-Id: I6b2120069b3299fc9d1a63c13bb2bdbe5cd3b236
Reviewed-on: https://skia-review.googlesource.com/151361
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
Auto-Submit: Cary Clark <caryclark@google.com>
2018-09-06 17:11:23 +00:00
angle-skia-autoroll
f019800c57 Roll third_party/externals/angle2 155bfd11e9f0..dff32a0da1de (1 commits)
155bfd11e9..dff32a0da1


git log 155bfd11e9f0..dff32a0da1de --date=short --no-merges --format='%ad %ae %s'
2018-09-06 oetuaho@nvidia.com Support multisample arrays in shader programs


Created with:
  gclient setdep -r third_party/externals/angle2@dff32a0da1de

The AutoRoll server is located here: https://autoroll.skia.org/r/angle-skia-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE
TBR=jvanverth@google.com

Change-Id: I15c2320f505c93cbc1b7064fd1785102d1758e9c
Reviewed-on: https://skia-review.googlesource.com/152220
Reviewed-by: <angle-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: <angle-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
2018-09-06 16:36:20 +00:00
recipe-roller
a5f0413b14 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
depot_tools:
  https://crrev.com/1e591dca21c6bddc02b7576bf7a834d98c451d75 Add Dawn got_revision_mapping to glient config (cwallez@chromium.org)
  https://crrev.com/b56a43a9064c35e81be989f5e86a19d9159d5edf Read the git config only once when doing a git cl issue -r lookup (bratell@opera.com)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I0138a8ca432351d4690c52714359f6d0f5657149
Reviewed-on: https://skia-review.googlesource.com/152184
Reviewed-by: Recipe Roller <recipe-roller@chromium.org>
Commit-Queue: Recipe Roller <recipe-roller@chromium.org>
2018-09-06 16:12:20 +00:00
Hal Canary
2d40490d4c Move some functions to MathPriv.h
Change-Id: I22c57a746e4a997fc03f35aa06b23d9fa9ed4fa9
Reviewed-on: https://skia-review.googlesource.com/152183
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-09-06 15:48:25 +00:00
Mike Klein
33d3d31a7e stop clamping in parametric stage
This is a very old legacy hack to work around
something we'd better have actually solved by now.

Just in case, guarded by SK_LEGACY_PARAMETRIC_CLAMP.

Change-Id: I9d6a62aded8b8898a4b2d2954dea9d0b4b8d3ac6
Reviewed-on: https://skia-review.googlesource.com/152042
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-09-06 12:55:26 +00:00
Ravi Mistry
c9d14aa33e Android compile bot target has changed. Update the bot name.
NoTry: true
Bug: skia:8339
Change-Id: Ic6e7da8d0b556593f02bf752a792c7fb38c3e0ad
Reviewed-on: https://skia-review.googlesource.com/151821
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2018-09-06 12:52:17 +00:00
Mike Klein
d30937a499 remove SkRandom::next64()
It appears to be unused, and exploits undefined behavior.

Change-Id: I935de36cd2f07e811958b1696afa62d410e1cb5f
Reviewed-on: https://skia-review.googlesource.com/152123
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
2018-09-06 12:46:46 +00:00
Cary Clark
60ebf14ccc Revert "SkStream: remove some WStream functions from public api"
This reverts commit 8b68110507.

Reason for revert: breaks bots

Original change's description:
> SkStream: remove some WStream functions from public api
> 
> move functions to SkStringPriv.h
> 
> also add SkStrAppendU32Hex() function, and re-write
> SkString::insertHex() to use SkStrAppendU32Hex.
> 
> add unit tests.
> 
> Change-Id: Ieda98fb4106db71565b607e593713a91a5ddd892
> Reviewed-on: https://skia-review.googlesource.com/151986
> Reviewed-by: Cary Clark <caryclark@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>

TBR=halcanary@google.com,bungeman@google.com,caryclark@google.com,reed@google.com

Change-Id: Idbac615092f46c18b38e08385dafba20930f0ff0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/152121
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-09-06 12:22:41 +00:00
Kevin Lubick
f05ebf074a [PathKit] Fix document.write warning in docs.
Switch back to using unpkg.com since it's actually a CDN
not a GCS bucket just pretending (lower latency, better
compression, etc).

Also loads consistently since https://skia-review.googlesource.com/c/buildbot/+/152020
landed.

No-Try: true
Docs-Preview: https://skia.org/?cl=151826
Bug: skia:
Change-Id: I9a2a8d71ebc87e44a85bf7ec40d04a0279a97ff1
Reviewed-on: https://skia-review.googlesource.com/151826
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Auto-Submit: Kevin Lubick <kjlubick@google.com>
2018-09-06 12:00:07 +00:00
Hal Canary
8b68110507 SkStream: remove some WStream functions from public api
move functions to SkStringPriv.h

also add SkStrAppendU32Hex() function, and re-write
SkString::insertHex() to use SkStrAppendU32Hex.

add unit tests.

Change-Id: Ieda98fb4106db71565b607e593713a91a5ddd892
Reviewed-on: https://skia-review.googlesource.com/151986
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-09-06 11:44:11 +00:00
Mike Klein
71f8475a0d Revert "update to new MakeFromStream signature"
This reverts commit edc6ea7a9e.

Reason for revert: need to update Flutter, Google3.

Original change's description:
> update to new MakeFromStream signature
> 
> Bug: skia:
> Change-Id: Ic18a45628905b90a2477043989ad4cb9fa11ab52
> Reviewed-on: https://skia-review.googlesource.com/151880
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Derek Sollenberger <djsollen@google.com>

TBR=djsollen@google.com,bungeman@google.com,reed@google.com

Change-Id: I22daf2cdb86f9e5ca3b78db45f8e15efe4b21005
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/152120
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-09-06 11:37:06 +00:00
angle-skia-autoroll
7da1a3df30 Roll third_party/externals/angle2 750e508722a9..155bfd11e9f0 (4 commits)
750e508722..155bfd11e9


git log 750e508722a9..155bfd11e9f0 --date=short --no-merges --format='%ad %ae %s'
2018-09-05 jiajia.qin@intel.com Fix that same resource is bound on SRV and UAV simultaneously
2018-09-05 jmadill@chromium.org Update update_canary_angle script.
2018-09-05 jmadill@chromium.org Update jsoncpp DEPS.
2018-09-05 jmadill@chromium.org Small style guide amendments.


Created with:
  gclient setdep -r third_party/externals/angle2@155bfd11e9f0

The AutoRoll server is located here: https://autoroll.skia.org/r/angle-skia-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE
TBR=jvanverth@google.com

Change-Id: Ief52755d4bb97605c593cb0b27aa01a670ba2a1d
Reviewed-on: https://skia-review.googlesource.com/152100
Reviewed-by: <angle-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: <angle-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
2018-09-06 02:25:14 +00:00
Mike Reed
edc6ea7a9e update to new MakeFromStream signature
Bug: skia:
Change-Id: Ic18a45628905b90a2477043989ad4cb9fa11ab52
Reviewed-on: https://skia-review.googlesource.com/151880
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2018-09-06 00:43:20 +00:00
recipe-roller
ffbcc3fadf Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
recipe_engine:
  https://crrev.com/2138a9dddaede3f377b838d0227bf4c88d6e7aa0 [cipd] Add better describe simulation behavior. (iannucci@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I0fd36c4d2b6b55224c6b06e10f114a6fd427145b
Reviewed-on: https://skia-review.googlesource.com/151985
Reviewed-by: Recipe Roller <recipe-roller@chromium.org>
Commit-Queue: Recipe Roller <recipe-roller@chromium.org>
2018-09-05 23:06:50 +00:00
recipe-roller
33dc0dc9f6 Roll recipe dependencies (nontrivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


Please review the expectation changes, and LGTM+CQ.


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
depot_tools:
  https://crrev.com/01f0c698fb898168940718c5616ed3f6bb6c1b18 bot_update: Specify the target branch for patch_refs. (ehmaldonado@chromium.org)


R=rmistry@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ibd4e7c583706b717ab2b0db68d619ed914bf8c5d
Reviewed-on: https://skia-review.googlesource.com/151984
Reviewed-by: Edward Lemur <ehmaldonado@google.com>
2018-09-05 22:39:40 +00:00
swiftshader-skia-autoroll
0c3dc59fc1 Roll third_party/externals/swiftshader fe5861bf5bb1..ad5c2952ca88 (5 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/fe5861bf5bb1..ad5c2952ca88


git log fe5861bf5bb1..ad5c2952ca88 --date=short --no-merges --format='%ad %ae %s'
2018-09-05 capn@google.com Move ConvertReadFormatType to utilities.
2018-09-05 capn@google.com Remove quad-layout depth formats from sampler.
2018-09-05 capn@google.com Implement GL_NV_read_depth_stencil.
2018-09-05 capn@google.com Refactor glReadPixels validation.
2018-09-05 capn@google.com Implement GL_OES_fbo_render_mipmap.


Created with:
  gclient setdep -r third_party/externals/swiftshader@ad5c2952ca88

The AutoRoll server is located here: https://autoroll.skia.org/r/swiftshader-skia-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
TBR=jvanverth@google.com

Change-Id: Ia3de8daf40ecddbff32deae22599ffa0278446a6
Reviewed-on: https://skia-review.googlesource.com/152080
Reviewed-by: swiftshader-skia-autoroll <swiftshader-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: swiftshader-skia-autoroll <swiftshader-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
2018-09-05 22:19:21 +00:00
Mike Klein
c4e4063a84 fix sw extended transfer functions
We were not mirroring negative numbers about the y axis.

This is most visible when we hit the gamma-only fast path,
as the linear segment of a 7-parameter function will at
least still produce real-valued colors...

Bug is present when SK_LEGACY_EXTENDED_TRANSFER_FUNCTIONS,
fixed when not.

PS1 forgot from_srgb/to_srgb.

Bug: chromium:875650
Change-Id: I84a68be7f6a3cf6e847011cbab5aeab18f7fa38a
Reviewed-on: https://skia-review.googlesource.com/152000
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-09-05 21:51:22 +00:00
Mike Klein
64bbee7ab2 fix typo
Change-Id: I8fe8d4d6dfe5332e6a3995e8519cc42e4e74caff
Reviewed-on: https://skia-review.googlesource.com/152041
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-09-05 21:32:18 +00:00
Mike Klein
d505b19c05 add src/opts headers to .gni files
Chrome's analyze step uses GN and doesn't see changes
to these files as mattering to anything.

I've kept the ones particular to old style opts in
each of their particular targets, and the ones that
are included multiple times (including from outside
src/opts) in core.  Kind of arbitrary, but it's at
least close to the right slicing.

Change-Id: I2a5aaeca5b6287c13d7365ec1b63158f48e4e84a
Reviewed-on: https://skia-review.googlesource.com/152040
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-09-05 20:31:09 +00:00
Brian Salomon
343553a1fe Don't use MEM_MOVE=true with SkTArrays of sk_sp
The code generated from std::move()ing them should be fine.

Bug: skia:8355
Change-Id: I63ef650b5fbcf9fb6356006190eae5e0977ae642
Reviewed-on: https://skia-review.googlesource.com/151982
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-09-05 20:11:07 +00:00
Jim Van Verth
da58cac61d Rip out variable offsetting
Bug: skia:
Change-Id: I0ca1f3b60d05ce02d1e53bb8b989c9dc1babddd1
Reviewed-on: https://skia-review.googlesource.com/150915
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-09-05 19:54:31 +00:00
Brian Salomon
8e449ebec3 Fix GrAAConvexTessellator to handle cases slightly concave bistectors.
When repeatedly insetting rings we can wind up with bisector vectors
that correspond to a slightly concave ring. This would cause the first
intersection when computing the next ring's inset depth to be outside
the current ring. Instead skip adjacent bisectors that intersect outside
the ring during the search.

Change-Id: I3efab5a9f44966888cfa86715876b7b177950732
Reviewed-on: https://skia-review.googlesource.com/151827
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-09-05 19:46:30 +00:00
recipe-roller
8d6a90e8b6 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
recipe_engine:
  https://crrev.com/b93bbf63414b69ca70b4fc85020c31518fbed812 [buildbucket] Remove tags from test_api.py (nodir@google.com)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ia948aa55f7c8e979050bbe0a7996460e50cbcffc
Reviewed-on: https://skia-review.googlesource.com/151980
Reviewed-by: Recipe Roller <recipe-roller@chromium.org>
Commit-Queue: Recipe Roller <recipe-roller@chromium.org>
2018-09-05 19:34:20 +00:00
Herb Derby
d3895d867c Centralize the predicate for a glyph being too large for the atlas
Centralize the calculation to SkGlyphCacheCommon. This allows this
function to be used with NO_GPU.

In addition, this was used in the last remaining function in GrTest.
That function was used in a single place. I made the function a static
and remove GrTest.h. This had massive knock-on effects.

Change-Id: I80f874a988f9af4383a83acf7c273d23b8d67c22
Reviewed-on: https://skia-review.googlesource.com/151480
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-09-05 19:25:29 +00:00
Brian Salomon
20ea47a5d9 Fix missing triangle when miter point omitted in GrAAConvexTessellator.
This issue is seen in the existing GPU results for GM "strokes_round".

Detected while investigating the below bug. However, the real bug there
caused by bad tessellations appears to be coming from
GrAAConvexPathRenderer.

BUG=chromium:851637

Change-Id: If4e653d10823d53f68bb9bf6bb77875cf391426f
Reviewed-on: https://skia-review.googlesource.com/151368
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-09-05 19:20:49 +00:00
Brian Osman
1ada9f3197 Remove SK_USE_LEGACY_PRIMARIES_TO_XYZ
Bug: skia:
Change-Id: I2545c328a9e94250b09038ce869c94bce6377376
Reviewed-on: https://skia-review.googlesource.com/151823
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-09-05 19:01:23 +00:00
skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com
76365c6a09 Roll skia/third_party/skcms 8a251fa55434..da4870efd7b7 (1 commits)
https://skia.googlesource.com/skcms.git/+log/8a251fa55434..da4870efd7b7

2018-09-05 mtklein@chromium.org another profile that reproduces this bug


The AutoRoll server is located here: https://autoroll.skia.org/r/skcms-skia-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.



CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel
TBR=jvanverth@google.com

Change-Id: Ie76e46dd5afa54724a4d8ccf297e03cb14b5402c
Reviewed-on: https://skia-review.googlesource.com/151920
Commit-Queue: skcms-skia-autoroll <skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Reviewed-by: skcms-skia-autoroll <skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
2018-09-05 18:46:00 +00:00
Cary Clark
a24712e4dc Revert "makeSurface defaults to raster"
This reverts commit 29a4a684af.

Reason for revert: some configs fail

Original change's description:
> makeSurface defaults to raster
> 
> Rather that returning nullptr for a recording
> canvas, return a raster canvas instead.
> 
> R=​reed@google.com,robertphillips@google.com
> 
> Bug: skia:
> Change-Id: I211d8ef368b9aec6d14cc72d1652ac6a03f3fa7b
> Reviewed-on: https://skia-review.googlesource.com/151666
> Commit-Queue: Cary Clark <caryclark@skia.org>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=robertphillips@google.com,reed@google.com,caryclark@skia.org

Change-Id: I82d2c3e4589a2ca8523bbf86884ed68b1431631d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/151824
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2018-09-05 18:41:45 +00:00
Greg Daniel
469dd659a5 On GrAHardwareBufferImageGenerator store the owned texture as a GrGpuResource instead of GrTexture.
Disassembly before change (crash on deref at  861310)
_ZN31GrAHardwareBufferImageGenerator17releaseTextureRefEv():
 861297 external/skia/src/gpu/GrAHardwareBufferImageGenerator.cpp:112
 861298   1eb738:       91010280        add     x0, x20, #0x40
 861299   1eb73c:       aa1f03e1        mov     x1, xzr
 861300   1eb740:       97fc287c        bl      f5930 <_ZN5sk_spI14GrTextureProxyE5resetEPS0_>
 861301 external/skia/src/gpu/GrAHardwareBufferImageGenerator.cpp:113
 861302   1eb744:       f9401a88        ldr     x8, [x20,#48]
 861303   1eb748:       b4000168        cbz     x8, 1eb774 <_ZN31GrAHardwareBufferImageGenerator17onGenerateTextureEP9GrContextRK11SkImageInfoRK8SkIPointb+0xac>
 861304 external/skia/src/gpu/GrAHardwareBufferImageGenerator.cpp:117
 861305   1eb74c:       f9400109        ldr     x9, [x8]
 861306 external/skia/src/gpu/GrAHardwareBufferImageGenerator.cpp:118
 861307   1eb750:       9101c3e0        add     x0, sp, #0x70
 861308 external/skia/src/gpu/GrAHardwareBufferImageGenerator.cpp:117
 861309   1eb754:       b9403a8a        ldr     w10, [x20,#56]
 861310   1eb758:       f85e8129        ldur    x9, [x9,#-24]
 861311   1eb75c:       b9007bea        str     w10, [sp,#120]
 861312   1eb760:       8b090108        add     x8, x8, x9
 861313   1eb764:       f9003be8        str     x8, [sp,#112]
 861314 external/skia/src/gpu/GrAHardwareBufferImageGenerator.cpp:118
 861315   1eb768:       97fffef6        bl      1eb340 <_ZN12SkMessageBusI25GrGpuResourceFreedMessageE4PostERKS0_>
 861316 external/skia/src/gpu/GrAHardwareBufferImageGenerator.cpp:119
 861317   1eb76c:       f9001a9f        str     xzr, [x20,#48]
 861318 external/skia/src/gpu/GrAHardwareBufferImageGenerator.cpp:120
 861319   1eb770:       b9003a9f        str     wzr, [x20,#56]

Disassembly with change (no more derefs):
 768904 _ZN31GrAHardwareBufferImageGenerator17releaseTextureRefEv():
 768905 external/skia/src/gpu/GrAHardwareBufferImageGenerator.cpp:105
 768906   1b0c94:       91010260        add     x0, x19, #0x40
 768907   1b0c98:       aa1f03e1        mov     x1, xzr
 768908   1b0c9c:       97fcb2a9        bl      dd740 <_ZN5sk_spI14GrTextureProxyE5resetEPS0_>
 768909 external/skia/src/gpu/GrAHardwareBufferImageGenerator.cpp:106
 768910   1b0ca0:       f9401a68        ldr     x8, [x19,#48]
 768911   1b0ca4:       b4000108        cbz     x8, 1b0cc4 <_ZN31GrAHardwareBufferImageGenerator9makeProxyEP9GrContext+0x84>
 768912 external/skia/src/gpu/GrAHardwareBufferImageGenerator.cpp:110
 768913   1b0ca8:       b9403a69        ldr     w9, [x19,#56]
 768914 external/skia/src/gpu/GrAHardwareBufferImageGenerator.cpp:111
 768915   1b0cac:       9100c3e0        add     x0, sp, #0x30
 768916 external/skia/src/gpu/GrAHardwareBufferImageGenerator.cpp:110
 768917   1b0cb0:       f9001be8        str     x8, [sp,#48]
 768918   1b0cb4:       b9003be9        str     w9, [sp,#56]

Bug: b/112859199
Change-Id: I5afab9b2bc6a3c13d2606ac9e09fb55929a14426
Reviewed-on: https://skia-review.googlesource.com/151822
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-09-05 18:40:58 +00:00