aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
Commit message (Collapse)AuthorAge
* 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>
* Retract GrTexture*.h & GrRenderTarget*.h from other headersGravatar Robert Phillips2017-06-13
| | | | | | | | | This does push some additional work (& includes) into the .cpp files. Change-Id: I27c847e371802270d13594dcc22aae44039990bb Reviewed-on: https://skia-review.googlesource.com/19660 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@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>
* 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>
* 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>
* Revert "Revert "Disable F16-nullptr sources""Gravatar Matt Sarett2017-06-12
| | | | | | | | | | | | This relands the original change with a modification. We should not check for non-null pixels because this breaks the Android hw bitmap use case. Bug: b/62482405 Change-Id: I081412bb46754d33b69e02e5754f04a082e081ae Reviewed-on: https://skia-review.googlesource.com/19494 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* GrTessellator: fix two NaN issues.Gravatar Stephen White2017-06-12
| | | | | | | | | | | | | | | If a point in the path rounds to +inf/-inf, the intersection code can produce NaN, which is unsortable. Fix: ignore non-finite intersections. Quadratic interpolation can sometimes produce NaN, which will never satisfy the flatness criterion. Abort if any of the interpolated points are non-finite. Bug:732023 Change-Id: If5881796e589c75b8f74459f42d00918619713a2 Reviewed-on: https://skia-review.googlesource.com/19467 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
* 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>
* fixed issue with SkSL dead code eliminationGravatar Ethan Nicholas2017-06-12
| | | | | | | | Bug: skia:6747 Change-Id: I8566f0f6822a452167079cca004730ec0db318a8 Reviewed-on: https://skia-review.googlesource.com/19275 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Revert "Disable F16-nullptr sources"Gravatar Matt Sarett2017-06-09
| | | | | | | | | | Manual revert: failing ui rendering cts tests Bug: b/62482405 Change-Id: I652ec8dce482d303437835a27c50a22248afd955 Reviewed-on: https://skia-review.googlesource.com/19360 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@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>
* GrTessellator: fix logging; fix test comment.Gravatar Stephen White2017-06-09
| | | | | | | Change-Id: Iaded9025a1518d8c69dbe366deb1035e0bd4295b Reviewed-on: https://skia-review.googlesource.com/19289 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
* 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>
* Improve cubic KLM accuracyGravatar Chris Dalton2017-06-09
| | | | | | | | | | | | | | | | | | | | | | Moves cubic root finding logic out of GrPathUtils and PathOpsCubicIntersectionTest, and unifies it in SkGeometry. "Normalizes" the homogeneous parameter values of the roots, rather than the cubic inflection function. Does this normalization by twiddling the exponents instead of division (which causes a loss of precision). Abandons the built-in derivatives in GrCubicEffect. These don't have high enough precision on many mobile gpus. Instead we pass the KLM matrix to the vertex shader via uniform, where we can use it to set up new linear functionals from which the fragment shader can calculate the gradient of the implicit function. Bug: skia:4410 Change-Id: Ibd64e999520adc8cdef7803a492d3699995aef5a Reviewed-on: https://skia-review.googlesource.com/19017 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Create a new HDC for each ANGLE contextGravatar Robert Phillips2017-06-09
| | | | | | | | Bug: skia:6711 Change-Id: I9c4720a8dbad4c6b18efe73e0e61afbdc19627bc Reviewed-on: https://skia-review.googlesource.com/19090 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Disable ReadPixels_Texture & ReadPixels_Gpu on ANGLEGravatar Robert Phillips2017-06-08
| | | | | | | | | | Depends on https://skia-review.googlesource.com/c/19101/ (Store context type (rather than backend type) in ContextInfo) Bug: skia:6742 Change-Id: I321c01838acf93ad28a17d8e97aa1bf594425502 Reviewed-on: https://skia-review.googlesource.com/19077 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Store context type (rather than backend type) in ContextInfoGravatar Robert Phillips2017-06-08
| | | | | | | Change-Id: I7dbfb735f1f094fa0a025b84f69e06a3533f2815 Reviewed-on: https://skia-review.googlesource.com/19101 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* GrTessellator: fix intersection above the first vertex.Gravatar Stephen White2017-06-08
| | | | | | | | | | | | | | | | | | | | Handle the case where the an intersection falls not only above both edge endpoints, but above the first vertex in the mesh. This requires passing the mesh into check_for_intersection(), in order to modify the head. We also need to rewind the mesh after insertion, since we need to rewind to the newly-inserted vertex. This also cleans up vertex ID computation a little (for logging), so that vertices before the first vertex or after the last have a reasonable ID. It also cleans up the intersection-on-endpoint special cases by refactoring the calls to split_edge(). BUG=730687 Change-Id: Idea736eca7b7c3c5d8a470b1373a16ad8e649e80 Reviewed-on: https://skia-review.googlesource.com/19069 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
* Draw time color xform API for AndroidGravatar Matt Sarett2017-06-08
| | | | | | | | | | | | | | | | | Will do a lazy color xform to the dst color space at GPU upload time. I've included the capability to control the gen id of the output image. This will allow us to reuse images in the Ganesh cache. This should only be temporary. When Android is able to cache the actual SkImage object, we won't need to expose this anymore. Bug: b/62347704 Change-Id: I93b950ef680f6bbdd7eb6a2ec6f50195dbb78311 Reviewed-on: https://skia-review.googlesource.com/16440 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Disable F16-nullptr sourcesGravatar Matt Sarett2017-06-08
| | | | | | | | | | | Also includes the refactor that triggered this change - stricter checking on creation on raster SkImages. Bug: skia: Change-Id: Ie3216ac3f5307de4b78792b472676faa51e5459d Reviewed-on: https://skia-review.googlesource.com/19040 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Matt Sarett <msarett@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>
* remove unused xfermode methodsGravatar Mike Reed2017-06-08
| | | | | | | Bug: skia: Change-Id: Ib0dfa7bbf3d4e73aab355df4d5f5e2a53f653809 Reviewed-on: https://skia-review.googlesource.com/19035 Reviewed-by: Mike Reed <reed@google.com>
* Remove SkLinearGradient::kForce4fContext_PrivateFlagGravatar Florin Malita2017-06-07
| | | | | | | | | | | | ... and related tests/gms. We now exercise the 4f impl with raster-pipeline/burst, no need for a special test flag. Change-Id: If67684d2d8840b3c413db9eeebb051f59cbc5a34 Reviewed-on: https://skia-review.googlesource.com/19025 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* 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>
* Introduce dynamic pipeline stateGravatar Chris Dalton2017-06-07
| | | | | | | | | | | | | | Adds a DynamicState struct to GrPipeline that has a field for the scissor rect. Eventually this should become the only way to specify a scissor rectangle and may grow to contain more fields. Adds an array of DynamicStates to GrGpuCommandBuffer::draw and implements support in GL and Vulkan. Bug: skia: Change-Id: If5aebbf9da5d192acf7e68e7def4674ffc7ec310 Reviewed-on: https://skia-review.googlesource.com/18510 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Fix alpha issues in SkGifCodecGravatar Leon Scroggins III2017-06-07
| | | | | | | | | | | | | | | | - Call conversion_possible with the proper alpha type for the frame. - Always use kUnpremul for the transform. Previously we used the alpha type for the first frame. If it was opaque and a later frame was not, this would be incorrect. Also fix Codec_frames test. Most of the tests were not running due to a return statement in a loop. Change that to continue, and correct errors in the test. Provide better debugging information. Change-Id: Icd40c09526b1d599168bfe90d93d8ddcdd9ca20f Reviewed-on: https://skia-review.googlesource.com/18935 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>
* Fix GrReducedClip.cpp: assertion failure surrounding tiny query boundsGravatar Chris Dalton2017-06-05
| | | | | | | | | | Some assertions cannot be relied upon due to FP error. Bug: skia:5990 Change-Id: I32445b320b9100ae2f80d2f762707d823da77805 Reviewed-on: https://skia-review.googlesource.com/18602 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Defend against ICOs with large BMPs embeddedGravatar Leon Scroggins III2017-06-05
| | | | | | | | | | | If the ICO reports that it has a large BMP file embedded, do not crash if we attempt to allocate too much memory. Bug: b/38116746 Change-Id: I70eb66f5e4ffc15587007b398bbe843665eae500 Reviewed-on: https://skia-review.googlesource.com/18447 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* sk_sp-ify GrResourceProvider some moreGravatar Robert Phillips2017-06-05
| | | | | | | | | | I believe this addresses the concerns of this particular bug (although more remains to be done) Bug: skia:5327 Change-Id: Ie82f08f87b3cf3d7986fe4eeb16a5d2553173913 Reviewed-on: https://skia-review.googlesource.com/18599 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Make GrSimpleMeshDrawOpHelper record whether coverage can be implemented as ↵Gravatar Brian Salomon2017-06-05
| | | | | | | | | | alpha This also makes the blend table entry for opaque src over indicate a blend of (1, ISA) rather than (1, 0) to match the actual implementation of the global src-over XP. Change-Id: I1b1f64d2546e4f0cf03c0239ce674d1baad655f6 Reviewed-on: https://skia-review.googlesource.com/18521 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@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>
* start on SkJumper lowp modeGravatar Mike Klein2017-06-04
| | | | | | | | | | | | | | | | Just 3 stages implemented so far: load_8888 swap_rb store_8888 That's enough to make the shortest non-trivial pipeline that you see in the new unit test. Change-Id: Iabf90866ab452f7183d8c8dec1405ece2db695dc Reviewed-on: https://skia-review.googlesource.com/18458 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* Remove support in GPU backend for distance vector field.Gravatar Brian Salomon2017-06-02
| | | | | | | | | Also, remvoes SkNormalBevelSource as this was the last use case for the distance vector field. Change-Id: Ib0176c78e500e6b5130310934253a75860245812 Reviewed-on: https://skia-review.googlesource.com/18482 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove accessRenderTarget call from Clear testsGravatar Robert Phillips2017-06-02
| | | | | | | | | In the split-opList world the full screen clear optimization no longer relies on the rendertarget ID. Change-Id: Ifc7bf10753355a18507998e30f9de7e8c1eb57c1 Reviewed-on: https://skia-review.googlesource.com/18497 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Re-land "Fixed an issue with sksl variable declarations"Gravatar Ethan Nicholas2017-06-02
| | | | | | | | | | This reverts commit affa6a3da87e9ea85f1d4fe3137b5bccbbc56f92. Bug: skia: Change-Id: I5864830e31acbf786f3ea7ae91f42f10aae6d855 Reviewed-on: https://skia-review.googlesource.com/18459 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Revert "Fixed an issue with sksl variable declarations"Gravatar Ethan Nicholas2017-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 88bd8edcff23dc9cf31b664cba7ba73b235318b0. Reason for revert: unhappy bots Original change's description: > Fixed an issue with sksl variable declarations > > There was an issue where multiple variables defined in the same > declaration were not being sequenced appropriately during analysis, so > 'int x = 0, y = x + 1' would report that x was undefined. > > Bug: skia: > Change-Id: I882f7e216467306f6a6013a0a34aac30a4c60744 > Reviewed-on: https://skia-review.googlesource.com/18313 > Reviewed-by: Chris Dalton <csmartdalton@google.com> > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > TBR=csmartdalton@google.com,ethannicholas@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Change-Id: Ibc68674289dce70b6173a347a0e78bb0f1e6db1b Reviewed-on: https://skia-review.googlesource.com/18457 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
* Fixed an issue with sksl variable declarationsGravatar Ethan Nicholas2017-06-02
| | | | | | | | | | | | There was an issue where multiple variables defined in the same declaration were not being sequenced appropriately during analysis, so 'int x = 0, y = x + 1' would report that x was undefined. Bug: skia: Change-Id: I882f7e216467306f6a6013a0a34aac30a4c60744 Reviewed-on: https://skia-review.googlesource.com/18313 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Expand texturability testing to cover mip-mapped textures, and fix iOSGravatar Brian Osman2017-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't allow creation of mip-mapped textures when caps says we don't support mip-mapping. Skip testing of mip-mapped resources in the resource size test, when creation will fail. For iOS devices with ES2, the APPLE BGRA8888 extension is more trouble than it's worth. Even though it lets the internal and external formats not match, it appears that the driver remembers the first external format, so subsequent attempts to upload with the other swizzle will fail. Up until now, creation of these textures was failing anyway, so now just make it more explicit that we don't support BGRA in this situation. Now that we're testing our TexStorage path, fix a few other problems that showed up: - Command Buffer doesn't like extension formats. - X86 PowerVR and Adreno devices don't like BGRA. Re-land of : https://skia-review.googlesource.com/18382 Re-re-land of: https://skia-review.googlesource.com/18261 BUG=skia: Change-Id: Ie12793549a6807300d6ece68cd6b92495e85c3fe Reviewed-on: https://skia-review.googlesource.com/18403 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Omnibus: Push instantiation of GrTextures later (post TextureSampler)Gravatar Robert Phillips2017-06-02
| | | | | | | | | | | | | Split into: https://skia-review.googlesource.com/c/10485/ (More GrSurfaceProxy-clean up) https://skia-review.googlesource.com/c/15819/ (Expand GrTextureProxy to handle highestFilterMode) https://skia-review.googlesource.com/c/16714/ (Switch ImageStorageAccess over to GrTextureProxies) https://skia-review.googlesource.com/c/16908/ (Convert DstTexture to DstProxy) Change-Id: I6cf3ba0f3bf0e1908d36749bc83571c066ddd568 Reviewed-on: https://skia-review.googlesource.com/10484 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Expand texturability testing to cover mip-mapped textures, and fix iOS"Gravatar Brian Osman2017-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c2b5175e99c6451bdf34fa52900af39ee11a4a84. Reason for revert: Nexus 5 Original change's description: > Expand texturability testing to cover mip-mapped textures, and fix iOS > > Don't allow creation of mip-mapped textures when caps says we don't > support mip-mapping. > > Skip testing of mip-mapped resources in the resource size test, > when creation will fail. > > For iOS devices with ES2, the APPLE BGRA8888 extension is more > trouble than it's worth. Even though it lets the internal and > external formats not match, it appears that the driver remembers > the first external format, so subsequent attempts to upload with > the other swizzle will fail. Up until now, creation of these > textures was failing anyway, so now just make it more explicit > that we don't support BGRA in this situation. > > Re-land of: https://skia-review.googlesource.com/18261 > > BUG=skia: > > Change-Id: I910ffab0aa735647dce910d9054696c385f94933 > Reviewed-on: https://skia-review.googlesource.com/18382 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true BUG=skia: Change-Id: I8f0fd87678cc584ad37b2a93a859bd4ef38c8092 Reviewed-on: https://skia-review.googlesource.com/18401 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Expand texturability testing to cover mip-mapped textures, and fix iOSGravatar Brian Osman2017-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | Don't allow creation of mip-mapped textures when caps says we don't support mip-mapping. Skip testing of mip-mapped resources in the resource size test, when creation will fail. For iOS devices with ES2, the APPLE BGRA8888 extension is more trouble than it's worth. Even though it lets the internal and external formats not match, it appears that the driver remembers the first external format, so subsequent attempts to upload with the other swizzle will fail. Up until now, creation of these textures was failing anyway, so now just make it more explicit that we don't support BGRA in this situation. Re-land of: https://skia-review.googlesource.com/18261 BUG=skia: Change-Id: I910ffab0aa735647dce910d9054696c385f94933 Reviewed-on: https://skia-review.googlesource.com/18382 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* update SkRasterPipeline::run() to also take yGravatar Mike Klein2017-06-01
| | | | | | | | | y isn't used yet. This is just a warmup that updates the callers. Change-Id: I78f4f44e2b82f72b3a39fa8a8bdadef1d1b8a99e Reviewed-on: https://skia-review.googlesource.com/18381 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Expand texturability testing to cover mip-mapped textures, and fix iOS"Gravatar Brian Osman2017-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9f6f41b01bdc8144808e78128676087bfb310a27. Reason for revert: Command Buffer and ANGLE failures. Original change's description: > Expand texturability testing to cover mip-mapped textures, and fix iOS > > Don't allow creation of mip-mapped textures when caps says we don't > support mip-mapping. > > Skip testing of mip-mapped resources in the resource size test, > when creation will fail. > > For iOS devices with ES2, the APPLE BGRA8888 extension is more > trouble than it's worth. Even though it lets the internal and > external formats not match, it appears that the driver remembers > the first external format, so subsequent attempts to upload with > the other swizzle will fail. Up until now, creation of these > textures was failing anyway, so now just make it more explicit > that we don't support BGRA in this situation. > > BUG=skia: > > Change-Id: Ic2e3ba1673398d542edd46a555ef47b5d0979c01 > Reviewed-on: https://skia-review.googlesource.com/18261 > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true BUG=skia: Change-Id: I68f6bb3be9fbafa7366ef5611a12e372274aa648 Reviewed-on: https://skia-review.googlesource.com/18380 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@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>
* Expand texturability testing to cover mip-mapped textures, and fix iOSGravatar Brian Osman2017-06-01
| | | | | | | | | | | | | | | | | | | | | | | | Don't allow creation of mip-mapped textures when caps says we don't support mip-mapping. Skip testing of mip-mapped resources in the resource size test, when creation will fail. For iOS devices with ES2, the APPLE BGRA8888 extension is more trouble than it's worth. Even though it lets the internal and external formats not match, it appears that the driver remembers the first external format, so subsequent attempts to upload with the other swizzle will fail. Up until now, creation of these textures was failing anyway, so now just make it more explicit that we don't support BGRA in this situation. BUG=skia: Change-Id: Ic2e3ba1673398d542edd46a555ef47b5d0979c01 Reviewed-on: https://skia-review.googlesource.com/18261 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>