aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
Commit message (Collapse)AuthorAge
* wire up reduced atlas and zero textblob cache to testGravatar joshualitt2015-08-21
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1300813007
* Reland of Implement canComputeFastBounds() for image filters. (patchset #1 ↵Gravatar senorblanco2015-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:1 of https://codereview.chromium.org/1300403003/ ) Reason for revert: The Mac compile issue was fixed here: https://chromium.googlesource.com/chromium/src/+/fdd331a42ae0b9a6909a121020735161ab61c6e5 Original issue's description: > Revert of Implement canComputeFastBounds() for image filters. (patchset #8 id:130001 of https://codereview.chromium.org/1296943002/ ) > > Reason for revert: > This causes a syntax error. > > http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/87819/steps/compile%20%28with%20patch%29/logs/stdio > > Original issue's description: > > Implement canComputeFastBounds() for image filters. > > > > Image filters have never implemented this check, which means that > > filters which affect transparent black falsely claim they can compute > > their bounds. > > > > Implemented an affectsTransparentBlack() virtual for image > > filters, and a similar helper function for color filters. > > > > This will affect the following GMs: imagefiltersscaled > > (lighting, perlin noise now filter to clip), > > colorfilterimagefilter (new test case), imagefiltersclipped > > (perlin noise now filters to clip). > > > > Note: I de-inlined SkPaint::canComputeFastBounds() to avoid adding > > a dependency from SkPaint.h to SkImageFilter.h.h. Skia benches show > > no impact from this change, but will watch the perf bots carefully. > > > > BUG=4212 > > > > Committed: https://skia.googlesource.com/skia/+/915881fe743f9a789037695f543bc6ea189cd0cb > > TBR=reed@google.com,senorblanco@chromium.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=4212 > > Committed: https://skia.googlesource.com/skia/+/12d8472d31ea5edb636d7d5214db253570115c40 TBR=reed@google.com,herb@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=4212 Review URL: https://codereview.chromium.org/1301823005
* Revert of Implement canComputeFastBounds() for image filters. (patchset #8 ↵Gravatar herb2015-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:130001 of https://codereview.chromium.org/1296943002/ ) Reason for revert: This causes a syntax error. http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/87819/steps/compile%20%28with%20patch%29/logs/stdio Original issue's description: > Implement canComputeFastBounds() for image filters. > > Image filters have never implemented this check, which means that > filters which affect transparent black falsely claim they can compute > their bounds. > > Implemented an affectsTransparentBlack() virtual for image > filters, and a similar helper function for color filters. > > This will affect the following GMs: imagefiltersscaled > (lighting, perlin noise now filter to clip), > colorfilterimagefilter (new test case), imagefiltersclipped > (perlin noise now filters to clip). > > Note: I de-inlined SkPaint::canComputeFastBounds() to avoid adding > a dependency from SkPaint.h to SkImageFilter.h.h. Skia benches show > no impact from this change, but will watch the perf bots carefully. > > BUG=4212 > > Committed: https://skia.googlesource.com/skia/+/915881fe743f9a789037695f543bc6ea189cd0cb TBR=reed@google.com,senorblanco@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=4212 Review URL: https://codereview.chromium.org/1300403003
* SkImage method for detecting lazy decodingGravatar fmalita2015-08-20
| | | | | | | BUG=skia:4224 R=reed@google.com Review URL: https://codereview.chromium.org/1305453007
* Introduce interface for memory dumpsGravatar primiano2015-08-20
| | | | | | BUG=chromium:503168 Review URL: https://codereview.chromium.org/1300103004
* Use static_assert instead of SK_COMPILE_ASSERT.Gravatar bungeman2015-08-20
| | | | | | | Now that static_assert is allowed, there is no need to use a non- standard compile time assertion Review URL: https://codereview.chromium.org/1306443004
* Implement canComputeFastBounds() for image filters.Gravatar senorblanco2015-08-20
| | | | | | | | | | | | | | | | | | | | | | Image filters have never implemented this check, which means that filters which affect transparent black falsely claim they can compute their bounds. Implemented an affectsTransparentBlack() virtual for image filters, and a similar helper function for color filters. This will affect the following GMs: imagefiltersscaled (lighting, perlin noise now filter to clip), colorfilterimagefilter (new test case), imagefiltersclipped (perlin noise now filters to clip). Note: I de-inlined SkPaint::canComputeFastBounds() to avoid adding a dependency from SkPaint.h to SkImageFilter.h.h. Skia benches show no impact from this change, but will watch the perf bots carefully. BUG=4212 Review URL: https://codereview.chromium.org/1296943002
* Add asserts for shared mutex.Gravatar herb2015-08-19
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1285973003
* private iterator to visit all resource cache entriesGravatar reed2015-08-19
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1271033002
* change asABitmap to isABitmap on shaderGravatar reed2015-08-19
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1287263005
* unsigned -> int for counts and indices in picture-related codeGravatar mtklein2015-08-19
| | | | | | | | also, (C) BUG=skia: Review URL: https://codereview.chromium.org/1300163002
* remove SkDeferredCanvasGravatar reed2015-08-19
| | | | | | | | Waiting a day or so to see if the blink-removal of SkDeferredCanvas sticks BUG=skia: Review URL: https://codereview.chromium.org/1269093002
* SkStream Testing: fix bug in new unit test.Gravatar halcanary2015-08-19
| | | | Review URL: https://codereview.chromium.org/1297143004
* Fix stack overuse errorGravatar halcanary2015-08-19
| | | | Review URL: https://codereview.chromium.org/1283193008
* SkPDF/Deflate: clean up old SkFlate codeGravatar halcanary2015-08-18
| | | | | | | | Factor out some of https://crrev.com/1227913008 BUG=skia:3030 Review URL: https://codereview.chromium.org/1298243002
* Test scaling for small imagesGravatar msarett2015-08-18
| | | | | | | | | | We don't want to test small images on Gold because they are not interested to look at. Instead, I wrote a unit test to verify that scaling small images does not cause crashes. BUG=skia: Review URL: https://codereview.chromium.org/1287863004
* When getGLInstance is called on a frag proc, the resulting ↵Gravatar wangyix2015-08-18
| | | | | | | | GrGLFragmentProcessor will be the root of a tree of GrGLFragmentProcessors that mirrors the GrFragmentProcessor's tree. This allows setData() to be called recursively (removing the responsibility from compose shader) and allows gl instances direct access to their children gl instances so they can emit their code. BUG=skia:4182 Review URL: https://codereview.chromium.org/1287023009
* fix pathops fuzz failuresGravatar caryclark2015-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If a curve has the identical start and control points, the initial or final tangent can't be trivally determined. The perpendicular to the tangent is used to measure coincidence. Add logic for cubics, quadratics, and conics, to use the secondary control points or the end points if the initial control point alone can't determine the tangent. Add debugging (currently untriggered by exhaustive testing) to detect zero-length tangents which are not at the curve endpoints. Increase the number of temporary intersecions gathered from 10 to 12 but reduce the max passed in by cubic intersection from 27 to 12. Also, add checks if the max passed exceeds the storage allocated. When cleaning up parallel lines, choose the intersection which is on the end of both segments over the intersection which is on the end of a single segment. TBR=reed@google.com BUG=425140,516266 Review URL: https://codereview.chromium.org/1288863004
* Make GrVertexBatch objects hold their own draws during GrDrawTarget flushGravatar bsalomon2015-08-17
| | | | | | NO_MERGE_BUILDS Review URL: https://codereview.chromium.org/1286043004
* remove unused codeGravatar caryclark2015-08-17
| | | | | | R=mtklein@google.com Review URL: https://codereview.chromium.org/1297013002
* SkPaintFilterCanvas should inherit the target canvas stateGravatar fmalita2015-08-17
| | | | | | | | | | | | | | Currently, SkPaintFilterCanvas does not provide any help in cloning target canvas state. While that could be handled in subclasses, it is easy to miss (see linked bug). This CL adds a new constructor variant which ensures that the initial matrix and clip bounds are inherited from the target canvas. BUG=516790 R=reed@google.com,robertphillips@google.com Review URL: https://codereview.chromium.org/1294013002
* Support more swizzles to 565 in SkCodecGravatar scroggo2015-08-14
| | | | | | | | | | | | | | | | | | | | | | | Add more swizzling functions for swizzling to 565. Much of this code was revived from crrev.com/1055743003 (for BMP). Also added swizzling functions for WBMP. Consolidate the static function conversion_possible. In SkCodec::getPixels, check that the alphatype corresponds to the colorType. This prevents requesting 565 + non-opaque. In SkIcoCodec, report that the image is unpremul (instead of whatever the largest embedded codec thinks), but modify the requested info to have the alpha type expected/required by the embedded codec. Add tests for decoding to 565. BUG=skia:3257 BUG=skia:3683 Review URL: https://codereview.chromium.org/1277213002
* Split GrDrawBatch and GrVertexBatch into their own filesGravatar bsalomon2015-08-13
| | | | | | TBR=joshualitt@google.com Review URL: https://codereview.chromium.org/1296483002
* Introduce GrBatch subclasses GrDrawBatch and GrVertexBatch to prepare for ↵Gravatar bsalomon2015-08-13
| | | | | | non-drawing batches Review URL: https://codereview.chromium.org/1293583002
* Defer flushes if kPreferNoIO is specifiedGravatar robertphillips2015-08-13
| | | | | | Prior to this patch clients who were solely uploading to textures (e.g., SW Mask Mgr) would cause extra flushes b.c., even though kPreferNoIO was being specified, resources with pending IO would still be returned even though there was plenty of space in the resource cache. Review URL: https://codereview.chromium.org/1286203002
* SkPDF: Move SkFlate into src/pdf (part 1/3) [reland]Gravatar halcanary2015-08-12
| | | | | | | | Rename to SkDeflate so Chromium builders continue to work Next, we change remove SkFlate from Chromium build files, then we can delete SkFlate. Review URL: https://codereview.chromium.org/1285913002
* Check for xfer barriers in GrBatch, auto-issue barriers in GrGpuGravatar bsalomon2015-08-12
| | | | Review URL: https://codereview.chromium.org/1287973003
* Update CodexTest to test valid_alpha.Gravatar scroggo2015-08-12
| | | | | | | | | | | | | Add a static function to CodexTest, which consolidates decoding, comparing to an expected SkCodec::Result, and optionally comparing to a digest. Test decoding non-opaque to opaque (fails) and premul to unpremul/vice versa (succeeds). BUG=skia:3475 Review URL: https://codereview.chromium.org/1277253003
* Fix bmp RLE "bug"Gravatar msarett2015-08-12
| | | | | | | | | | | | | | | | | Chromium's test suite contains an RLE image that reports a certain file size in the header, but then contains additional encoded data. Our bmp decoder would only decode half of the image, before stopping. With this fix, we check for additional data before returning kIncompleteInput. If this lands, I will upload the test image to the bots. Also adding an invalid image test to CodexTest. BUG=skia: Review URL: https://codereview.chromium.org/1273853004
* C API: add radial, sweep, and two-point conical gradient shadersGravatar halcanary2015-08-12
| | | | Review URL: https://codereview.chromium.org/1263773006
* SkPDF: clean up overuse of SK_SUPPORT_PDFGravatar halcanary2015-08-11
| | | | | | | When possible use run-time checks (via SkDocument::CreatePDF) When PDF is disabled, do not compile tests/PDF*.cpp Review URL: https://codereview.chromium.org/1278403006
* SkPDF: allow PDF module to be disabled in DM and SampleAppGravatar halcanary2015-08-11
| | | | | | | | | | | To disable PDF: GYP_DEFINES='skia_pdf=0' bin/sync-and-gyp ninja -C out/Debug dm SampleApp When disabled, SkDocument::CreatePDF() always returns NULL. Review URL: https://codereview.chromium.org/1279123007
* Rename GrPipelineInfo to GrPipelineOptimizationsGravatar bsalomon2015-08-10
| | | | | | TBR=joshualitt@google.com Review URL: https://codereview.chromium.org/1274513005
* Make folder for batchesGravatar joshualitt2015-08-07
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1277233002
* Add approxBytesUsed to hashes.Gravatar mtklein2015-08-07
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1280653003
* Fix StringTest for VS2015Gravatar bsalomon2015-08-06
| | | | | | TBR=reed@google.com Review URL: https://codereview.chromium.org/1280853002
* Fix warnings on VS2015 x86_64 buildGravatar bsalomon2015-08-06
| | | | | | TBR=bungeman@google.com Review URL: https://codereview.chromium.org/1276133002
* flag to use const& instead of const* for src-rectGravatar reed2015-08-06
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1272713005
* Don't pass pipeline to GrBatch::generateGeometry()Gravatar bsalomon2015-08-06
| | | | | | R=joshualitt@google.com Review URL: https://codereview.chromium.org/1275083002
* SkSurface copy-on-write can yield stale GPU render targets.Gravatar fmalita2015-08-06
| | | | | | | | | | | | | | Prepare_rt_for_external_access() grabs the render target and then fires access notifications. But the notification handlers may trigger copy-on-write, causing the returned render target to be stale (pointing at the detached snapshot). We should grab the render target after firing notifications. R=reed@google.com,bsalomon@google.com Review URL: https://codereview.chromium.org/1276713002
* IWYU: 'core' target, files starting A-C.Gravatar bungeman2015-08-05
| | | | | | | | | TBR=reed@google.com Verbal lgtm, does not change API. Committed: https://skia.googlesource.com/skia/+/7403d87db8e43d4c2b5b25ac22a0ebc22bd09d69 Review URL: https://codereview.chromium.org/1265033002
* Scanline decoding for wbmpGravatar msarett2015-08-05
| | | | | | | | | | | | | | | We are also changing the wbmp to use SkSwizzler. This will allow us to take advantage of the sampling routines that are being implemented in SkSwizzler. The image in this upload came from: https://commons.wikimedia.org/wiki/File:Android_robot.png It is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license. BUG=skia: Review URL: https://codereview.chromium.org/1254483004
* Revert of IWYU: 'core' target, files starting A-C. (patchset #5 id:80001 of ↵Gravatar reed2015-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1265033002/ ) Reason for revert: revert to unblock DEPS roll ../../chrome/browser/chromeos/display/overscan_calibrator.cc:43:10: error: variable has incomplete type 'SkPath' SkPath base_path; Original issue's description: > IWYU: 'core' target, files starting A-C. > > TBR=reed@google.com > Verbal lgtm, does not change API. > > Committed: https://skia.googlesource.com/skia/+/7403d87db8e43d4c2b5b25ac22a0ebc22bd09d69 TBR=reed@google.com,mtklein@google.com,bungeman@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1273613002
* IWYU: 'core' target, files starting A-C.Gravatar bungeman2015-08-04
| | | | | | | TBR=reed@google.com Verbal lgtm, does not change API. Review URL: https://codereview.chromium.org/1265033002
* Remove experimental/PdfViewerGravatar halcanary2015-08-04
| | | | | | | | Motivation: maintaining this code doesn't seem worth the time, since no one seems to be using it. If someone wants to use it in the future, just revert this CL. Review URL: https://codereview.chromium.org/1266093003
* Implement caching of filled paths in the tessellated path renderer.Gravatar senorblanco2015-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | Paths are cached as tessellated triangle meshes in vertex buffers on the GPU. Stroked paths are not (yet) cached. Paths containing no curved segments (linear paths) are reused at all scales. Paths containing curved segments are reused within a scale tolerance threshold. In order to invalidate the cache when an SkPath is changed or deleted, this required implementing genID change notification in SkPath. This is modelled almost exactly on SkPixelRef::GenIDChangeListener. However, It does not currently implement the check for unique genIDs, so notifiers will fire when the first instance of an SkPathRef using a given genID is destroyed. Another caveat is that you cannot successfully add a change notifier to an empty path, since it uses the "canonical" empty path which is never modified or destroyed. For this reason, we prevent adding listeners to it. BUG=skia:4121,skia:4122, 497403 DOCS_PREVIEW= https://skia.org/?cl=1114353004 Committed: https://skia.googlesource.com/skia/+/468dfa72eb6694145487be17876804dfca3b7adb Review URL: https://codereview.chromium.org/1114353004
* Create a scanline decoder without creating a codecGravatar scroggo2015-08-04
| | | | | | | | | | | | | | Prior to this CL, if a client wanted to decode scanlines, they had to create an SkCodec in order to get an SkScanlineDecoder. This introduces complications if input data is not easily shared between the two objects. Instead, add methods to SkScanlineDecoder for creating a new one from input data, and remove the creation functions from SkCodec. Update DM and tests. Review URL: https://codereview.chromium.org/1267583002
* Revert "Implement caching of filled paths in the tessellated path renderer."Gravatar mtklein2015-08-04
| | | | | | | | | | | | | | | | | | This reverts commit 468dfa72eb6694145487be17876804dfca3b7adb. This CL caused signficant GM diffs. Revert "Fix resource cache test." This reverts commit b001c41ed37d2018d38ce787b412ed741585d75d. Revert "Fix SkData leaks at GrResourceKey::setCustomData() call sites." This reverts commit c369348aa596d7be05c9ce0ca5d349e5d1903789. These CLs depend on the first one. BUG=skia: TBR=bsalomon@google.com Review URL: https://codereview.chromium.org/1260363007
* cache private readback for gpu-imagesGravatar reed2015-08-04
| | | | | | | | | | | | Does not try to cache calls to readPixels at the moment: - not triggered by drawing - not clear if we want to perform any pixel transformations (that readPixels allows) on the GPU or CPU Can consider that another time. BUG=513695 Review URL: https://codereview.chromium.org/1262923003
* Added registerChild; transforms, textures, glKey automatically handled.Gravatar wangyix2015-08-04
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1266633003