aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* src/pdf: code cleanupGravatar Hal Canary2017-05-04
| | | | | | | | | | | | | * SkPDFCanon: remove unnecessary abstraction * Make use of SkTHashMap<K, sk_sp<T>>. * Remove unncessary struct constructors. * More factory fns return sk_sp<T> * SkPDFUtility::GetCachedT<T> factored out. Change-Id: I4055a131b43fe2588fd042b769cd09fff8a3466c Reviewed-on: https://skia-review.googlesource.com/13655 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Finish removal of SkImageInfo from SkPixelRefGravatar Matt Sarett2017-05-04
| | | | | | | | | | All of the clients are updated. We don't need this anymore. Bug: skia:6535 Change-Id: I1399a08b7dda8f29c4f4016a1de50ee8310c1fef Reviewed-on: https://skia-review.googlesource.com/15106 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Revert "Add SkImage::makeColorSpace() with correct transfer fn behavior"Gravatar Matt Sarett2017-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9ad0531a18f854e5a2c8034880140dd6cd3ea3c1. Reason for revert: Does not handle transfer fn behavior. Original change's description: > Add SkImage::makeColorSpace() with correct transfer fn behavior > > Completes implementation for lazy and raster images. gpu is > still a TODO. > > Bug: skia:6553 > Change-Id: I04eea5c4fb53c50c0406c2e6b6778b0e21fd85f8 > Reviewed-on: https://skia-review.googlesource.com/14403 > Commit-Queue: Matt Sarett <msarett@google.com> > Reviewed-by: Mike Reed <reed@google.com> > TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I3830321aea7d0dc5ab38a40f3318bb53a41df383 Reviewed-on: https://skia-review.googlesource.com/15306 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* GrTessellator: fix for vertex coincident with enclosing edge.Gravatar Stephen White2017-05-04
| | | | | | | | | | | | | | | If a previously-enclosing edge coincides exactly with the current vertex, there are no two adjacent edges which enclose the vertex. Since find_enclosing_edges() ensures that the left enclosing edge is to the left of the vertex, the fix is to split the right enclosing edge on the current vertex and restart intersection tests. Bug: 716720 Change-Id: Id26c5b92a6d6139f348e99554638cded37e81a8e Reviewed-on: https://skia-review.googlesource.com/15261 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
* Add SkImage::makeColorSpace() with correct transfer fn behaviorGravatar Matt Sarett2017-05-03
| | | | | | | | | | | Completes implementation for lazy and raster images. gpu is still a TODO. Bug: skia:6553 Change-Id: I04eea5c4fb53c50c0406c2e6b6778b0e21fd85f8 Reviewed-on: https://skia-review.googlesource.com/14403 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert "treat SkPMColor as sRGB in SkPM4f::FromPMColor()"Gravatar Mike Klein2017-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a4f3e14d896708376aa50b2a8804796e6e1ee644. Reason for revert: affecting 565 in ways I didn't expect Original change's description: > treat SkPMColor as sRGB in SkPM4f::FromPMColor() > > We made the wrong call in SkPM4f::FromPMColor(). SkPM4f::FromPMColor() > is only used by the color correct drawing pipeline, not legacy. That > means it makes a lot more sense to treat SkPMColors as premul sRGB than > premul linear. > > You can see the effect very clearly in any code path using the fallback > SkShader::Context::shadeSpan4f(). We shade legacy 8888, then > "linearize" to float by calling SkPM4f::FromPMColor(). At head we're > not really linearizing, which means everything ends up too bright in the > end. Things get double sRGB-encoded, etc. > > It is expected that this CL will make many color correct images look > darker and a lot more like legacy mode. It may be jarring... we've > gotten used to seeing this bug and thinking brighter == fixed. > > The only GM that changes in actual legacy 8888 is gamut, which > explicitly creates non-legacy 8888 images... the diff there is expected. > > Change-Id: I77ac6cfe8f7ffb15e90f4aad798dbe8f9d3aafbd > Reviewed-on: https://skia-review.googlesource.com/15227 > Commit-Queue: Mike Klein <mtklein@chromium.org> > Reviewed-by: Herb Derby <herb@google.com> > Reviewed-by: Mike Reed <reed@google.com> > TBR=mtklein@chromium.org,herb@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I80d852cbb618e94744f786bc82a4648128e99c71 Reviewed-on: https://skia-review.googlesource.com/15300 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Revert "Add a new non-AA rect op that does not inherit from ↵Gravatar Brian Salomon2017-05-03
| | | | | | | | | | | | GrLegacyMeshDrawOp."" This reverts commit 0f353327968530506dd3dd15fca79ef59fe013f1. Bug: skia: Change-Id: I8def56fa55bfc70de4386bf0b7a7867f6e91c173 Reviewed-on: https://skia-review.googlesource.com/15251 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* treat SkPMColor as sRGB in SkPM4f::FromPMColor()Gravatar Mike Klein2017-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | We made the wrong call in SkPM4f::FromPMColor(). SkPM4f::FromPMColor() is only used by the color correct drawing pipeline, not legacy. That means it makes a lot more sense to treat SkPMColors as premul sRGB than premul linear. You can see the effect very clearly in any code path using the fallback SkShader::Context::shadeSpan4f(). We shade legacy 8888, then "linearize" to float by calling SkPM4f::FromPMColor(). At head we're not really linearizing, which means everything ends up too bright in the end. Things get double sRGB-encoded, etc. It is expected that this CL will make many color correct images look darker and a lot more like legacy mode. It may be jarring... we've gotten used to seeing this bug and thinking brighter == fixed. The only GM that changes in actual legacy 8888 is gamut, which explicitly creates non-legacy 8888 images... the diff there is expected. Change-Id: I77ac6cfe8f7ffb15e90f4aad798dbe8f9d3aafbd Reviewed-on: https://skia-review.googlesource.com/15227 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert "Add a new non-AA rect op that does not inherit from GrLegacyMeshDrawOp."Gravatar Brian Salomon2017-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ff574e0eb79b83c2e797dec8f1661378876202d8. Reason for revert: needs a merge Original change's description: > Add a new non-AA rect op that does not inherit from GrLegacyMeshDrawOp. > > This uses a new helper class, GrSimpleMeshDrawOpHelper, which it uses to fullfill the GrMeshDrawOp contract and to construct its GrPipline when flushed. The helper is intended to be used such that the op only stores a GrProcessorSet if it is constructed with a "nontrivial" GrPaint. "Trivial" currently means no fragment processors and src-over blending. The helper allows the op subclass to specify whether it supports stenciling via a template parameter. The helper class is initially intended to be used for ops that don't have per-vertex colors and construct a single GrPipeline at flush time, though perhaps this can be relaxed in future changes. > > On the microbenchmark "rotated_rects_bw_same_transparent_srcover" this produces a 18-20% reduction in time on my Z840 running Linux and 33% on my 2010 MacPro. > > Bug: skia: > Change-Id: I9f655827a70bee585b0b0e1255371ffd995a0b80 > Reviewed-on: https://skia-review.googlesource.com/14604 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Brian Osman <brianosman@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I2893d6ff7c183a18f7d0ba82818701b80b681eb0 Reviewed-on: https://skia-review.googlesource.com/15280 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add a new non-AA rect op that does not inherit from GrLegacyMeshDrawOp.Gravatar Brian Salomon2017-05-03
| | | | | | | | | | | | This uses a new helper class, GrSimpleMeshDrawOpHelper, which it uses to fullfill the GrMeshDrawOp contract and to construct its GrPipline when flushed. The helper is intended to be used such that the op only stores a GrProcessorSet if it is constructed with a "nontrivial" GrPaint. "Trivial" currently means no fragment processors and src-over blending. The helper allows the op subclass to specify whether it supports stenciling via a template parameter. The helper class is initially intended to be used for ops that don't have per-vertex colors and construct a single GrPipeline at flush time, though perhaps this can be relaxed in future changes. On the microbenchmark "rotated_rects_bw_same_transparent_srcover" this produces a 18-20% reduction in time on my Z840 running Linux and 33% on my 2010 MacPro. Bug: skia: Change-Id: I9f655827a70bee585b0b0e1255371ffd995a0b80 Reviewed-on: https://skia-review.googlesource.com/14604 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* fix G3 opt android_arm build?Gravatar Mike Klein2017-05-03
| | | | | | | | | | | | | | We suspect that having SkTDPQueue inherit from SkNoncopyable is what's causing this error: third_party/skia/HEAD/src/gpu/GrResourceCache.h:44:7: error: 'GrResourceCache' declared with greater visibility than the type of its field 'GrResourceCache::fPurgeableQueue' [-Werror=attributes] class GrResourceCache { ^ Change-Id: Idc737aa64f5cb159edbe59e8baf70d711f7e07d9 Reviewed-on: https://skia-review.googlesource.com/15243 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
* Validate SkSpecialSurface raster infoGravatar Florin Malita2017-05-03
| | | | | | | | | | BUG=chromium:716311 Change-Id: I01ea2e77ba8920f735395dd46ef2cea78a858308 Reviewed-on: https://skia-review.googlesource.com/15230 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* headers: fixGravatar Hal Canary2017-05-03
| | | | | | | Change-Id: I0cd10f735c25686e41831ad1d0c99981c9d22d9a Reviewed-on: https://skia-review.googlesource.com/11383 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
* Revert "Revert "Reland: Remove SkLights include from SkCanvas.h""Gravatar Florin Malita2017-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9d5f66d9c21eda7d3e2ed47654180c0c4b6e38b1. Reason for revert: Leon landed Android fixes. Original change's description: > Revert "Reland: Remove SkLights include from SkCanvas.h" > > This reverts commit fed00319c9bafa41c8df658708030c072b301a41. > > Reason for revert: breaking the Android roll. > > Original change's description: > > Reland: Remove SkLights include from SkCanvas.h > > > > SkLights.h pulls in a bunch of other headers and is not needed (fwdecl > > works fine). > > > > Change-Id: I3ed97cd7861e51dcb7cfa7950a97b420dbc6fbfb > > TBR=reed@google.com > > Reviewed-on: https://skia-review.googlesource.com/15143 > > Commit-Queue: Florin Malita <fmalita@chromium.org> > > Reviewed-by: Florin Malita <fmalita@chromium.org> > > > > TBR=fmalita@chromium.org,reed@google.com > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I3b0e69f1d04d160f16a5567b09982d35cc9ca84e > Reviewed-on: https://skia-review.googlesource.com/15195 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Commit-Queue: Florin Malita <fmalita@chromium.org> > TBR=msarett@google.com,reviews@skia.org,fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I0a1c2f9df61f16987ab72dfb4f3a205fbcc37667 Reviewed-on: https://skia-review.googlesource.com/15229 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Convert GrMesh to a structGravatar Chris Dalton2017-05-03
| | | | | | | | | | | | | Converts GrMesh to a struct and changes the names/semantics of its fields to be more inline with their GL counterparts. Also renames the "instancing" feature to "pattern", to avoid ambiguity with hardware instancing. Bug: skia: Change-Id: Ia0999d4f9c83b5dd31f81b9bf4f36ed9abd26286 Reviewed-on: https://skia-review.googlesource.com/15157 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Delete SkBitmap::copyTo()Gravatar Matt Sarett2017-05-03
| | | | | | | | Bug: skia:6465 Change-Id: Ied95fe3aaed9126906fde15bfda73bd6597e3347 Reviewed-on: https://skia-review.googlesource.com/15220 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* sksl SPIR-V sampledBuffer supportGravatar Ethan Nicholas2017-05-03
| | | | | | | | Bug: skia: Change-Id: I9bf936857b61d3bb5a165f7a11e53d25069b53c2 Reviewed-on: https://skia-review.googlesource.com/15192 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* dither stageGravatar Mike Klein2017-05-03
| | | | | | | | | | | | | | | | I think we can dither generically as a pipeline stage. I'm not married to where the dither happens, or the implementation, which is mostly cribbed from https://en.wikipedia.org/wiki/Ordered_dithering. BUG=skia:3302,skia:6224 Change-Id: If7f6b22a523ca0b34cb03c0aa97b6734c34e0133 Reviewed-on: https://skia-review.googlesource.com/15161 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* Allow TextureSamplers to have null GrTexture pointerGravatar Robert Phillips2017-05-03
| | | | | | | | | Bug: 715488 Change-Id: I69775cbb50d334d81872e236e59368fe65e698ff Reviewed-on: https://skia-review.googlesource.com/14605 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add sweep gradient to SkRasterPipelineGravatar Herb Derby2017-05-03
| | | | | | | | | | | | | | | | This is a prototype. I have remove the tiling, but maybe I should add it back in. I thinking about factoring out the common code with linear gradient in its own CL. I think radial gradient will be very close to this. Change-Id: I1dfcb4f944138ee623afdf10b2a8befde797c604 Reviewed-on: https://skia-review.googlesource.com/13766 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Herb Derby <herb@google.com>
* Revert "Reland: Remove SkLights include from SkCanvas.h"Gravatar Florin Malita2017-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fed00319c9bafa41c8df658708030c072b301a41. Reason for revert: breaking the Android roll. Original change's description: > Reland: Remove SkLights include from SkCanvas.h > > SkLights.h pulls in a bunch of other headers and is not needed (fwdecl > works fine). > > Change-Id: I3ed97cd7861e51dcb7cfa7950a97b420dbc6fbfb > TBR=reed@google.com > Reviewed-on: https://skia-review.googlesource.com/15143 > Commit-Queue: Florin Malita <fmalita@chromium.org> > Reviewed-by: Florin Malita <fmalita@chromium.org> > TBR=fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I3b0e69f1d04d160f16a5567b09982d35cc9ca84e Reviewed-on: https://skia-review.googlesource.com/15195 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "Revert "eliminated GrGLSLExpr""Gravatar Ethan Nicholas2017-05-03
| | | | | | | | | | This reverts commit 5e550ab57e0204bfadd2cb69c47d2a85e38d6a4c. Bug: skia: Change-Id: I4705e47dbd209aa8f43db3d28c856bd3aa9e49ab Reviewed-on: https://skia-review.googlesource.com/15187 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Reland: Remove SkLights include from SkCanvas.hGravatar Florin Malita2017-05-03
| | | | | | | | | | | SkLights.h pulls in a bunch of other headers and is not needed (fwdecl works fine). Change-Id: I3ed97cd7861e51dcb7cfa7950a97b420dbc6fbfb TBR=reed@google.com Reviewed-on: https://skia-review.googlesource.com/15143 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* remove unused etc logicGravatar Mike Reed2017-05-03
| | | | | | | | Bug: skia: Change-Id: I913d348910db0b6ab930c4c5566ba9eb2320550e Reviewed-on: https://skia-review.googlesource.com/15181 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
* fix tricolor shaderGravatar Mike Reed2017-05-02
| | | | | | | | | | | | | 1. map pixel-centers through inverse (correctness) 2. forward-difference srcXY in loop (perf) Lots of minor (but correct) changes in GMs Bug: skia:6578 Change-Id: I2ad2ef939f58373d33212d4056c7d2f63eaafe0e Reviewed-on: https://skia-review.googlesource.com/15153 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Remove translateZ and lights from SkCanvasGravatar Jim Van Verth2017-05-02
| | | | | | | | Bug: skia:6557 Change-Id: I0dbf70c4131ab59e7fc6c674a6587767af98e13a Reviewed-on: https://skia-review.googlesource.com/15151 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Revert "eliminated GrGLSLExpr"Gravatar Brian Salomon2017-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 93f20f5629e52eed732d2b9d6dbbb351cc30b2cd. Reason for revert: Mismerge readded deleted files. Original change's description: > eliminated GrGLSLExpr > > Now that skslc performs all of the optimizations (and then some) that > GrGLSLExpr is responsible for, it's just extra work for no benefit. > > Bug: skia: > Change-Id: I40b0629e00a33873ed9fc6c0a9f41d8350221f9a > Reviewed-on: https://skia-review.googlesource.com/14560 > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > TBR=bsalomon@google.com,ethannicholas@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ia8b723594527afe34489fc78a4b49039081b6390 Reviewed-on: https://skia-review.googlesource.com/15154 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Support numerical transfer functions in readPixels()Gravatar Matt Sarett2017-05-02
| | | | | | | | | | | | | Let's do this because: (1) We can. (2) Android and Chrome have asked for it. (3) It will simplify the implementation of SkImage::makeColorSpace(). Bug: skia: Change-Id: Ia3c322b8a58c79ad67cdebe744e0623bd59dcffd Reviewed-on: https://skia-review.googlesource.com/15148 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* Add support for row-by-row jpeg encodingGravatar Matt Sarett2017-05-02
| | | | | | | | | | | Reland of: https://skia-review.googlesource.com/c/14641/ Bug: 713862 Change-Id: I9dca5ede4ebf569c5f80edcfb23a506b6cfa935e Reviewed-on: https://skia-review.googlesource.com/15144 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Add wireframe mode to Viewer.Gravatar Jim Van Verth2017-05-02
| | | | | | | Change-Id: I0ff11088465a4702acf9841a791d76f286ddbaf1 Reviewed-on: https://skia-review.googlesource.com/15147 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* eliminated GrGLSLExprGravatar Ethan Nicholas2017-05-02
| | | | | | | | | | | Now that skslc performs all of the optimizations (and then some) that GrGLSLExpr is responsible for, it's just extra work for no benefit. Bug: skia: Change-Id: I40b0629e00a33873ed9fc6c0a9f41d8350221f9a Reviewed-on: https://skia-review.googlesource.com/14560 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* speedup exp() in gaussian colorfilterGravatar Mike Reed2017-05-02
| | | | | | | | | | | ~20% faster differs in low 1 from prev impl Bug: skia: Change-Id: If7aa7f5523f15a5424ebf5a09313c5e1d43e1a1f Reviewed-on: https://skia-review.googlesource.com/15105 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Setup support for UNIFORM_TEXEL_BUFFER descriptor sets in VulkanGravatar Greg Daniel2017-05-02
| | | | | | | | | | This is the first CL to get support for using texel buffers in vulkan. Bug: skia: Change-Id: Iaac5ba4a356b487bc2b63111cca34ed968881f6b Reviewed-on: https://skia-review.googlesource.com/15100 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* sksl support for buffer blocksGravatar Ethan Nicholas2017-05-02
| | | | | | | | Bug: skia: Change-Id: Ic2cabaf2c7fb23cec7863f2b6152bbed133e0886 Reviewed-on: https://skia-review.googlesource.com/14947 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Remove EXPERIMENTAL_SHADOWING, Part 1Gravatar Jim Van Verth2017-05-02
| | | | | | | | | Bug: skia:6557 Change-Id: I6482d74be7b360c93141a73dd80c67854530c7a1 Reviewed-on: https://skia-review.googlesource.com/15101 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Add support for row-by-row jpeg encoding"Gravatar Leon Scroggins2017-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9b848d5749c5e34b56f927a3a3374c8ebafbd9db. Reason for revert: ASAN reports leaked memory [1]. Google3 reports a "delete size mismatch" [2], which I suspect is the same issue. [1] https://chromium-swarm.appspot.com/task?id=35e2c9fa9eac6310&refresh=10&show_raw=1 [2] https://test.corp.google.com/ui#cl=154838904&flags=CAMQBQ==&id=OCL:154838904:BASE:154839043:1493741642370:9c96115f&t=//chrome/skia/dm_wrapper:dm_wrapper Original change's description: > Add support for row-by-row jpeg encoding > > Bug: 713862 > Change-Id: I787b7c49662a00b89ae0ef35845dfbd6be3e6fb1 > Reviewed-on: https://skia-review.googlesource.com/14641 > Commit-Queue: Matt Sarett <msarett@google.com> > Reviewed-by: Leon Scroggins <scroggo@google.com> > TBR=msarett@google.com,scroggo@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ic5a8d67e0d4a7733662586055ceff086a2ab335d Reviewed-on: https://skia-review.googlesource.com/15140 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Add support for row-by-row jpeg encodingGravatar Matt Sarett2017-05-02
| | | | | | | | Bug: 713862 Change-Id: I787b7c49662a00b89ae0ef35845dfbd6be3e6fb1 Reviewed-on: https://skia-review.googlesource.com/14641 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Revert "Remove SkLights include from SkCanvas.h"Gravatar Florin Malita2017-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9ff301bf918cd85d9f67047f10631b7a74345a90. Reason for revert: need to update G3, Flutter. Original change's description: > Remove SkLights include from SkCanvas.h > > SkLights.h pulls in a bunch of other headers and is not needed (fwdecl > works fine). > > Change-Id: Id2d7176eb3bf4609f72f46d513eebf59318f542f > Reviewed-on: https://skia-review.googlesource.com/14904 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Florin Malita <fmalita@chromium.org> > TBR=mtklein@google.com,fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I4799ad5b31aaeaf529c8b912bbe09aa8869a5e6c Reviewed-on: https://skia-review.googlesource.com/15107 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Remove SkLights include from SkCanvas.hGravatar Florin Malita2017-05-02
| | | | | | | | | | SkLights.h pulls in a bunch of other headers and is not needed (fwdecl works fine). Change-Id: Id2d7176eb3bf4609f72f46d513eebf59318f542f Reviewed-on: https://skia-review.googlesource.com/14904 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Fix up shadows in raster.Gravatar Jim Van Verth2017-05-02
| | | | | | | | | | | * Re-enable shadow blurs for raster circles and rrects * Fix up the tessellation as much as possible to remove skinny triangles Bug: skia:6425 Change-Id: I6548055084bc8596a052bcd3cec852766e084ba2 Reviewed-on: https://skia-review.googlesource.com/14943 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Make GrBackendTexture take Gr*Info refs in ctor, and copy them.Gravatar Greg Daniel2017-05-02
| | | | | | | | | Bug: skia: Change-Id: Ic05d3384fa07560fc18c52bb8ae03541a72515f7 Reviewed-on: https://skia-review.googlesource.com/14374 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove declaration of SkTextureImageSetTexture, which does not existGravatar Brian Osman2017-05-02
| | | | | | | | Bug: skia: Change-Id: Ifb7edcae491ef48fbc69324d9dfb97a298104db9 Reviewed-on: https://skia-review.googlesource.com/15073 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Expose resetForNextPicture in SkNoDrawCanvasGravatar Adrienne Walker2017-05-02
| | | | | | | | | | | | | | | | | | | SkRecorder has some private Skia behavior with the way it handles an SkNoDrawCanvas that is not exposed. In particular, it's able to create an arbitrary SkIRect device clip at construction time. This is a performance optimization when reusing SkNoDrawCanvas across multiple recordings instead of reconstructing a new canvas every time. https://codereview.chromium.org/2768143002 is trying to implement another version of SkPictureBuilder/SkRecorder and so wants to be able to use similar SkNoDrawCanvas behavior. Change-Id: I0ac5f0eef8f0548cefd7354062311667cf448b07 Reviewed-on: https://skia-review.googlesource.com/11320 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Added A2B support to colorspaceinfo toolGravatar Matt Sarett2017-05-01
| | | | | | | | | | | | | Tool now parses A2B images/profiles. Tool can now display a cross-section based visualization for the color look-up tables in A2B profiles. BUG=skia: Change-Id: I68abb3e947b080c533e283783d7859feea8d35d6 Reviewed-on: https://skia-review.googlesource.com/6119 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Revert "Revert "SaveLayerRec::fClipMask -> raw pointer""Gravatar Mike Klein2017-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 3354969a4a4adcea159f3a0b01ad0a7c04fc9115. Reason for revert: not the problem? Original change's description: > Revert "SaveLayerRec::fClipMask -> raw pointer" > > This reverts commit a6b72cb5729306fdd676d739c1e2c53afa0786a7. > > Reason for revert: red bots > > Original change's description: > > SaveLayerRec::fClipMask -> raw pointer > > > > Use raw pointers for optional clip mask plumbing, to match the backdrop > > API. > > > > Change-Id: I7eb0ee5896faf34cc05789ba0703f35a4ab6a4f2 > > Reviewed-on: https://skia-review.googlesource.com/14901 > > Reviewed-by: Mike Reed <reed@google.com> > > Commit-Queue: Florin Malita <fmalita@chromium.org> > > > > TBR=fmalita@chromium.org,reed@google.com > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I4387620cdc3410018af9cef221e5cf8d09015380 > Reviewed-on: https://skia-review.googlesource.com/14955 > Reviewed-by: Mike Klein <mtklein@chromium.org> > Commit-Queue: Mike Klein <mtklein@chromium.org> > TBR=mtklein@chromium.org,reviews@skia.org,fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I6dde9e0441928f7a7423139a5c39f520f892f4b5 Reviewed-on: https://skia-review.googlesource.com/14958 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "SaveLayerRec::fClipMask -> raw pointer"Gravatar Mike Klein2017-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a6b72cb5729306fdd676d739c1e2c53afa0786a7. Reason for revert: red bots Original change's description: > SaveLayerRec::fClipMask -> raw pointer > > Use raw pointers for optional clip mask plumbing, to match the backdrop > API. > > Change-Id: I7eb0ee5896faf34cc05789ba0703f35a4ab6a4f2 > Reviewed-on: https://skia-review.googlesource.com/14901 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Florin Malita <fmalita@chromium.org> > TBR=fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I4387620cdc3410018af9cef221e5cf8d09015380 Reviewed-on: https://skia-review.googlesource.com/14955 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* SaveLayerRec::fClipMask -> raw pointerGravatar Florin Malita2017-05-01
| | | | | | | | | | Use raw pointers for optional clip mask plumbing, to match the backdrop API. Change-Id: I7eb0ee5896faf34cc05789ba0703f35a4ab6a4f2 Reviewed-on: https://skia-review.googlesource.com/14901 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* finish up constantsGravatar Mike Klein2017-05-01
| | | | | | | | | | | | | | | | | | For whatever reason, if I swap the condition in the if_then_else tests from < to >= and swap the then/else values, I can use constants in hsl_to_rgb. Still don't understand why, but I'll take it. I suspect it has something to do with SSE, IEEE, and NaN, but I don't care enough to speculate any more concretely. This does that, removes C() and _f, updates some comments, and adds a guard in build_stages.py to yell if it sees trouble like LCPI40_4... This reminds me to try -ffast-math soon. I think that was mostly held back by constants. Change-Id: I3f8a37a4d4642f77422ce3261b750061e9e604a3 Reviewed-on: https://skia-review.googlesource.com/14942 Reviewed-by: Herb Derby <herb@google.com>
* refactor hsl_to_rgb a touchGravatar Mike Klein2017-05-01
| | | | | | | | | | | | | | This rewrites the existing logic to expose more of the symmetries, and especially to make them clearly identical subexpressions. I think it's clear that the intent in hue_to_rgb is to wrap the t value back into 0-1... that's t = fract(t). No GM diffs. Change-Id: I9d62d8f80bcb45711ee334f953d3f6410e068ce4 Reviewed-on: https://skia-review.googlesource.com/14940 Reviewed-by: Herb Derby <herb@google.com>
* fix t / t2 confusion in hsl_to_rgbGravatar Mike Klein2017-05-01
| | | | | | | | | | | | | | | | | | | | | | | | I think the original[1] SkRasterPipeline_opts.h version had a typo that I faithfully copied over to hsl_to_rgb. In Hue2RGB[2], the scalar equivalent of hue_to_rgb, we mutate t to keep it in 0-1 range[3]. In the SkRasterPipeline_opts.h code we introduced a new value t2 instead, and then used it everywhere, but accidentally typed 't' in the t < 1/6 case. The expression "p + (q - p)*6.0f*t" should have been "p + (q - p)*6.0f*t2". This fixes things by changing t in place, much like Hue2RGB does. The GM doesn't change anywhere, which is troubling. [1] https://skia-review.googlesource.com/c/7460/21/src/opts/SkRasterPipeline_opts.h#808 [2] https://skia-review.googlesource.com/c/7460/21/src/effects/SkHighContrastFilter.cpp#26 [3] I think this whole clamp should probably become "t = fract(t)". Will follow up. Change-Id: I3dcc1a79ffae46830178d931844ee3113f8bdfd1 Reviewed-on: https://skia-review.googlesource.com/14910 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>