Bug when CanvasRenderingContext2D.filter is invert(100%)
Reported by
gv.nish...@gmail.com,
Aug 15 2016
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36 Steps to reproduce the problem: http://jsfiddle.net/sapics/800nfj6g/11/ What is the expected behavior? What went wrong? When I set ctx.filter to 'invert(100%)', it appears unexpected line in some cases. I do not know why, but you may or may not appear depending on the size of the browser. Did this work before? No Chrome version: 52.0.2743.82 Channel: n/a OS Version: 10.0 Flash Version: Shockwave Flash 22.0 r0
,
Aug 17 2016
Able to reproduce the issue on windows 7 using chrome version 52.0.2743.116 and canary 54.0.2830.0. This is regression issue broken in M52.Please find the bisect information as below Narrow Bisect:: Good :: 52.0.2723.0 -- (official build revision 391139) Bad :: 52.0.2724.0 -- (official build revision 391399) CHANGELOG URL: ================= https://chromium.googlesource.com/chromium/src/+log/a4bd42ba95dfa2be77c4a9db6388e97270046dea..01089137a7646403fb0f7835259a52206a16ecc3 Possible suspect from the above CL https://chromium.googlesource.com/chromium/src/+/d4f797cd6ccadb8d109ca6b8daabb96adc191fe5 ajuma@ Could you please look into this issue if it is related to your change,else please help us in finding the appropriate owner for this issue. Thanks,
,
Aug 17 2016
This only reproduces with accelerated canvas enabled, and doesn't seem to reproduce on Mac or Linux. Here's a reduced test case: http://jsfiddle.net/800nfj6g/53/ Note that the filter is actually a no-op (opacity(100%)) in this example.
,
Aug 17 2016
Also, the bug doesn't seem to reproduce when reloading the test page, it only reproduces on the initial page load.
,
Aug 19 2016
This is triggered by GrCaps::preferVRAMUseOverFlushes being false (it's only false on Windows). Changing this to true on Windows fixes the bug (and changing it to false on Linux causes the bug to repro there). When preferVRAMUseOverFlushes is false, GrResourceCache::findAndRefScratchResource can (by design) return a resource that still has pending IO. The problem seems to be that this pending IO isn't getting flushed when we have a filter. GrTextureStripAtlas::lockRow (which gets called during ColorTableEffect::Make) passes kDontFlush_PixelOpsFlag to GrTexture::writePixels, which causes a flush in GrContext::writeSurfacePixels to get skipped. Removing this flag also fixes the bug. Perhaps the right fix is to only pass this flag when preferVRAMUseOverFlushes is true.
,
Aug 19 2016
I wonder if this a bug in GrTextureStripAtlas. I believe that object is supposed to track pending reads on a row-by-row basis and not overwrite rows that have a pending read. Hence, it is supposed to be safe to pass the kDontFlush flag. If there are no free rows then it should flush.
,
Aug 19 2016
Quickly scanning at the code, it looks like perhaps GrTextureStripAtlas::AtlasRow* GrTextureStripAtlas::getLRU() should return null if the lru row has locks.
,
Aug 19 2016
Another thought: GrTextureStripAtlas protects against overwriting its own earlier writes using per-row lock counts. However, that doesn't protect against writes that were pending when the atlas first grabbed its texture. I think we need ensure any pending texture IO is flushed after the texture is newly acquired in GrTexureStripAtlas::lockTexture (inside the if in that function).
,
Aug 19 2016
Thanks, flushing pending texture IO in GrTextureStripAtlas::lockTexture when first grabbing the texture works! (Changing getLRU to return null if the lru row has locks doesn't seem to make a difference; I believe the existing logic already ensures that rows with locks don't make it into the LRU list.)
,
Aug 24 2016
The following revision refers to this bug: https://skia.googlesource.com/skia.git/+/95243ebb68cae9ff4821ea57b9a32a194f2a87cf commit 95243ebb68cae9ff4821ea57b9a32a194f2a87cf Author: ajuma <ajuma@chromium.org> Date: Wed Aug 24 15:19:02 2016 Make GrTextureStripAtlas flush pending IO on newly acquired texture GrTextureStripAtlas uses its own lock counts to protect against overwriting its own earlier writes, but that doesn't protect against IO that was pending when a texture was first acquired. BUG= chromium:637678 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2262233002 Review-Url: https://codereview.chromium.org/2262233002 [modify] https://crrev.com/95243ebb68cae9ff4821ea57b9a32a194f2a87cf/gyp/gpu.gypi [modify] https://crrev.com/95243ebb68cae9ff4821ea57b9a32a194f2a87cf/include/gpu/GrContext.h [rename] https://crrev.com/95243ebb68cae9ff4821ea57b9a32a194f2a87cf/include/private/GrTextureStripAtlas.h [modify] https://crrev.com/95243ebb68cae9ff4821ea57b9a32a194f2a87cf/src/effects/SkTableColorFilter.cpp [modify] https://crrev.com/95243ebb68cae9ff4821ea57b9a32a194f2a87cf/src/effects/gradients/SkGradientShader.cpp [modify] https://crrev.com/95243ebb68cae9ff4821ea57b9a32a194f2a87cf/src/gpu/GrContext.cpp [modify] https://crrev.com/95243ebb68cae9ff4821ea57b9a32a194f2a87cf/src/gpu/effects/GrTextureStripAtlas.cpp [add] https://crrev.com/95243ebb68cae9ff4821ea57b9a32a194f2a87cf/tests/GrTextureStripAtlasTest.cpp
,
Aug 24 2016
The following revision refers to this bug: https://skia.googlesource.com/skia.git/+/8c99eabdd92d4fbdbcb74e979b527cdbf066b138 commit 8c99eabdd92d4fbdbcb74e979b527cdbf066b138 Author: ajuma <ajuma@chromium.org> Date: Wed Aug 24 19:09:12 2016 Fix leak in GrTextureStripAtlasTest This is a followup to https://codereview.chromium.org/2262233002/, adding a missing call to GrTextureStripAtlas::unlockRow. BUG= chromium:637678 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2272953003 Review-Url: https://codereview.chromium.org/2272953003 [modify] https://crrev.com/8c99eabdd92d4fbdbcb74e979b527cdbf066b138/tests/GrTextureStripAtlasTest.cpp
,
Aug 24 2016
,
Aug 24 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5005b3d5d481d6777ffeb1b41603843e9df50458 commit 5005b3d5d481d6777ffeb1b41603843e9df50458 Author: skia-deps-roller <skia-deps-roller@chromium.org> Date: Wed Aug 24 22:52:40 2016 Roll src/third_party/skia/ 3bf7509c3..168261287 (17 commits). https://chromium.googlesource.com/skia.git/+log/3bf7509c3f68..168261287136 $ git log 3bf7509c3..168261287 --date=short --no-merges --format='%ad %ae %s' 2016-08-24 caryclark mark fuzz test flaky since it may fail on some platforms 2016-08-24 halcanary gyp/sfntly: set SK_SFNTLY_SUBSETTER uniformly 2016-08-24 mtklein GN: guard tools (except fiddle) by skia_enable_tools. 2016-08-24 mtklein SkPngCodec: voidp instead of forward-declares for png.h types. 2016-08-24 ajuma Fix leak in GrTextureStripAtlasTest 2016-08-24 bungeman s/invertable/invertible 2016-08-24 caryclark tiny line breaks gl render 2016-08-24 fmalita Fix SkTLazy(const T*) initialization 2016-08-24 mtklein GN: Fuchsia probably cannot link without this. 2016-08-24 halcanary SkPDF: vector canvases can't hint! 2016-08-24 mtklein GN: more optional components: jpeg, pdf, png, xml 2016-08-24 caryclark remove point aliases 2016-08-24 halcanary SkPDF: vertical writing: draw nothing 2016-08-24 bungeman Add simple font fallback on Mac. 2016-08-24 ajuma Make GrTextureStripAtlas flush pending IO on newly acquired texture 2016-08-24 msarett Parse ICC profiles from webps 2016-08-24 egdaniel Add addtional resolve calls to vulkan backend BUG= 637678 , 640176 , 637571 , 637678 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel TBR=bungeman@google.com Review-Url: https://codereview.chromium.org/2274283002 Cr-Commit-Position: refs/heads/master@{#414184} [modify] https://crrev.com/5005b3d5d481d6777ffeb1b41603843e9df50458/DEPS |
||||
►
Sign in to add a comment |
||||
Comment 1 by f...@opera.com
, Aug 15 2016