aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* Move CPU feature detection to its own file.Gravatar mtklein2016-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Moves CPU feature detection to its own file. - Cleans up some redundant feature detection scattered around core/ and opts/. - Can now detect a few new CPU features: * F16C -> Intel f16<->f32 instructions, added between AVX and AVX2 * FMA -> Intel FMA instructions, added at the same time as AVX2 * VFP_FP16 -> ARM f16<->f32 instructions, quite common * NEON_FMA -> ARM FMA instructions, also quite common * SSE and SSE3... why not? This new internal API makes it very cheap to do fine-grained runtime CPU feature detection. Redundant calls to SkCpu::Supports() should be eliminated and it's hoistable out of loops. It compiles away entirely when we have the appropriate instructions available at compile time. This means we can call it to guard even a little snippet of 1 or 2 instructions right where needed and let inlining hoist the check (if any at all) up to somewhere that doesn't hurt performance. I've explained how I made this work in the private section of the new header. Once this lands and bakes a bit, I'll start following up with CLs to use it more and to add a bunch of those little 1-2 instruction snippets we've been wanting, e.g. cvtps2ph, cvtph2ps, ptest, pmulld, pmovzxbd, blendvps, pshufb, roundps (for floor) on x86, and vcvt.f32.f16, vcvt.f16.f32 on ARM. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1890483002 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review URL: https://codereview.chromium.org/1890483002
* remove U16 support, just support F16Gravatar reed2016-04-14
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1889753002 Review URL: https://codereview.chromium.org/1889753002
* Remove requestedStyle from SkTypefaceCache.Gravatar bungeman2016-04-14
| | | | | | | | | | | | The typeface cache contains typefaces which can be compared against to determine if an already known typeface will work instead of creating a new typeface id. This is primarily for sharing scaler contexts. How that typeface was requested is not relevant to this comparison, so don't cache it. Request caching must be handled separately. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1879423002 Review URL: https://codereview.chromium.org/1879423002
* Switch SkMagnifierImageFilter over to new onFilterImage interfaceGravatar robertphillips2016-04-14
| | | | | | | | | | | | | | | | | | Additionally, this CL: adds crop handling to the CPU path (the GPU path handled it but with a bug) adds a cropRect (to better justify the applyCropRect) adds a GM to exercise the cropRect Note: I believe the handling of cropRects and clipping is deeply flawed but, at least, the two paths are consistently flawed now. TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1882943002 Review URL: https://codereview.chromium.org/1882943002
* Since PIEX can now return an uncompressed RGB thumbnail, check the type of ↵Gravatar yujieqin2016-04-14
| | | | | | | | | | | | | | | the image before treating it as a JPEG. Highlights of new PIEX: * PIEX can now return JPEG compressed image or uncompressed RGB image * Add IsOfType() and GEtNumberofBytesForIsOfType() to image_type_recognition_lite * Add GetDngInformation() and GetOrientation() to piex * Remove deprecated data entries from piex_types BUG=b/27214608, b/28119810 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1883783002 Review URL: https://codereview.chromium.org/1883783002
* Simplify gamma-correctness for text rendering.Gravatar brianosman2016-04-14
| | | | | | | | | | | Just use the DC flag, independent of the destination pixel config or the special output override flag (which is only to be used internally be special effects that will never hit this code path.) BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1888473003 Review URL: https://codereview.chromium.org/1888473003
* For GOOGLE3, add deref method to SkRefCnt.Gravatar benjaminwagner2016-04-13
| | | | | | | | | This makes it easier to integrate with Blink code using RefPtr/PassRefPtr without pulling in Chrome's SkUserConfig.h. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1890573003 Review URL: https://codereview.chromium.org/1890573003
* Fix legacy NewRenderTarget factoryGravatar bsalomon2016-04-13
| | | | | | | TBR=robertphillips@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1888593002 Review URL: https://codereview.chromium.org/1888593002
* Only eglTerminate command buffer displays when no displays are in useGravatar bsalomon2016-04-13
| | | | | | | | | This is a workaround for crbug.com/603223 BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1878943008 Review URL: https://codereview.chromium.org/1878943008
* Remove GrTextureStorageAllocator. This was added from Chromium but never ↵Gravatar bsalomon2016-04-13
| | | | | | | | used and not expected to be used. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1886613003 Review URL: https://codereview.chromium.org/1886613003
* Tweak distance field path renderer behavior in gamma-correct mode to matchGravatar brianosman2016-04-13
| | | | | | | | | | | | | | | | | | recent changes to text rendering. Uses linear coverage falloff. Produces results that are perceptually more similar to L32 (raster and gpu). Smoothstep + sRGB was too soft. Plumb the gamma-correctness via DrawPathArgs, which also paves the way for other path rendering implementations to easily make decisions about rendering technique based on that flag. Fix a few typos and formatting issues from my most recent change. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1889453002 Review URL: https://codereview.chromium.org/1889453002
* Respect FC_MATRIX and FC_EMBOLDEN as extra font parameters.Gravatar bungeman2016-04-13
| | | | | | | | | | | | | | | A font consists of a set of data and a set of parameters to that data. For example a ttc font consists of the full font data parameterized by the index. In addition to the index, FontConfig allows specifying a matrix and embolden flag. In the future there may also be additional parameters of this sort, for example which color palette to use. This does not provide a way to serialize these parameters. Adding this here provides a nice place to experiment with doing so. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1890533002 Review URL: https://codereview.chromium.org/1890533002
* Rename lots of things from 'sRGB' to 'GammaCorrect', where appropriateGravatar brianosman2016-04-13
| | | | | | | | | | | Trying to be much more explicit about where we really mean sRGB as a format, and where we mean gamma-correct, as in: "not legacy behavior". Most of the changes to rendering behavior are dependent on the latter, so let's be precise. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1884873006 Review URL: https://codereview.chromium.org/1884873006
* Add GM to prevent mis-drawing of LCD text in SkPictureImageFiltersGravatar robertphillips2016-04-13
| | | | | | | BUG=602555 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1878373003 Review URL: https://codereview.chromium.org/1878373003
* Fix ChromeOS Swarming bot compileGravatar borenet2016-04-13
| | | | | | | BUG=skia:5158 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1886573004 Review URL: https://codereview.chromium.org/1886573004
* Allow a small tolerance in GrAtlasTextBatch bounds test.Gravatar bsalomon2016-04-13
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1882833002 Review URL: https://codereview.chromium.org/1882833002
* Make build_shaderc.py blow away output dir and allow build_type arg to ↵Gravatar bsalomon2016-04-13
| | | | | | | | contain either Debug or Release GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1884963002 Review URL: https://codereview.chromium.org/1884963002
* Make SkSpecialSurfaces always use kUnknown for their pixel geometryGravatar robertphillips2016-04-13
| | | | | | | | | | This now matches how the SkDevices were being created by the device proxy and prevents LCD text from being inadvertently applied. BUG=602555 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1878143004 Review URL: https://codereview.chromium.org/1878143004
* Fix CommandBuffer bot's DM configGravatar borenet2016-04-13
| | | | | | | BUG=skia:4957 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1880403002 Review URL: https://codereview.chromium.org/1880403002
* Remove SK_VERY_LEGACY_CREATE_TYPEFACE.Gravatar bungeman2016-04-13
| | | | | | | | | The flag and code it guards are no longer used. TBR=reed This just removes dead code. Review URL: https://codereview.chromium.org/1882803002
* Switch SkMatrixConvolutionImageFilter over to new onFilterImage interfaceGravatar robertphillips2016-04-13
| | | | | | | | TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1877343002 Review URL: https://codereview.chromium.org/1877343002
* remove SK_SUPPORT_NEW_ONCREATESCALERCONTEXT, no longer needed in chdromeGravatar reed2016-04-12
| | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1881733005 TBR= Review URL: https://codereview.chromium.org/1881733005
* distinguish distinct matrixconvolution benchmarksGravatar mtklein2016-04-12
| | | | | | | | | Today they all show as "matrixconvolution", and we probably only log one. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1886523002 Review URL: https://codereview.chromium.org/1886523002
* Blitter for repeat RGBA8888->RGBA8888.Gravatar herb2016-04-12
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1852613002 Review URL: https://codereview.chromium.org/1852613002
* Add missing F16 case to reverse pixel config conversionGravatar brianosman2016-04-12
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1884753002 Review URL: https://codereview.chromium.org/1884753002
* Begin switch to SkFontStyle for legacy calls.Gravatar bungeman2016-04-12
| | | | | | | | | | | | | | | | | | | This adds SK_VERY_LEGACY_CREATE_TYPEFACE which, when defined, provides only the old interface. Ideally, everyone would switch directly to SkFontMgr and use one of the newer calls, but there is currently no path for current users to get there. This updates all the internals to use SkFontStyle, after switching these over the higher level APIs can be switched. The Chromium follow on patch can be seen at https://crrev.com/1877673002 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1873923002 TBR=reed This doesn't really change API, just modernizes it. Review URL: https://codereview.chromium.org/1873923002
* sRGB support for distance field text.Gravatar brianosman2016-04-12
| | | | | | | | | | | | | | | | | | | | | Add a second distance field adjust table that only applies contrast, not fake-gamma correction. Store a flag in the batch at creation time, using the same logic we apply elsewhere (render target format, plus paint flags). That gets us close, but not as good as bitmap text. The final step is to use a linear step function (rather than smoothstep) to map distance to coverage, when we have sRGB output. Smoothstep's nonlinear response is actually doing some fake-gamma, so it ends up over-correcting when the output is already gamma-correct. Results are now very close between L32 (old table, smoothstep) and S32 (contrast-only table, linstep). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1885613002 Review URL: https://codereview.chromium.org/1885613002
* Remove SimpleOffsetFilterGravatar robertphillips2016-04-12
| | | | | | | | SimpleOffsetFilter & SkOffsetImageFilter seem equivalent nowadays. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1884733002 Review URL: https://codereview.chromium.org/1884733002
* Revert AlphaThresholdFilter to its old behavior wrt premulGravatar robertphillips2016-04-12
| | | | | | | | | | | TBR=borenet@google.com This fixes the "serialize-8888 gm imagealphathreshold_surface" failure related to: https://codereview.chromium.org/1879643003/ (Switch AlphaThresholdFilter over to new onFilterImage interface) GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1885633003 Review URL: https://codereview.chromium.org/1885633003
* Make fuzz builds set SK_FUZZ_LOGGINGGravatar kjlubick2016-04-12
| | | | | | | BUG=skia:5191 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1878363002 Review URL: https://codereview.chromium.org/1878363002
* Switch AlphaThresholdFilter over to new onFilterImage interfaceGravatar robertphillips2016-04-12
| | | | | | | | | | | | This CL also alters the raster path in two ways: it now respects the sRGB/linear distinction of its input it now respects the clip TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1879643003 Review URL: https://codereview.chromium.org/1879643003
* f16 and pm4f are always the same swizzle, so remove adaptorGravatar reed2016-04-12
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1880953003 Review URL: https://codereview.chromium.org/1880953003
* Make more unit tests run on VulkanGravatar bsalomon2016-04-12
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1885623002 Review URL: https://codereview.chromium.org/1885623002
* GYP_DEFINES and DM flags for Vulkan botGravatar borenet2016-04-12
| | | | | | | BUG=skia:5186 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1885563002 Review URL: https://codereview.chromium.org/1885563002
* Fix Vk build breakage due to new GrSLTypeGravatar bsalomon2016-04-12
| | | | | | | R=egdaniel@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1881033002 Review URL: https://codereview.chromium.org/1881033002
* Make is_ktx saferGravatar scroggo2016-04-12
| | | | | | | | | | | | Rather than assuming the data passed to ktx at least KTX_FILE_IDENTIFIER_SIZE, pass the length of the data to is_ktx and compare it. Splitting off from crrev.com/1862133002, which no longer depends on is_ktx. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1882593002 Review URL: https://codereview.chromium.org/1882593002
* Implement initCopySurfaceDstDesc for VulkanGravatar egdaniel2016-04-12
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1880613002 Review URL: https://codereview.chromium.org/1880613002
* Revert "Revert of Pass effects directly to fontcache (patchset #8 id:140001 ↵Gravatar reed2016-04-12
| | | | | | | | | | | | | | of https://codereview.chromium.org/1863013003/ )" add SK_SUPPORT_NEW_ONCREATESCALERCONTEXT for chrome this has now landed https://codereview.chromium.org/1878913002/ TBR= BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1880873002 Review URL: https://codereview.chromium.org/1880873002
* iOS: Tweak xcodebuild locationGravatar borenet2016-04-12
| | | | | | | BUG=skia:5155 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1879513002 Review URL: https://codereview.chromium.org/1879513002
* SkWStream::writeText inlined.Gravatar halcanary2016-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | Motivation: This function is used throughout SkPDF. Note that the compiler can usually inline the result of strlen() for literal strings. Before: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 24.2ns ! -> high variance, ? -> moderate variance micros bench 6.10 WStreamWriteText nonrendering After: out/Release/nanobench -m WStreamWriteText -q Timer overhead: 23.9ns ! -> high variance, ? -> moderate variance micros bench 2.51 WStreamWriteText nonrendering PDF runtime change: -0.8% ±0.04%. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1844343004 Review URL: https://codereview.chromium.org/1844343004
* Implement texel buffersGravatar cdalton2016-04-11
| | | | | | | | | | Adds a mechanism for processors to add buffer accesses and implements them in the GL backend. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1870893002 Review URL: https://codereview.chromium.org/1870893002
* Convert some unit tests from running on GL contexts to running on all contextsGravatar bsalomon2016-04-11
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1873313002 Review URL: https://codereview.chromium.org/1873313002
* Vulkan config in dmGravatar bsalomon2016-04-11
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1872283003 Review URL: https://codereview.chromium.org/1872283003
* Separate private headers for condition inclusion in BUILD file.Gravatar iroth2016-04-11
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1878753002 Review URL: https://codereview.chromium.org/1878753002
* Wait for all device work to finish before destroy VkDeviceGravatar egdaniel2016-04-11
| | | | | | | | | | | Currently before destroying the GrVkGpu, we do wait on all queue work to finish before destroying objects there. Since we only have one queue, the vkDeviceWaitIdle added here is probably not necessary, but the spec does suggest having it just to make sure all work is fully done on the device. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1876863004 Review URL: https://codereview.chromium.org/1876863004
* Switch SkTileImageFilter over to new onFilterImage interfaceGravatar robertphillips2016-04-11
| | | | | | | | This relies on: https://codereview.chromium.org/1816223002 (Update SkSpecialImage to be able to create tight SkImages and SkSurfaces) GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1810693003 Review URL: https://codereview.chromium.org/1810693003
* nullptr -> "sans-serif" fixes bold in gm/colorwheelGravatar mtklein2016-04-11
| | | | | | | | | This was an odd case where 8888 drew wrong and serialize-8888 was correct. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1880653002 Review URL: https://codereview.chromium.org/1880653002
* Add GLSL support for texelFetchGravatar cdalton2016-04-11
| | | | | | | | | | | Adds a cap and builder methods for texelFetch. This is required for texel buffers. Also moves the texel buffer cap into the general shader caps, and adds glTexBufferRange to the GL interface. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1869063005 Review URL: https://codereview.chromium.org/1869063005
* Rename EmitArgs::fSamplers to fTexSamplersGravatar cdalton2016-04-11
| | | | | | | | | | | Renames fSamplers to fTexSamplers in GrProcessor EmitArgs, and renames GrGLSLTextureSampler to GrGLSLSampler. This will allow us to add a second array of buffer samplers. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1862373003 Review URL: https://codereview.chromium.org/1862373003
* Infer sampler precision from pixel configGravatar cdalton2016-04-11
| | | | | | | | | | | Adds a "samplerPrecision" method to GrGLSLCaps and updates GrGLSLProgramBuilder to infer a sampler's precision based on its config and visibility. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1846963004 Review URL: https://codereview.chromium.org/1846963004