aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2018-09-04Remove some references to defunct kIndex_8Leon Scroggins III
Bug: skia:6828 Bug: skia:3338 Bug: skia:3339 The comment for five_reference_pixels seems to suggest removing the default case, but we already have new SkColorTypes, leaving the default seems like the right approach for now. Remove premultiply_if_necessary. We can now draw unpremultiplied bitmaps, so it's never necessary. Remove a TODO related to kIndex8 Change-Id: Iafdab22bb6453e4b5bba7278b12d27788cc7d037 Reviewed-on: https://skia-review.googlesource.com/151362 Commit-Queue: Leon Scroggins <scroggo@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Auto-Submit: Leon Scroggins <scroggo@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
2018-09-04Change SkTypeface::MakeFromStream to take unique_ptrMike Reed
Also, add MakeFromData variant, which matches SkFontMgr Bug: skia:8350 Change-Id: Ia220496bab8ecf0e7eefaf0c8b62d88ea1394a17 Reviewed-on: https://skia-review.googlesource.com/150969 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Reed <reed@google.com> Auto-Submit: Mike Reed <reed@google.com>
2018-09-04removed GrOverdrawFragmentProcessor.cppEthan Nicholas
Bug: skia: Change-Id: I5d5893b06b0736b760b7b3015692962bd63e7e47 Reviewed-on: https://skia-review.googlesource.com/151364 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2018-09-04Add an explicit SkFrame move constructorNigel Tao
Bug: skia: Change-Id: I2f1c1ebf329e8913b4fb72efe53ff1a435989230 Reviewed-on: https://skia-review.googlesource.com/150300 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
2018-09-04Add notion of active opList to GrDrawingManagerRobert Phillips
With an incrementally sorted list of opLists we will no longer be able to assume that the last opList is the active one. This is pulled out of: https://skia-review.googlesource.com/c/skia/+/150614 (Begin centralizing opList DAG) and also contains some of the non-substantive changes from that CL. Change-Id: Ic3d264565afa61b19e2125c38a6ad053292bc7d9 Reviewed-on: https://skia-review.googlesource.com/151021 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-09-04Switch SkPaint's color to SkColor4fBrian Osman
Change-Id: Ic2b83a05739720013a7c30ec014df0747b3f99a5 Reviewed-on: https://skia-review.googlesource.com/149229 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
2018-09-04converted overdraw effect to new FP systemEthan Nicholas
Bug: skia: Change-Id: I4cff0ecdf3fc61f584012af519730f08bfd78264 Reviewed-on: https://skia-review.googlesource.com/150484 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2018-09-04fixed ASAN error while compiling .fp filesEthan Nicholas
Bug: skia: Change-Id: I7242986661c42c43616f42e1dfe01266d10109a3 Reviewed-on: https://skia-review.googlesource.com/150916 Auto-Submit: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-09-03check if stream failedMike Reed
If so, index might be uninitialized, so don't use it Bug: skia: Change-Id: Icccf6c796cf73317f10c80d6f7523479662c401f Reviewed-on: https://skia-review.googlesource.com/151221 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
2018-09-03add behavior enum to SkTypeface::serialize()Mike Reed
This enables a simple SkSerialProc for typefaces that can decide, during picture serialization, how much data to serialize for each typeface. Bug: skia: Change-Id: Ic9d18b24d9e650fd2a78304520a73aa0645dc139 Reviewed-on: https://skia-review.googlesource.com/150968 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
2018-09-03Reland "ccpr: Implement stroking with fine triangle strips"Chris Dalton
This is a reland of 2f2757fa6ba8134330e05694d08907f6e37abb41 Original change's description: > ccpr: Implement stroking with fine triangle strips > > Implements strokes by linearizing the curve into fine triangle strips > and interpolating a coverage ramp for edge AA. Each triangle in the > strip emits either positive or negative coverage, depending on its > winding direction. Joins and caps are drawn with the existing CCPR > shaders for triangles and conics. > > Conic strokes and non-rigid-body transforms are not yet supported. > > Bug: skia: > Change-Id: I45a819abd64e91c2b62e992587eb85c703e09e77 > Reviewed-on: https://skia-review.googlesource.com/148243 > Commit-Queue: Chris Dalton <csmartdalton@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Reviewed-by: Allan MacKinnon <allanmac@google.com> TBR=robertphillips@google.com Bug: skia: Change-Id: I3f0065e80975ee8334300bc5e934231b66b49178 Reviewed-on: https://skia-review.googlesource.com/151188 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
2018-08-31Reland "Use skcms_PrimariesToXYZD50 to implement ↵Brian Osman
SkColorSpacePrimaries::toXYZD50" This reverts commit 79fca19eabdf7df46d24cb44079f77af049a5b76. Reason for revert: Now guarded for Chrome layout tests. Original change's description: > Revert "Use skcms_PrimariesToXYZD50 to implement SkColorSpacePrimaries::toXYZD50" > > This reverts commit 887b416bf59288b545adea661e19c0806ce68bfb. > > Reason for revert: layout tests? > > Original change's description: > > Use skcms_PrimariesToXYZD50 to implement SkColorSpacePrimaries::toXYZD50 > > > > Two copies of this code is one too many. > > > > Change-Id: I57d1426d1b0ba8340c0ac1e2dbc1b1422994ea2b > > Reviewed-on: https://skia-review.googlesource.com/150381 > > Commit-Queue: Brian Osman <brianosman@google.com> > > Commit-Queue: Mike Klein <mtklein@google.com> > > Auto-Submit: Brian Osman <brianosman@google.com> > > Reviewed-by: Mike Klein <mtklein@google.com> > > TBR=mtklein@google.com,brianosman@google.com > > Change-Id: I332089462bf2e3234306251cd92ccc6389954f0f > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/150367 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,brianosman@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: Iadacc431290a9b8f538f370507b7e92e27cd21d8 Reviewed-on: https://skia-review.googlesource.com/150846 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
2018-08-31add circles to stroked cubics with cuspsCary Clark
Add a circle at the cusp to match Adobe Illustrator, Microsoft Edge, and our own CCPR implementation. R=reed@google.com,csmartdalton@google.com Bug: skia:5623 Change-Id: Ia46c910643f373e50c4b30303fcac5f79d77be62 Reviewed-on: https://skia-review.googlesource.com/150370 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Mike Reed <reed@google.com>
2018-08-31Support more hardware buffer formatsStan Iliev
Add support for AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM, AHARDWAREBUFFER_FORMAT_R8G8B8_UNORM and AHARDWAREBUFFER_FORMAT_R10G10B10A2_UNORM formats. Handle unknown formats as RGBA. Bug: 113555199 Change-Id: I95efde5e60ab4b6e8f10a15ae97cf328e6567f10 Reviewed-on: https://skia-review.googlesource.com/150470 Commit-Queue: Stan Iliev <stani@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-08-31Fixes for primitive handling for uniformsMichael Ludwig
Updates header mapping to include bool as a primitive, restoring the GrYUVtoRGBEffect header to its state pre-improved uniforms. Also fixes the NaN constants specified in the uniform ctype mapping to actually reference valid constants for SK_FloatNaN. Bug: skia: Change-Id: I27848d61c411f2674f66a1532876c7cf22d71be3 Reviewed-on: https://skia-review.googlesource.com/150906 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2018-08-31Simplify perspective shadows to match future MD specs.Jim Van Verth
* For ambient we outset a constant amount around the perspective shape. * For spot we compute the projection of the bounds from the light's perspective, and from that compute a matrix to transform the path. Bug: skia:7971 Change-Id: I7fffdd1446423956773d145ff4fae0a81602ad5b Reviewed-on: https://skia-review.googlesource.com/150471 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-08-31Fix GrAAConvexTessellator colinear point removal.Brian Salomon
We weren't checking whether the new point in lineTo was backtracking or not. Also: Replace distance-to-line check with triangle area check. The previous check was asymmetric. Given point sequence (a, b, c) it might make a different decision than when given (c, b, a). Compute normals late since we don't use them to detect colinear edges anymore. Rename SkPointPriv::SetOrhog -> SkPointPriv::MakeOrthog and return computed value rather than take SkPoint* dst. Bug: chromium:869172 Change-Id: I8da53edf1a2e6098f4199da57368ebb644866e4c Reviewed-on: https://skia-review.googlesource.com/150682 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-08-31Revert "Add support for gray + colorspace to SkCodec"Brian Osman
This reverts commit 8491dd80c89943cc535427aa1521edd6de1fb64f. Reason for revert: BonusConfigs bot asserting on some color images. Original change's description: > Add support for gray + colorspace to SkCodec > > In both PNG and JPEG, support passing Gray8 directly to skcms, and > remove assertions about gray never having a color xform. > > Remove SkImage_Lazy hacks to strip color spaces when decoding gray. > > Change-Id: I64c7b480c51a2b0c839e7eb8ed3a5fdea5aa4e41 > Reviewed-on: https://skia-review.googlesource.com/150909 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> TBR=mtklein@google.com,scroggo@google.com,brianosman@google.com Change-Id: Iebdd4f60144380d4ef462225ff3cadb7b91eee84 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/150912 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
2018-08-31update CPU feature macros in src/optsMike Klein
Use macros from SkPreConfig.h where they exist and are appropriate. Change-Id: If8e161ca2a105e75b76dfc75c75f91abfc5997ef Reviewed-on: https://skia-review.googlesource.com/150963 Commit-Queue: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Mike Klein <mtklein@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
2018-08-31fonts: Cap the max number of entries in server side glyph cache trackingKhushal
The SkStrikeServer maintains a map of SkGlyphCacheState to track the cache for a strike on the client. This entry is evicted only on a failure to lock, which means that the map can potentially grow unbounded if entries are not reused after eviction. Make sure we check that they are deleted after some limit. R=herb@google.com Bug:878966 Change-Id: I4adb06c35661049328f6e0bde52fb1c774d0c29b Reviewed-on: https://skia-review.googlesource.com/150443 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>
2018-08-31Add support for gray + colorspace to SkCodecBrian Osman
In both PNG and JPEG, support passing Gray8 directly to skcms, and remove assertions about gray never having a color xform. Remove SkImage_Lazy hacks to strip color spaces when decoding gray. Change-Id: I64c7b480c51a2b0c839e7eb8ed3a5fdea5aa4e41 Reviewed-on: https://skia-review.googlesource.com/150909 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
2018-08-31Extract SkGlyphRunListPainter from SkGlyphRun.*Herb Derby
Change-Id: I2c5275b6dd9cf2f83d4d99b73dd32dff487e659b Reviewed-on: https://skia-review.googlesource.com/150660 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
2018-08-31Reland "standardize macro checks in SkRasterPipeline_opts"Mike Klein
This is a reland of 75d25c4c8f0cb61770faef77a9a24f3392316dfb Last time I screwed up by replacing defined(__AVX2__) with defined(JUMPER_IS_HSW). When __AVX2__ is defined, we'll be using AVX2, _or better_. This time around I think I've got it all straight translating the old __FOO__ into the equivalent JUMPER_IS_FOO. Last time I also missed a defined(__SSE__), which has been translated into JUMPER_IS_FOOs now too. Original change's description: > standardize macro checks in SkRasterPipeline_opts > > We mostly check JUMPER_IS_FOO macros, but in a few places we are > checking the raw __FOO__ compiler macros instead. If only for clarity, > switch to JUMPER_IS_FOO. > > This is also a step towards me being able to control the instruction > set we choose without having to #define these protected __FOO__ macros. > > Change-Id: Ieea2090ff658399e27746e0bb8ce950b06f9efb8 > Reviewed-on: https://skia-review.googlesource.com/150961 > Commit-Queue: Brian Osman <brianosman@google.com> > Auto-Submit: Mike Klein <mtklein@google.com> > Reviewed-by: Brian Osman <brianosman@google.com> Change-Id: I656d89e3d3cd7fa23fd618c80e59908fd2b31329 Reviewed-on: https://skia-review.googlesource.com/150965 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
2018-08-31Make GrSemaphore a GrGpuResourceBrian Salomon
This makes semaphores get handled correctly when GrContext is abandoned or asked to free all its resources. Change-Id: I0b935bb95cf99b9acf647472bcd0231bb2759db6 Reviewed-on: https://skia-review.googlesource.com/150364 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-08-31Revert "standardize macro checks in SkRasterPipeline_opts"Mike Klein
This reverts commit 75d25c4c8f0cb61770faef77a9a24f3392316dfb. Reason for revert: subtly broken, going to give this a redo. Original change's description: > standardize macro checks in SkRasterPipeline_opts > > We mostly check JUMPER_IS_FOO macros, but in a few places we are > checking the raw __FOO__ compiler macros instead. If only for clarity, > switch to JUMPER_IS_FOO. > > This is also a step towards me being able to control the instruction > set we choose without having to #define these protected __FOO__ macros. > > Change-Id: Ieea2090ff658399e27746e0bb8ce950b06f9efb8 > Reviewed-on: https://skia-review.googlesource.com/150961 > Commit-Queue: Brian Osman <brianosman@google.com> > Auto-Submit: Mike Klein <mtklein@google.com> > Reviewed-by: Brian Osman <brianosman@google.com> TBR=mtklein@google.com,brianosman@google.com Change-Id: Ifbf5b6f51a29ad4e02e8ca311e449c13cc3ed19c No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/150964 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
2018-08-31Refactor 'in uniform' CPP code generationMichael Ludwig
Easily supports mapping ctypes to sksl types with templates that specify how to send data to the GPU and how to track state changes. The template logic and type mappings are defined in SkSLCPPUniformCTypes.* while SkSLCPPCodeGenerator is updated to utilize it. It also updates the supported ctypes to properly generate code for SkPoint, SkIPoint, SkIRect, and GrColor4f. The code generated for 'in uniforms' now also correctly supports conditional uniforms. Bug: skia: Change-Id: Ib7c0a873bdd68a966b6a00871f33102dfa2c432d Reviewed-on: https://skia-review.googlesource.com/150129 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2018-08-31standardize macro checks in SkRasterPipeline_optsMike Klein
We mostly check JUMPER_IS_FOO macros, but in a few places we are checking the raw __FOO__ compiler macros instead. If only for clarity, switch to JUMPER_IS_FOO. This is also a step towards me being able to control the instruction set we choose without having to #define these protected __FOO__ macros. Change-Id: Ieea2090ff658399e27746e0bb8ce950b06f9efb8 Reviewed-on: https://skia-review.googlesource.com/150961 Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Mike Klein <mtklein@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
2018-08-31Revert "ccpr: Implement stroking with fine triangle strips"Chris Dalton
This reverts commit 2f2757fa6ba8134330e05694d08907f6e37abb41. Reason for revert: issues with DDL Original change's description: > ccpr: Implement stroking with fine triangle strips > > Implements strokes by linearizing the curve into fine triangle strips > and interpolating a coverage ramp for edge AA. Each triangle in the > strip emits either positive or negative coverage, depending on its > winding direction. Joins and caps are drawn with the existing CCPR > shaders for triangles and conics. > > Conic strokes and non-rigid-body transforms are not yet supported. > > Bug: skia: > Change-Id: I45a819abd64e91c2b62e992587eb85c703e09e77 > Reviewed-on: https://skia-review.googlesource.com/148243 > Commit-Queue: Chris Dalton <csmartdalton@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Reviewed-by: Allan MacKinnon <allanmac@google.com> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,caryclark@google.com,csmartdalton@google.com,reed@google.com,allanmac@google.com Change-Id: I1980b09976df8275817eaffb6766dbd9fd3e59c7 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/150980 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-08-31Add support for switching family queues in vulkan.Greg Daniel
Bug: skia: Change-Id: Ie4f620a96d1a6f7662819590d97073a694159f96 Reviewed-on: https://skia-review.googlesource.com/150483 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
2018-08-31Revert "update SkPaint size sanity check"Mike Klein
This reverts commit cd72da268c83c90494bc48e16a62df380e7f4a5e. Reason for revert: <INSERT REASONING HERE> Original change's description: > update SkPaint size sanity check > > I counted twice... there are 7 pointers and 8 4-byte things. > > Change-Id: I106a0f1c1bf9ee580e7b04afc763b2ec977fca3c > Reviewed-on: https://skia-review.googlesource.com/150120 > Auto-Submit: Mike Klein <mtklein@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Osman <brianosman@google.com> TBR=mtklein@google.com,brianosman@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I579eab2f71bb1307c1e6c12da8678b787291411a Reviewed-on: https://skia-review.googlesource.com/150845 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
2018-08-31ccpr: Implement stroking with fine triangle stripsChris Dalton
Implements strokes by linearizing the curve into fine triangle strips and interpolating a coverage ramp for edge AA. Each triangle in the strip emits either positive or negative coverage, depending on its winding direction. Joins and caps are drawn with the existing CCPR shaders for triangles and conics. Conic strokes and non-rigid-body transforms are not yet supported. Bug: skia: Change-Id: I45a819abd64e91c2b62e992587eb85c703e09e77 Reviewed-on: https://skia-review.googlesource.com/148243 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Allan MacKinnon <allanmac@google.com>
2018-08-31Fix Fuchsia rollRobert Phillips
It is dying with the error: src/svg/SkSVGDevice.cpp:870:23: error: binding reference member 'fOrigin' to stack allocated parameter 'origin' [-Werror,-Wdangling-field] : fOrigin(origin) ^~~~~~ src/svg/SkSVGDevice.cpp:941:21: note: reference member declared here const SkPoint& fOrigin; and was introduced in: https://skia-review.googlesource.com/c/skia/+/150542 (Remove drawPosText from svg) Change-Id: I7a2d1c2992100d0cfd2e50df6dd7195f62d053e6 Reviewed-on: https://skia-review.googlesource.com/150842 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
2018-08-30Detect when a FreeType glyph doesn't have a path.Ben Wagner
It appears that the way to check a glyph doesn't have a path is to load the glyph with the FT_LOAD_NO_BITMAP load flag and then check if the glyph format is FT_GLYPH_FORMAT_BITMAP, meaning that no outline was available. Change-Id: Ie19fc7005115f4c4f6072a7be0e93576f8db5877 Bug: skia:7878 Reviewed-on: https://skia-review.googlesource.com/150467 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
2018-08-30Support input color argument to process() function in sksl .fp filesMichael Ludwig
-- This expands sksl's capabilities with .fp files. Previously, it was possible to declare "in fragmentProcessor foo" and emit it automatically when "process(foo);" was called. This adds a variant of process that takes a second argument, which must be a half4 expression. This argument specifies the value, or dynamic expression calculated earlier in the parent shader, to use as sk_InColor by the child. The CL is longer than anticipated because of properly handling dependencies between previous sksl statements and the input to the child. The original writeEmitCode() collected all extra emission code (the calls to build->emitChild) and put them before any call to codeAppendf. This makes it impossible to use a parent's variable, or the output of another child, as the input for process. To solve this, there is now a flushEmittedCode() function that takes over the logic of outputting the extra emission code and the necessary codeAppendf calls. When invoked, it (by default) only appends completed sksl statements, and places any current expression back at the beginning of the output stream. It now updates fFormatArgs and fExtraEmitCodeCode as it consumes their contents. This allows writeFunctionCall() for a call to "process" to flush all previous statements before it adds its emit child code. Bug: skia: Change-Id: I63c41af6f3e0620aa890d10d14436ee6244f0051 Reviewed-on: https://skia-review.googlesource.com/148395 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2018-08-30Remove GrTextureStripAtlas, textured gradients use independent texturesMichael Ludwig
The texture strip atlas code path has been disabled without performance regressions since 8/3/18, so this deletes it completely from the code base since it is complex and difficult to manage. GrTextureStripAtlas, GrDynamicTextureStripAtlas, and GrDDLTextureStripAtlas completely deleted, everything else is cleaning up references/dead code using the atlas. Bug: skia: Change-Id: Ieb967b6e291a1d76da62fce9fa384acbda8c51c0 Reviewed-on: https://skia-review.googlesource.com/150472 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-08-30Remove drawPosText from SkDeviceHerb Derby
Change-Id: I1ca6d5222499e295485a5b7773fa3957410803eb Reviewed-on: https://skia-review.googlesource.com/150543 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
2018-08-30Reland "Check that mask to path fallback happens"Herb Derby
This is a reland of 9f85b5116e333a65ecfecb66adfdf7f72bb9e9ef Original change's description: > Check that mask to path fallback happens > > BUG=chromium:876767 > > Change-Id: I6aadf329af836a1e03aa85b34a58830be00ff750 > Reviewed-on: https://skia-review.googlesource.com/150135 > Commit-Queue: Herb Derby <herb@google.com> > Reviewed-by: Khusal Sagar <khushalsagar@chromium.org> Bug: chromium:876767 Change-Id: I3fdf17ef3bd9c3f8b0e19d017f14114f3675dc12 Reviewed-on: https://skia-review.googlesource.com/150544 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
2018-08-30Improve inputColor handling in fragment processor implementations.Michael Ludwig
EmitArgs explicitly checks for null constructor arguments and uses "half4(1)" for fInputColor to ensure its fields are non-null. Cleans up accesses of fInputColor in existing fragment processors to no longer check for null and hardcode a "half4(1)". Updates .fp CPP generation to remove the null check for fInputArgs. Updates the internals of emitChild() to emit an extra local variable with a mangled variable name for storing the provided input expression. Bug: skia: Change-Id: Iad807f269655689dcb2e8d58f2eb506685ba2757 Reviewed-on: https://skia-review.googlesource.com/149231 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2018-08-30Remove drawPosText from svgHerb Derby
Change-Id: Ic2934da38025fb889f8125e13670cea798640247 Reviewed-on: https://skia-review.googlesource.com/150542 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-08-30Remove drawPosText_asPath - more dead codeHerb Derby
Change-Id: I4a0a1eb093767962fb0cd631ad41561962a233ea Reviewed-on: https://skia-review.googlesource.com/150540 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
2018-08-30Some GrSemaphore cleanupBrian Salomon
Remove unused GrResourceProvider functions that transfer context ownership. Return GrBackendSemaphore by value, make method public. Change-Id: I1fe83b661cab82a54dde33b4b649579ea01be97c Reviewed-on: https://skia-review.googlesource.com/150363 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-08-30Suppress addition of changeListeners during DDL recordingRobert Phillips
Bug: skia:8324 Change-Id: I5e27bc4c5b8bc709c8017367dfdfaf09643fafbf Reviewed-on: https://skia-review.googlesource.com/150462 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-08-30Remove drawPosText support for SkBitmapDeviceHerb Derby
Change-Id: I84885c3c12bc9ee7b048846c762bf928682e0952 Reviewed-on: https://skia-review.googlesource.com/150362 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
2018-08-30converted arithmetic FP to new FP structureEthan Nicholas
Bug: skia: Change-Id: I5492b378fa0f2ab7b453b2b1b18e4aef898370d2 Reviewed-on: https://skia-review.googlesource.com/148910 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-08-30Always force GPU generated masks be top left (take 2)Robert Phillips
Bug: 878195 Change-Id: Ie5d890597926f160743188ff1011f33e078f3d8f Reviewed-on: https://skia-review.googlesource.com/150466 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-08-30remove scaling from pathopsCary Clark
PathOps added a cheat some time ago to reduce fuzzer bugs by scaling down very large paths, with the hope that it would make the math more sane. This had the side-effect of causing small edges to disappear altogether if the bounds is large enough. Removing the scaling causes a single regression to one fuzz-generated bug. That path succeeeded with scale by eliminating the troublesome tiny contour. Eliminating the scale may fix the CCPR-related bug discovered by Flutter, or at least uncover the next bug. I would expect more fuzzer bugs to appear with this change; paths with large and small values will no longer have the small values removed. R=csmartdalton@google.com,reed@google.com,bsalomon@google.com Bug: skia:8290 Change-Id: I3bfdb101c568e9cfa324858685eac1f9c368c291 Reviewed-on: https://skia-review.googlesource.com/150465 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Kevin Lubick <kjlubick@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-08-30Revert "Remove lazy image color space hacks for gray"Brian Osman
This reverts commit a81c2be75adcc6ca63171d88df3c8bf2cb694ee7. Reason for revert: Bad images on gold. Original change's description: > Remove lazy image color space hacks for gray > > Change-Id: Idca6c0bb237d7973f84acbd2f0583cc8b6c6292c > Reviewed-on: https://skia-review.googlesource.com/150241 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> TBR=mtklein@google.com,scroggo@google.com,brianosman@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I08658c69eb7b0b9adfc36e73fbbd09ff1aad75f6 Reviewed-on: https://skia-review.googlesource.com/150464 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
2018-08-30Revert "Reland "Add ability to specify different GP textures for each mesh ↵Brian Salomon
in a draw."" This reverts commit 2d0a6a1f989dbe02e5eaff5b8ae9ed9dc216a3e6. Revert "Add support for dynamic state GP textures in Vulkan backend." This reverts commit 5e81a123f22c309ebe790904345d54de4cba2ab5. Revert "Disable GrTextureOp Chaining" This reverts commit fdec6f469a44b19e3d77ed313c5b79fb72982603. Bug: chromium:877598 Bug: chromium:877602 Bug: chromium:877610 Change-Id: Iabf2971b27bcf7728785903f1d7f47d1148a2e63 Reviewed-on: https://skia-review.googlesource.com/150461 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-08-30Add tracing to saveLayerYuqian Li
I think this would be helpful for tracing as saveLayer is usually very costly. Bug: skia: Change-Id: Ia5bc194d6a7346c6fbec54da86065dc95d36f612 Reviewed-on: https://skia-review.googlesource.com/150115 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Auto-Submit: Yuqian Li <liyuqian@google.com>
2018-08-30increase SkPoint3 normalize precisionCary Clark
using sqrtf() instead of sqrt() loses too much precision. Removed SK_CPU_FLUSH_TO_ZERO since it was only used by the older code. R=robertphillips@google.com Bug: skia: Change-Id: Ief2b969642e7dd423a2b07d2158f5e24eb487ca7 Reviewed-on: https://skia-review.googlesource.com/150380 Reviewed-by: Cary Clark <caryclark@skia.org> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Cary Clark <caryclark@skia.org> Auto-Submit: Cary Clark <caryclark@skia.org>