aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
Commit message (Collapse)AuthorAge
* Fix up textblobcachetestGravatar joshualitt2015-07-22
| | | | | | | TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1250003003
* Add the ability to decode a subset to SkCodecGravatar scroggo2015-07-22
| | | | | | | | | | | | | | | | | | | | | | | | This allows codecs that support subsets natively (i.e. WEBP) to do so. Add a field on SkCodec::Options representing the subset. Add a method on SkCodec to find a valid subset which approximately matches a desired subset. Implement subset decodes in SkWebpCodec. Add a test in DM for decoding subsets. Notice that we only start on even boundaries. This is due to the way libwebp's API works. SkWEBPImageDecoder does not take this into account, which results in visual artifacts. FIXME: Subsets with scaling are not pixel identical, but close. (This may be fine, though - they are not perceptually different. We'll just need to mark another set of images in gold as valid, once https://skbug.com/4038 is fixed, so we can tests scaled webp without generating new images on each run.) Review URL: https://codereview.chromium.org/1240143002
* Fix SkCanvas::wouldOverwriteEntireSurface() contains testGravatar fmalita2015-07-22
| | | | | | R=reed@google.com,robertphillips@google.com,bsalomon@google.com Review URL: https://codereview.chromium.org/1244093005
* adding unit test for textblob cache / GrBatchAtlasGravatar joshualitt2015-07-17
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1233253003
* Revert[2] of guard to remove DrawBitmapRectFlagsGravatar reed2015-07-17
| | | | | | | | | This reverts commit 91110195a2eee170c11885da9d16f94b00a39f87. BUG=skia: TBR= Review URL: https://codereview.chromium.org/1240753003
* Revert of guard to remove DrawBitmapRectFlags (patchset #1 id:1 of ↵Gravatar scroggo2015-07-17
| | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1235393003/) Reason for revert: breaking android framework build Original issue's description: > guard to remove DrawBitmapRectFlags > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/6fb0b6779e40ce05c20cf279f0ecff31fa3cd60d TBR=fmalita@chromium.org,djsollen@google.com,reed@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1230823007
* Now that the SkImageFilter::CropRect crop edges refer toGravatar senorblanco2015-07-16
| | | | | | | | width & height, name them appropriately. BUG=240827 Review URL: https://codereview.chromium.org/1234873005
* Revert of Remove rt flags that are not necessary (patchset #1 id:1 of ↵Gravatar bsalomon2015-07-16
| | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1226123012/) Reason for revert: breaks tests, e.g. https://build.chromium.org/p/client.skia.android/builders/Test-Android-GCC-Nexus9-GPU-TegraK1-Arm64-Release/builds/752/steps/dm/logs/stdio Original issue's description: > Remove rt flags that are not necessary > > Committed: https://skia.googlesource.com/skia/+/b6b0a6ef179f4143c94ba7e0e1be6e7ce4b0a23a TBR=joshualitt@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1234503004
* Remove rt flags that are not necessaryGravatar bsalomon2015-07-16
| | | | Review URL: https://codereview.chromium.org/1226123012
* Make readpixels work on GrTexturesGravatar bsalomon2015-07-16
| | | | Review URL: https://codereview.chromium.org/1234313002
* Various GL testing fixesGravatar jvanverth2015-07-16
| | | | | | | Check for GL context when printing NVPR error string. Fix some indenting. Review URL: https://codereview.chromium.org/1235283004
* Replace buggy_blend_modes GM with an exhaustive test.Gravatar mtklein2015-07-16
| | | | | | | | | | | | | | The new test is disabled by default, as it's quite slow. We can run it if we suspect problems by passing -x to DM. This test would have been failing before the bug fix, and now is passing. Assuming the Priv on the end means it's not considered public API... TBR=reed@google.com BUG=skia:4052 Review URL: https://codereview.chromium.org/1228333003
* guard to remove DrawBitmapRectFlagsGravatar reed2015-07-16
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1235393003
* Fix leak in Android FontMgr test.Gravatar bungeman2015-07-15
| | | | | | FontMgrAndroidParserTest deos not free the font families it creates. This issue was discovered by asan when enabling this test on Linux platforms.
* Only run test_wrapped_resources() when GL is activeGravatar jvanverth2015-07-15
| | | | Review URL: https://codereview.chromium.org/1234233002
* Preserve SKP cullrects on deserializationGravatar fmalita2015-07-14
| | | | | | | | Let's not ignore the offset. R=reed@google.com,mtklein@google.com Review URL: https://codereview.chromium.org/1235953004
* Very tiny paths are subsumed by the ConvexicatorGravatar caryclark2015-07-14
| | | | | | | | | | | | | | | and are treated as convex when they are not. Allow the SkPath::Iter to leave degenerate path segments unmolested by passing an additional exact bool to next(). Treat any non-zero length as significant in addPt(). R=reed@google.com,robertphillips@google.com BUG=493450 Review URL: https://codereview.chromium.org/1228383002
* Remove GrRedBlackTreeGravatar joshualitt2015-07-14
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1226203013
* Rename backing texture testing routinesGravatar jvanverth2015-07-14
| | | | Review URL: https://codereview.chromium.org/1230193006
* 3-15% speedup to HardLight / Overlay xfermodes.Gravatar mtklein2015-07-14
| | | | | | | | | | | | | | | While investigating my bug (skia:4052) I saw this TODO and figured it'd make me feel better about an otherwise unsuccessful investigation. This speeds up HardLight and Overlay (same code) by about 15% with SSE, mostly by rewriting the logic from 1 cheap comparison and 2 expensive div255() calls to 2 cheap comparisons and 1 expensive div255(). NEON speeds up by a more modest ~3%. BUG=skia: Review URL: https://codereview.chromium.org/1230663005
* add src-rect-constraint to drawImageRectGravatar reed2015-07-14
| | | | | | | | | | | Follow-on work - unify around SrcRectConstraint (i.e. drawBitmapRect) - remove silly drawBitmapRectToRect alias - clean-up (possibly remove) alias problems around drawBitmapRect + IRect parameter BUG=skia: Review URL: https://codereview.chromium.org/1228083004
* Add new SkPoint3 classGravatar robertphillips2015-07-13
| | | | | | The existing Light filter and the upcoming Lighting Shader both need a Point3 class Review URL: https://codereview.chromium.org/1229693009
* Add a GM that reproduces layout test failures with my new xfermode code.Gravatar mtklein2015-07-13
| | | | | | | | | | | | | | Inspired by https://storage.googleapis.com/chromium-layout-test-archives/linux_blink_rel/69169/layout-test-results/results.html I think the root cause is overflow. Also, adds tests for Sk16b::operator<(). It wasn't wrong, but it was suspect (used in all three of these xfermode implementations) and so it's best to have tests. BUG=skia: Review URL: https://codereview.chromium.org/1228393006
* Fix for partially-specified crop rects.Gravatar senorblanco2015-07-13
| | | | | | | | | | | When only the left or top edge of a crop rect is given, the right and bottom should be computed based on the incoming width and height, not based on the crop rect's width & height. This complies more accurately with SVG semantics. BUG=240827 Review URL: https://codereview.chromium.org/1232873002
* Start to propagate constness of GrPipelineBuilder up the stackGravatar joshualitt2015-07-13
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1229143007
* Remove GL-specific code from GMs and testsGravatar jvanverth2015-07-13
| | | | | | TBR=bsalomon@google.com Review URL: https://codereview.chromium.org/1232173002
* remove some unused stuffGravatar joshualitt2015-07-10
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1231163002
* Allow creating multiple scanline decoders.Gravatar scroggo2015-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make getScanlineDecoder return a new object each time, which is owned by the caller, and independent from any existing scanline decoders and the SkCodec itself. Since the SkCodec already contains the entire state machine, and it is used by the scanline decoders, simply create a new SkCodec which is now owned by the scanline decoder. Move code that cleans up after using a scanline decoder into its destructor One side effect is that creating the first scanline decoder requires a duplication of the stream and re-reading the header. (With some more complexity/changes, we could pass the state machine to the scanline decoder and make the SkCodec recreate its own state machine instead.) The typical client of the scanline decoder (region decoder) uses an SkMemoryStream, so the duplication is cheap, although we should consider the extra time to reread the header/recreate the state machine. (If/when we use the scanline decoder for other purposes, where the stream may not be cheaply duplicated, we should consider passing the state machine.) One (intended) result of this change is that a client can create a new scanline decoder in a new thread, and decode different pieces of the image simultaneously. In SkPngCodec::decodePalette, use fBitDepth rather than a parameter. Review URL: https://codereview.chromium.org/1230033004
* Use the upstream version of libwebp, v0.4.3.Gravatar scroggo2015-07-10
| | | | | | | | | | | | | | | | | | | DEPS: Update to pull v0.4.3 of libwebp from upstream gyp/libwebp.gyp: Add new files, as referenced by the gyp file used by Chromium. resource/tests: Add regression tests for particular images. BUG=skia:3442 BUG=skia:3315 BUG=skia:3429 Committed: https://skia.googlesource.com/skia/+/3aa0fb4d80c76b559ff4b82d5e569993aea06da1 Review URL: https://codereview.chromium.org/1178013008
* Fix SkImage::asLegacyBitmap() rowBytes assertGravatar fmalita2015-07-09
| | | | | | | | When reusing the pixel ref, we need to observe its rowBytes. R=reed@google.com Review URL: https://codereview.chromium.org/1227413002
* Let's not leak this SkData.Gravatar mtklein2015-07-09
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1231903006
* remove getter for imagegenerator factory, update testGravatar reed2015-07-09
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1223413002
* add runtime option to provide data->imagegenerator factoryGravatar reed2015-07-09
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1229933003
* Remove SkImageGenerator pieces only for SkCodec.Gravatar scroggo2015-07-09
| | | | | | | | | | | Follow up to the split between SkImageGenerator and SkCodec. Now that SkCodec does not inherit from SkImageGenerator, SkImageGenerator no longer needs Options or Result, which were added for SkCodec. Remove them, but keep them behind a flag, since Chromium has its own subclasses of SkImageGenerator which assume the old signature for onGetPixels. Review URL: https://codereview.chromium.org/1226023003
* SkCodec no longer inherits from SkImageGenerator.Gravatar scroggo2015-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkImageGenerator makes some assumptions that are not necessarily valid for SkCodec. For example, SkCodec does not assume that it can always be rewound. We also have an ongoing question of what an SkCodec should report as its default settings (i.e. the return from getInfo). It makes sense for an SkCodec to report that its pixels are unpremultiplied, if that is the case for the underlying data, but if a client of SkImageGenerator uses the default settings (as many do), they will receive unpremultiplied pixels which cannot (currently) be drawn with Skia. We may ultimately decide to revisit SkCodec reporting an SkImageInfo, but I have left it unchanged for now. Import features of SkImageGenerator used by SkCodec into SkCodec. I have left SkImageGenerator unchanged for now, but it no longer needs Result or Options. This will require changes to Chromium. Manually handle the lifetime of fScanlineDecoder, so SkScanlineDecoder.h can include SkCodec.h (where Result is), and SkCodec.h does not need to include it (to delete fScanlineDecoder). In many places, make the following simple changes: - Now include SkScanlineDecoder.h, which is no longer included by SkCodec.h - Use the enums in SkCodec, rather than SkImageGenerator - Stop including SkImageGenerator.h where no longer needed Review URL: https://codereview.chromium.org/1220733013
* rename GrShaderDataManager -> GrProcessorDataManagerGravatar joshualitt2015-07-09
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1228683002
* fix up test create functionsGravatar joshualitt2015-07-08
| | | | | | | TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1213623022
* add ability to get FBO ID to SurfaceGravatar joshualitt2015-07-08
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1220733007
* Add image->bitmapGravatar reed2015-07-08
| | | | | | | | BUG=skia: patch from issue 1212163012 at patchset 1 (http://crrev.com/1212163012#ps1) Review URL: https://codereview.chromium.org/1208993017
* Makes GrPipelineInfo a class with query functions used by GrBatch subclasses.Gravatar bsalomon2015-07-08
| | | | | | Committed: https://skia.googlesource.com/skia/+/f5179a4c490bc787190321bd8ffdb0e6a4efa9ac Review URL: https://codereview.chromium.org/1213383005
* Revert of Use the upstream version of libwebp, v0.4.3. (patchset #6 id:70001 ↵Gravatar scroggo2015-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of https://codereview.chromium.org/1178013008/) Reason for revert: Breaking the build e.g. http://build.chromium.org/p/client.skia/builders/Perf-Mac10.8-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Release/builds/1082/steps/build%20nanobench/logs/stdio ../../../third_party/externals/libwebp/src/utils/./endian_inl.h:51:10: error: use of unknown builtin '__builtin_bswap16' [-Wimplicit-function-declaration] return __builtin_bswap16(x); ^ 1 error generated. Original issue's description: > Use the upstream version of libwebp, v0.4.3. > > DEPS: > Update to pull v0.4.3 of libwebp from upstream > > gyp/libwebp.gyp: > Add new files, as referenced by the gyp file used by Chromium. > > resource/tests: > Add regression tests for particular images. > > BUG=skia:3442 > BUG=skia:3315 > BUG=skia:3429 > > Committed: https://skia.googlesource.com/skia/+/3aa0fb4d80c76b559ff4b82d5e569993aea06da1 TBR=djsollen@google.com,jzern@chromium.org,msarett@google.com,emmaleer@google.com,scroggo@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:3442 Review URL: https://codereview.chromium.org/1223583004
* Use the upstream version of libwebp, v0.4.3.Gravatar scroggo2015-07-08
| | | | | | | | | | | | | | | | | DEPS: Update to pull v0.4.3 of libwebp from upstream gyp/libwebp.gyp: Add new files, as referenced by the gyp file used by Chromium. resource/tests: Add regression tests for particular images. BUG=skia:3442 BUG=skia:3315 BUG=skia:3429 Review URL: https://codereview.chromium.org/1178013008
* Revert of Rework GrPipelineInfo (patchset #7 id:120001 of ↵Gravatar bsalomon2015-07-08
| | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1213383005/) Reason for revert: breaking stuff! Original issue's description: > Makes GrPipelineInfo a class with query functions used by GrBatch subclasses. > > Committed: https://skia.googlesource.com/skia/+/f5179a4c490bc787190321bd8ffdb0e6a4efa9ac TBR=joshualitt@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1213013003
* Fix leak in PictureTest.cppGravatar mtklein2015-07-08
| | | | | | | | TBR=schenney@chromium.org BUG=skia: Review URL: https://codereview.chromium.org/1210053008
* More threading of GrShaderDataManagerGravatar joshualitt2015-07-08
| | | | | | | TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1213613016
* Makes GrPipelineInfo a class with query functions used by GrBatch subclasses.Gravatar bsalomon2015-07-08
| | | | Review URL: https://codereview.chromium.org/1213383005
* fix pathops battle testGravatar caryclark2015-07-07
| | | | | | | | | | The intermediate subtraction threw away bits causing the subsequent cross product to fail. Defer the bit truncation until after the vector is computed. TBR=reed@google.com Review URL: https://codereview.chromium.org/1226933003
* Allow reset of the SkPictureRecorder cull rect and other parameters during ↵Gravatar schenney2015-07-07
| | | | | | | | | | | | | | | | | | | | | | endRecording. For some users of SkPictureRecorder, the cull rect is more efficiently determined while drawing is in progress, rather than when recording starts. The existing API requires the cull rect at start time, even though the information is not used for any culling purpose until the end of recording. This patch provides a means to reset the cull rect when recording ends, allowing users to update the rect based on information learned during drawing and for the new rect to be used as the culling bound. A valid bound is still required on the beginRecording call because it sizes the underlying canvas and sets the aspect ratio for any bounding box hierarchy. The bounding box factory can also be specified and parameters that control SkPicture creation. R=mtklein, reed1 BUG=skia:3919 Review URL: https://codereview.chromium.org/1178673007
* Remove SkThread.h, include SkMutex.h or SkAtomics.h as appropriate.Gravatar mtklein2015-07-07
| | | | | | | | | | | | | | SkThread.h doesn't do anything anymore execept include those two, and thankfully, it doesn't seem to be mentioned outside Skia. No public API changes. TBR=reed@google.com BUG=skia: Committed: https://skia.googlesource.com/skia/+/c50acf2321d7a934c80d754e9cbe936dfb8eb4cc Review URL: https://codereview.chromium.org/1215393002
* add SkImage::NewFromBitmapGravatar reed2015-07-07
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1217053003