aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
...
* SkTypeface::getAdvancedMetrics(): cleanupGravatar Hal Canary2017-05-04
| | | | | | | | | | | | | | | | | - SkAdvancedTypefaceMetrics is a struct not a class - SkTypeface::PerGlyphInfo is gone - s/getAdvancedTypefaceMetrics/getAdvancedMetrics/g - s/onGetAdvancedTypefaceMetrics/onGetAdvancedMetrics/g - [on]getAdvancedMetrics now return unique_ptr rather than bare ptr. - [on]getAdvancedMetrics no longer has parameters. (Only caller always used same arguments.) - SkAdvancedTypefaceMetrics uses C++11 in-class member initializers. - SkAdvancedTypefaceMetrics no longer inherits from SkRefCnt Change-Id: I37571ebcc383ba9eb21bc20c60c734e3ca317582 Reviewed-on: https://skia-review.googlesource.com/15311 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* force all colorfilters to implement 4fGravatar Mike Reed2017-05-04
| | | | | | | | | | | high-contrast gms differ at most by 1 bit Bug: skia: Change-Id: I1308bd105020ea3cd5a30fd3dd322ed134fb5ed5 Reviewed-on: https://skia-review.googlesource.com/15249 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* add virtual to support CTFontRefGravatar Mike Reed2017-05-04
| | | | | | | | Bug: skia:6583 Change-Id: I8525e63d3f43467289360d4b15c0153d2a43539e Reviewed-on: https://skia-review.googlesource.com/15194 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Combine the ambient and spot alphas into the base colorGravatar Jim Van Verth2017-05-04
| | | | | | | | | | | | | | for geometric shadows. This matches the analytic shadow approach better, and is color space invariant. Also includes cleanup in SampleAndroidShadows. Bug: skia:6546 Change-Id: I7a7cd060420dae741f967334c8b19542a14f0bcf Reviewed-on: https://skia-review.googlesource.com/15228 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* move dither after the transfer functionGravatar Mike Klein2017-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no single dither rate that we can use in linear space if we're using a non-linear transfer function... if it's too high (like today) we'll dither too much around zero (e.g. 0 -> 5), and if it's too low we won't dither near one. We were thinking it'd be a good idea to move the dither later in the pipeline anyway. This has to be the right spot! Now that we're moving dither from operating in linear space to operating in bit-space (after transfer function, aware of bit-depth of destination) we have to start clamping [0,1] instead of [0,a]... But, I think I've rewritten things to make sure we don't need to clamp at all. The main idea is to make sure 0-dither and 1+dither round to 0 and 1 respectively. We can do this by making the dither span exclusive, switching from [-0.5,+0.5] to (-0.5,+0.5). In practice I'm doing that as [-0.4921875,+0.4921875], a maximum dither of 63/128 of a bit. Similarly, I don't think it makes sense to fold in the multiply by alpha anymore if we're after the transfer function. Change-Id: I55857bca80377c639fcdd29acc9b362931dd9d12 Reviewed-on: https://skia-review.googlesource.com/15254 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Fix spot shadow inset.Gravatar Jim Van Verth2017-05-04
| | | | | | | | | | This handles negative values in the spot translation, and produces a tight fit for rrects and circles. Change-Id: Id2536347dca98f06f57b31518390037b86fd8a9e Reviewed-on: https://skia-review.googlesource.com/15248 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add GrGpuTextureProxyRefGravatar Robert Phillips2017-05-04
| | | | | | | | | Basically a GrTextureProxified clone of GrGpuResourceRef Change-Id: I8772550bb867ef2cf2d53efef0a0346bb7c90eb6 Reviewed-on: https://skia-review.googlesource.com/15221 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Reland "Add SkImage::makeColorSpace() with correct transfer fn behavior"Gravatar Matt Sarett2017-05-04
| | | | | | | | | | | Completes implementation for lazy and raster images. gpu is still a TODO. Bug: skia:6553 Change-Id: I898e4464ffc91442c7f98669f1203dd5c203621b Reviewed-on: https://skia-review.googlesource.com/15307 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Revert "Revert "Revert "eliminated GrGLSLExpr"""Gravatar Ethan Nicholas2017-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 796001c82eca5651bc6a221204f6186918781daf. Reason for revert: looks to be causing problems in Chrome (https://storage.googleapis.com/chromium-layout-test-archives/WebKit_Linux_Trusty__dbg_/1553/layout-test-results/results.html) Original change's description: > Revert "Revert "eliminated GrGLSLExpr"" > > 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> > TBR=ethannicholas@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I6455a4f16b2dc0d6d1265541f7117e0cfb8dd91c Reviewed-on: https://skia-review.googlesource.com/15309 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* 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>