aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2014-12-05Remove PDF JPEG shortcut, since it fails on grayscale JPEGs.Hal Canary
BUG=436079 Review URL: https://codereview.chromium.org/767343002 Review URL: https://codereview.chromium.org/782023002
2014-11-25Cherry pick 'Fix yet another convexicator issue' to M40 branchRobert Phillips
URL of the original CL: https://codereview.chromium.org/727283003/ TBR=bsalomon@google.com BUG=433683 Review URL: https://codereview.chromium.org/761453002
2014-11-05Add mock context and use in ResourceCacheTest.bsalomon
BUG=skia:2889 Committed: https://skia.googlesource.com/skia/+/820dd6c335411aad889c1d7e8a857642ecd87e30 Review URL: https://codereview.chromium.org/702083003
2014-11-05Revert of Add mock context and use in ResourceCacheTest. (patchset #4 ↵bsalomon
id:60001 of https://codereview.chromium.org/702083003/) Reason for revert: Breaking tests Original issue's description: > Add mock context and use in ResourceCacheTest. > > BUG=skia:2889 > > Committed: https://skia.googlesource.com/skia/+/820dd6c335411aad889c1d7e8a857642ecd87e30 TBR=robertphillips@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2889 Review URL: https://codereview.chromium.org/704563004
2014-11-05Add mock context and use in ResourceCacheTest.bsalomon
BUG=skia:2889 Review URL: https://codereview.chromium.org/702083003
2014-11-05Add unit test for SkDashPathEffect::asPoints' cullingrobertphillips
This is a follow on to (Crop the fast path dashed lines to the cull rect - https://codereview.chromium.org/699623003/) Review URL: https://codereview.chromium.org/701133002
2014-11-04Allow all font weights on Android and respect overrides.bungeman
This removes the code which forces 400 and 700 weights only, and also overrides the font weight with the configured weight. Review URL: https://codereview.chromium.org/694533006
2014-11-04Fix PictureTest for new GPU vetojvanverth
NOTREECHECKS=true Review URL: https://codereview.chromium.org/702733002
2014-11-03Force input coverage to be only a byte in gpu shaders.egdaniel
Prime coverage invariant output calculations with single component BUG=skia: Review URL: https://codereview.chromium.org/649783003
2014-11-03Shrink saveLayer device bounds when it supplies an explicit bounds and has a ↵robertphillips
complex paint This CL shrinks the bound computed for saveLayers that possess both an explicit bound and a complex paint (e.g., one that affects transparent black). In this case the bound of the layer should be the clipped explicit bound rather then the clip prior/after the saveLayer/restore block. In the following the first bound is the currently computed bound while the second is the new/desired one: For a 100x100 picture saveLayer (no bound, no paint) [ 0 0 100 100 ] [ 50 50 100 100 ] setMatrix (translate 50, 50) [ 0 0 100 100 ] [ 50 50 100 100 ] saveLayer (bound of 0, 0, 50, 50 - complex paint) [ 0 0 100 100 ] [ 50 50 100 100 ] restore [ 0 0 100 100 ] [ 50 50 100 100 ] restore [ 0 0 100 100 ] [ 50 50 100 100 ] Review URL: https://codereview.chromium.org/696763002
2014-10-30Upgrade GPUOptimizerobertphillips
This will be a bit hairy to review. The FillBounds and CollectLayers code has diverged significantly resulting in the rendering path seeing different bounds than the hoisting path. This CL merges the FillBounds changes into CollectLayers. A follow on CL will, hopefully, find a way to layer CollectLayers on top of FillBounds. The only code in CollectLayers that is different from FillBounds is bracketed by "LAYER HOISTING" comments. NOTREECHECKS=true Review URL: https://codereview.chromium.org/685263004
2014-10-30Make RTree handle the case where the playback canvas has empty clip boundsjunov
BUG=skia:3074 Review URL: https://codereview.chromium.org/678303004
2014-10-30allow SkUserConfig.h to control NOGPUreed
BUG=skia: Review URL: https://codereview.chromium.org/685243002
2014-10-29cleanup reentrance logic in CMMjoshualitt
BUG=skia: Review URL: https://codereview.chromium.org/684223002
2014-10-29Revert of Use SkTypeface::getBounds() in bounding-box calculations. ↵mtklein
(patchset #5 id:80001 of https://codereview.chromium.org/680363003/) Reason for revert: Mac mini asserting Original issue's description: > Use SkTypeface::getBounds() in bounding-box calculations. > > This should produce tighter conservative bounding boxes for text than the > approximation code it replaces. > > Recording performance is neutral on my desktop. Playback performance > improves by up to 15% on text heavy pages, e.g. > > desk_pokemonwiki.skp_1 3.24ms -> 2.83ms 0.87x > desk_baidu.skp_1 1.91ms -> 1.58ms 0.83x > > Committed: https://skia.googlesource.com/skia/+/bf8dc343df4fbdcb8af546eb68b640e011a33489 > > CQ_EXTRA_TRYBOTS=client.skia:Test-Win7-ShuttleA-HD2000-x86-Debug-Trybot > > Committed: https://skia.googlesource.com/skia/+/c51add674dfb89b988a7fbc05f41838c203f9dcd TBR=reed@google.com,mtklein@chromium.org NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/690833002
2014-10-29Use SkTypeface::getBounds() in bounding-box calculations.mtklein
This should produce tighter conservative bounding boxes for text than the approximation code it replaces. Recording performance is neutral on my desktop. Playback performance improves by up to 15% on text heavy pages, e.g. desk_pokemonwiki.skp_1 3.24ms -> 2.83ms 0.87x desk_baidu.skp_1 1.91ms -> 1.58ms 0.83x Committed: https://skia.googlesource.com/skia/+/bf8dc343df4fbdcb8af546eb68b640e011a33489 CQ_EXTRA_TRYBOTS=client.skia:Test-Win7-ShuttleA-HD2000-x86-Debug-Trybot Review URL: https://codereview.chromium.org/680363003
2014-10-29Discard atlas after every MultiPictureDraw::drawrobertphillips
This is intended to prevent ghosting on tiled architectures. This CL also defers creation of the atlas (and its texture) until it is actually needed. Committed: https://skia.googlesource.com/skia/+/6d5b5455743414ddb11d2b8c1fe9d7959f2b853d Review URL: https://codereview.chromium.org/678403002
2014-10-29MultiPictureDraw is taskgroup aware.reed
SampleApp is multipicturedraw aware. BUG=skia: Review URL: https://codereview.chromium.org/684923002
2014-10-29Fix bounds computation of all 0-input filters.senorblanco
The SkRectShaderImageFilter had the same bug as previously fixed for SkBitmapSource and SkPictureImageFilter. Rather than copy-and-paste the implementation, this change makes all filters with 0 inputs return their source bounds, instead of returning false. BUG=427251 Review URL: https://codereview.chromium.org/681643003
2014-10-29Revert of Use SkTypeface::getBounds() in bounding-box calculations. ↵mtklein
(patchset #3 id:40001 of https://codereview.chromium.org/680363003/) Reason for revert: http://build.chromium.org/p/client.skia/builders/Test-Win7-ShuttleA-HD2000-x86-Debug/builds/97/steps/nanobench/logs/stdio Original issue's description: > Use SkTypeface::getBounds() in bounding-box calculations. > > This should produce tighter conservative bounding boxes for text than the > approximation code it replaces. > > Recording performance is neutral on my desktop. Playback performance > improves by up to 15% on text heavy pages, e.g. > > desk_pokemonwiki.skp_1 3.24ms -> 2.83ms 0.87x > desk_baidu.skp_1 1.91ms -> 1.58ms 0.83x > > Committed: https://skia.googlesource.com/skia/+/bf8dc343df4fbdcb8af546eb68b640e011a33489 TBR=reed@google.com,mtklein@chromium.org NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/685173002
2014-10-29Use SkTypeface::getBounds() in bounding-box calculations.mtklein
This should produce tighter conservative bounding boxes for text than the approximation code it replaces. Recording performance is neutral on my desktop. Playback performance improves by up to 15% on text heavy pages, e.g. desk_pokemonwiki.skp_1 3.24ms -> 2.83ms 0.87x desk_baidu.skp_1 1.91ms -> 1.58ms 0.83x Review URL: https://codereview.chromium.org/680363003
2014-10-28OptState owns program descriptorjoshualitt
BUG=skia: Review URL: https://codereview.chromium.org/674543004
2014-10-28rename GrTextureDesc->GrSurfaceDesc, GrTextureFlags->GrSurfaceFlagsbsalomon
Review URL: https://codereview.chromium.org/682223002
2014-10-28Removing dead code from CanvasTestpiotaixr
BUG=skia:3054 Review URL: https://codereview.chromium.org/681083002
2014-10-28Revert of harden pathops for pathological test (patchset #19 id:410001 of ↵hcm
https://codereview.chromium.org/633393002/) Reason for revert: Compile errors on bots Original issue's description: > These tests stress pathops by describing the union of circle-like paths that have tiny line segments embedded and double back to create near-coincident conditions. > > The fixes include > - detect when finding the active top loops between two possible answers > - preflight chasing winding to ensure answer is consistent > - binary search more often when quadratic intersection fails > - add more failure paths when an intersect is missed > > While this fixes the chrome bug, reenabling path ops in svg should be deferred until additional fixes are landed. > > TBR= > BUG=421132 > > Committed: https://skia.googlesource.com/skia/+/6f726addf3178b01949bb389ef83cf14a1d7b6b2 TBR=caryclark@google.com NOTREECHECKS=true NOTRY=true BUG=421132 Review URL: https://codereview.chromium.org/686843002
2014-10-28These tests stress pathops by describing the union of circle-like paths that ↵caryclark
have tiny line segments embedded and double back to create near-coincident conditions. The fixes include - detect when finding the active top loops between two possible answers - preflight chasing winding to ensure answer is consistent - binary search more often when quadratic intersection fails - add more failure paths when an intersect is missed While this fixes the chrome bug, reenabling path ops in svg should be deferred until additional fixes are landed. TBR= BUG=421132 Review URL: https://codereview.chromium.org/633393002
2014-10-28Alter layer hoisting to only hoist layers for one canvas at a timerobertphillips
This CL alters layer hoisting to defer creation of the free floating layers until they are actually needed (rather than creating _all_ the hoisted layers at the start). It also fixes a pre vs. post Concat bug with how matrices were being accumulated. BUG=skia:2315 Review URL: https://codereview.chromium.org/657383004
2014-10-28not a failure if we didn't load the test filereed
BUG=skia: Review URL: https://codereview.chromium.org/687453005
2014-10-27Revert of Fix bounds computation of all 0-input filters. (patchset #2 ↵hcm
id:20001 of https://codereview.chromium.org/681643003/) Reason for revert: try again Original issue's description: > Fix bounds computation of all 0-input filters. > > The SkRectShaderImageFilter had the same bug as previously fixed for > SkBitmapSource and SkPictureImageFilter. Rather than copy-and-paste > the implementation, this change makes all filters with 0 inputs return > their source bounds, instead of returning false. > > BUG=427251 > > Committed: https://skia.googlesource.com/skia/+/ba036cc82b5a543a13cafd11a19ba0e3087fca38 TBR=bsalomon@google.com,senorblanco@chromium.org NOTREECHECKS=true NOTRY=true BUG=427251 Review URL: https://codereview.chromium.org/678273002
2014-10-27Reenable assertions that were reported failing in tests/CanvasTest.cpppiotaixr
BUG=skia:498,skia:499 Review URL: https://codereview.chromium.org/670403002
2014-10-27Fix bounds computation of all 0-input filters.senorblanco
The SkRectShaderImageFilter had the same bug as previously fixed for SkBitmapSource and SkPictureImageFilter. Rather than copy-and-paste the implementation, this change makes all filters with 0 inputs return their source bounds, instead of returning false. BUG=427251 Review URL: https://codereview.chromium.org/681643003
2014-10-27Cut down SkBBH API more.mtklein
- The expected case is now a single bulk-load insert() call instead of N; - reserve() and flushDeferredInserts() can fold into insert() now; - SkBBH subclasses may take ownership of the bounds This appears to be a performance no-op on both my Mac and N5. I guess even the simplest indirect branch predictor ("same as last time") can predict the repeated virtual calls to SkBBH::insert() perfectly. BUG=skia: Review URL: https://codereview.chromium.org/670213002
2014-10-24Add `SkIRect bounds()` convenience method to SkImageInfo and SkBitmap.halcanary
Review URL: https://codereview.chromium.org/646213003
2014-10-24move c api into includereed
BUG=skia: Review URL: https://codereview.chromium.org/665203004
2014-10-24Add test for new FrontBufferedStream behavior.scroggo
Test for https://skia.googlesource.com/skia/+/dd5a1e094c19fa10202c37c50a1f799e5af5dac0 Verify that FrontBufferedStream does not attempt to read beyond the end of its underlying stream. Make SkStreamToCGImageSource handle an empty stream better. Review URL: https://codereview.chromium.org/641813009
2014-10-23Adding an option to render only the shadow in SkDropShadowImageFiltersugoi
This is basically how blink uses the filter. Currently, I can't use it for "ShadowOnly" mode with the filter at all, but instead of copying the code and risking to have the codepaths diverge, I'm simply going to add the option here. BUG=skia: Review URL: https://codereview.chromium.org/646213004
2014-10-23Add utils to better quantize grayscale values to three bit indices whilepavel
compressing coverage masks. Signed-off-by: Pavel Krajcevski <pavel@cs.unc.edu> BUG=skia: Review URL: https://codereview.chromium.org/669243003
2014-10-23add float equivalent in dumpHex output as commentcaryclark
R=reed@google.com,bsalomon@google.com Review URL: https://codereview.chromium.org/676803002
2014-10-23use SkMaskCache inside SkBlurMaskFilterreed
depends on https://codereview.chromium.org/670063004/ BUG=skia: Review URL: https://codereview.chromium.org/669993003
2014-10-23Revert of Add test for new FrontBufferedStream behavior. (patchset #1 id:1 ↵mtklein
of https://codereview.chromium.org/641813009/) Reason for revert: Test is SkASSERTing on Macs, e.g: http://chromegw.corp.google.com/i/client.skia/builders/Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Debug/builds/257/steps/dm/logs/stdio 210 tasks left 1737M peak 1ms test FrontBufferedStream../../src/ports/SkImageDecoder_CG.cpp:43: failed assertion "data" Signal 11: _sigtramp (+0x1a) SkStreamToCGImageSource(SkStream*) (+0x62) SkImageDecoder_CG::onDecode(SkStream*, SkBitmap*, SkImageDecoder::Mode) (+0x2e) SkImageDecoder::decode(SkStream*, SkBitmap*, SkColorType, SkImageDecoder::Mode) (+0x81) SkImageDecoder::DecodeStream(SkStreamRewindable*, SkBitmap*, SkColorType, SkImageDecoder::Mode, SkImageDecoder::Format*) (+0xff) SkImageDecoder::DecodeStream(SkStreamRewindable*, SkBitmap*) (+0x31) test_ShortFrontBufferedStream(skiatest::Reporter*) (+0x97) skiatest::ShortFrontBufferedStreamClass::onRun(skiatest::Reporter*) (+0x19) skiatest::Test::run() (+0x7c) DM::CpuTestTask::draw() (+0x5a) DM::CpuTask::run() (+0x9e) non-virtual thunk to DM::CpuTask::run() (+0x1c) (anonymous namespace)::ThreadPool::Loop(void*) (+0xf4) thread_start(void*) (+0x54) _pthread_start (+0x14b) Original issue's description: > Add test for new FrontBufferedStream behavior. > > Test for https://skia.googlesource.com/skia/+/dd5a1e094c19fa10202c37c50a1f799e5af5dac0 > > Verify that FrontBufferedStream does not attempt to read beyond the > end of its underlying stream. > > Committed: https://skia.googlesource.com/skia/+/da59f05c6738dbb9a92cad21c608cdfae53a76b2 TBR=reed@google.com,scroggo@google.com NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/649553003
2014-10-23Removed simple tests steps from CanvasTest.piotaixr
CanvasTest only checks if the state of the different canvas implementations are consistent with the one of the default implementation. Because most of the draw calls are stateless and already tested in GMs the test steps that exercices them are not useful. BUG=skia:3054 Review URL: https://codereview.chromium.org/672273002
2014-10-23Remove android specific genID from SkPaint.djsollen
Review URL: https://codereview.chromium.org/677453002
2014-10-23Add test for new FrontBufferedStream behavior.scroggo
Test for https://skia.googlesource.com/skia/+/dd5a1e094c19fa10202c37c50a1f799e5af5dac0 Verify that FrontBufferedStream does not attempt to read beyond the end of its underlying stream. Review URL: https://codereview.chromium.org/641813009
2014-10-23Add SkMaskCacheqiankun.miao
BUG=skia: Review URL: https://codereview.chromium.org/670063004
2014-10-22Qualify the return value of SkImageDecoder::decodescroggo
Add a new enum to differentiate between a complete decode and a partial decode (with the third value being failure). Return this value from SkImageDecoder::onDecode (in all subclasses, plus SkImageDecoder_empty) and ::decode. For convenience, if the enum is treated as a boolean, success and partial success are both considered true. Note that the static helper functions (DecodeFile etc) still return true and false (for one thing, this allows us to continue to use SkImageDecoder::DecodeMemory as an SkPicture::InstallPixelRefProc in SkPicture::CreateFromStream). Also correctly report failure in SkASTCImageDecoder::onDecode when SkTextureCompressor::DecompressBufferFromFormat fails. BUG=skia:3037 BUG:b/17419670 Review URL: https://codereview.chromium.org/647023006
2014-10-22SkResourceCache::Key namespace support.fmalita
Add a unique-per-subclass namespace tag to make Keys from different domains comparable. Also drop the SkPictureShader cache and convert to using the global resource cache instead. R=reed@google.com,mtklein@google.com,robertphillips@google.com Review URL: https://codereview.chromium.org/668223002
2014-10-22Track nested picture xform state for layer hoistingrobertphillips
The accumulated matrix state of any enclosing SkPictures must be stored separate from the picture-local CTM. Any setMatrix calls inside a layer need to replace the picture-local CTM but concatenate with the enclosing SkPicture transform state (and the transform state needed to translate the layer to the correct location in the cached GrTexture). Review URL: https://codereview.chromium.org/639863005
2014-10-21add round/ceil/etc. for SkMScalarreed
BUG=skia: TBR= Review URL: https://codereview.chromium.org/645793006
2014-10-21SkLazyPtr follow upsmtklein
- moves test to LazyPtrTest.cpp - adds the ability to use a Create() method with an argument BUG=skia: Review URL: https://codereview.chromium.org/669783002
2014-10-20Fix image filters for PDF backend.senorblanco
Currently, the PDF backend does not support image filters (since PDF does not have that functionality), so it simply removes them. This is causing Chrome print preview to render incorrectly (see bug). The fix here is to fall back to a raster device for image filters, as we used to do in Blink. The resulting bitmap will be drawn to the destination device as a normal main-memory-backed bitmap. Note: this change invalidates the PDF results of all GMs containing image filters (since they'll actually be rendered). BUG=422144 Review URL: https://codereview.chromium.org/644323006