Closed Bug 822132 Opened 13 years ago Closed 12 years ago

Only parts of canvas rendered when HWA is turned on (PDF.JS)

Categories

(Core :: Graphics: Canvas2D, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
firefox18 --- affected
firefox19 --- affected
firefox20 --- affected
firefox21 --- affected
firefox-esr17 --- unaffected

People

(Reporter: julian.viereck, Assigned: mattwoodrow)

References

Details

(Keywords: regression)

Attachments

(1 file)

This bug is reproduce able rendering page 11 of the tracemonkey paper using the helloworld example of PDF.JS. Expected result: - page 11 of the tracemonkey paper should be rendered completely to the canvas Actual result: - only the chart at the beginning of the page 11 is rendered and none of the following text If I set |layers.acceleration.disabled=true| in about:config, this bug is no longer reproduce able. Output of about:config with |layers.acceleration.disabled=false|: { "application": { "name": "Firefox", "version": "20.0a1", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20121216 Firefox/20.0", "supportURL": "http://support.mozilla.org/1/firefox/20.0a1/Darwin/en-US/" }, "modifiedPreferences": { "browser.cache.disk.capacity": 1048576, "browser.cache.disk.smart_size.first_run": false, "browser.cache.disk.smart_size_cached_value": 1048576, "browser.places.smartBookmarksVersion": 4, "browser.startup.homepage_override.mstone": "20.0a1", "browser.startup.homepage_override.buildID": "20121216030851", "extensions.lastAppVersion": "20.0a1", "gfx.blacklist.webgl.msaa": 4, "network.cookie.prefsMigrated": true, "places.history.expiration.transient_current_max_pages": 104858, "plugin.disable_full_page_plugin_for_types": "application/pdf", "privacy.sanitize.migrateFx3Prefs": true }, "graphics": { "numTotalWindows": 2, "numAcceleratedWindows": 2, "windowLayerManagerType": "OpenGL", "adapterDescription": "", "adapterVendorID": "0x8086", "adapterDeviceID": "0x 126", "adapterRAM": "", "adapterDrivers": "", "driverVersion": "", "driverDate": "", "webglRenderer": "Intel Inc. -- Intel HD Graphics 3000 OpenGL Engine", "info": { "AzureCanvasBackend": "quartz", "AzureFallbackCanvasBackend": "none", "AzureContentBackend": "none" } }, "javaScript": { "incrementalGCEnabled": true }, "accessibility": { "isActive": false, "forceDisabled": 0 }, "libraryVersions": { "NSPR": { "minVersion": "4.9.5 Beta", "version": "4.9.5 Beta" }, "NSS": { "minVersion": "3.14.1.0 Basic ECC", "version": "3.14.1.0 Basic ECC" }, "NSSUTIL": { "minVersion": "3.14.1.0", "version": "3.14.1.0" }, "NSSSSL": { "minVersion": "3.14.1.0 Basic ECC", "version": "3.14.1.0 Basic ECC" }, "NSSSMIME": { "minVersion": "3.14.1.0 Basic ECC", "version": "3.14.1.0 Basic ECC" } }, "userJS": { "exists": false }, "extensions": [ { "name": "about-downloads", "version": "0.2.3", "isActive": false, "id": "about-downloads@jetpack" }, { "name": "about:nosy", "version": "0.2", "isActive": false, "id": "jid1-O23HSUjp6N0lVA@jetpack" }, { "name": "Adblock Plus", "version": "2.2.1", "isActive": false, "id": "{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}" }, { "name": "Add-on Builder Helper", "version": "1.4", "isActive": false, "id": "jid0-t3eeRQgGANLCH9c50lPqcTDuNng@jetpack" }, { "name": "Always Right", "version": "1.2", "isActive": false, "id": "jid0-SzimoL45Ib8OddgoUBG0buQmjec@jetpack" }, { "name": "ChatZilla", "version": "0.9.89", "isActive": false, "id": "{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}" }, { "name": "ChromeBug", "version": "1.7.0b1", "isActive": false, "id": "chromebug@johnjbarton.com" }, { "name": "Collusion", "version": "0.15", "isActive": false, "id": "jid1-F9UJ2thwoAm5gQ@jetpack" }, { "name": "Customizable Shortcuts", "version": "0.5.10", "isActive": false, "id": "customizable-shortcuts@timtaubert.de" }, { "name": "Cycle Collector Analyzer, about:ccdump", "version": "0.4.3", "isActive": false, "id": "ccdump@getfirebug.com" }, { "name": "DOM Inspector", "version": "2.0.13", "isActive": false, "id": "inspector@mozilla.org" }, { "name": "DownThemAll!", "version": "2.0.15", "isActive": false, "id": "{DDC359D1-844A-42a7-9AA1-88A850A938A8}" }, { "name": "Firebug", "version": "1.11.1", "isActive": false, "id": "firebug@software.joehewitt.com" }, { "name": "Flashblock", "version": "1.5.15.1", "isActive": false, "id": "{3d7eb24f-2740-49df-8937-200b1cc08f8a}" }, { "name": "Floaty Scrollbar", "version": "0.1", "isActive": false, "id": "jid1-BGQHZVB2EcrgBw@jetpack" }, { "name": "Hide Menubar", "version": "6.0.20110915", "isActive": false, "id": "hidemenubar@moztw.org" }, { "name": "HTML5 Notifications", "version": "1.2", "isActive": false, "id": "html5notifications@paxal.net" }, { "name": "JavaScript Terminal", "version": "2.0", "isActive": false, "id": "jsterm@paulrouget.com" }, { "name": "JIT Inspector", "version": "0.3.0.0", "isActive": false, "id": "bhackett@mozilla.com" }, { "name": "jviereck (2)", "version": "initial.rev52", "isActive": false, "id": "jid0-oyWYFyzbB1MY3R44Xv3gCnZ8qQo@jetpack" }, { "name": "Live Scratchpad", "version": "0.3.0", "isActive": false, "id": "devtools-LiveScratchpad@mozilla.com" }, { "name": "Mass Password Reset", "version": "1.05", "isActive": false, "id": "masspasswordreset@johnathan.nightingale" }, { "name": "Memory Meter", "version": "0.2.2", "isActive": false, "id": "jid0-rPVfV5hsOVtkmfHWDnYqpd1QC9k@jetpack" }, { "name": "Mozilla Labs App Runtime", "version": "0.5.1", "isActive": false, "id": "openwebapps@mozillalabs.com" }, { "name": "Mozilla Labs: Prospector - AwesomeBar HD", "version": "14", "isActive": false, "id": "awesomeBar.HD@prospector.labs.mozilla" }, { "name": "Mozilla Labs: Prospector - Home Dash", "version": "11", "isActive": false, "id": "home.dash@prospector.labs.mozilla" }, { "name": "Mozilla Labs: Prospector - OneLiner", "version": "2", "isActive": false, "id": "oneLiner@prospector.labs.mozilla" }, { "name": "Mozilla Labs: Prospector - Tab Focus", "version": "2", "isActive": false, "id": "tabfocus@prospector.labs.mozilla" }, { "name": "PasswordGenerator", "version": "0.1a.rev51", "isActive": false, "id": "jid0-ohYqGx4BM9lYq775lMyKtvxnCAQ@jetpack" }, { "name": "PDF Viewer", "version": "0.7.14", "isActive": false, "id": "uriloader@pdf.js" }, { "name": "playplus", "version": "0.0.0.1", "isActive": false, "id": "{5d2b3e63-48f9-407c-b08c-28d4e4402d9c}" }, { "name": "Print / Print Preview (Update)", "version": "0.7.7", "isActive": false, "id": "printprintpreview-andrewsfirefoxextensions@gmail.com" }, { "name": "Print/Print Preview", "version": "0.9", "isActive": false, "id": "{19EB90DC-A456-458b-8AAC-616D91AAFCE1}" }, { "name": "QuickFox Notes", "version": "2.7.8", "isActive": false, "id": "amin.eft_bmnotes@gmail.com" }, { "name": "Ready to Deliver to Boot to Gecko", "version": "0.3", "isActive": false, "id": "r2d2b2g@mozilla.org" }, { "name": "ReminderFox", "version": "2.0.2", "isActive": false, "id": "{ada4b710-8346-4b82-8199-5de2b400a6ae}" }, { "name": "RESTClient", "version": "2.0.3", "isActive": false, "id": "{ad0d925d-88f8-47f1-85ea-8463569e756e}" }, { "name": "sky-edit", "version": "0.0.2", "isActive": false, "id": "jid0-YZAvwrSjpo40iuJw0XpWTq4rfDI@jetpack" }, { "name": "sky-edit", "version": "0.4.2", "isActive": false, "id": "sky-edit@jetpack" }, { "name": "SPDY indicator", "version": "2.1", "isActive": false, "id": "spdyindicator@chengsun.github.com" }, { "name": "Test Pilot", "version": "1.2.2", "isActive": false, "id": "testpilot@labs.mozilla.com" }, { "name": "Text to Voice", "version": "1.10", "isActive": false, "id": "text2voice@vik.josh" }, { "name": "Tree Style Tab", "version": "0.14.2012111201", "isActive": false, "id": "treestyletab@piro.sakura.ne.jp" }, { "name": "User Agent RG", "version": "1.0", "isActive": false, "id": "useragentrg@mozilla.org" }, { "name": "User Agent Switcher", "version": "0.7.3", "isActive": false, "id": "{e968fc70-8f95-4ab9-9e79-304de2a71ee1}" } ] }
This bug is reproduceable with FF 18.0.2 and NOT with FF 17.0.2 using a clean profile with |layers.acceleration.disabled=false| in about:config, which is the default option.
I can reproduce this on my mac mini (running OS X 10.6.8). jviereck said he's at a location w/ slow internet at the moment, so I tracked down the nightly regression range: { Last good nightly: 2012-10-11 First bad nightly: 2012-10-12 Pushlog: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=99898ec9976a&tochange=1301a72b1c39 }
Inbound: GOOD: 20121010233102 http://hg.mozilla.org/integration/mozilla-inbound/rev/20f9a0406524 BAD: 20121011192402 http://hg.mozilla.org/integration/mozilla-inbound/rev/038ef23a04cd Pushlog: https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=20f9a0406524&tochange=038ef23a04cd Narrowed pushlog, w/ intersection of the inbound & m-c regression ranges: https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=20f9a0406524&tochange=19cfc27b2c67 (Not sure offhand what in that log is responsible; there are several canvas-related changes in there.)
I would bet this one: http://hg.mozilla.org/mozilla-central/rev/52fdb83ca8b8 52fdb83ca8b8 Robert O'Callahan — Bug 798990. Part 2: nsCanvasRenderingContext2DAzure::EnsureTarget must ensure that a full layer transaction occurs, because we may have transitioned from needing no display item or layer to needing them. r=mattwoodrow @dholbert, can you do build before/after (seems like you have setup your machine already?) and see if that's really the bad changeset or should we /cc roc right away?
Sure. My mac is kinda slow at builds, so it might be an hour or two, but I'll post results when I've got 'em.
(In reply to Julian Viereck from comment #4) > I would bet this one: > > http://hg.mozilla.org/mozilla-central/rev/52fdb83ca8b8 My targeted builds of that cset and its parent (ca18c9aedc67) both reproduce the bug. So, I don't think that cset is responsible -- it's something earlier.
Actually, not much earlier at all -- turns out the problem starts with that parent cset (which just "part 1" of the same bug that jviereck suspected in comment 4): { ca18c9aedc67 Robert O'Callahan — Bug 798990. No need to call EnsureTarget just to paint nothing. Anyway it's not safe to call it during a paint. r=kft }
Blocks: 798990
Thanks a lot Daniel!
The testcase works fine on Windows with and without acceleration. I think something Mac-specific is going on here. Hopefully Matt can help.
Assignee: nobody → matt.woodrow
I don't have any ideas here. I can confirm the regression range at least. The canvas surface that we are uploading to GL layers doesn't contain the text, so it looks like we just give up drawing halfway through the page. What I can't figure out is how this is affected by changing when we allocate the canvas buffer (first composite vs first draw) or layer manager (BasicLayers vs OpenGL).
set a breakpoint on _cairo_error?
Yep, tried that. This should all be through Azure anyway. The glyphs being sent to DrawTargetCG::FillGlyphs look sane, as does the current transform at the time (both on the DT and the CGContext).
Matt's patch 716816 on bug 835045 fixes this for me.
Fixed for me and also confirmed by this comment: https://bugzilla.mozilla.org/show_bug.cgi?id=835045#c9.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Depends on: 835045
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: