aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
Commit message (Collapse)AuthorAge
* Revert "Revert "Update skia to use ifdefs for Vulkan code instead of dummy ↵Gravatar Robert Phillips2017-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | header"" This reverts commit fad9e3f54112ea8c8bb6bb72384f47b9759578f5. Reason for revert: Can't find the error message anymore (?!?) Let's try again shall we Original change's description: > Revert "Update skia to use ifdefs for Vulkan code instead of dummy header" > > This reverts commit c0f8e426c59eec6c720b8e1329dcb966cf1b6800. > > Reason for revert: Experiment to see if this will unblock the Android roll > > Original change's description: > > Update skia to use ifdefs for Vulkan code instead of dummy header > > > > Bug: skia:6721 > > Change-Id: I80a4c9f2acc09c174497f625c50ed12a8bb76505 > > Reviewed-on: https://skia-review.googlesource.com/19547 > > Reviewed-by: Mike Klein <mtklein@google.com> > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com > > Change-Id: Ib51c1672570f2071a17b6fbde692a5174b0358ce > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:6721 > Reviewed-on: https://skia-review.googlesource.com/19724 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: Iecef7ddcfe31d82938336120a4193525ac6693be No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:6721 Reviewed-on: https://skia-review.googlesource.com/19782 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Revert "use pipeline for non-opt xfermodes""Gravatar Mike Reed2017-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4f8c695736c8ae4fed2190a8e1301a4f4a979898. Reason for revert: suppression re-landed in chrome Original change's description: > Revert "use pipeline for non-opt xfermodes" > > This reverts commit e93cf97175d348ce1400762bdd8d9acabdd29766. > > Reason for revert: unblock Chrome roll > > Original change's description: > > use pipeline for non-opt xfermodes > > > > Produces slightly different results for Hue, Saturation, Color, Luminosity, > > seemingly around the aa edging. > > > > Bug: skia: > > Change-Id: I6364818c9788863e5fad6d14cad4797d073dbea3 > > Reviewed-on: https://skia-review.googlesource.com/19554 > > Reviewed-by: Mike Klein <mtklein@google.com> > > Commit-Queue: Mike Reed <reed@google.com> > > TBR=mtklein@google.com,fmalita@chromium.org,reed@google.com > > Change-Id: Ib85a51753d21ce778fa5cfedd6b7d1b5b2b87096 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/19745 > Reviewed-by: Mike Klein <mtklein@chromium.org> > Commit-Queue: Mike Klein <mtklein@chromium.org> TBR=mtklein@chromium.org,mtklein@google.com,fmalita@chromium.org,reed@google.com Change-Id: I1201b5abae1514edf9143927064ce060095592f4 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/19760 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Update skia to use ifdefs for Vulkan code instead of dummy header"Gravatar Robert Phillips2017-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c0f8e426c59eec6c720b8e1329dcb966cf1b6800. Reason for revert: Experiment to see if this will unblock the Android roll Original change's description: > Update skia to use ifdefs for Vulkan code instead of dummy header > > Bug: skia:6721 > Change-Id: I80a4c9f2acc09c174497f625c50ed12a8bb76505 > Reviewed-on: https://skia-review.googlesource.com/19547 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com Change-Id: Ib51c1672570f2071a17b6fbde692a5174b0358ce No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:6721 Reviewed-on: https://skia-review.googlesource.com/19724 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "use pipeline for non-opt xfermodes"Gravatar Mike Klein2017-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e93cf97175d348ce1400762bdd8d9acabdd29766. Reason for revert: unblock Chrome roll Original change's description: > use pipeline for non-opt xfermodes > > Produces slightly different results for Hue, Saturation, Color, Luminosity, > seemingly around the aa edging. > > Bug: skia: > Change-Id: I6364818c9788863e5fad6d14cad4797d073dbea3 > Reviewed-on: https://skia-review.googlesource.com/19554 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Mike Reed <reed@google.com> TBR=mtklein@google.com,fmalita@chromium.org,reed@google.com Change-Id: Ib85a51753d21ce778fa5cfedd6b7d1b5b2b87096 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/19745 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Update skia to use ifdefs for Vulkan code instead of dummy headerGravatar Greg Daniel2017-06-13
| | | | | | | | Bug: skia:6721 Change-Id: I80a4c9f2acc09c174497f625c50ed12a8bb76505 Reviewed-on: https://skia-review.googlesource.com/19547 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Add GrPrimitiveType::kLinesAdjacencyGravatar Chris Dalton2017-06-13
| | | | | | | | | | Converts GrPrimitiveType to an enum class and adds kLinesAdjacency. Bug: skia: Change-Id: I3b5e68acfb20476f6c6923968f5a4ac4f73ae12d Reviewed-on: https://skia-review.googlesource.com/19680 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Revert "Add GrPrimitiveType::kLinesAdjacency"Gravatar Ravi Mistry2017-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f7eb015083aba8942031145736251dd32094115d. Reason for revert: Looks like this is causing build failures: * https://chromium-swarm.appspot.com/task?id=36baaf4d376bbf10&refresh=10 * https://chromium-swarm.appspot.com/task?id=36baad1f17e93510&refresh=10 Original change's description: > Add GrPrimitiveType::kLinesAdjacency > > Converts GrPrimitiveType to an enum class and adds kLinesAdjacency. > > Bug: skia: > Change-Id: If57d26277182aac1375e8181211ddaf7ea6d1e0a > Reviewed-on: https://skia-review.googlesource.com/19581 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=bsalomon@google.com,csmartdalton@google.com Change-Id: I37a1c575123b357abd8b9af9eea8871fe199f44b No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/19661 Reviewed-by: Ravi Mistry <rmistry@google.com> Commit-Queue: Ravi Mistry <rmistry@google.com>
* Add GrPrimitiveType::kLinesAdjacencyGravatar Chris Dalton2017-06-13
| | | | | | | | | | Converts GrPrimitiveType to an enum class and adds kLinesAdjacency. Bug: skia: Change-Id: If57d26277182aac1375e8181211ddaf7ea6d1e0a Reviewed-on: https://skia-review.googlesource.com/19581 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* use pipeline for non-opt xfermodesGravatar Mike Reed2017-06-13
| | | | | | | | | | | Produces slightly different results for Hue, Saturation, Color, Luminosity, seemingly around the aa edging. Bug: skia: Change-Id: I6364818c9788863e5fad6d14cad4797d073dbea3 Reviewed-on: https://skia-review.googlesource.com/19554 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Move Flags from GrRenderTarget to GrTypesPriv.h & renameGravatar Robert Phillips2017-06-13
| | | | | | | | | The motivation for this is to prevent GrRenderTarget.h appearing in GrRenderTargetProxy.h Change-Id: I4ef126972c0780cbacb35fa2aa6290777c66eddf Reviewed-on: https://skia-review.googlesource.com/19521 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Consolidate decoding frames into SkCodecGravatar Leon Scroggins III2017-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new private method to SkCodec that handles Options.fFrameIndex: - Check to ensure the index is valid - Call onGetFrameCount to force parsing the stream - Recursively call getPixels (it should be complete, so no need for incremental decoding) to decode the prior frame if necessary - Zero fill a RestoreBGColor frame Call the method in getPixels and startIncrementalDecode, and remove duplicate code from GIF and WEBP. Remove support for scaling frames beyond the first, which is currently unused. Preserve the feature of SkGifCodec that it will only parse to the end of the first frame if the first frame is asked for. (Also note that when we continue a partial frame, we won't force parsing the full stream.) If the client only wants the first frame, parsing the rest would be unnecessary. But if the client wants the second, we assume they will want any remaining frames, so we parse the remainder of the stream. This simplifies the code (so SkCodec does not have to ask its subclass to parse up to a particular frame). Update tests that relied on the old behavior: - Codec_partialAnim now hardcodes the bytes needed. Previously it relied on the old behavior that GIF only parsed up to the frame being decoded. - Codec_skipFullParse now only tests the first frame, since that is the case where it is important to skip a full parse. TBR=reed@google.com No changes to the public API. Change-Id: Ic2f075452dfeedb4e3e60e6cf4df33ee7bd38495 Reviewed-on: https://skia-review.googlesource.com/19276 Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Revert "Revert "Expand partial render target write pixels workaround.""Gravatar Brian Salomon2017-06-12
| | | | | | | | | | | New version limits the workaround to unorm configs. This reverts commit fdd117025fb846771e9e47cbf825d9071745fa98. Change-Id: I47a08a0ea4cf1acd88ca3c1bf9922cf0a8d215cc Reviewed-on: https://skia-review.googlesource.com/19490 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Reland DeferredTextureImageData low-bit-depth/dithering supportGravatar Eric Karl2017-06-12
| | | | | | | | | | | | | Cause DeferredTextureImageData functionality to support low bit depth (4444, 565) image formats (with dithering). Updated to handle colorspace + 4444 colortype correctly. Bug: 720105 Change-Id: Ib7e14d937849f4f6b08fda6992a240bb203d0089 Reviewed-on: https://skia-review.googlesource.com/19094 Commit-Queue: Eric Karl <ericrk@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Re-enable deferred proxies in ChromeGravatar Robert Phillips2017-06-12
| | | | | | | Change-Id: I6dad0c1d3ff9f81e13625988b00c3f844128d7e7 Reviewed-on: https://skia-review.googlesource.com/19446 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove GrTGpuResourceRef specializationsGravatar Robert Phillips2017-06-12
| | | | | | | | | This template is only used for GrBuffers now. Change-Id: Ia9e95576b01124657e64007231fbc0a83276e13f Reviewed-on: https://skia-review.googlesource.com/19484 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* SkXfermode no longer needs to e a flattenableGravatar Mike Reed2017-06-10
| | | | | | | | | | SkArithmeticMode is unreachable, so delete it Bug: skia: Change-Id: Ibe4c48fcf756280569c4b302da8d96bd4e21b717 Reviewed-on: https://skia-review.googlesource.com/19394 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Retract GrTexture.h a bitGravatar Robert Phillips2017-06-09
| | | | | | | | | This began as cleaning up SkSpecialImage.h & spiraled out of control from there. Change-Id: I9a570ecd2a7af9ee724ebfebe4e9185748f38bbc Reviewed-on: https://skia-review.googlesource.com/19290 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* SkShader::asACompose is android-onlyGravatar Mike Reed2017-06-09
| | | | | | | | Bug: skia: Change-Id: Ib99a7ee4984544f342699fa6b20797c55be7d5a0 Reviewed-on: https://skia-review.googlesource.com/19268 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Add comments support for PNG encoderGravatar Yuqian Li2017-06-09
| | | | | | | | | Bug: skia:6689 Change-Id: I6ccac8890f44724ccd6e20c8f4ea80bc99f9fa58 Reviewed-on: https://skia-review.googlesource.com/19080 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Add tonal color support for shadows.Gravatar Jim Van Verth2017-06-09
| | | | | | | | Bug: skia: Change-Id: Ib9bd9083da1d8a9fa90ae7c710386e6903541fd5 Reviewed-on: https://skia-review.googlesource.com/18148 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Extend composeshader to support a lerp parameterGravatar Mike Reed2017-06-09
| | | | | | | | Bug: skia: Change-Id: I3bbb2cb8d0a84fca0309654498548ebc94d8938f Reviewed-on: https://skia-review.googlesource.com/18460 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Remove debug checks for unsupported ICC profilesGravatar Matt Sarett2017-06-09
| | | | | | | | | | | | This was never fully integrated with our automated image testing. I feel it has limited usefulness in terms of catching bugs. Bug: skia: Change-Id: Iecd0a4e9b664ab0b351debde45ada864379de7ec Reviewed-on: https://skia-review.googlesource.com/19267 Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* remove unused colorfilter virtual asAComposeGravatar Mike Reed2017-06-09
| | | | | | | | Bug: skia: Change-Id: I1e23dbd18f7145dcaaa864f3fd7b34aea2c342a6 Reviewed-on: https://skia-review.googlesource.com/19269 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* remove unneeded includeGravatar Mike Reed2017-06-09
| | | | | | | | Bug: skia: Change-Id: If8c689c008438efed398d018782021195f6d0274 Reviewed-on: https://skia-review.googlesource.com/19261 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Add support for SkImageGenerator creating external texturesGravatar Stan Iliev2017-06-08
| | | | | | | | | | | Copy the SkImageGenerator texture if tiling is needed and original texture target is GR_GL_TEXTURE_EXTERNAL. Bug: skia: Change-Id: I98f5acc3883e2060b1a35f80633b02b08a706107 Reviewed-on: https://skia-review.googlesource.com/18268 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Stan Iliev <stani@google.com>
* Bump min picture to 7+ months agoGravatar Mike Reed2017-06-08
| | | | | | | | | | | Delete lots of support code, including need for SkXfermode objects which are no longer used anywhere else. Bug: skia: Change-Id: Id6b7ef0f529691041ff2b206c35e336e8a4c974d Reviewed-on: https://skia-review.googlesource.com/19059 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "Revert "Revert "DeferredTextureImageData low-bit-depth/dithering ↵Gravatar Brian Salomon2017-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | support""" This reverts commit 840ff8837bd93ee73c187890839b3f56e7c94fb7. Reason for revert: Not obvious to me how to fix, reverting the chrome CL that was dependent on this. Original change's description: > Revert "Revert "DeferredTextureImageData low-bit-depth/dithering support"" > > This reverts commit d7c681d6a7b154d276e275becc51685eac8705c2. > > Reason for revert: New param already used in Chrome > > Original change's description: > > Revert "DeferredTextureImageData low-bit-depth/dithering support" > > > > This reverts commit 2c075e749d1f33dea06ad2710e15c9a1d60ebced. > > > > Reason for revert: Breaking tests. e.g.: https://chromium-swarm.appspot.com/task?id=369dc44f62ce9510&refresh=10 > > > > Original change's description: > > > DeferredTextureImageData low-bit-depth/dithering support > > > > > > Cause DeferredTextureImageData functionality to support low bit depth > > > (4444, 565) image formats (with dithering). > > > > > > Bug: 720105 > > > Change-Id: Ie3b5768ebc393d9b0a5322461c722bf37c80b791 > > > Reviewed-on: https://skia-review.googlesource.com/18945 > > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > > Commit-Queue: Eric Karl <ericrk@chromium.org> > > > > TBR=bsalomon@google.com,ericrk@chromium.org > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Bug: 720105 > > > > Change-Id: I07aec722425efc62bc54f82cee9a19a9bf339f7b > > Reviewed-on: https://skia-review.googlesource.com/19039 > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Commit-Queue: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,reviews@skia.org,ericrk@chromium.org > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: 720105 > > Change-Id: I91e690d0564f04209a2bd677de9ae9eb9c0f90d3 > Reviewed-on: https://skia-review.googlesource.com/19041 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,reviews@skia.org,ericrk@chromium.org No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 720105 Change-Id: I63eb0051964ce99e187b4e4943ea79bc22d392d2 Reviewed-on: https://skia-review.googlesource.com/19046 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Revert "DeferredTextureImageData low-bit-depth/dithering support""Gravatar Brian Salomon2017-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d7c681d6a7b154d276e275becc51685eac8705c2. Reason for revert: New param already used in Chrome Original change's description: > Revert "DeferredTextureImageData low-bit-depth/dithering support" > > This reverts commit 2c075e749d1f33dea06ad2710e15c9a1d60ebced. > > Reason for revert: Breaking tests. e.g.: https://chromium-swarm.appspot.com/task?id=369dc44f62ce9510&refresh=10 > > Original change's description: > > DeferredTextureImageData low-bit-depth/dithering support > > > > Cause DeferredTextureImageData functionality to support low bit depth > > (4444, 565) image formats (with dithering). > > > > Bug: 720105 > > Change-Id: Ie3b5768ebc393d9b0a5322461c722bf37c80b791 > > Reviewed-on: https://skia-review.googlesource.com/18945 > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Commit-Queue: Eric Karl <ericrk@chromium.org> > > TBR=bsalomon@google.com,ericrk@chromium.org > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: 720105 > > Change-Id: I07aec722425efc62bc54f82cee9a19a9bf339f7b > Reviewed-on: https://skia-review.googlesource.com/19039 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,reviews@skia.org,ericrk@chromium.org No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 720105 Change-Id: I91e690d0564f04209a2bd677de9ae9eb9c0f90d3 Reviewed-on: https://skia-review.googlesource.com/19041 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "DeferredTextureImageData low-bit-depth/dithering support"Gravatar Brian Salomon2017-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2c075e749d1f33dea06ad2710e15c9a1d60ebced. Reason for revert: Breaking tests. e.g.: https://chromium-swarm.appspot.com/task?id=369dc44f62ce9510&refresh=10 Original change's description: > DeferredTextureImageData low-bit-depth/dithering support > > Cause DeferredTextureImageData functionality to support low bit depth > (4444, 565) image formats (with dithering). > > Bug: 720105 > Change-Id: Ie3b5768ebc393d9b0a5322461c722bf37c80b791 > Reviewed-on: https://skia-review.googlesource.com/18945 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Eric Karl <ericrk@chromium.org> TBR=bsalomon@google.com,ericrk@chromium.org No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 720105 Change-Id: I07aec722425efc62bc54f82cee9a19a9bf339f7b Reviewed-on: https://skia-review.googlesource.com/19039 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* DeferredTextureImageData low-bit-depth/dithering supportGravatar Eric Karl2017-06-07
| | | | | | | | | | | Cause DeferredTextureImageData functionality to support low bit depth (4444, 565) image formats (with dithering). Bug: 720105 Change-Id: Ie3b5768ebc393d9b0a5322461c722bf37c80b791 Reviewed-on: https://skia-review.googlesource.com/18945 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Eric Karl <ericrk@chromium.org>
* Make SkCodec more flexible about its required frameGravatar Leon Scroggins III2017-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkCodec sets fRequiredFrame to be the earliest possible frame that a given frame can depend on. e.g. - Frame A fills the screen, Keep - Frame B does not cover A, Keep - Frame C covers B but not A, and is opaque Frame C can depend on either A or B. SkCodec already reports that C depends on A. This CL allows a client of SkCodec to use either A or B to create C. Also expose the DisposalMethod. Since any frame between A and C can be used to create C except for DisposePrevious frames, the client needs to be able to know the disposal method so they do not try to use such a frame to create C. Further, the disposal method can be used to give the client a better idea whether they will continue to need a frame. (e.g. if frame i is DisposePrevious and depends on i-1, the client may not want to steal i-1 to create i, since i+1 may also depend on i-1.) TODO: Share code for decoding prior frames between GIF and WEBP Change-Id: I91a5ae22ba3d8dfbe0bde833fa67ae3da0d81ed6 Reviewed-on: https://skia-review.googlesource.com/13722 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Chris Blume <cblume@chromium.org> Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* move SkPathRef.h into privateGravatar Mike Reed2017-06-07
| | | | | | | | Bug: skia: Change-Id: I3370c594301ae833ec1fe3cb16ac544e5b2128e8 Reviewed-on: https://skia-review.googlesource.com/18982 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Touch input support for WindowsGravatar Brian Osman2017-06-07
| | | | | | | | | | | | | | | | | | | Had to add some logic to avoid touch and mouse cross-talk, because (at least on my laptop), the touch screen generates both kinds of events. This seems really useful [1] for the many [2] Skia developers with touch-enabled Windows devices. ---------- 1: No, not really. 2: N = 1? Bug: skia: Change-Id: Ib888bf4198f2cc0a29a31581ec4b64d3d9008c33 Reviewed-on: https://skia-review.googlesource.com/18920 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* remove unneeded class declarationsGravatar Mike Reed2017-06-07
| | | | | | | | Bug: skia: Change-Id: I7ca7f69e444279fe85d8aa66367194768736995f Reviewed-on: https://skia-review.googlesource.com/18964 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Create an SkColorSpaceXform image generatorGravatar Matt Sarett2017-06-06
| | | | | | | | | | | | | | | | | This should be immediately useful in the Skia-Android rendering pipeline. Possible future uses include creating a "renderable" SkImage from a bitmap with a funny color space. Inspired by: https://skia-review.googlesource.com/c/13981/ Bug: b/62347704 Change-Id: I388c7af1fc43834b8ad22022d0caf3ac90b734c8 Reviewed-on: https://skia-review.googlesource.com/18598 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Expose SkWriteBuffer in component buildsGravatar Adrienne Walker2017-06-05
| | | | | | | | | | | | The chromium compositor wants to lean on Skia internal serialization (at least temporarily, but possibly long term as well) for certain types. As flattening types requires an SkWriteBuffer, make SkWriteBuffer have public visibility in component builds. Change-Id: I635f89bcf816aa376682bd7f7ef46de7d5669e12 Reviewed-on: https://skia-review.googlesource.com/18700 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Simplify SkCodecs' call to SkColorSpaceXform::applyGravatar Leon Scroggins III2017-06-05
| | | | | | | | | | | | | | | | | | | | | | | | | | Most SkCodec subclasses did the following to apply their SkColorSpaceXform: dstFormat = select_xform_format(dstInfo.colorType()); srcFormat = select_xform_format(<something that doesn't change>); xformAlphaType = select_xform_alpha(dstInfo.alphaType(), this->getInfo().alphaType()); this->colorXform()->apply(dstFormat, dst, srcFormat, src, width, xformAlphaType); Consolidate the computation of these parameters into SkCodec and add a new method to SkCodec that calls apply() with those parameters. Add a SkColorSpaceXform::ColorFormat to SkCodec. This allows the new method SkCodec::applyColorXform to supply the ColorFormat. TBR=reed@google.com (No change to public API.) Change-Id: I8ea7ba4c0024be827a9f9359796c778744330f6e Reviewed-on: https://skia-review.googlesource.com/18523 Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Simplify some Viewer code, and fix a few bugsGravatar Brian Osman2017-06-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The content rect was always identical to the window rect, so most of the related code did nothing. The translation limit code is always useful (to avoid dragging the slide way off-screen with the mouse), so always include it. The auto-scaling to fit the screen is also still useful, but just base it on the window rect. The zoom code has four state variables, only used two of them, and one was a trivially derived computation. Fold most of that work into computeMatrix. (The translation was always zero -- we never changed the zoom center.) Include fDefaultMatrix in the matrix from computeMatrix, rather than needing to apply it specially to the canvas. Don't apply the inverse default matrix to touch or mouse points. The absolute positions of those touch points is not important, but because that matrix includes scale (and sometimes very large or very small scale), it just had the effect of greatly amplifying or damping the drag speed. Without it, the slide always pans at the speed of the touch/mouse drag -- which seems more desirable. The use of the inverse default matrix was a clever trick, but it caused the translation (applied to the global mtx) to be scaled, so the slide was always pinned incorrectly. Instead, supply the unmodified window rect and the default matrix, so the trans limit code can do the obvious correct thing: xform the slide bounds completely, then limit the translation that will be applied after that. Slides are now correctly pinned to screen edge regardless of how much zoom is present in the default matrix. Note: There are still several bugs related to all of this code, but given the web of xform state, it's hard to unravel. The touch gesture still doesn't know about viewer's zoom, so that's ignored when doing the pinning. Beyond that, it doesn't even know about window resize - it only configures the translation limit when setting up a slide. I had a fix for all of this (doing the translation limiting in computeMatrix), but then the touch gesture doesn't know about it, and can accumulate drag motion that needs to be un-dragged to get back on-screen, even though the slide is never really translated that far. SkTouchGesture is in include. No one uses it except viewer: TBR=bsalomon@google.com Bug: skia: Change-Id: I460cc07c3de6d36e63826f57d359faf1facf5ab3 Reviewed-on: https://skia-review.googlesource.com/18524 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Make instantiate return a BooleanGravatar Robert Phillips2017-06-05
| | | | | | | | | | | | From an off-line conversation: The longer term idea will be to create a helper class isolates the ability to instantiate proxies until flush time. The peek* methods could then be moved to GrSurfaceProxy. Change-Id: I8e8c02c098475b77d515791c0d6b81f7e4a327dd Reviewed-on: https://skia-review.googlesource.com/18076 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Don't move raw pointers in SkCanvasGravatar Vaclav Brozek2017-06-05
| | | | | | | | | | | | | | | | Moving raw pointers does the same job as copying, but is more verbose and also more confusing: e.g., is the supposed pointer meant to be a smart one? This instance was flagged by the tool from https://codereview.chromium.org/2919243002/. BUG=chromium:729393 Change-Id: I4c89e9d80fab9f6d14ab7db53e8b9b6e7cf966dc Reviewed-on: https://skia-review.googlesource.com/18540 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Remove ImmediateFlush modeGravatar Robert Phillips2017-06-02
| | | | | | | Change-Id: I7db113e66d81516b2beb5eefeddf488d9bfed2e5 Reviewed-on: https://skia-review.googlesource.com/18488 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove deprecated SkRWBuffer snapshot methodsGravatar Florin Malita2017-06-02
| | | | | | | Change-Id: I98fc6059fe74458fb359eaf00ccfcae50996a9e1 Reviewed-on: https://skia-review.googlesource.com/18480 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Implement an SkImage backed by a Android hardware bufferGravatar Stan Iliev2017-06-02
| | | | | | | | | | | | | | Create a new SkImage public API to make an image from an Android hardware buffer. Implementation is using a SkImageGenerator derived class GrAndroidBufferImageGenerator. A new EGLImage texture is created, which is then wrapped with GrTextureProxy. Bug: skia: Change-Id: I610a4c5a58198686ce7c03e9a0adad3f9d2342e0 Reviewed-on: https://skia-review.googlesource.com/17789 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Stan Iliev <stani@google.com>
* add API to change max pointsize for font cacheGravatar Mike Reed2017-06-01
| | | | | | | | Bug: skia:6585 Change-Id: I6df8c439dca0a154e8fbfce6d66c536665dff1d7 Reviewed-on: https://skia-review.googlesource.com/18314 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Add smartptr SkRWBuffer snapshot methodsGravatar Florin Malita2017-06-01
| | | | | | | Change-Id: Id816a38213a86bf090230ebaaef00d98a9487965 Reviewed-on: https://skia-review.googlesource.com/18266 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* make SkColorFilter::onAppendStages() pureGravatar Mike Klein2017-06-01
| | | | | | | Change-Id: I2851e19648fb0478db9b940e86c6ddb2020000b3 Reviewed-on: https://skia-review.googlesource.com/18264 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Remove GrSurface-based surfaceContext factories from GrContextPrivGravatar Robert Phillips2017-06-01
| | | | | | | | | | | This relies on both: https://skia-review.googlesource.com/c/13001/ (Rm makeRenderTargetContext in favor of deferred version) https://skia-review.googlesource.com/c/11125/ (Remove discard from GrRenderTarget & force it to always go through a RenderTargetContext) Change-Id: Ia06469a6fa0048e162fb769ed4a11e4773cfacca Reviewed-on: https://skia-review.googlesource.com/13130 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Disable deferred proxies for M60 branchGravatar Robert Phillips2017-05-31
| | | | | | | | Bug: 720325 Change-Id: I0529bbcd592bdc5d5a741731af8a66971e485649 Reviewed-on: https://skia-review.googlesource.com/18239 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Add support for instanced drawsGravatar Chris Dalton2017-05-31
| | | | | | | | | | | | Adds an instance buffer to GrMesh and instance attribs to GrPrimitiveProcessor. Implements support in GL and Vulkan. Adds unit tests for instanced rendering with GrMesh. Bug: skia: Change-Id: If1a9920feb9366f346b8c37cf914713c49129b3a Reviewed-on: https://skia-review.googlesource.com/16200 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* slant colorfilter away from filterSpan4fGravatar Mike Reed2017-05-31
| | | | | | | | | | | rename to make it easy to delete any impl that also had onAppendStages... i.e. rename to make it clear that it is just an impl trick for rasterpipeline. Bug: skia: Change-Id: If3c3b2811eff12d399cdf7a77552c01e72c06996 Reviewed-on: https://skia-review.googlesource.com/18234 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>