fix: port OSR code to new viz compositor codepath (#17538)
* fix: make OSR work with viz compositor * fix: update OSR patch * fix: update patch again * fix: update viz_osr.patch for macOS * fix: gn check warnings * chore: no need to change SoftwareOutputDeviceWinProxy * chore: add check in case we missed something * fix: consider scale factor when compare size * fix: make GPU OSR work * fix: autofill popups with OSR * chore: use UNIX line ending for osr_video_consumer * chore: code is already in defined(OS_MACOSX) * fix: share same OSR implementation on macOS This should also fix the crash when there is navigation on macOS. * test: osr window should not crash after navigation * fix: make osr work on Mac properly * fix: software osr on windows * fix: software osr on Linux * fix: compilation error introduced with rebase * fix: split local surface id allocation into two * Update osr_host_display_client_mac.mm * chore: update copyright year * fix: update patch
This commit is contained in:
parent
1478bd36fd
commit
81bf15877f
22 changed files with 1302 additions and 777 deletions
|
@ -3702,14 +3702,18 @@ describe('BrowserWindow module', () => {
|
|||
w.webContents.once('paint', function (event, rect, data) {
|
||||
assert.notStrictEqual(data.length, 0)
|
||||
const size = data.getSize()
|
||||
const scale = process.platform === 'darwin' ? devicePixelRatio : 1
|
||||
assertWithinDelta(size.width, 100 * scale, 2, 'width')
|
||||
assertWithinDelta(size.height, 100 * scale, 2, 'height')
|
||||
assertWithinDelta(size.width, 100 * devicePixelRatio, 2, 'width')
|
||||
assertWithinDelta(size.height, 100 * devicePixelRatio, 2, 'height')
|
||||
done()
|
||||
})
|
||||
w.loadFile(path.join(fixtures, 'api', 'offscreen-rendering.html'))
|
||||
})
|
||||
|
||||
it('does not crash after navigation', () => {
|
||||
w.webContents.loadURL('about:blank')
|
||||
w.loadFile(path.join(fixtures, 'api', 'offscreen-rendering.html'))
|
||||
})
|
||||
|
||||
describe('window.webContents.isOffscreen()', () => {
|
||||
it('is true for offscreen type', () => {
|
||||
w.loadFile(path.join(fixtures, 'api', 'offscreen-rendering.html'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue