aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* 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>
* Do not return Index8 from SkAndroidCodec::computeOutputColorTypeGravatar Matt Sarett2017-06-08
| | | | | | | | | | | Given that this is the only known use of Index8 color type, this is essentially an experimental delete. Bug: skia:6620 Change-Id: Ib363d237e0217f6e7f461a62e54d32892c428095 Reviewed-on: https://skia-review.googlesource.com/10586 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@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>
* Roll recipe dependencies (trivial).Gravatar recipe-roller2017-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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/f69860bdbf90ea5c42b610c88d07f087b6c93b96 gclient: evaluate conditions for deps (phajdan.jr@chromium.org) https://crrev.com/572537307e46403e256d862a8309f1aa1fcb45bd gclient: implement exporting variables to .gni files (phajdan.jr@chromium.org) https://crrev.com/52e8abc30fb35fc21369fa3bd14b0f9fc4e15f69 git-map: use committer date instead of author date (agable@chromium.org) https://crrev.com/3c2aa8389485a303a1185b7d28116c9312ff7e8e gclient flatten: handle GN settings (phajdan.jr@chromium.org) https://crrev.com/f475a4780737f7451ec4f4196d48a406ae715354 Update my_activity.py to use crrev.com short URLs for Gerrit. (jbroman@chromium.org) recipe_engine: https://crrev.com/db920908bf51fcdb0e30f686a528b25cd4876ca7 Update vpython and spec to new text protobuf. (dnj@chromium.org) TBR=borenet@google.com Recipe-Tryjob-Bypass-Reason: Autoroller Bugdroid-Send-Email: False Change-Id: I2fed378f059229dfd5a52810404dab6616325f8c Reviewed-on: https://skia-review.googlesource.com/19031 Reviewed-by: Recipe Roller <recipe-roller@chromium.org> Commit-Queue: Recipe Roller <recipe-roller@chromium.org>
* 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>
* SkPDF: Do draw{Image,Bitmap} with maskfilter.Gravatar Hal Canary2017-06-07
| | | | | | | | | https://fiddle.skia.org/c/@skbug_237_drawImage_with_blur BUG=skia:237 Change-Id: I50f65d428f254e3965a448a110edd39c0f7a937f Reviewed-on: https://skia-review.googlesource.com/19027 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@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>
* GM for drawImage w/ maskFilterGravatar Hal Canary2017-06-07
| | | | | | | | BUG=skia:237 Change-Id: I8b06fa5b0e05af28e010ccbd2772c64e3eaefdde Reviewed-on: https://skia-review.googlesource.com/19026 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkPDF: Do draw{Image,Bitmap}Rect with maskfilter.Gravatar Hal Canary2017-06-07
| | | | | | | | | | https://fiddle.skia.org/c/@skbug_237_drawImageRect BUG=skia:237 Change-Id: I4d6d683fcbfd6dc86a27998e3d03534458952db0 Reviewed-on: https://skia-review.googlesource.com/19023 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Use burst mode for linear gradients w/ > 2 stopsGravatar Florin Malita2017-06-07
| | | | | | | Change-Id: I4c2778ca9a004ae8b45362e11cb15ac7703c18ac Reviewed-on: https://skia-review.googlesource.com/19022 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* 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>
* Reland "Handle different types of streams in different jpeg source managers"Gravatar Matt Sarett2017-06-07
| | | | | | | | | | | | | | | | | | | For streams that are memory backed (stream->getMemoryBase() returns a non-null ptr and hasLength() returns true), handle the stream with skjpeg_mem_source_mgr, which directly assigns memory base to the source manager. For other non memory backed streams, handle the stream with skjpeg_buffered_source_mgr, which is renamed from the old skjpeg_source_mgr with no implementation change. Original Author: cjbao <cathy.bao@intel.com> https://skia-review.googlesource.com/c/17296/ Bug: skia: Change-Id: I0885c5114083f976a9c08afe5954434196762e39 Reviewed-on: https://skia-review.googlesource.com/18933 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* disable coverage optimization for hairlinesGravatar Mike Reed2017-06-07
| | | | | | | | | | | | | The coverage blitter is an optimization of regular blitting to A8. It can go faster because it never tries to blend with itself... because it was intended to be called only by fill-path, which is written to never draw twice in the same place. Hairlines don't make this promise, so we can use the coverage optimization for hairlines. Change-Id: I0a4816f886462017ad81378d5928357ef038ae8f Reviewed-on: https://skia-review.googlesource.com/18666 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Suppress rendererability of kAlpha8 GL_CHROMIUM_framebuffer_multisample for ↵Gravatar Robert Phillips2017-06-07
| | | | | | | | | | | | | ANGLE D3D9 For ANGLE D3D9 ES2 we're seeing GL_CHROMIUM_framebuffer_multisample but not GL_ANGLE_framebuffer_multisample. The same occurs for ANGLE D3D11 ES2 but kAlpha8 is renderable in that case. Bug: 730082 Change-Id: I7eda844b0ad48150d19406517d1dfbe453e9e478 Reviewed-on: https://skia-review.googlesource.com/18980 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Fix croppedrects GMGravatar Chris Dalton2017-06-07
| | | | | | | | | | | | | The stroke-to-rect test was accidentally doing both non-aa draws and non-filtered texture sampling on exact half pixel boundaries. So sometimes the CPU and GPU rounded in different directions. This CL updates the draws and sampling to fall on integer boundaries. Bug: skia:5522 Change-Id: If968bcbb327106eba8919e4abf3a7211c5326daf Reviewed-on: https://skia-review.googlesource.com/18960 Reviewed-by: Robert Phillips <robertphillips@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>
* Revert "Handle too many (or too large) paths in GrDefaultPathRenderer"Gravatar Brian Osman2017-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6383b298489504d7f8f822d7da575b04b14a9737. Reason for revert: Test failures Original change's description: > Handle too many (or too large) paths in GrDefaultPathRenderer > > PathGeoBuilder constructs the geometry with the same basic > technique as before, but allows interrupting the process > to emit multiple draws. > > Original test case was 2000 non-AA stroked circles, which > created ~66000 vertices. That now renders, as do various > tests with a single large path (as well as filled paths). > > TODO: I think that this could be extracted and re-used for > MSAA path renderer without too much work? I need to read > that code more carefully to make sure it lines up. > > Bug: skia:6695 > Change-Id: I18983ba3d4f475ae0651946958b4911008aa623f > Reviewed-on: https://skia-review.googlesource.com/18360 > Reviewed-by: Brian Salomon <bsalomon@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:6695 Change-Id: I78ce9879a2e45e19f53027ca506cc2e8fae664b3 Reviewed-on: https://skia-review.googlesource.com/18981 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Update showmiplevel gm to round coords the same for both variations of the GMGravatar Greg Daniel2017-06-07
| | | | | | | | | | | | | | | | The versions of showmiplevel that take both a width and height, round the coords of draws to integers. The basic version did not do this which caused sampling bugs on adreno when using nearest neighbor at half pixel coords. Since this GM isn't testing the GPU rendering of the mips, this workaround is okay. Bug: skia:5905 Change-Id: I4080532e8c1f37d74c60089970c5d0fc83cd5373 Reviewed-on: https://skia-review.googlesource.com/18939 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@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>
* Fix use of uninitialized value in SkColor4Shader::CreateProcGravatar Brian Osman2017-06-07
| | | | | | | | | Bug: chromium:727678 Change-Id: I4c59d9222d47b866b3c30408322ec456f304aa53 Reviewed-on: https://skia-review.googlesource.com/18938 Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Handle too many (or too large) paths in GrDefaultPathRendererGravatar Brian Osman2017-06-07
| | | | | | | | | | | | | | | | | | | | PathGeoBuilder constructs the geometry with the same basic technique as before, but allows interrupting the process to emit multiple draws. Original test case was 2000 non-AA stroked circles, which created ~66000 vertices. That now renders, as do various tests with a single large path (as well as filled paths). TODO: I think that this could be extracted and re-used for MSAA path renderer without too much work? I need to read that code more carefully to make sure it lines up. Bug: skia:6695 Change-Id: I18983ba3d4f475ae0651946958b4911008aa623f Reviewed-on: https://skia-review.googlesource.com/18360 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Limit Adreno 4xx stencil clear workaround to older driversGravatar Brian Salomon2017-06-07
| | | | | | | | Bug: skia:5587 Change-Id: I00f377c06228deb9053b1cf7d9f413e0bf2fb490 Reviewed-on: https://skia-review.googlesource.com/18936 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* we can std::move work to avoid copying itGravatar Mike Klein2017-06-07
| | | | | | | | | clang-tidy pointed out this opportunity in the Google3 build. Change-Id: Id3c7b291fec12cbf860e7fc2583c1a34ad23f697 Reviewed-on: https://skia-review.googlesource.com/18927 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Mark SkThreadedBMPDevice destructors with overrideGravatar Kevin Lubick2017-06-07
| | | | | | | | | | Very new versions of Clang (5.0 TOT) call out this problem. Bug: skia: Change-Id: Ie86d3936c26769c0d3387a81fd2c247ea1272d1c Reviewed-on: https://skia-review.googlesource.com/18930 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* we can move dst hereGravatar Mike Klein2017-06-07
| | | | | | | | | clang-tidy pointed out this opportunity in the Google3 build. Change-Id: I2ab01602fae2d3132a229006c06625371342e18a Reviewed-on: https://skia-review.googlesource.com/18926 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Show SkPaint/blendMode in debuggerGravatar Florin Malita2017-06-07
| | | | | | | Change-Id: I4347ab1bf3e26ca3b8c18dead85ec3646d3694bd Reviewed-on: https://skia-review.googlesource.com/18921 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@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>
* GrTessellator: implement out-of-range splitting and AEL rewinding.Gravatar Stephen White2017-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to floating point inaccuracy, when intersecting edges, the intersection point may fall above one of the edges' top vertices or below one of the bottom vertices. In these cases, we were simply splitting one edge on the relevant endpoint of the other edge. This is incorrect if the intersection is far from the endpoint (e.g., the test case in the linked bug, where one of the intersected edges is near-horizontal but the intersection falls below both of its endpoints, in the middle of the edge.) The correct solution is to split both edges as normal, and take care to produce edges with the correct ordering where the intersection is above or below an edge. However, since the new vertex may be above the current vertex, simply restarting intersection checks at the current vertex won't work. We need to process the intersection vertex before the current one. This introduces another problem: unlike all other splitting modes (which always shorten edges), splitting an edge above the top or below the bottom can lengthen it, causing it to violate the AEL with an adjacent edge which then shortens it back to the original point (in cleanup_active_edges()). Since the splitting and merging code can't agree, we loop forever. Instead of simply fusing neighboring edges in cleanup_active_edges(), the proper fix to this problem is to detect the AEL violation and rewind all processing to the vertex above it. For performance, we only rewind when we detect that a split edge is no longer ordered within the mesh (merge_enclosing_edges()) or within the the AEL (rewind_if_necessary()). We also store the enclosing edges of each vertex, which allows us to rewind quickly, since we know exactly which edges need to be added/removed from the AEL. cleanup_active_edges(), fix_active_state() and Vertex::fProcessed have been removed. In their place are rewind_active_edges() and rewind_if_necessary(), which uses the same logic as cleanup_active_edges() but uses it to know when to rewind. Bug: skia:5026 Change-Id: I3638a429f5428498d6df6bb7b98c67374dc291aa Reviewed-on: https://skia-review.googlesource.com/18900 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
* Revert "Revert "Workaround Adreno driver issue with stencil clears.""Gravatar Mike Klein2017-06-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8b06ed7c9f76760563ed3c46716e8e8f27ec2311. Reason for revert: try again. Original change's description: > Revert "Workaround Adreno driver issue with stencil clears." > > This reverts commit 4e8c581f2aa911bf49f97a246cc26134da292a8c. > > Reason for revert: breaks Google3 roll > > Original change's description: > > Workaround Adreno driver issue with stencil clears. > > > > This also removes the "debug wire rect" which was not used and not implemented for Vulkan. > > > > Also some declared but not implemented methods are removed from GrGLGpu. > > > > Bug: skia:5587 > > > > Change-Id: I750051e90e6cfbfad6a6fe20792226182f698bcf > > Reviewed-on: https://skia-review.googlesource.com/18639 > > Reviewed-by: Chris Dalton <csmartdalton@google.com> > > Commit-Queue: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,csmartdalton@google.com > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:5587 > > Change-Id: I65aa16b3f8c70cdef56ff16e16304ba09604c475 > Reviewed-on: https://skia-review.googlesource.com/18924 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,bsalomon@google.com,reviews@skia.org,csmartdalton@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:5587 Change-Id: Ice49027bda1c1ff7e0362d0680341ac862159850 Reviewed-on: https://skia-review.googlesource.com/18928 Reviewed-by: Mike Klein <mtklein@google.com>
* Revert "Workaround Adreno driver issue with stencil clears."Gravatar Mike Klein2017-06-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4e8c581f2aa911bf49f97a246cc26134da292a8c. Reason for revert: breaks Google3 roll Original change's description: > Workaround Adreno driver issue with stencil clears. > > This also removes the "debug wire rect" which was not used and not implemented for Vulkan. > > Also some declared but not implemented methods are removed from GrGLGpu. > > Bug: skia:5587 > > Change-Id: I750051e90e6cfbfad6a6fe20792226182f698bcf > Reviewed-on: https://skia-review.googlesource.com/18639 > Reviewed-by: Chris Dalton <csmartdalton@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,csmartdalton@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:5587 Change-Id: I65aa16b3f8c70cdef56ff16e16304ba09604c475 Reviewed-on: https://skia-review.googlesource.com/18924 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Fix invalid assert in GrMesh::setIndexedGravatar Chris Dalton2017-06-06
| | | | | | | | | | | When drawing a single point it's valid for the first and last indices to be equal. Bug: skia:6728 Change-Id: Ice8cd89b306ed9564cdd9a77c557628662e18abb Reviewed-on: https://skia-review.googlesource.com/18904 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Use more stable root finding methods for cubicsGravatar Christopher Dalton2017-06-06
| | | | | | | | | | | | | | Applies the quadratic formula from "Numerical Recipes in C", Section 5.6, to the homogeneous quadratic equations that find cubic inflection points and loop intersections. Also addresses KLM orientation ahead of time, rather than negating K and L after the fact. Bug: skia: Change-Id: Ic7e0818e2fe49b7724f9b583bae52281cfb1aea1 Reviewed-on: https://skia-review.googlesource.com/13481 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* more exclusion of SkImageEncoder_none.cppGravatar Mike Klein2017-06-06
| | | | | | | | | | | The current roll is failing due to double linking: multiple definition of 'SkEncodeImage(SkWStream*, SkPixmap const&, SkEncodedImageFormat, int)' src/images/SkImageEncoder.pic.o: previous definition here Change-Id: I64ada3591b4c4c0cb8deada0dc796d9a0376b6a7 Reviewed-on: https://skia-review.googlesource.com/18855 Reviewed-by: Matt Sarett <msarett@google.com>
* Workaround Adreno driver issue with stencil clears.Gravatar Brian Salomon2017-06-06
| | | | | | | | | | | | | This also removes the "debug wire rect" which was not used and not implemented for Vulkan. Also some declared but not implemented methods are removed from GrGLGpu. Bug: skia:5587 Change-Id: I750051e90e6cfbfad6a6fe20792226182f698bcf Reviewed-on: https://skia-review.googlesource.com/18639 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Image encoder cleanup: speculative fix for bzl rollGravatar Matt Sarett2017-06-06
| | | | | | | Bug: skia: Change-Id: I1e09e66e4d257eebcf959cec44b5d4f0fa876545 Reviewed-on: https://skia-review.googlesource.com/18851 Reviewed-by: Mike Klein <mtklein@google.com>
* Opt-in burst mechanism for pipeline shadersGravatar Florin Malita2017-06-06
| | | | | | | | | | | | | | Add a dedicated virtual for shaders to select burst mode. Enabled for linear gradients with more than 8 stops, as a start. BUG=skia:6710 Change-Id: I1b19124f42d1d805de27a5db6a26601c386bb9ff Reviewed-on: https://skia-review.googlesource.com/18628 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Revert "Handle different types of streams in different jpeg source managers"Gravatar Matt Sarett2017-06-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 96cc36124d06e023005dd901b32c59b29f55a135. Reason for revert: I think this is break one of our test bots. I will reland once that is figured out. Original change's description: > Handle different types of streams in different jpeg source managers > > For streams that are memory backed (stream->getMemoryBase() returns > a non-null ptr and hasLength() returns true), handle the stream > with skjpeg_mem_source_mgr, which directly assigns memory base to > the source manager. For other non memory backed streams, handle the > stream with skjpeg_buffered_source_mgr, which is renamed from > the old skjpeg_source_mgr with no implementation change. > > Signed-off-by: cjbao <cathy.bao@intel.com> > Bug: skia: > Change-Id: I748de0bdba726bbb318922c08497135e73e37329 > Reviewed-on: https://skia-review.googlesource.com/17296 > Reviewed-by: Leon Scroggins <scroggo@google.com> > Reviewed-by: Matt Sarett <msarett@google.com> > Commit-Queue: Matt Sarett <msarett@google.com> > TBR=msarett@google.com,scroggo@google.com,cathy.bao@intel.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia: Change-Id: Idf6c426468cc959b3f4661c0b3e86cb4d5e93688 Reviewed-on: https://skia-review.googlesource.com/18850 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Roll recipe dependencies (trivial).Gravatar recipe-roller2017-06-06
| | | | | | | | | | | | | | | | | | | | | | | | 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/0ffdf2de157ed4252983254913f8c0b5e231d99c git-cl-comments: Support Gerrit file- and line-comments (agable@chromium.org) recipe_engine: https://crrev.com/267b9221c5fbd2712527852550d86f9e2e3874ff [file] Derive user-facing error from StepFailure and set FAILURE status on step. (iannucci@chromium.org) https://crrev.com/1ec7ad4df3efbdd7224f249179390aab4a66c562 [file] add log listings to file.listdir and file.glob_paths. (iannucci@chromium.org) TBR=borenet@google.com Recipe-Tryjob-Bypass-Reason: Autoroller Bugdroid-Send-Email: False Change-Id: Ibc3d2c87bcfa3ea96031f0470536636deb0c9dff Reviewed-on: https://skia-review.googlesource.com/18847 Reviewed-by: Recipe Roller <recipe-roller@chromium.org> Commit-Queue: Recipe Roller <recipe-roller@chromium.org>
* Add basic support for ARM so Skia can be built on Linux 4 Tegra (L4T)Gravatar Neal Norwitz2017-06-06
| | | | | | | | | | which is used in the Nvidia Jetson TX2 dev kit. It is Linux on ARM64. Bug: skia: Change-Id: I97b99226a8eb2b28190d3cf281d4a1a8278ae5b0 Reviewed-on: https://skia-review.googlesource.com/18884 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* use smarter float -> skfixed15 logic everywhereGravatar Mike Klein2017-06-06
| | | | | | | | | | | | | | | | | | | | | | This is the same logic from constant_color, covering all the other places where we convert from float to fixed, e.g. scale_1_float. This isn't quite ideal yet. We replace mulss+cvttss2si for addss+movd, which is great, but this leads to a silly sequence of code: addss %xmm2, %xmm0 movd %xmm0, %r9d movd %r9d, %xmm0 pshuflw $0x0, %xmm0, %xmm0 Those two movd are pointless... Again, all diffs due to switching from truncation to rounding. Change-Id: Icf6f3b6eb370fe41cea0cebcfda0b8907e055f41 Reviewed-on: https://skia-review.googlesource.com/18846 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* less naive lowp constant_colorGravatar Mike Klein2017-06-06
| | | | | | | | | | | This is as good as we can get without switching away from float inputs. All diffs due to rounding (from the +256.0f). Change-Id: I0d314f111d313577ce9078660178be17e865f11e Reviewed-on: https://skia-review.googlesource.com/18845 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
* define HWCAP_* ourselves in SkCpu.cppGravatar Mike Klein2017-06-06
| | | | | | | | | | | | | For compatibility with older system headers, instead of looking for HWCAP_ values in asm/hwcap.h, just define the bits we want to test ourselves. This lets us compile this code on systems before those bits were defined. At runtime the bits will harmlessly test as zero. Change-Id: I44b6aba7d6f0fc2c5df08ad262c2b0537d900209 Reviewed-on: https://skia-review.googlesource.com/18844 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Add color space support to 4f gradientsGravatar Florin Malita2017-06-06
| | | | | | | | | | | Similar to the raster pipeline stage, transform the stops into the dest color space before interpolation. Change-Id: I626b6ef18606fd2308d7da166ce70d05f3951e21 Reviewed-on: https://skia-review.googlesource.com/18767 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* move Coeff into blendmodeGravatar Mike Reed2017-06-06
| | | | | | | | Bug: skia: Change-Id: Ib4f3398b0cdc6b0f575f6db80d2ce0bf9666f077 Reviewed-on: https://skia-review.googlesource.com/18843 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>