aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
Commit message (Collapse)AuthorAge
* Add handling for instantiate failure up the call stackGravatar Robert Phillips2016-11-18
| | | | | | | | | | | | | | | | | The following two CLs were created via grep: https://skia-review.googlesource.com/c/4929/ (Guard against instantiate & accessRenderTarget failures) https://skia-review.googlesource.com/c/4961/ (Remove accessRenderTarget call in SkGpuDevice ctor) This CL was created by running through all the tests and having instantiate fail so it catches up-stack failures to handle a null return. BUG=665681,665500,665621 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4991 Change-Id: I6611eec8d36679123eef140538ee2526fb18628f Reviewed-on: https://skia-review.googlesource.com/4991 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Use SkFixedAllocator in SkLinearPipeline and remove the embedding ofGravatar Herb Derby2016-11-18
| | | | | | | | | | | | | | | the entire pipeline. Adjust SkFixedAlloc to allow nesting of allocation. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4987 Change-Id: Ieeb1b5deaae004b67cee933af9bc19bbfd5a7687 Reviewed-on: https://skia-review.googlesource.com/4987 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Port convolve functions to SkOptsGravatar xiangze.zhang2016-11-17
| | | | | | | | | | | | This patch moves the C++/SSE2/NEON implementations of convolve functions into the same place and uses SkOpts framework. Also some indentation fix. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2500113004 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2500113004
* perspective matrixGravatar Mike Klein2016-11-17
| | | | | | | | | | | | Nothing too tricky. The path of least resistance was to keep the matrix row-major when in perspective. It should make no difference in the end. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4983 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: I48bb9de0265e7873c465874cc37076a8111f5ea1 Reviewed-on: https://skia-review.googlesource.com/4983 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Fix the quickSkFDot6Div range checkGravatar Yuqian Li2016-11-17
| | | | | | | | | | | | | | | Our previous (1 << 10) limit is based on 2^32 being our maximum value. However, that's not the case because we have one more sign bit. Therefore I should make it (1 << 9). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4973 Change-Id: I38acb627cdb2514d3e4996aef02480b389cf3588 Reviewed-on: https://skia-review.googlesource.com/4973 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Rename GrTextureParams to GrSamplerParamsGravatar Brian Salomon2016-11-17
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4965 Change-Id: I7d52e81c670e92ca96117284f44b274ce3cc3671 Reviewed-on: https://skia-review.googlesource.com/4965 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Use SkSmallAllocator for Blender stage.Gravatar Herb Derby2016-11-17
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4969 Change-Id: I5466e6b906c1f268860011957a5a00361c6bb66a Reviewed-on: https://skia-review.googlesource.com/4969 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Herb Derby <herb@google.com>
* Support SkImageShader in SkRasterPipeline blitterGravatar Mike Klein2016-11-17
| | | | | | | | | | | | | | First of many CLs, I'm sure. This handles 8888 or sRGB sources with an affine matrix, clamp/clamp tiling, and nearest-neighbor sampling only. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4906 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: I99f7508852b3d44b6f52f7a0bee29a793af35c48 Reviewed-on: https://skia-review.googlesource.com/4906 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Remove accessRenderTarget call in SkGpuDevice ctorGravatar Robert Phillips2016-11-17
| | | | | | | | | | | | | | | This is a follow up to https://skia-review.googlesource.com/c/4929/ (Guard against instantiate & accessRenderTarget failures). Rather than guard this call to accessRenderTarget I would prefer to remove it. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4961 BUG=665681,665500,665621 Change-Id: I2c9ec245491d9059de892b2e6a7d4a4de4accdfd Reviewed-on: https://skia-review.googlesource.com/4961 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Use SkFixedMul instead of SkFixedMul_lowprecGravatar Yuqian Li2016-11-17
| | | | | | | | | | | | | | | | | | | It seems that SkFixedMul_lowprec doesn't have too much performance gain (maybe 1%). But its precision loss is siginificant. No serious issues have been found in convex cases, but things get much trickier for concave shapes. I'm removing it now to improve the stability and reliability of our algorithm, which may potentially benefit our Chrome landing. (Even if we do not remove SkFixedMul_lowprec now, we eventually will remove it when we land concave AAA code.) BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4926 Change-Id: Iae5739a3780bb77ce6237888eee51a502fea5cf2 Reviewed-on: https://skia-review.googlesource.com/4926 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Guard against instantiate & accessRenderTarget failuresGravatar Robert Phillips2016-11-17
| | | | | | | | | | | | | | | Chrome's fuzzer have reminded me that, since we are deferring allocation, instantiate and accessRenderTarget can now fail further down the call stack. This should probably be cherry picked back to M56. BUG=665681,665500,665621 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4929 Change-Id: I44d81ff29586dfe75ddda30b5ed8ca76354542d6 Reviewed-on: https://skia-review.googlesource.com/4929 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Plumb filter quality into SkShader::appendStages().Gravatar Mike Klein2016-11-17
| | | | | | | | | | | | | We of course need this to know whether or not to bilerp. TBR=herb@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4932 Change-Id: I5fe6d93c1d36d0d53f566f722960fcafb0d8bc3c Reviewed-on: https://skia-review.googlesource.com/4932 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Rename GrTextureAccess to GrProcessor::TextureSampler.Gravatar Brian Salomon2016-11-17
| | | | | | | | | | | Renames vars and methods that used the work "access" to refer to this type. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4931 Change-Id: Ibcf488fbd445c5119fc13d190544cd98981bdbee Reviewed-on: https://skia-review.googlesource.com/4931 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Use SkSmallAllocator for SamplerStage and Accessor.Gravatar Herb Derby2016-11-16
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4917 Change-Id: Id67d7c1cefa2aadfc706c56dd02d086120f99be3 Reviewed-on: https://skia-review.googlesource.com/4917 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Hook into parametric and table raster pipeline stagesGravatar Matt Sarett2016-11-16
| | | | | | | | | | | | BUG:664864 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4913 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: I909152f1abba60803f0ce2f970eec1f8f1816d78 Reviewed-on: https://skia-review.googlesource.com/4913 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Turn off all SkDebugfs in SkScan_AAAPath.cppGravatar Yuqian Li2016-11-16
| | | | | | | | | | | | | | TBR=mtklein@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4912 Change-Id: Ia69f2932936e34bc487c9c468bba176de0b2b0df Reviewed-on: https://skia-review.googlesource.com/4912 Reviewed-by: Yuqian Li <liyuqian@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* No SkDebugf for approximate intersectionGravatar Yuqian Li2016-11-16
| | | | | | | | | | | | | | | TBR=mtklein@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4911 Change-Id: I23bc298186f93c1a97a15d00b34f65cd72f964e7 Reviewed-on: https://skia-review.googlesource.com/4911 Reviewed-by: Yuqian Li <liyuqian@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Yuqian Li <liyuqian@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* External SkImageGenerator APIGravatar Florin Malita2016-11-16
| | | | | | | | | | | | | | | Introduce an SkImageGenerator API to support the implementation of externally-managed image decode and scale caches. BUG=skia:5806 R=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4720 Change-Id: Ibfe37af5471f78f28f88f9d5e80938882be1a344 Reviewed-on: https://skia-review.googlesource.com/4720 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
* Add trace and registers stages.Gravatar Mike Klein2016-11-16
| | | | | | | | | | | | | | | Yet more debugging tools. TBR=herb@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4908 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: I92e2e6b17abfc32c8d3554e71dbf95abadbb3824 Reviewed-on: https://skia-review.googlesource.com/4908 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Use SkSmallAllocator for tiling.Gravatar Herb Derby2016-11-16
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4904 Change-Id: If401ea43454b46591d6f39492e7761b16a7e7a29 Reviewed-on: https://skia-review.googlesource.com/4904 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* move SkBlendMode_Name into public (for chrome)Gravatar Mike Reed2016-11-16
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4905 Change-Id: I4f6cbc7b4d2a9d41ba5da39d550961587f30a4ac Reviewed-on: https://skia-review.googlesource.com/4905 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Fix mask overflow caused by edge driftGravatar Yuqian Li2016-11-16
| | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4797 Change-Id: Ica1568b67c1e1ce4aae2bdaba2c5b1f2155d1382 Reviewed-on: https://skia-review.googlesource.com/4797 Reviewed-by: Cary Clark <caryclark@google.com>
* Drop forceRLE to simplify aaa_walk_convex_edgesGravatar Yuqian Li2016-11-16
| | | | | | | | | | | | | | | | | | | | | | | The virtual flush function doesn't seem to affect the performance much. Maybe there's a 1% drop in performance in nanobench against fill_big_triangle and fill_big_circle, but that's too small a change for nanobench to reliabily diffrentiate. The smooth jump (ignore fractional y if edges don't change their directions significantly) no longer needs to be guarded against SkAAClip because our recent CL (https://skia-review.googlesource.com/c/4636/) make left/rightBound much tighter. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4899 Change-Id: If323013b810cc1ff5f6dbb868a8981354ee6f9b5 Reviewed-on: https://skia-review.googlesource.com/4899 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Stan Iliev <stani@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com> Commit-Queue: Stan Iliev <stani@google.com>
* Simplify the signature of sk/aaa_fill_pathGravatar Yuqian Li2016-11-16
| | | | | | | | | | | | | | | Previously, the clipRect is either equal to nullptr or clipRgn's bound (after necessary supersampling shift). Hence we drop one of them to make the signature simpler. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4874 Change-Id: Ied8d5313809d6cf90374365b01f2b8d52f2236e2 Reviewed-on: https://skia-review.googlesource.com/4874 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* make SkXfermode.h go awayGravatar Mike Reed2016-11-16
| | | | | | | | | | | | | | | | | | This is step one: - make SkXfermode useless to public clients - everything they should need is in SkBlendMode.h Step two: - remove SkXfermode.h entirely (since skia core will already be using SkXfermodePriv.h) BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4534 Change-Id: If2cea9f71df92430ed6644edb98dd306c5572cbc Reviewed-on: https://skia-review.googlesource.com/4534 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* add {parametric,table}_{r,g,b} stages.Gravatar Mike Klein2016-11-16
| | | | | | | | | | | | | | Think you can take over from here, hook these into SkColorSpaceXform_A2B, and remove the need for fn_1_{r,g,b}? BUG=skia:664864 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4888 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: If573fa2861f32f201f4db28598559290b1eef812 Reviewed-on: https://skia-review.googlesource.com/4888 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Matt Sarett <msarett@google.com>
* Revert "Defer more renderTargetContexts in the GPU image filter paths"Gravatar Robert Phillips2016-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fd01ce05ef7902c49b0272b3524a389693c72b35. Reason for revert: see if this is the cause of the Nexus7 assertion failure Original change's description: > Defer more renderTargetContexts in the GPU image filter paths > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4767 > > Change-Id: I4c1f27247ef340a49d1ac96761810e77e6047ca2 > Reviewed-on: https://skia-review.googlesource.com/4767 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I158f96ec1252481345fc5dca15086ffd4b47cb95 Reviewed-on: https://skia-review.googlesource.com/4875 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Move the matrix stage of SkLinearBitmapPipeline over to using SkSmallAllocator.Gravatar herb2016-11-15
| | | | | | | | | | | | | The rest of the stages will follow. When all stages are completed, this should significantly reduce stack use in the typical case. This a step in removing the baroque stage system and moving towards a SkRasterPipeline stage system. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2484273002 Review-Url: https://codereview.chromium.org/2484273002
* Add SkRasterPipeline::dump().Gravatar Mike Klein2016-11-15
| | | | | | | | | | | | | | Entirely for debugging. TBR=herb@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4871 Change-Id: I6d6972c40b11854441f566c12516a2ec8c75c78f Reviewed-on: https://skia-review.googlesource.com/4871 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* More shader preliminaries / refactoringGravatar Mike Klein2016-11-15
| | | | | | | | | | | | | | | | - thread through ctm - make blitter handle paint modulation instead of each shader TBR=herb@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4830 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: I8161e6b3864c4e48e4d47d5ad40a56a13c02fee8 Reviewed-on: https://skia-review.googlesource.com/4830 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Support decoding images to multiple formats, depending on usage"Gravatar Brian Osman2016-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c73a1ecbed64652b3d7aa8dc6face9a2205ce830. Reason for revert: ANGLE and CommandBuffer failures Original change's description: > Support decoding images to multiple formats, depending on usage > > Our codec generator will now preserve any asked-for color space, and > convert the encoded data to that representation. Cacherator now > allows decoding an image to both legacy (nullptr color space), and > color-correct formats. In color-correct mode, we choose the best > decoded format, based on the original properties, and our backend's > capabilities. Preference is given to the native format, when it's > already texturable (sRGB 8888 or F16 linear). Otherwise, we prefer > linear F16, and fall back to sRGB when that's not an option. > > BUG=skia:5907 > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4438 > > Change-Id: I847c243dcfb72d8c0f1f6fc73c09547adea933f0 > Reviewed-on: https://skia-review.googlesource.com/4438 > Reviewed-by: Matt Sarett <msarett@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> > TBR=mtklein@google.com,bsalomon@google.com,msarett@google.com,brianosman@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I1818f937464573d601f64e5a1f1eb43f5a778f4e Reviewed-on: https://skia-review.googlesource.com/4832 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Revert "Fix NoGPU compilation"Gravatar Brian Osman2016-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d5a78805c5133bc55e07c5da21f8d72b91a3df4f. Reason for revert: This was a patch for an earlier change that's going to be reverted as well. Original change's description: > Fix NoGPU compilation > > All of these functions were written to work without GPU support, just > forgot to compile them in that situation. > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4796 > > Change-Id: Ia23d304f07eb16714390b459dd448bc08402f479 > Reviewed-on: https://skia-review.googlesource.com/4796 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Stan Iliev <stani@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> > Commit-Queue: Stan Iliev <stani@google.com> > TBR=egdaniel@google.com,brianosman@google.com,stani@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Id0b9db355f416c118c0ef95501a6cfdeb083b54e Reviewed-on: https://skia-review.googlesource.com/4831 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Revert "While we can, restrict SkFixedAlloc/SkFallbackAlloc to POD."Gravatar Mike Klein2016-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1ee70359a199f161ce38451989a706d727954cc1. Reason for revert: breaking my various rolls. Original change's description: > While we can, restrict SkFixedAlloc/SkFallbackAlloc to POD. > > This trims the overhead down to a uniform 4 bytes. > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4786 > > Change-Id: I92127a0c2d6c23a4a372eca39842e22195d2dc99 > Reviewed-on: https://skia-review.googlesource.com/4786 > Reviewed-by: Herb Derby <herb@google.com> > Commit-Queue: Mike Klein <mtklein@chromium.org> > TBR=mtklein@chromium.org,herb@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Iae9ef553422352a1abf95b709fccd014d468da86 Reviewed-on: https://skia-review.googlesource.com/4829 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Revert "fix google3?"Gravatar Mike Klein2016-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ccb8e8bf38f51e35e0a456c6a724bab96d1b657a. Reason for revert: rolling back a CL this attempted to fix. Original change's description: > fix google3? > > TBR=brianosman@google.com > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4822 > > Change-Id: I991232e90c6851938151daa59cdeb4a3e22a7f03 > Reviewed-on: https://skia-review.googlesource.com/4822 > Commit-Queue: Mike Klein <mtklein@chromium.org> > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Mike Klein <mtklein@chromium.org> > TBR=mtklein@chromium.org,brianosman@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I127165f065be45af98528c8ae825e2f0fe5c8b0d Reviewed-on: https://skia-review.googlesource.com/4828 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* fix google3?Gravatar Mike Klein2016-11-15
| | | | | | | | | | | | TBR=brianosman@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4822 Change-Id: I991232e90c6851938151daa59cdeb4a3e22a7f03 Reviewed-on: https://skia-review.googlesource.com/4822 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Fix NoGPU compilationGravatar Brian Osman2016-11-15
| | | | | | | | | | | | | | | | All of these functions were written to work without GPU support, just forgot to compile them in that situation. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4796 Change-Id: Ia23d304f07eb16714390b459dd448bc08402f479 Reviewed-on: https://skia-review.googlesource.com/4796 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Stan Iliev <stani@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: Stan Iliev <stani@google.com>
* While we can, restrict SkFixedAlloc/SkFallbackAlloc to POD.Gravatar Mike Klein2016-11-15
| | | | | | | | | | | | | This trims the overhead down to a uniform 4 bytes. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4786 Change-Id: I92127a0c2d6c23a4a372eca39842e22195d2dc99 Reviewed-on: https://skia-review.googlesource.com/4786 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Support decoding images to multiple formats, depending on usageGravatar Brian Osman2016-11-15
| | | | | | | | | | | | | | | | | | | | Our codec generator will now preserve any asked-for color space, and convert the encoded data to that representation. Cacherator now allows decoding an image to both legacy (nullptr color space), and color-correct formats. In color-correct mode, we choose the best decoded format, based on the original properties, and our backend's capabilities. Preference is given to the native format, when it's already texturable (sRGB 8888 or F16 linear). Otherwise, we prefer linear F16, and fall back to sRGB when that's not an option. BUG=skia:5907 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4438 Change-Id: I847c243dcfb72d8c0f1f6fc73c09547adea933f0 Reviewed-on: https://skia-review.googlesource.com/4438 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Defer more renderTargetContexts in the GPU image filter pathsGravatar Robert Phillips2016-11-15
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4767 Change-Id: I4c1f27247ef340a49d1ac96761810e77e6047ca2 Reviewed-on: https://skia-review.googlesource.com/4767 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Start each pipeline with (x,y) in (dr,dg) registers for the shader.Gravatar Mike Klein2016-11-15
| | | | | | | | | | | | | | | | | | | | | Image shaders need to do some geometry work before sampling the image colors: 1) determine dst coordinates 2) map back to src coordinates 3) tiling Feeding (x,y) through as (dr,dg) registers makes step 1) easy, perhaps trivial, while leaving (r,g,b,a) with their usual meanings, "the color", starting with the paint color. This is easy to tweak into something like (x+0.5, y+0.5, 1) in (dr,dg,db) once this lands. Mostly I just want to get all the uninteresting boilerplate out of the way first. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4791 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: Ia07815d942ded6672dc1df785caf80a508fc8f37 Reviewed-on: https://skia-review.googlesource.com/4791 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Make SkSmallAllocator obey the RAII invariants and move to heap structures ↵Gravatar herb2016-11-15
| | | | | | | | | | | | | | | when needed. The biggest change is to the API which allowed code to bypass the destruction invariants. This destruction bypass feature was needed in only one use, and is totally encapsulated using createWithIniterT. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2488523003 Committed: https://skia.googlesource.com/skia/+/d5dc657b8c3ac916f98005dafdedafe02f023449 Committed: https://skia.googlesource.com/skia/+/c18b5f8f57a4efc5d5d1e399ed8bd3bd02c592ab Review-Url: https://codereview.chromium.org/2488523003
* Catch width overflow in ASAN using int64Gravatar Yuqian Li2016-11-14
| | | | | | | | | | | | | | | This is related with our previous CL: https://skia-review.googlesource.com/c/4628/ That previous CL fix won't pass the ASAN test (../../../include/core/SkRect.h:72:39: runtime error: signed integer overflow: 1 - -2147483648 cannot be represented in type 'int') so we use int64 in this CL. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4785 Change-Id: I39f7329c427d49f4be07588f37120722ac9892c2 Reviewed-on: https://skia-review.googlesource.com/4785 Reviewed-by: Mike Reed <reed@google.com>
* Fill in gamut-transformation TODOs for software pipeline.Gravatar Mike Klein2016-11-14
| | | | | | | | | | | | This adds support for paint colors, color shaders, and mode color filters (everything that the software pipeline supports today). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4781 Change-Id: I6e5da6d0dba03fbc82ecaa233ce8c727e7ce17b3 Reviewed-on: https://skia-review.googlesource.com/4781 Reviewed-by: Brian Osman <brianosman@google.com>
* Set analytic AA as default.Gravatar liyuqian2016-11-14
| | | | | | | | | | | We'll use https://codereview.chromium.org/2471123002/ to keep Chrome from using analytic AA until we fix all the Chrome tests. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2471133002 Committed: https://skia.googlesource.com/skia/+/dca4f6530013cf43a2557ccb07f5cb4fd916b8e8 Review-Url: https://codereview.chromium.org/2471133002
* Remove accumulative snapping errorGravatar Yuqian Li2016-11-14
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4769 Change-Id: Ie70bdc280c680c82f3b8a186466bf3a0835a9107 Reviewed-on: https://skia-review.googlesource.com/4769 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Start hooking shaders into SkRasterPipelineBlitter.Gravatar Mike Klein2016-11-14
| | | | | | | | | | | | | Here first just the simplest, constant-color shaders. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4743 Change-Id: I92c6523660e21a1e2aa353524570230282ba5dfe Reviewed-on: https://skia-review.googlesource.com/4743 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Start plumbing deferral of GPU resources in the image filtersGravatar Robert Phillips2016-11-14
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4688 Change-Id: I904d999ea87a55bee73765aa96a2f8aef7a0d61c Reviewed-on: https://skia-review.googlesource.com/4688 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert[2] "Change SkCanvas to *not* inherit from SkRefCnt"Gravatar Mike Reed2016-11-13
| | | | | | | | | | | | | | | | | Changes over original: - conditionalize ownership in SkPictureRecorder - conditionalize ownership in SkCanvasStateUtils This reverts commit b613c266df48cf45296ecc23d1bd7098c84bb7ba. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4742 Change-Id: Ib25514d6f546c69b6650b5c957403b04f7380dc2 Reviewed-on: https://skia-review.googlesource.com/4742 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert of Make SkSmallAllocator obey the RAII invariants and be expandable ↵Gravatar mtklein2016-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #15 id:280001 of https://codereview.chromium.org/2488523003/ ) Reason for revert: bots crashing / asserting Original issue's description: > Make SkSmallAllocator obey the RAII invariants and move to heap structures when needed. > > The biggest change is to the API which allowed code to bypass the > destruction invariants. This destruction bypass feature was needed in > only one use, and is totally encapsulated using createWithIniterT. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2488523003 > > Committed: https://skia.googlesource.com/skia/+/d5dc657b8c3ac916f98005dafdedafe02f023449 > Committed: https://skia.googlesource.com/skia/+/c18b5f8f57a4efc5d5d1e399ed8bd3bd02c592ab TBR=bungeman@google.com,herb@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2494353002
* Make SkSmallAllocator obey the RAII invariants and move to heap structures ↵Gravatar herb2016-11-13
| | | | | | | | | | | | | | when needed. The biggest change is to the API which allowed code to bypass the destruction invariants. This destruction bypass feature was needed in only one use, and is totally encapsulated using createWithIniterT. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2488523003 Committed: https://skia.googlesource.com/skia/+/d5dc657b8c3ac916f98005dafdedafe02f023449 Review-Url: https://codereview.chromium.org/2488523003