aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm
Commit message (Collapse)AuthorAge
* Simplify linkages to Android framework internalsGravatar tomhudson2015-10-26
| | | | | | | | | | We've migrated SkHwuiRenderer into the Android Framework as android::uirenderer::TestWindowContext in response to an internal bug; we now delete that class and change our build references here. R=djsollen@google.com Review URL: https://codereview.chromium.org/1407053009
* Add immediate mode option for gpu configs in dmGravatar bsalomon2015-10-23
| | | | Review URL: https://codereview.chromium.org/1421853002
* Implementation of SkBitmapRegionDecoder using SkAndroidCodecGravatar msarett2015-10-22
| | | | | | | | Includes testing in DM and nanobench BUG=skia: Review URL: https://codereview.chromium.org/1402863002
* Fix uninitialized memory on kIndex8 divisor tests in GoldGravatar msarett2015-10-21
| | | | | | | | | | | | | Turns out bitmap.eraseColor() does nothing if the bitmap is kIndex8. We need a more reliable way to initialize all of the pixels that we look at in Gold. The input SkCanvas* is always zero initialized, so let's only draw pixels to the canvas if we have initialized them. BUG=skia: Review URL: https://codereview.chromium.org/1418913002
* SkRemote: more refactoringGravatar mtklein2015-10-21
| | | | | | | | | | | | - move Client / Server definitions to .cpp - rename Client / Server to Canvas / Decoder No diffs: https://gold.skia.org/search2?issue=1409113005&unt=true&query=source_type%3Dgm&master=false&include=true BUG=skia: Review URL: https://codereview.chromium.org/1409113005
* SkRemote: refactoringGravatar mtklein2015-10-21
| | | | | | | | | | | | | | | - Cache becomes CachingEncoder that wraps another Encoder - Encoders provide IDs - syntaxy improvements to Client - ID isn't really protocol sensitive. - I don't think we need Type::kNone. No diffs. https://gold.skia.org/search2?issue=1418863002&unt=true&query=source_type%3Dgm&master=false&include=true BUG=skia: Review URL: https://codereview.chromium.org/1418863002
* 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
* SkRemoteGravatar mtklein2015-10-16
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1391023005
* 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
* Add subsetting to SkScanlineDecoderGravatar msarett2015-10-13
| | | | | | | | | | | | This CL allows the SkScanlineDecoder to decode partial scanlines. This is a first step in efficiently implementing subsetting in SkScaledCodec. BUG=skia:4209 Review URL: https://codereview.chromium.org/1390213002
* SkBitmapRegionDecoder clean-upGravatar msarett2015-10-12
| | | | | | | | | | | | | | Use SkCodecPrintf instead of SkDebugf. Check if the conversion is possible rather than starting many decodes that will certainly fail. Small refactor to code that deals with subsets that fall outside of the image. BUG=skia: Review URL: https://codereview.chromium.org/1395383002
* Enable more testing for scaled webpsGravatar msarett2015-10-12
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1401093002
* Fill incomplete images in SkCodec parent classGravatar msarett2015-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | Rather than implementing some sort of "fill" in every SkCodec subclass for incomplete images, let's make the parent class handle this situation. This includes an API change to SkCodec.h SkCodec::getScanlines() now returns the number of lines it read successfully, rather than an SkCodec::Result enum. getScanlines() most often fails on an incomplete input, in which case it is useful to know how many lines were successfully decoded - this provides more information than kIncomplete vs kSuccess. We do lose information when the API is used improperly, as we are no longer able to return kInvalidParameter or kScanlineNotStarted. Known Issues: Does not work for incomplete fFrameIsSubset gifs. Does not work for incomplete icos. BUG=skia: Review URL: https://codereview.chromium.org/1332053002
* Update libwebp and resume testing scaled webpGravatar scroggo2015-10-01
| | | | | | | | | | | | | | | | | libwebp has a fix for [1]. Update to the commit that contains the fix. Update libwebp.gypi, corresponding to libwebp's latest makefile. Turn back on DM testing for scaled webp, now that it should no longer use uninitialized memory. [1] https://code.google.com/p/webp/issues/detail?id=254 BUG=skia:4038 Committed: https://skia.googlesource.com/skia/+/0575d3e6c272744a66ab3281f9871366717df339 Review URL: https://codereview.chromium.org/1280073002
* SkPDF: Implement drawImage*() properlyGravatar halcanary2015-10-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drawImage calls now properly embeds the original jpeg. NOTE: drawBitmap*() calls no longer embed JPEG files when possible (this is in advance of eliminating bitmaps backed by encoded data). Chromium has already moved from drawBitmap to drawImage. Comparisons: control: total PDF drawImage/drawBitmap calls: 8010 total PDF jpeg images: 0 total PDF regular images: 3581 experiament: total PDF drawImage/drawBitmap calls: 8014 total PDF jpeg images: 271 total PDF regular images: 3311 total PDF regular images: 3582 (271 + 3311) When comparing rendered output there were perceptual differences in the following four GMs: colorcube, emboss, colormatrix, and tablecolorfilter. All of these differences were improvements (that is, closer to the 8888 rendering) due fixing a bug with colorfilters and forgetting to call notifyPixelsChanged. No SKPs had perceptual differences. Total PDF size dropped from 133964 kB to 126276 kB, a 5.7% improvement (mostly due to restoring use of JPG images in SKPs). BUG=skia:4370 Review URL: https://codereview.chromium.org/1372783003
* Small DM cleanupGravatar scroggo2015-09-30
| | | | | | | We set a value to bounds, and then immediately replace it. Skip the first one. Review URL: https://codereview.chromium.org/1378923002
* Fix bug testing SkCodec for ICOGravatar scroggo2015-09-30
| | | | | | | | | | | | | | | | | | | | | Looking in Gold, I see some ICO images that only show the upper left corner of the originals. It is happening because we use different ways of deciding what the dimensions are: In CodecSrc::size(), we use an SkScaledCodec to get the dimensions, even when fMode is not kScaledCodec_Mode. In CodecSrc::draw(), we only use SkScaledCodec in kScaledCodec_Mode. My recent CL to combine SkScanlineDecoder with SkCodec revealed this bug, because now SkScaledCodec::NewFromStream will succeed on ICO. (Previously, it failed because we do not yet have a scanline decoder for ICO (skbug.com/4404). Now that they are combined, we would need to specially flag ICO to stop returning an SkScaledCodec.) Switch size() to use the correct type of codec. Review URL: https://codereview.chromium.org/1373253004
* Merge SkCodec with SkScanlineDecoderGravatar scroggo2015-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Benefits: - This mimics other decoding APIs (including the ones SkCodec relies on, e.g. a png_struct, which can be used to decode an entire image or one line at a time). - It allows a client to ask us to do what we can do efficiently - i.e. start from encoded data and either decode the whole thing or scanlines. - It removes the duplicate methods which appeared in both SkCodec and SkScanlineDecoder (some of which, e.g. in SkJpegScanlineDecoder, just call fCodec->sameMethod()). - It simplifies moving more checks into the base class (e.g. the examples in skbug.com/4284). BUG=skia:4175 BUG=skia:4284 ===================================================================== SkScanlineDecoder.h/.cpp: Removed. SkCodec.h/.cpp: Add methods, enums, and variables which were previously in SkScanlineDecoder. Default fCurrScanline to -1, as a sentinel that start has not been called. General changes: Convert SkScanlineDecoders to SkCodecs. General changes in SkCodec subclasses: Merge SkScanlineDecoder implementation into SkCodec. Most (all?) owned an SkCodec, so they now call this-> instead of fCodec->. SkBmpCodec.h/.cpp: Replace the unused rowOrder method with an override for onGetScanlineOrder. Make getDstRow const, since it is called by onGetY, which is const. SkCodec_libpng.h/.cpp: Make SkPngCodec an abstract class, with two subclasses which handle scanline decoding separately (they share code for decoding the entire image). Reimplement onReallyHasAlpha so that it can return the most recent result (e.g. after a scanline decode which only decoded part of the image) or a better answer (e.g. if the whole image is known to be opaque). Compute fNumberPasses early, so we know which subclass to instantiate. Make SkPngInterlaceScanlineDecoder use the base class' fCurrScanline rather than a separate variable. CodexTest.cpp: Add tests for the state changes in SkCodec (need to call start before decoding scanlines; calling getPixels means that start will need to be called again before decoding more scanlines). Add a test which decodes in stripes, currently only used for an interlaced PNG. TODO: Add tests for onReallyHasAlpha. Review URL: https://codereview.chromium.org/1365313002
* DM: PDFSink sets rasterizer keywordGravatar halcanary2015-09-28
| | | | Review URL: https://codereview.chromium.org/1376573002
* simplify code in SkRecords.hGravatar mtklein2015-09-28
| | | | | | | | | | | | | | | | - use C++11 features ({} init, move constructors) to eliminate the need for explicit constructors - collapse RECORD0...RECORD8 into just one RECORD macro - explicitly tag record types instead of using member detectors. Removing member detectors makes this code significantly less fragile. This exposes a few places where we didn't really think through what to do with SkDrawable. I've marked them TODO for now. BUG=skia: Review URL: https://codereview.chromium.org/1360943003
* SkInstallDiscardablePixelRef is deprecated, enforce thatGravatar reed2015-09-25
| | | | | | | | | No functionality change, just a renaming. BUG=skia: TBR= Review URL: https://codereview.chromium.org/1372593002
* SkPDF: add basic metadata supportGravatar halcanary2015-09-23
| | | | | | | | | Motivation: I want too finalize this API before working on the more complex problem of adding XMP metadata for PDF/A. BUG=skia:3110 Review URL: https://codereview.chromium.org/1359943003
* Add nanobench tests for BitmapRegionDecoderGravatar msarett2015-09-22
| | | | | | | | | | | | | | | | SkBitmapRegionDecoderInterface provides an interface for multiple implementations of Android's BitmapRegionDecoder. We already have correctness tests in DM that will enable us to compare the quality of our various BRD implementations. We also need these performance tests to compare the speed of our various implementations. BUG=skia:4357 Review URL: https://codereview.chromium.org/1344993003
* fix DM?Gravatar mtklein2015-09-22
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1359833005
* Use rounding when converting desiredScale to a sampleSizeGravatar msarett2015-09-18
| | | | | | | | | | | | | | | | | | | | | Right now we have a bug in Gold where some images are labeled _0.167 and others are labeled _0.166. They are all 1/6 scales and should be labeled the same way and compared. The fix involves changing 0.166 to 0.167 in the list of scales that we test on, but SkScaledCodec does not scale to 0.167 as I expected. SkScaledCodec converts 0.167 to sampleSize = 5.999 and then casts to sampleSize = 5. I would argue that we should do a true round, so 0.167 represents a sampleSize of 6. In general, this CL change onGetScaledDimensions so that we now round desiredScale to the nearest sampleSize. BUG=skia: Review URL: https://codereview.chromium.org/1356923002
* skia: Add ANGLE with GL backend to nanobench/DMGravatar hendrikw2015-09-11
| | | | | | | This will allow us to test this without hacking it in, might be useful for others too. Review URL: https://codereview.chromium.org/1338003002
* Remove jpegs with uninitialized memory from GoldGravatar msarett2015-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BitmapRegionSampler (uses SkImageDecoder) will often scale to a power of 2 regardless of the sampleSize requested. This is skbug.com/4319. Consider a 60x60 image. To decode a subset with sample size 3, we might ask for the following. [x, y, w, h] = [-15, -15, 30, 30] sampleSize = 3 Since w = 30 and h = 30, this should give us a 10x10 result. Only the bottom right 5x5 quadrant of this 10x10 subset will actually be in the image. We should get a 5 pixel border on the top and left because we ask for 15 extra pixels on the top and left. Unfortunately, SkImageDecoder will take our requested sample size of 3, and then decide to use a sample size of 2. Not only will it scale the image by 2, but it will also scale the border by 2. So while we are expecting pixel data to begin at offset (5, 5) of the result bitmap, it actually begins at offset (7, 7). Making things worse, the pixels between (5, 5) and (7, 7) are uninitialized, causing problems on Gold. Options for fixing this include: (1) Not testing decodes with a border. (2) Changing the test to check the size of the output bitmap. (3) Disable the tests. I think it's best to just disable these tests. We know they don't work, so why do we need to see the results on Gold? BUG=skia:4319 Review URL: https://codereview.chromium.org/1313233007
* DM: add --key and --properties to PNG description field.Gravatar mtklein2015-09-10
| | | | | | | | This tags each image with the bot that created it. BUG=skia:4322 Review URL: https://codereview.chromium.org/1332903002
* Provides various implementations of Android's SkBitmapRegionDecoder.Gravatar msarett2015-09-08
| | | | | | | | | | | | | Implements testing in DM for these implementations. nanobench testing will follow after this. TBR=scroggo BUG=skia: Committed: https://skia.googlesource.com/skia/+/76f755e6d54a32f9887ad254ce59a3a62f28bde4 Review URL: https://codereview.chromium.org/1288963002
* Re-enable nvpr text rendering in DM.Gravatar bsalomon2015-09-08
| | | | Review URL: https://codereview.chromium.org/1306733007
* Revert of Provides multiple implementations of Android's ↵Gravatar msarett2015-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | SkBitmapRegionDecoder (patchset #16 id:360001 of https://codereview.chromium.org/1288963002/ ) Reason for revert: Breaking Android bots Bad use of the utils folder Original issue's description: > Provides various implementations of Android's SkBitmapRegionDecoder. > > Implements testing in DM for these implementations. > > nanobench testing will follow after this. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/76f755e6d54a32f9887ad254ce59a3a62f28bde4 TBR=scroggo@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1322773004
* Scanline decoding for gifsGravatar msarett2015-09-07
| | | | | | | | BUG=skia: Committed: https://skia.googlesource.com/skia/+/e9c10b9121887e8c300bd41357461418e061984d Review URL: https://codereview.chromium.org/1305123002
* Revert of Scanline decoding for gifs (patchset #15 id:380001 of ↵Gravatar jcgregorio2015-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1305123002/ ) Reason for revert: Breaks the build with SkScanlineDecoder.h not found: http://build.chromium.org/p/client.skia/builders/Linux%20Builder/builds/3722/steps/compile/logs/stdio ../../third_party/skia/src/utils/SkBitmapRegionCanvas.h:10:10: fatal error: 'SkScanlineDecoder.h' file not found #include "SkScanlineDecoder.h" Original issue's description: > Scanline decoding for gifs > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/e9c10b9121887e8c300bd41357461418e061984d TBR=scroggo@google.com,djsollen@google.com,msarett@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1320273004
* Scanline decoding for gifsGravatar msarett2015-09-04
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1305123002
* Provides various implementations of Android's SkBitmapRegionDecoder.Gravatar msarett2015-09-04
| | | | | | | | | | Implements testing in DM for these implementations. nanobench testing will follow after this. BUG=skia: Review URL: https://codereview.chromium.org/1288963002
* Remove unwanted images in GoldGravatar msarett2015-09-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | These extra outputs were caused by recent changes to push_codec_srcs. https://codereview.chromium.org/1327433003/ *** First, I would argue that we do not want to test "native" modes (ex: codec, scanline, etc) to scales that require sampling (ex: 0.1, 0.2, etc). Right now, we are trying to scale jpegs to 0.1, settling for 0.125 as the closest option, and then trying to compare the 0.125 scaled image to the actual 0.1 scaled image in Gold. *** Second, I messed up and caused our test setup to try to decode to kIndex8 and kGray8 "always" instead of only when it is recommended. The bad effect of this happens because we can decode jpegs to kGray8 even if they are color images. Right now in Gold, we have a bunch of untriaged gray versions of color images. The second issue would have been caught if we signaled a fatal failure for invalid conversions. Maybe we should look into this now that 565 is supported everywhere? BUG=skia: Review URL: https://codereview.chromium.org/1314163007
* Various improvements to CodecSrc testing in dmGravatar msarett2015-09-01
| | | | | | | | | | | | | | | | | | | | | *** Add CodecMode and ScaledCodecMode (in place of NormalMode), so now we test SkCodec's getPixels() and SkScaledCodec's getPixels() *** Don't attempt to test scanline and codec modes using the dimensions that were recommended for SkScaledCodec. *** Change tags so that each scale gets its own output folder. TODO: Make ScanlineMode and ScanlineSubsetMode support kOutOfOrder etc. I think this belongs with the gif CL - I don't want to add test modes that we don't run yet. BUG=skia:4202 BUG=skia:4238 Review URL: https://codereview.chromium.org/1327433003
* Rename flag from "distance field" to "device independent."Gravatar bsalomon2015-08-31
| | | | Review URL: https://codereview.chromium.org/1322433006
* Scanline decoding for bmpGravatar msarett2015-08-31
| | | | | | | | | | | | | Redesigns SkScanlineDecoder.h to indicate the ordering in which the scanlines are provided Refactors SkSwizzler::Fill() to include the zeroInit check and to actually be correct. BUG=skia:3257 BUG=skia:4198 Review URL: https://codereview.chromium.org/1287423002
* skia: add ability to load command_buffer_gles2Gravatar hendrikw2015-08-27
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1306823003
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Style Change: SkNEW->new; SkDELETE->deleteGravatar halcanary2015-08-26
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316123003 Review URL: https://codereview.chromium.org/1316123003
* Remove include of stdlib.h from SkTypes.h.Gravatar bungeman2015-08-26
| | | | | | | | | | | | | | | Unfortunately, immintrin.h (which is also included by SkTypes) includes xmmintrin.h which includes mm_malloc.h which includes stdlib.h for malloc even though, from the implementation, it is difficult to see why. Fortunately, arm_neon.h does not seem to be involved in such shenanigans, so building for Android will keep things sane. TBR=reed@google.com Doesn't change Skia API, just moves an include. Review URL: https://codereview.chromium.org/1313203003
* DM: "wb" (binary mode) may matter on WindowsGravatar mtklein2015-08-25
| | | | | | | | | | | I suspect we might be doing some funky /n -> /r/n translations without 'b'. This kills the PNG. BUG=skia: NOTREECHECKS=true Review URL: https://codereview.chromium.org/1303063008
* DM: use SkBitmap::reset()Gravatar mtklein2015-08-24
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1310373004
* Have DM manually encode its .png outputs.Gravatar mtklein2015-08-24
| | | | | | | | | | | | This eliminates some variability on various axes: different PNG encoders, different libpng versions, different formats (RGB, indexed), different unpremultiplication, different sRGB tags. BUG=skia: Committed: https://skia.googlesource.com/skia/+/3cc0dfffb70c0bd08ed8899efcd2e98da86a6ec7 CQ_EXTRA_TRYBOTS=client.skia:Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Debug-Trybot Review URL: https://codereview.chromium.org/1304443002
* 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
* Revert of Have DM manually encode its .png outputs. (patchset #2 id:20001 of ↵Gravatar mtklein2015-08-19
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1304443002/ ) Reason for revert: derek + Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Debug Original issue's description: > Have DM manually encode its .png outputs. > > This eliminates some variability on various axes: different PNG encoders, different libpng versions, different formats (RGB, indexed), different unpremultiplication, different sRGB tags. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/3cc0dfffb70c0bd08ed8899efcd2e98da86a6ec7 TBR=stephana@google.com,msarett@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1297383002
* Have DM manually encode its .png outputs.Gravatar mtklein2015-08-19
| | | | | | | | This eliminates some variability on various axes: different PNG encoders, different libpng versions, different formats (RGB, indexed), different unpremultiplication, different sRGB tags. BUG=skia: Review URL: https://codereview.chromium.org/1304443002