aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl
Commit message (Collapse)AuthorAge
* Revert "added GrSkSLFP and converted DitherEffect to use it"Gravatar Kevin Lubick2018-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit dfbfc738a9edfff7a9804253175e380c230f3d21. Reason for revert: Seems to be breaking DDL/ASAN bots Original change's description: > added GrSkSLFP and converted DitherEffect to use it > > Bug: skia: > Change-Id: I84b71165eab1712355f3c7669cee2d33d259f3df > Reviewed-on: https://skia-review.googlesource.com/124504 > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,ethannicholas@google.com Change-Id: Ic4c3978aaba0391f2f8bb1316a456e3821a3a2f2 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/135700 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com>
* added GrSkSLFP and converted DitherEffect to use itGravatar Ethan Nicholas2018-06-18
| | | | | | | | Bug: skia: Change-Id: I84b71165eab1712355f3c7669cee2d33d259f3df Reviewed-on: https://skia-review.googlesource.com/124504 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* consolidated writing fields logic and added more builtins for skslc msl backendGravatar Timothy Liang2018-06-13
| | | | | | | | Bug: skia: Change-Id: I6cad948bc68194322f031926ab9a49186ec2302b Reviewed-on: https://skia-review.googlesource.com/134502 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Timothy Liang <timliang@google.com>
* renamed SkSL's assert macrosGravatar Ethan Nicholas2018-06-12
| | | | | | | | | | | | | | Since SkSL needs to run outside of Skia, it was originally using its own ASSERT macro, which mapped to SkASSERT when inside of Skia. This is causing conflicts with one or two other ASSERT macros defined around Skia, so to avoid that I am switching SkSL over to just use Skia's standard naming for these macros. Bug: skia: Change-Id: I115435d7282da03d076c6080f7b13d1972b9eb9f Reviewed-on: https://skia-review.googlesource.com/134322 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* fixed vec3 size differences and mod calculation of skslc msl backendGravatar Timothy Liang2018-06-08
| | | | | | | | Bug: skia: Change-Id: I5dc6d956463845627a1a2debee5ac8856e5e2e8d Reviewed-on: https://skia-review.googlesource.com/132500 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Timothy Liang <timliang@google.com>
* fixed interface/in/out struct for mvk integration and added a few missing ↵Gravatar Timothy Liang2018-06-05
| | | | | | | | | | builtins to skslc msl backend Bug: skia: Change-Id: Id514dc6af64bb2a5eb71f2161ceba549a8a6836d Reviewed-on: https://skia-review.googlesource.com/131881 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Timothy Liang <timliang@google.com>
* added interface block, vector comparison intrinsics, and mvk integration for ↵Gravatar Timothy Liang2018-05-24
| | | | | | | | | | metal sksl backend Bug: skia: Change-Id: Ia6984ba73482ec377f0890eb79f6ff92ff736749 Reviewed-on: https://skia-review.googlesource.com/129654 Commit-Queue: Timothy Liang <timliang@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
* added global variable and multi-texture support to metal sksl backendGravatar Timothy Liang2018-05-18
| | | | | | | | Bug: skia: Change-Id: If676774ec0a30c5b536ccffbff2220d180b7fa59 Reviewed-on: https://skia-review.googlesource.com/129187 Commit-Queue: Timothy Liang <timliang@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
* added basic texturing to metal sksl backendGravatar Timothy Liang2018-05-17
| | | | | | | | Bug: skia: Change-Id: I2e70efe53f5c2fb208979cc89be9c3c841944a48 Reviewed-on: https://skia-review.googlesource.com/128844 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Timothy Liang <timliang@google.com>
* fixed incorrect index in SPIR-V matrix constructionGravatar Ethan Nicholas2018-05-11
| | | | | | | | Bug: skia:7908 Change-Id: I990e5f6e84afdc81d340f433d93a9061b9dd67ef Reviewed-on: https://skia-review.googlesource.com/127397 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Make GrCaps and GrShaderCaps private.Gravatar Brian Salomon2018-05-11
| | | | | | | | | Moves getCaps() from GrContext to GrContextPriv and removes unused refCaps(). Change-Id: Ic6a8951b656c0d1b2773eae73bff8e88af819866 Reviewed-on: https://skia-review.googlesource.com/127389 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* fix for SPIR-V sk_in definition which was upsetting Intel NUCGravatar Ethan Nicholas2018-05-04
| | | | | | | | Bug: skia:7852 Change-Id: Ife747f3531d19e69dc70c2e0b9a9c6cfe001da72 Reviewed-on: https://skia-review.googlesource.com/125743 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* workaround for Intel OpCompositeConstruct bugGravatar Ethan Nicholas2018-04-27
| | | | | | | | | | | | | | | | The SPIR-V spec permits constructing a vector from mixed vectors and scalars, e.g. vec3(vec2, float). Intel's Vulkan driver does not handle this correctly. We already have a workaround in place for vector construction (writing the code as vec3(vec2.x, vec2.y, float) instead), but missed that matrix construction can produce the same problem, as each column requires a vector to be constructed for it. This CL extends the workaround to handle matrix construction as well. Bug: skia:7851 Change-Id: I0fe5d300ec7ad5db87bcc6662cf8371bcd6deed8 Reviewed-on: https://skia-review.googlesource.com/124321 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Don't 'require' external image extensions, 'enable' themGravatar Brian Osman2018-04-25
| | | | | | | | | | | We trigger this when we don't necessarily have support for both extensions, so requiring them can cause compilation failures. Bug: https://github.com/flutter/flutter/issues/16178 Change-Id: I54c190709a677bc9ec2fa46f612e8958e3de38cb Reviewed-on: https://skia-review.googlesource.com/123683 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* cache SkSL headersGravatar Ethan Nicholas2018-04-25
| | | | | | | | | | | This reduces the cost of successive shader compilations by caching the results of compiling SkSL's headers. Bug: skia: Change-Id: If7fc21a9877021c4025ad99dd0981523a25855e0 Reviewed-on: https://skia-review.googlesource.com/123422 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* With ES3, enable both ES2 and ES3 external image extensionsGravatar Brian Osman2018-04-18
| | | | | | | | Bug: skia:7713 Change-Id: If06c0368e91c33bbac9e7715227d619c4834684f Reviewed-on: https://skia-review.googlesource.com/121884 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Move external texture extension logic into SkSLGravatar Brian Osman2018-04-17
| | | | | | | | | | Automatically enable the extension if any external samplers are used. Bug: skia:7713 Change-Id: I1de2faddd7c8eda864873941b90d7a4c4606497a Reviewed-on: https://skia-review.googlesource.com/121797 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* fix sksl standalone build errorGravatar Ethan Nicholas2018-04-13
| | | | | | | | Bug: skia: Change-Id: I7de6d46a5774b5820bb6468a418be7c56da8510b Reviewed-on: https://skia-review.googlesource.com/121421 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* added sk_LastFragColorGravatar Ethan Nicholas2018-04-13
| | | | | | | | Bug: skia: Change-Id: If64d8281beb8b7687db629eef2e956974ee9a979 Reviewed-on: https://skia-review.googlesource.com/121343 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* workaround for buggy macOS GLSL shader compilerGravatar Ethan Nicholas2018-04-12
| | | | | | | | Bug: skia: Change-Id: Ib77e11d80f93f76e65eac6119dbf2bd03523aaf9 Reviewed-on: https://skia-review.googlesource.com/117626 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Make generated effects from sksl fp files not need SK_SUPPORT_GPUGravatar Greg Daniel2018-04-06
| | | | | | | | Bug: skia: Change-Id: I42a5c7fe7dc35a23290c8daa754c9fcce07f76fb Reviewed-on: https://skia-review.googlesource.com/119010 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "Revert "Make SkSL GLSL generator declare sk_FragColor inout when EXT ↵Gravatar Brian Salomon2018-04-04
| | | | | | | | | | | | fb fetch is used."" This reverts commit d40133092ae138b3d47a1158101faec3c53c6b1f. Bug: skia: Change-Id: I236505da047d5ad29e4952d8955eb7aa1bfb870b Reviewed-on: https://skia-review.googlesource.com/118621 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Make SkSL GLSL generator declare sk_FragColor inout when EXT fb ↵Gravatar Brian Salomon2018-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | fetch is used." This reverts commit 7e1dd2017a59a748c6cb10160868780d2dffdbc0. Reason for revert: breaking fp compilation Original change's description: > Make SkSL GLSL generator declare sk_FragColor inout when EXT fb fetch is used. > > Change-Id: I5e6e3263bb49febc757cd63d5d6c1518f174322d > Reviewed-on: https://skia-review.googlesource.com/118420 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=egdaniel@google.com,bsalomon@google.com Change-Id: I2aedfaff93150ba8cd1ed9fed22f3cfdd509695a No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/118600 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Make SkSL GLSL generator declare sk_FragColor inout when EXT fb fetch is used.Gravatar Brian Salomon2018-04-04
| | | | | | | Change-Id: I5e6e3263bb49febc757cd63d5d6c1518f174322d Reviewed-on: https://skia-review.googlesource.com/118420 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* fix for frexp dataflow analysisGravatar Ethan Nicholas2018-04-01
| | | | | | | | Bug: skia: Change-Id: Ic20bedadfbf37fd78ce03872ece2d9552307cfcd Reviewed-on: https://skia-review.googlesource.com/117243 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* fixed type mismatches in SkSL comparison operatorsGravatar Ethan Nicholas2018-03-29
| | | | | | | | Bug: skia: Change-Id: I8f05088c561a80549264f7a65cb8161bbe7d8f4c Reviewed-on: https://skia-review.googlesource.com/116982 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* initial SkSLJIT checkinGravatar Ethan Nicholas2018-03-27
| | | | | | | | | Docs-Preview: https://skia.org/?cl=112204 Bug: skia: Change-Id: I10042a0200db00bd8ff8078467c409b1cf191f50 Reviewed-on: https://skia-review.googlesource.com/112204 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* added frexp support to SkSLGravatar Ethan Nicholas2018-03-26
| | | | | | | | | | | | | | | | | This includes an optimizer fix for the situation: int i; float f = frexp(foo, i); If we don't read the variable i, it is considered dead and eliminated - which then causes an error when we try to write the expression frexmp(foo, i). Bug: skia: Change-Id: Iac385e38e215455346fab62e1f4ec46fa65b3c21 Reviewed-on: https://skia-review.googlesource.com/116521 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Get @constructor feature of SKSL workingGravatar Robert Phillips2018-03-23
| | | | | | | | | | This is probably the only portion of https://skia-review.googlesource.com/c/skia/+/115900 that we want to keep TBR=ethannicholas@google.com Change-Id: Ife4d7bfbe454f705e93fb051b0bcf8e2b0a052b5 Reviewed-on: https://skia-review.googlesource.com/116192 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Remove std::move from GrSimpleTextureEffect"Gravatar Robert Phillips2018-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0a4b13cdea208946a59c612e0743f28533124166. Reason for revert: incorrect change Original change's description: > Remove std::move from GrSimpleTextureEffect > > Bug:822680 > Change-Id: I4780ce12a6ce244a2165bfb7b293adb06ae577c5 > Reviewed-on: https://skia-review.googlesource.com/115900 > Reviewed-by: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com,ethannicholas@google.com Change-Id: Ib4123d50b02eeac3f5112bf2702b12fc080f0d1c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 822680 Reviewed-on: https://skia-review.googlesource.com/116140 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove std::move from GrSimpleTextureEffectGravatar Robert Phillips2018-03-22
| | | | | | | | | Bug:822680 Change-Id: I4780ce12a6ce244a2165bfb7b293adb06ae577c5 Reviewed-on: https://skia-review.googlesource.com/115900 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* switched SPIR-V vertexid to vertexindexGravatar Ethan Nicholas2018-03-22
| | | | | | | | Bug: skia: Change-Id: I32c10e2874feea63d7fa048057ef57e27d5874bc Reviewed-on: https://skia-review.googlesource.com/115880 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* fixed attributes of sk_InvocationIDGravatar Ethan Nicholas2018-03-21
| | | | | | | | Bug: skia: Change-Id: I549fdfa75f536e00f14bca445753f4c1354fa5d0 Reviewed-on: https://skia-review.googlesource.com/115361 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* fix switch fallthrough warningGravatar Ethan Nicholas2018-03-19
| | | | | | | | Bug: skia: Change-Id: Ia2e25545319d54c3258b76c050b46a73c292c791 Reviewed-on: https://skia-review.googlesource.com/115085 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* SPIR-V output now always includes DescriptorSet for uniformsGravatar Ethan Nicholas2018-03-19
| | | | | | | | Bug: skia: Change-Id: I6a31d6ec51d59340ef738c2bc4a8a88a261bef14 Reviewed-on: https://skia-review.googlesource.com/114865 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* fix SkSL SPIR-V geometry shaders' entry point declarationGravatar Ethan Nicholas2018-03-16
| | | | | | | | Bug: skia: Change-Id: I5cd5a35fe1a554b127548a7809c106de70df0be7 Reviewed-on: https://skia-review.googlesource.com/114785 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* we now complain if an SkSL program tries to override the default outputGravatar Ethan Nicholas2018-03-16
| | | | | | | | Bug: skia: Change-Id: I387ddc3aac0712eb6c0a6ea39e48e5f3d809bc48 Reviewed-on: https://skia-review.googlesource.com/114691 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* fixed SkSL SPIR-V vector comparisonsGravatar Ethan Nicholas2018-03-14
| | | | | | | | Bug: skia: Change-Id: I57788fe427f62e20c6e073fd96279910febef22e Reviewed-on: https://skia-review.googlesource.com/114367 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Add incompleteShortIntPrecision to SkSL StandaloneShaderCapsGravatar Chris Dalton2018-03-14
| | | | | | | | | | TBR=ethannicholas@google.com Bug: skia: Change-Id: If3b86e414d74072dd3e38a5507bbcbcecc3946f6 Reviewed-on: https://skia-review.googlesource.com/114378 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Add a shader cap for incomplete short int precisionGravatar Chris Dalton2018-03-14
| | | | | | | | | Bug: skia: Change-Id: Iac36eb763e687f6ecc3acbd4afced66f95596be2 Reviewed-on: https://skia-review.googlesource.com/109003 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Fixed SkSL use-after-free fuzzer bug and added defensive code to catch such ↵Gravatar Ethan Nicholas2018-03-01
| | | | | | | | | | problems in the future. Bug: skia:7558 Change-Id: I5098c0ed08f2328828969e819db7785270b26656 Reviewed-on: https://skia-review.googlesource.com/111460 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Update certain instrinsic calls in SkSL SPIR-V gen to not mix vectors and ↵Gravatar Ethan Nicholas2018-02-28
| | | | | | | | | | | | | | scalars. Functions like min, max, clamp, and mix cannot intermix vectors and scalars as operands and return value. This updates SkSL to promote scalars to vectors if need be before calling these functions. Bug: skia:7653 Change-Id: I13f98d452978e3f15bafddea638b7bbe313d98ce Reviewed-on: https://skia-review.googlesource.com/110660 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Don't use LOD bias on OES external texturesGravatar Brian Osman2018-02-21
| | | | | | | Change-Id: Id366b644576c6e4763c0c081b6a6b40f4e930df7 Reviewed-on: https://skia-review.googlesource.com/109024 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Drop unused shader support for multisample interpolationGravatar Chris Dalton2018-02-20
| | | | | | | | | Bug: skia: Change-Id: Ie19f13877bf6828ab94ffbb20e6f74e0e376f6cb Reviewed-on: https://skia-review.googlesource.com/107359 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Drop unused shader support for sample variablesGravatar Chris Dalton2018-02-15
| | | | | | | | Bug: skia: Change-Id: I9e2b7da8c916703027d8dd4303ae67f4e69bcf87 Reviewed-on: https://skia-review.googlesource.com/107356 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Add "sharpen" option to SkSL, to LOD bias all texturesGravatar Brian Osman2018-02-13
| | | | | | | | | | | | | | | | This adds a fixed bias (-0.5) to the computed LOD of all mip-mapped texture fetches. (Technically, to all texture fetches, but that only matters for mip-mapped ones). Clients can opt-in with a new GrContextOption. Bug: skia:7541 Bug: chromium:562162 Change-Id: Ie3cd0679c4ab66f62d2dc32e7e68e5c99355115e Reviewed-on: https://skia-review.googlesource.com/106322 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove (unused) NV_bindless_texture from GL interfaceGravatar Brian Osman2018-02-09
| | | | | | | Change-Id: I232c200c30f348da4f61cd7d6d73f3f3b46e0770 Reviewed-on: https://skia-review.googlesource.com/105984 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Add missing include (to get std::min on MSVC)Gravatar Brian Osman2018-02-09
| | | | | | | Change-Id: I2ca5ef0df9276e740a78b08e6f51bcdb445fd29b Reviewed-on: https://skia-review.googlesource.com/105985 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* updated SkSL READMEGravatar Ethan Nicholas2018-02-01
| | | | | | | | Bug: skia: Change-Id: Iac2f0451ab86a9fa17e119a562c1305b31aa1069 Reviewed-on: https://skia-review.googlesource.com/102144 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* updated .fp file headersGravatar Ethan Nicholas2018-02-01
| | | | | | | | Bug: skia: Change-Id: I9c39622f34e803a706acd04372be569667380661 Reviewed-on: https://skia-review.googlesource.com/102204 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>