aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* Fix invalid assert in GrMesh::setIndexedGravatar Chris Dalton2017-06-06
| | | | | | | | | | | When drawing a single point it's valid for the first and last indices to be equal. Bug: skia:6728 Change-Id: Ice8cd89b306ed9564cdd9a77c557628662e18abb Reviewed-on: https://skia-review.googlesource.com/18904 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Use more stable root finding methods for cubicsGravatar Christopher Dalton2017-06-06
| | | | | | | | | | | | | | Applies the quadratic formula from "Numerical Recipes in C", Section 5.6, to the homogeneous quadratic equations that find cubic inflection points and loop intersections. Also addresses KLM orientation ahead of time, rather than negating K and L after the fact. Bug: skia: Change-Id: Ic7e0818e2fe49b7724f9b583bae52281cfb1aea1 Reviewed-on: https://skia-review.googlesource.com/13481 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* more exclusion of SkImageEncoder_none.cppGravatar Mike Klein2017-06-06
| | | | | | | | | | | The current roll is failing due to double linking: multiple definition of 'SkEncodeImage(SkWStream*, SkPixmap const&, SkEncodedImageFormat, int)' src/images/SkImageEncoder.pic.o: previous definition here Change-Id: I64ada3591b4c4c0cb8deada0dc796d9a0376b6a7 Reviewed-on: https://skia-review.googlesource.com/18855 Reviewed-by: Matt Sarett <msarett@google.com>
* Workaround Adreno driver issue with stencil clears.Gravatar Brian Salomon2017-06-06
| | | | | | | | | | | | | This also removes the "debug wire rect" which was not used and not implemented for Vulkan. Also some declared but not implemented methods are removed from GrGLGpu. Bug: skia:5587 Change-Id: I750051e90e6cfbfad6a6fe20792226182f698bcf Reviewed-on: https://skia-review.googlesource.com/18639 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Image encoder cleanup: speculative fix for bzl rollGravatar Matt Sarett2017-06-06
| | | | | | | Bug: skia: Change-Id: I1e09e66e4d257eebcf959cec44b5d4f0fa876545 Reviewed-on: https://skia-review.googlesource.com/18851 Reviewed-by: Mike Klein <mtklein@google.com>
* Opt-in burst mechanism for pipeline shadersGravatar Florin Malita2017-06-06
| | | | | | | | | | | | | | Add a dedicated virtual for shaders to select burst mode. Enabled for linear gradients with more than 8 stops, as a start. BUG=skia:6710 Change-Id: I1b19124f42d1d805de27a5db6a26601c386bb9ff Reviewed-on: https://skia-review.googlesource.com/18628 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Revert "Handle different types of streams in different jpeg source managers"Gravatar Matt Sarett2017-06-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 96cc36124d06e023005dd901b32c59b29f55a135. Reason for revert: I think this is break one of our test bots. I will reland once that is figured out. Original change's description: > Handle different types of streams in different jpeg source managers > > For streams that are memory backed (stream->getMemoryBase() returns > a non-null ptr and hasLength() returns true), handle the stream > with skjpeg_mem_source_mgr, which directly assigns memory base to > the source manager. For other non memory backed streams, handle the > stream with skjpeg_buffered_source_mgr, which is renamed from > the old skjpeg_source_mgr with no implementation change. > > Signed-off-by: cjbao <cathy.bao@intel.com> > Bug: skia: > Change-Id: I748de0bdba726bbb318922c08497135e73e37329 > Reviewed-on: https://skia-review.googlesource.com/17296 > Reviewed-by: Leon Scroggins <scroggo@google.com> > Reviewed-by: Matt Sarett <msarett@google.com> > Commit-Queue: Matt Sarett <msarett@google.com> > TBR=msarett@google.com,scroggo@google.com,cathy.bao@intel.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia: Change-Id: Idf6c426468cc959b3f4661c0b3e86cb4d5e93688 Reviewed-on: https://skia-review.googlesource.com/18850 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Roll recipe dependencies (trivial).Gravatar recipe-roller2017-06-06
| | | | | | | | | | | | | | | | | | | | | | | | This is an automated CL created by the recipe roller. This CL rolls recipe changes from upstream projects (e.g. depot_tools) into downstream projects (e.g. tools/build). More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug. depot_tools: https://crrev.com/0ffdf2de157ed4252983254913f8c0b5e231d99c git-cl-comments: Support Gerrit file- and line-comments (agable@chromium.org) recipe_engine: https://crrev.com/267b9221c5fbd2712527852550d86f9e2e3874ff [file] Derive user-facing error from StepFailure and set FAILURE status on step. (iannucci@chromium.org) https://crrev.com/1ec7ad4df3efbdd7224f249179390aab4a66c562 [file] add log listings to file.listdir and file.glob_paths. (iannucci@chromium.org) TBR=borenet@google.com Recipe-Tryjob-Bypass-Reason: Autoroller Bugdroid-Send-Email: False Change-Id: Ibc3d2c87bcfa3ea96031f0470536636deb0c9dff Reviewed-on: https://skia-review.googlesource.com/18847 Reviewed-by: Recipe Roller <recipe-roller@chromium.org> Commit-Queue: Recipe Roller <recipe-roller@chromium.org>
* Add basic support for ARM so Skia can be built on Linux 4 Tegra (L4T)Gravatar Neal Norwitz2017-06-06
| | | | | | | | | | which is used in the Nvidia Jetson TX2 dev kit. It is Linux on ARM64. Bug: skia: Change-Id: I97b99226a8eb2b28190d3cf281d4a1a8278ae5b0 Reviewed-on: https://skia-review.googlesource.com/18884 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* use smarter float -> skfixed15 logic everywhereGravatar Mike Klein2017-06-06
| | | | | | | | | | | | | | | | | | | | | | This is the same logic from constant_color, covering all the other places where we convert from float to fixed, e.g. scale_1_float. This isn't quite ideal yet. We replace mulss+cvttss2si for addss+movd, which is great, but this leads to a silly sequence of code: addss %xmm2, %xmm0 movd %xmm0, %r9d movd %r9d, %xmm0 pshuflw $0x0, %xmm0, %xmm0 Those two movd are pointless... Again, all diffs due to switching from truncation to rounding. Change-Id: Icf6f3b6eb370fe41cea0cebcfda0b8907e055f41 Reviewed-on: https://skia-review.googlesource.com/18846 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* less naive lowp constant_colorGravatar Mike Klein2017-06-06
| | | | | | | | | | | This is as good as we can get without switching away from float inputs. All diffs due to rounding (from the +256.0f). Change-Id: I0d314f111d313577ce9078660178be17e865f11e Reviewed-on: https://skia-review.googlesource.com/18845 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
* define HWCAP_* ourselves in SkCpu.cppGravatar Mike Klein2017-06-06
| | | | | | | | | | | | | For compatibility with older system headers, instead of looking for HWCAP_ values in asm/hwcap.h, just define the bits we want to test ourselves. This lets us compile this code on systems before those bits were defined. At runtime the bits will harmlessly test as zero. Change-Id: I44b6aba7d6f0fc2c5df08ad262c2b0537d900209 Reviewed-on: https://skia-review.googlesource.com/18844 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Add color space support to 4f gradientsGravatar Florin Malita2017-06-06
| | | | | | | | | | | Similar to the raster pipeline stage, transform the stops into the dest color space before interpolation. Change-Id: I626b6ef18606fd2308d7da166ce70d05f3951e21 Reviewed-on: https://skia-review.googlesource.com/18767 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* move Coeff into blendmodeGravatar Mike Reed2017-06-06
| | | | | | | | Bug: skia: Change-Id: Ib4f3398b0cdc6b0f575f6db80d2ce0bf9666f077 Reviewed-on: https://skia-review.googlesource.com/18843 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Create an SkColorSpaceXform image generatorGravatar Matt Sarett2017-06-06
| | | | | | | | | | | | | | | | | This should be immediately useful in the Skia-Android rendering pipeline. Possible future uses include creating a "renderable" SkImage from a bitmap with a funny color space. Inspired by: https://skia-review.googlesource.com/c/13981/ Bug: b/62347704 Change-Id: I388c7af1fc43834b8ad22022d0caf3ac90b734c8 Reviewed-on: https://skia-review.googlesource.com/18598 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* remove unused xfermode methodsGravatar Mike Reed2017-06-06
| | | | | | | | | CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Bug: skia: Change-Id: Ibc7d581bcc40134ee7cf57bb65fee2d70e119bc7 Reviewed-on: https://skia-review.googlesource.com/18842 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Use chrome-infra Git CIPD packageGravatar Eric Boren2017-06-06
| | | | | | | | | | | Add Git recipe module to easily use this version of Git anywhere. This fixes recipe bundling and unblocks the recipe roll. Bug: skia: Change-Id: Ib4d1361b7a52676e1992025b29e630ea3ada173b Reviewed-on: https://skia-review.googlesource.com/18833 Reviewed-by: Ravi Mistry <rmistry@google.com> Commit-Queue: Eric Boren <borenet@google.com>
* more easy lowp stagesGravatar Mike Klein2017-06-06
| | | | | | | Change-Id: I8a292bc98135b41ceedb4242451436c3657616fc Reviewed-on: https://skia-review.googlesource.com/18722 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Expose SkWriteBuffer in component buildsGravatar Adrienne Walker2017-06-05
| | | | | | | | | | | | The chromium compositor wants to lean on Skia internal serialization (at least temporarily, but possibly long term as well) for certain types. As flattening types requires an SkWriteBuffer, make SkWriteBuffer have public visibility in component builds. Change-Id: I635f89bcf816aa376682bd7f7ef46de7d5669e12 Reviewed-on: https://skia-review.googlesource.com/18700 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* SkJumper: only omit leaf frame pointersGravatar Mike Klein2017-06-05
| | | | | | | | | This seems to make Instruments work a lot better. Change-Id: I078f005d32e427b4eb31bc92c731e3444f2faffb Reviewed-on: https://skia-review.googlesource.com/18635 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Simplify SkCodecs' call to SkColorSpaceXform::applyGravatar Leon Scroggins III2017-06-05
| | | | | | | | | | | | | | | | | | | | | | | | | | Most SkCodec subclasses did the following to apply their SkColorSpaceXform: dstFormat = select_xform_format(dstInfo.colorType()); srcFormat = select_xform_format(<something that doesn't change>); xformAlphaType = select_xform_alpha(dstInfo.alphaType(), this->getInfo().alphaType()); this->colorXform()->apply(dstFormat, dst, srcFormat, src, width, xformAlphaType); Consolidate the computation of these parameters into SkCodec and add a new method to SkCodec that calls apply() with those parameters. Add a SkColorSpaceXform::ColorFormat to SkCodec. This allows the new method SkCodec::applyColorXform to supply the ColorFormat. TBR=reed@google.com (No change to public API.) Change-Id: I8ea7ba4c0024be827a9f9359796c778744330f6e Reviewed-on: https://skia-review.googlesource.com/18523 Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Fix GrReducedClip.cpp: assertion failure surrounding tiny query boundsGravatar Chris Dalton2017-06-05
| | | | | | | | | | Some assertions cannot be relied upon due to FP error. Bug: skia:5990 Change-Id: I32445b320b9100ae2f80d2f762707d823da77805 Reviewed-on: https://skia-review.googlesource.com/18602 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Add TiledDrawScheduler so we can concurrently draw and enqueGravatar Yuqian Li2017-06-05
| | | | | | | | | | | | | | | | | (instead of finishing enque before draw). The highlight is that we can now achieve 9x speedup compared to 5x in all our previous approaches (including multi-picture draw). The schedulers here are experimental. I'd like to move on to try initializing once for each draw before further polishing and optimizing the schedule mechanism. Bug: skia: Change-Id: Idc3d030d475af9645c24c5372ff62b9a402206cc Reviewed-on: https://skia-review.googlesource.com/17826 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* more lowp blend modesGravatar Mike Klein2017-06-05
| | | | | | | | Change-Id: Id62e989d4278f273c040b159ed4d2fd6a2f209e0 Reviewed-on: https://skia-review.googlesource.com/18627 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* SkPDF: Draw paths with mask filters; color filter.Gravatar Hal Canary2017-06-05
| | | | | | | | | | | | | | | Also: - drawPaint, drawPath w/ perspective shaders - text with mask filters, stroking, path effect. - SkPDFUtils::GetShaderLocalMatrix BUG=skia:237 BUG=skia:238 BUG=skia:5607 Change-Id: Iffeaf2d7abbde13fd2577ce9feaa178657f48364 Reviewed-on: https://skia-review.googlesource.com/18200 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* lowp: add some big easy stagesGravatar Mike Klein2017-06-05
| | | | | | | | | | srcover_rgba_8888, lerp_u8, lerp_1_float, scale_u8, scale_1_float... this is enough for _lots_ of drawing. Change-Id: Ibe42adb8b1da6c66db3085851561dc9070556ee3 Reviewed-on: https://skia-review.googlesource.com/18622 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Defend against ICOs with large BMPs embeddedGravatar Leon Scroggins III2017-06-05
| | | | | | | | | | | If the ICO reports that it has a large BMP file embedded, do not crash if we attempt to allocate too much memory. Bug: b/38116746 Change-Id: I70eb66f5e4ffc15587007b398bbe843665eae500 Reviewed-on: https://skia-review.googlesource.com/18447 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Update link to testing infrastructure.Gravatar Ben Wagner2017-06-05
| | | | | | | | | No-Try: true Docs-Preview: https://skia.org/?cl=18596 Change-Id: I0d3cae67ccb7db06f3a85a0b1360873a77bbe78f Reviewed-on: https://skia-review.googlesource.com/18596 Reviewed-by: Eric Boren <borenet@google.com> Commit-Queue: Ben Wagner <benjaminwagner@google.com>
* In shapes_as_paths, draw zoom from pixmaps, not imagesGravatar Brian Osman2017-06-05
| | | | | | | | | | | | Trying to track down why the Galaxy S6 sometimes claims that every pixel is different, even though the zoomed images look identical. It's helpful to draw what's actually being diffed. Bug: skia:6653 Change-Id: Ia577aa70ed11d806fa204eaffdef41e6a65a60f2 Reviewed-on: https://skia-review.googlesource.com/18623 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* sk_sp-ify GrResourceProvider some moreGravatar Robert Phillips2017-06-05
| | | | | | | | | | I believe this addresses the concerns of this particular bug (although more remains to be done) Bug: skia:5327 Change-Id: Ie82f08f87b3cf3d7986fe4eeb16a5d2553173913 Reviewed-on: https://skia-review.googlesource.com/18599 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Destroy ANGLE displays in destroyGLContext"Gravatar Robert Phillips2017-06-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c1359888c021ad4594d22d849b2414fd0cdec6f5. Reason for revert: failing botbots Original change's description: > Destroy ANGLE displays in destroyGLContext > > Bug: skia:6711 > Change-Id: I770bb390d7b4e156116411bc6ce796375a6ddf21 > Reviewed-on: https://skia-review.googlesource.com/18588 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:6711 Change-Id: I2087153f1601dfade8442f0918ffd71e0cacff08 Reviewed-on: https://skia-review.googlesource.com/18621 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* lowp: add constant_color, swap, move_dst_srcGravatar Mike Klein2017-06-05
| | | | | | | | | | This is enough for us to do some really simple draws. Also add some debug tools to help prioritize porting. Change-Id: I334f8fd2133be1aeec3f3406371a81aa6c184776 Reviewed-on: https://skia-review.googlesource.com/18597 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* add colorGravatar Mike Klein2017-06-05
| | | | | | | Change-Id: Ie85ed7a807603ba627cb7f17de5a423ca9678251 Reviewed-on: https://skia-review.googlesource.com/18594 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Make GrSimpleMeshDrawOpHelper record whether coverage can be implemented as ↵Gravatar Brian Salomon2017-06-05
| | | | | | | | | | alpha This also makes the blend table entry for opaque src over indicate a blend of (1, ISA) rather than (1, 0) to match the actual implementation of the global src-over XP. Change-Id: I1b1f64d2546e4f0cf03c0239ce674d1baad655f6 Reviewed-on: https://skia-review.googlesource.com/18521 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Destroy ANGLE displays in destroyGLContextGravatar Robert Phillips2017-06-05
| | | | | | | | Bug: skia:6711 Change-Id: I770bb390d7b4e156116411bc6ce796375a6ddf21 Reviewed-on: https://skia-review.googlesource.com/18588 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* lowp: add move_src_dst and srcoverGravatar Mike Klein2017-06-05
| | | | | | | | | | | | | | This is enough to run the bench SkRasterPipeline_compile. $ ninja -C out monobench; and out/monobench SkRasterPipeline_compile 300 Before: 300 SkRasterPipeline_compile 48.4858ns After: 300 SkRasterPipeline_compile 37.5801ns Change-Id: Icb80348908dfb016826700a44566222c9f7a853c Reviewed-on: https://skia-review.googlesource.com/18595 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* slight streamlining for lowp load_8888 with pshufbGravatar Mike Klein2017-06-05
| | | | | | | | | We can use 2 pshufb to replace 4 unpacks when deinterlacing the colors. Change-Id: I713fbbc94f5cb9eaf14f85323b0ec76dc2246e98 Reviewed-on: https://skia-review.googlesource.com/18531 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* Remove blacklist of unit tests on Adreno VulkanGravatar Greg Daniel2017-06-05
| | | | | | | | Bug: skia:5777 Change-Id: I3cee2ffaf1b2858e660ca5d550d25f4a312395e6 Reviewed-on: https://skia-review.googlesource.com/18589 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Exclude SkJumper_stages_lowp.cpp from G3 build.Gravatar Mike Klein2017-06-05
| | | | | | | | | | | It's not meant to be built as part of Skia, only by build_stages.py into SkJumper_generated.S. Change-Id: Id028c42355f99415fe2bc0710c2292ea949f6eec Reviewed-on: https://skia-review.googlesource.com/18593 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Ben Wagner <benjaminwagner@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Real fix for stage perf regression.Gravatar Mike Klein2017-06-05
| | | | | | | | | | | | | | | | | When we made start_pipeline() return void, the call into the tail!=0 run of the pipeline became eligble to be a tail-call, and Clang made that choice. This had the side effect of not going through vzeroupper on those tails. We now mark start_pipeline() as inelligible for tail calls when targeting AVX+. All paths go through the vzeroupper at the end. BUG=chromium:729237 Change-Id: I2099931284214f24c67b38979b3ad4b4d10e8bba Reviewed-on: https://skia-review.googlesource.com/18591 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Simplify some Viewer code, and fix a few bugsGravatar Brian Osman2017-06-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The content rect was always identical to the window rect, so most of the related code did nothing. The translation limit code is always useful (to avoid dragging the slide way off-screen with the mouse), so always include it. The auto-scaling to fit the screen is also still useful, but just base it on the window rect. The zoom code has four state variables, only used two of them, and one was a trivially derived computation. Fold most of that work into computeMatrix. (The translation was always zero -- we never changed the zoom center.) Include fDefaultMatrix in the matrix from computeMatrix, rather than needing to apply it specially to the canvas. Don't apply the inverse default matrix to touch or mouse points. The absolute positions of those touch points is not important, but because that matrix includes scale (and sometimes very large or very small scale), it just had the effect of greatly amplifying or damping the drag speed. Without it, the slide always pans at the speed of the touch/mouse drag -- which seems more desirable. The use of the inverse default matrix was a clever trick, but it caused the translation (applied to the global mtx) to be scaled, so the slide was always pinned incorrectly. Instead, supply the unmodified window rect and the default matrix, so the trans limit code can do the obvious correct thing: xform the slide bounds completely, then limit the translation that will be applied after that. Slides are now correctly pinned to screen edge regardless of how much zoom is present in the default matrix. Note: There are still several bugs related to all of this code, but given the web of xform state, it's hard to unravel. The touch gesture still doesn't know about viewer's zoom, so that's ignored when doing the pinning. Beyond that, it doesn't even know about window resize - it only configures the translation limit when setting up a slide. I had a fix for all of this (doing the translation limiting in computeMatrix), but then the touch gesture doesn't know about it, and can accumulate drag motion that needs to be un-dragged to get back on-screen, even though the slide is never really translated that far. SkTouchGesture is in include. No one uses it except viewer: TBR=bsalomon@google.com Bug: skia: Change-Id: I460cc07c3de6d36e63826f57d359faf1facf5ab3 Reviewed-on: https://skia-review.googlesource.com/18524 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* SkImage::makeColorSpace(): Fix nullptr->sRGB bug with picture imagesGravatar Matt Sarett2017-06-05
| | | | | | | | Bug: 729352 Change-Id: I5ad5e2121ce87dc154528bfd9ec0f3e9253ed792 Reviewed-on: https://skia-review.googlesource.com/18590 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Replace BMP calls to new with calls to mallocGravatar Leon Scroggins III2017-06-05
| | | | | | | | | | | | | | | | | A BMP can have an arbitrarily large width. We typically read a row into a block of memory before swizzling it to the output. Rather than calling new to create that block of memory, which may crash when we run out of memory, call malloc, and return null if malloc fails. Add a common base class for Mask and Standard BMP codecs. This class handles allocating and freeing the buffer. Bug: b/37623797 Change-Id: I0510b76d688d030865faa481bb2fb1351dac2c97 Reviewed-on: https://skia-review.googlesource.com/18400 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Remove hardstop blacklist for nexus player vulkanGravatar Greg Daniel2017-06-05
| | | | | | | | | | | Local testing says this has been fixed by some series of SKSL changes over the past month or so Bug: skia:6037 Change-Id: Iffc8b63e495016ac9565459ddaf44db4049a33c0 Reviewed-on: https://skia-review.googlesource.com/14530 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
* A little help message for Android viewer's build dirGravatar Yuqian Li2017-06-05
| | | | | | | | | | | | | I think that I've mis-used out/Debug multiple times to build Android viewer. Maybe this message would help me and others in the future. No-Try: true Docs-Preview: https://skia.org/?cl=18587 Bug: skia: Change-Id: I810920a0ca4aa8a46dd58b35966e08513520953c Reviewed-on: https://skia-review.googlesource.com/18587 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Handle different types of streams in different jpeg source managersGravatar cjbao2017-06-05
| | | | | | | | | | | | | | | | | For streams that are memory backed (stream->getMemoryBase() returns a non-null ptr and hasLength() returns true), handle the stream with skjpeg_mem_source_mgr, which directly assigns memory base to the source manager. For other non memory backed streams, handle the stream with skjpeg_buffered_source_mgr, which is renamed from the old skjpeg_source_mgr with no implementation change. Signed-off-by: cjbao <cathy.bao@intel.com> Bug: skia: Change-Id: I748de0bdba726bbb318922c08497135e73e37329 Reviewed-on: https://skia-review.googlesource.com/17296 Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Support passing single SKP to get_images_from_skpsGravatar Leon Scroggins III2017-06-05
| | | | | | | | | | | In addition to allowing the user to supply a directory, allow them to supply a file. Simplifies my typical use case of testing a single file. Change-Id: I4f268cfb33fc70ff3121135941693023b6840cd3 Reviewed-on: https://skia-review.googlesource.com/18586 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* add testing flag to force rasterpipelineGravatar Mike Reed2017-06-05
| | | | | | | | Bug: skia: Change-Id: I8e195e90dc00b9be9072858086f7541e993428da Reviewed-on: https://skia-review.googlesource.com/18585 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Make instantiate return a BooleanGravatar Robert Phillips2017-06-05
| | | | | | | | | | | | From an off-line conversation: The longer term idea will be to create a helper class isolates the ability to instantiate proxies until flush time. The peek* methods could then be moved to GrSurfaceProxy. Change-Id: I8e8c02c098475b77d515791c0d6b81f7e4a327dd Reviewed-on: https://skia-review.googlesource.com/18076 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* have start_pipeline() return limit againGravatar Mike Klein2017-06-05
| | | | | | | | | | | | | | | | | | | This is spooky. I don't quite yet understand why, but this makes things much faster. Performance regressed across the board when we no longer needed the value and changed it to return void: https://perf.skia.org/e/?begin=1496176469&keys=6994&xbaroffset=28513 You can see similar regressions following this Chromium bug link. BUG=chromium:729237 Change-Id: I68371b0456014f909acf819aca52aa4f4f187460 Reviewed-on: https://skia-review.googlesource.com/18580 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>