aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
Commit message (Collapse)AuthorAge
* Update testing frameworks/tests for MDBGravatar robertphillips2015-11-13
| | | | | | | | | | | | | This CL: Fixes an ordering problem w.r.t. drawTarget clean up in GrContext::abandonContext (for text test that abandons context) Fixes when the lastDrawTarget field is set on a RenderTarget (now in GrDrawTarget ctor) due to GrTestTarget use case Updates the ProgramUnitTest to use multiple drawTargets Adds renderTarget creation to GrTestTargets (in MDB drawTargets require them) BUG=skia:4094 Review URL: https://codereview.chromium.org/1441533003
* Switch uses of SkChecksum::Compute to Murmur3.Gravatar mtklein2015-11-12
| | | | | | | | | | | SkChecksum::Compute is a very, very poorly distributed hash function. This replaces all remaining uses with Murmur3. The only interesting stuff is in src/gpu. BUG=skia: Review URL: https://codereview.chromium.org/1436973003
* Fix GrCoverageSetOpXP unit test on mixed samplesGravatar cdalton2015-11-12
| | | | | | | | | | | Updates GrCoverageSetOpXPFactory::TestCreate to not invert coverage with mixed samples, which is an unsupported configuration. TBR=bsalomon@google.com BUG=skia:4556 Review URL: https://codereview.chromium.org/1442763002
* Replace SkFunction with std::functionGravatar mtklein2015-11-12
| | | | | | | TBR=reed@google.com No public API changes. Review URL: https://codereview.chromium.org/1441753002
* Factor CSS3 matching rules.Gravatar bungeman2015-11-12
| | | | | | | | | | | | This factors out the CSS3 matching rules, creates tests for it, and uses it with the GDI font manager. BUG=chromium:554238,skia:4037 TBR=reed@google.com No public API changes. Review URL: https://codereview.chromium.org/1438113002
* Increment text pointer when the width is zero in the subpixel with center ↵Gravatar herb2015-11-12
| | | | | | | | and right alignment. BUG=skia: Review URL: https://codereview.chromium.org/1438893002
* Readd "immediate" modeGravatar robertphillips2015-11-11
| | | | | | | | This isn't an exact replacement. The accumulated batches are now flushed at drawContext-entry-point granularity (via the AutoCheckFlush objects) rather than per batch. TBR=bsalomon@google.com Review URL: https://codereview.chromium.org/1439533003
* Move all ShaderBuilder files to GLSLGravatar egdaniel2015-11-11
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1438003003
* Fix leaks in unit tests of GrGLTextureInfosGravatar bsalomon2015-11-11
| | | | | | TBR=egdaniel@google.com Review URL: https://codereview.chromium.org/1433353005
* Move GrBatchFlushState from GrDrawTarget to GrDrawingManagerGravatar robertphillips2015-11-11
| | | | | | | | | | | | This CL: moves the flushState disables immediate mode (it was proving difficult to implement) also moves the program unit test to the drawing manager BUG=skia:4094 TBR=bsalomon@google.com Review URL: https://codereview.chromium.org/1437843002
* Fix code that left shifts a negative value. This has undefined behavior.Gravatar benjaminwagner2015-11-11
| | | | | | | | Patched from internal cl/107515669 by rtrieu and added comments. BUG=skia:2481 Review URL: https://codereview.chromium.org/1439483002
* Use a struct for client GL texture handlesGravatar bsalomon2015-11-10
| | | | Review URL: https://codereview.chromium.org/1429863009
* SkResourceCache::GetAllocator() index8 and other color types handlingGravatar aleksandar.stojiljkovic2015-11-10
| | | | | | | | | | | Unit tests added to check all color types in SkOneShotDiscardablePixelref SkResourceCacheTest seems to have been allways using default Heap Allocator. Fixed so that it uses private (not global that is) SkDiscardableMemory. BUG=skia:4355 Review URL: https://codereview.chromium.org/1426753006
* Update Layer Hoisting to store its atlas texture in the resource cacheGravatar robertphillips2015-11-09
| | | | | | | | BUG=skia:4346 Committed: https://skia.googlesource.com/skia/+/42597bc99f00553825843b5ed41e81b121773368 Review URL: https://codereview.chromium.org/1406013006
* prune unused SkNx featuresGravatar mtklein2015-11-09
| | | | | | | | | | | | | | | - remove float -> int conversion, keeping float -> byte - remove support for doubles I was thinking of specializing Sk8f for AVX. This will help keep the complexity down. This may cause minor diffs in radial gradients: toBytes() rounds where castTrunc() truncated. But I don't see any diffs in Gold. https://gold.skia.org/search2?issue=1411563008&unt=true&query=source_type%3Dgm&master=false BUG=skia:4117 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review URL: https://codereview.chromium.org/1411563008
* Comments Style: s/skbug.com/bug.skia.org/Gravatar halcanary2015-11-07
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1432503003 Review URL: https://codereview.chromium.org/1432503003
* Revert of Update Layer Hoisting to store its atlas texture in the resource ↵Gravatar robertphillips2015-11-06
| | | | | | | | | | | | | | | | | | | | | | cache (patchset #6 id:100001 of https://codereview.chromium.org/1406013006/ ) Reason for revert: Android Original issue's description: > Update Layer Hoisting to store its atlas texture in the resource cache > > BUG=skia:4346 > > Committed: https://skia.googlesource.com/skia/+/42597bc99f00553825843b5ed41e81b121773368 TBR=bsalomon@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4346 Review URL: https://codereview.chromium.org/1413483004
* Update Layer Hoisting to store its atlas texture in the resource cacheGravatar robertphillips2015-11-06
| | | | | | BUG=skia:4346 Review URL: https://codereview.chromium.org/1406013006
* Avoid hang in OncePtr test with --threads 1Gravatar kkinnunen2015-11-04
| | | | | | | | | | | | | Avoid hang in OncePtr test when using "dm --threads 1". The test will hang the threads until sk_num_cores() threads have run the code. This requires that sk_num_cores() threads to be run in parallel, which the global thread pool will not do if the thread count is smaller than sk_num_cores(). BUG=skia: Review URL: https://codereview.chromium.org/1419593004
* Update RecordReplaceDraw unit testGravatar robertphillips2015-11-04
| | | | Review URL: https://codereview.chromium.org/1407143011
* Revert of Revert[2] of "stop using drawSprite (at least w/ no filters) as it ↵Gravatar reed2015-11-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | is going away" (patchset #1 id:1 of https://codereview.chromium.org/1410343011/ ) Reason for revert: failing on msaa Original issue's description: > Revert[2] of "stop using drawSprite (at least w/ no filters) as it is going away" > > Fixed assert in test that was calling GrRecordReplaceDraw(). That function now uses > drawBitmap, so updated the test to check for that (instead of drawSprite). > > This reverts commit 21b766347064837e6b78d600755901aad88cd6e0. > > BUG=skia: > TBR= > > Committed: https://skia.googlesource.com/skia/+/7b81994d95f10cda80ddb85af68a2651ff31782f TBR= NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1420053009
* Combine native sampling with samplingGravatar scroggo2015-11-03
| | | | | | | | | | | | In SkSampledCodec, allow the native codec to do its scaling first, then sample on top of that. Since the only codec which can do native scaling is JPEG, and we know what it can do, hard-code for JPEG. Check to see if the sampleSize is something JPEG supports, or a multiple of something it supports. If so, use JPEG directly or combine them. BUG=skia:4320 Review URL: https://codereview.chromium.org/1417583009
* Revert[2] of "stop using drawSprite (at least w/ no filters) as it is going ↵Gravatar reed2015-11-03
| | | | | | | | | | | | | | away" Fixed assert in test that was calling GrRecordReplaceDraw(). That function now uses drawBitmap, so updated the test to check for that (instead of drawSprite). This reverts commit 21b766347064837e6b78d600755901aad88cd6e0. BUG=skia: TBR= Review URL: https://codereview.chromium.org/1410343011
* SkScan_Antihair: assert in debug and potentialy lost last pixelsGravatar aleksandar.stojiljkovic2015-11-02
| | | | | | | | | alpha: (uint8_t) 256 is clamped to 255 before static cast to uint8_t in SkToU8. BUG=4406 Review URL: https://codereview.chromium.org/1424253002
* path ops: fix fuzz-found divide by zeroGravatar caryclark2015-11-02
| | | | | | | TBR=reed@google.com BUG=542391 Review URL: https://codereview.chromium.org/1427913005
* Move shader compiling to ProgramBuilder and various ShaderBuilder cleanups.Gravatar egdaniel2015-11-02
| | | | | | | | An additional positive of this CL is that GrGLShaderBuilder is now GL independent besides GrGLProgramBuilder BUG=skia: Review URL: https://codereview.chromium.org/1431433003
* More conic-specific tests revealed a few conic-specific bugs. Because ↵Gravatar caryclark2015-10-30
| | | | | | | | | | | | | | | | | | | | | | | | javascript / canvas make visualizing conics tricky, new native tools are required. The utility SubsetPath removes parts of a potentially very large path to isolate a minimal test case. SubsetPath is very useful for debugging path ops, but is not path ops specific. PathOpsBuilderConicTest compares the output of the Path Ops Builder, sequential calls to Simplify, and SkRegions for some number of rotated ovals. Some tests caused path ops to hang. It was caught adding a loop of curves because the head was not found by the tail. Even though the root cause has been fixed, SkSegment::addCurveTo callers now abort the path op if the same curve was added twice. The subdivided conic weight was been computed anew. Fortunately, it's a simpler computation that the one it replaces. Some Simplify() subroutines returned false to signal that the results needed assembling. Change these to abort the current operation instead. Coincident curve intersection triggered two small bugs; one where no perpendicular could be found for coincident curves, and one where no coincident curves remain after looping. The SixtyOvals test can be run through multiple processes instead of multiple threads. This strategy allows a 48 core machine to saturate all cores at 100%. The DEBUG_VISUALIZE_CONICS code in PathOpsConicIntersectionTest acknowleges that it is easier to visualize conics with Skia than with script and html canvas. This test also verifies that path ops subdivision matches geometry chopping. TBR=reed@google.com Review URL: https://codereview.chromium.org/1405383004
* Make SkTextBlob::RunIterator public.Gravatar halcanary2015-10-27
| | | | | | | | | Motivation: This will be easier than adding a friend every time I want to create a one-off SkCanvas subclass or SkRemote::Encoder subclass. See also: SkPath::Iter. Review URL: https://codereview.chromium.org/1411723005
* Update CodexTest for 565Gravatar scroggo2015-10-27
| | | | | | | All our codecs now support 565, so no need to have a boolean to check it. Review URL: https://codereview.chromium.org/1414553006
* SkRecord refactor: fill bounds array instead of BBH directlyGravatar mtklein2015-10-24
| | | | | | | | | This should be a strict refactor, just pulling out the bounds array. (It's the rescued nice parts of a dead-end CL targeting skia:4492.) BUG=skia: Review URL: https://codereview.chromium.org/1424553002
* Use SkSwizzler to convert from CMYKGravatar scroggo2015-10-23
| | | | | | | | | | | | | Move convert_CMYK_to_RGBA into two functions in SkSwizzler: one for 565 and one for 8888. For simplicity, when converting to 8888, we no longer convert in place. BUG=skia:4476 Committed: https://skia.googlesource.com/skia/+/450ee8f26d39f975cf6af37a27de658ae5a9fa10 Review URL: https://codereview.chromium.org/1411083009
* Revert of Use SkSwizzler to convert from CMYK (patchset #4 id:60001 of ↵Gravatar scroggo2015-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1411083009/ ) Reason for revert: Breaking ASAN. See http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN/builds/2879 Original issue's description: > Use SkSwizzler to convert from CMYK > > Move convert_CMYK_to_RGBA into two functions in SkSwizzler: one for 565 > and one for 8888. > > For simplicity, when converting to 8888, we no longer convert in place. > > BUG=skia:4476 > > Committed: https://skia.googlesource.com/skia/+/450ee8f26d39f975cf6af37a27de658ae5a9fa10 TBR=msarett@google.com,scroggo@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4476 Review URL: https://codereview.chromium.org/1411193006
* Use SkSwizzler to convert from CMYKGravatar scroggo2015-10-23
| | | | | | | | | | | Move convert_CMYK_to_RGBA into two functions in SkSwizzler: one for 565 and one for 8888. For simplicity, when converting to 8888, we no longer convert in place. BUG=skia:4476 Review URL: https://codereview.chromium.org/1411083009
* tunnel down texture-size-constraint to imagefiltersGravatar reed2015-10-22
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1421493003
* Reland of path ops: fix conic weight and partial coincidence (patchset #1 ↵Gravatar caryclark2015-10-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:1 of https://codereview.chromium.org/1408923003/ ) Reason for revert: suppressions have landed in chrome Original issue's description: > Revert of path ops: fix conic weight and partial coincidence (patchset #5 id:80001 of https://codereview.chromium.org/1413763002/ ) > > Reason for revert: > path ops change breaks svg clipping layout tests -- conic is now more accurate, changing edge of circle in clip > > These need to be rebaselined > > svg/clip-path/clip-path-child-clipped.svg > svg/clip-path/clip-path-nonzero.svg > svg/clip-path/clip-path-evenodd-nonzero.svg > svg/clip-path/clip-path-nonzero-evenodd.svg > > Original issue's description: > > The remaining 1m skp bugs are asserts that can be harmlessly > > suppressed and bugs around conics. > > > > The conic calculation for a subdivided w was just wrong. > > > > Also added debugging to template intersection to initialize > > reused structures and dump additional data. > > > > TBR=reed@google.com > > > > Committed: https://skia.googlesource.com/skia/+/ef33b1e739b23a1201100ff17a572da85b03d9af > > TBR= > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://skia.googlesource.com/skia/+/f428df1be3e96d3f8970d0f7f415b862f7da5404 TBR= NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1407003016
* Create an SkAndroidCodec API separate from SkCodecGravatar msarett2015-10-21
| | | | | | | | | | | | We will implement this API using SkCodecs. SkAndroidCodecs will be used to implement the BitmapRegionDecoder Java API (and possibly BitmapFactory). BUG=skia: Review URL: https://codereview.chromium.org/1406223002
* Stop creating static GrProcessor instancesGravatar bsalomon2015-10-21
| | | | | | | | R=joshualitt@google.com BUG=skia:4483 Review URL: https://codereview.chromium.org/1414733007
* Revert of path ops: fix conic weight and partial coincidence (patchset #5 ↵Gravatar caryclark2015-10-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:80001 of https://codereview.chromium.org/1413763002/ ) Reason for revert: path ops change breaks svg clipping layout tests -- conic is now more accurate, changing edge of circle in clip These need to be rebaselined svg/clip-path/clip-path-child-clipped.svg svg/clip-path/clip-path-nonzero.svg svg/clip-path/clip-path-evenodd-nonzero.svg svg/clip-path/clip-path-nonzero-evenodd.svg Original issue's description: > The remaining 1m skp bugs are asserts that can be harmlessly > suppressed and bugs around conics. > > The conic calculation for a subdivided w was just wrong. > > Also added debugging to template intersection to initialize > reused structures and dump additional data. > > TBR=reed@google.com > > Committed: https://skia.googlesource.com/skia/+/ef33b1e739b23a1201100ff17a572da85b03d9af TBR= NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1408923003
* The remaining 1m skp bugs are asserts that can be harmlesslyGravatar caryclark2015-10-20
| | | | | | | | | | | | | suppressed and bugs around conics. The conic calculation for a subdivided w was just wrong. Also added debugging to template intersection to initialize reused structures and dump additional data. TBR=reed@google.com Review URL: https://codereview.chromium.org/1413763002
* Remove SkThread::setProcessorAffinity()Gravatar mtklein2015-10-20
| | | | | | | | | | It's only used by a couple unit tests. We have other ways of getting the same quality testing of our ref-count code now (e.g. TSAN). BUG=skia: CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot Review URL: https://codereview.chromium.org/1408213005
* Modifications to get 'blaze build -c opt //third_party/skia/HEAD/...' to work.Gravatar benjaminwagner2015-10-19
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1413973002
* Add SkTTopoSortGravatar robertphillips2015-10-19
| | | | | | BUG=skia:4094 Review URL: https://codereview.chromium.org/1414503003
* Fix SkSwizzler bugGravatar msarett2015-10-16
| | | | | | | | | | | | | | | Now, that we are subsetting, fX0 is not necessarily less than fSrcWidth (since fSrcWidth is really the subset width). Ex: We may want a 10 pixel subset starting twenty pixels from the left edge. In that case, fX0=20 and fSrcWidth=10. Let's rename the width as fSubsetWidth to avoid confusion and remove the check. BUG=skia: Review URL: https://codereview.chromium.org/1407603003
* Enabling clip stack flattening exercises path ops.Gravatar caryclark2015-10-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Iterating through the 903K skps that represent the imagable 1M top web pages triggers a number of bugs, some of which are addressed here. Some web pages trigger intersecting cubic representations of arc with their conic counterparts. This exposed a flaw in coincident detection that caused an infinite loop. The loop alternatively extended the coincident section and, determining the that the bounds of the curve pairs did not overlap, deleted the extension. Track the number of times the coincident detection is called, and if it exceeds an empirically found limit, assume that the curves are coincident and force it to be so. The loop count limit can be determined by enabling DEBUG_T_SECT_LOOP_COUNT and running all tests. The largest count is reported on completion. Another class of bugs was caused by concident detection duplicating nearly identical points that had been merged earlier. To track these bugs, the 'handle coincidence' code was duplicated as a const debug variety that reported if one of a dozen or so irregularities are present; then it is easier to see when a block of code that fixes one irregularity regresses another. Creating the debug const code version exposed some non-debug code that could be const, and some that was experimental and could be removed. Set DEBUG_COINCIDENCE to track coincidence health and handling. For running on Chrome, DEBUG_VERIFY checks the result of pathops against the same operation using SkRegion to verify that the results are nearly the same. When visualizing the pathops work using tools/pathops_visualizer.htm, set DEBUG_DUMP_ALIGNMENT to see the curves after they've been aligned for coincidence. Other bugs fixed include detecting when a section of a pair of curves have devolved into lines and are coincident. TBR=reed@google.com Review URL: https://codereview.chromium.org/1394503003
* SkTHash: hash from fnptr to functor typeGravatar mtklein2015-10-15
| | | | | | | | Passing &SkGoodHash to SkTHashMap and SkTHashSet doesn't guarantee that it's actually instantiated. Using a functor does. BUG=skia: Review URL: https://codereview.chromium.org/1405053002
* Fix TextBlobTest valgrind errorGravatar fmalita2015-10-14
| | | | | | | | | When converting text to glyph IDs, the paint needs to reflect the actual text encoding. R=bungeman@google.com,herb@google.com Review URL: https://codereview.chromium.org/1404153002
* [SkTextBlob] Remove incorrect builder assertGravatar fmalita2015-10-13
| | | | | | | | | | | | | | At the end of TightRunBounds, glyphPosX cannot exceed the start of the next run. But glyphPosY is running ahead of glyphPosX (for kFull_Positioning) => the glyphPosY assert is incorrect. Since the two pointers advance in lock-step, there isn't much value in the glyphPosY assert anyway - we might as well remove it. BUG=chromium:542643 R=reed@google.com,bungeman@google.com Review URL: https://codereview.chromium.org/1405463004
* SkPDF: fall back on paths for unembeddable fonts.Gravatar halcanary2015-10-12
| | | | | | | | Add GM, SkPDFFont::CanEmbedTypeface BUG=skia:3866 Review URL: https://codereview.chromium.org/1401763002
* add applyFilter() to SkImageGravatar reed2015-10-12
| | | | | | | | | | | | | | | Result: - clients can get a filtered version of an image without having to setup a temp drawing environment - for some cases, the process is more efficient even than (deprecated) drawSprite, since there is no need to draw/copy the result Impl: - made Proxy virtual so we don't need to have an existing device to use it This, in conjunction with LocalMatrixImageFilter, should allow us to simplify and optimize ApplyImageFilter() in cc/output/gl_renderer.cc BUG=skia: Review URL: https://codereview.chromium.org/1390913005
* change more effects to only expose factoriesGravatar reed2015-10-12
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1395403002