Skip to content

webgl: Clear the drawing buffer when preserveDrawingBuffer is false. - #24386

Merged
bors-servo merged 2 commits into
servo:masterfrom
jdm:no-preserve-drawing-buffer
Oct 10, 2019
Merged

bors-servo merged 2 commits into
servo:masterfrom
jdm:no-preserve-drawing-buffer

Conversation

@jdm

@jdm jdm commented Oct 7, 2019 •

Copy link
Copy Markdown
Member

This adds an explicit clear operation to a webgl canvas when the preserveDrawingBuffer attribute is false when creating the context. Because we're not using double buffering this may end up making some demos worse (ie. a clear operation at a random time while drawing a frame), but this problem is expected to go away when #24256 is fixed and we move to a multi-buffered frame setup. This change is important at this time because so many babylon.js demos rely on the engine clearing the frame, per the specification.



This change is Reviewable

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 7, 2019
@jdm

jdm commented Oct 7, 2019

Copy link
Copy Markdown
Member Author

@bors-servo try=wpt

bors-servo pushed a commit that referenced this pull request Oct 7, 2019
webgl: Clear the drawing buffer when preserveDrawingBuffer is false.

This adds an explicit clear operation to a webgl canvas when the preserveDrawingBuffer attribute is false when creating the context. Because we're not using double buffering this may end up making some demos worse (ie. a clear operation at a random time while drawing a frame), but this problem is expected to go away when #24256 is fixed and we move to a multi-buffered frame setup. This change is important at this time because so many babylon.js demos rely on the engine clearing the frame, per the specification.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21132
- [x] There are tests for these changes
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit 93578d2 with merge 2578d29...

@jdm

jdm commented Oct 7, 2019

Copy link
Copy Markdown
Member Author

@paulrouget See if this change makes the babylon demos more bearable.

@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel-css

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-tests-failed The changes caused existing tests to fail. labels Oct 7, 2019
@jdm

jdm commented Oct 8, 2019

Copy link
Copy Markdown
Member Author

@bors-servo try=wpt

@bors-servo

Copy link
Copy Markdown
Contributor

🔒 Merge conflict

@jdm
jdm force-pushed the no-preserve-drawing-buffer branch from 8333962 to 7d51382 Compare October 8, 2019 17:20
@jdm

jdm commented Oct 8, 2019

Copy link
Copy Markdown
Member Author

@bors-servo try=wpt

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit 7d51382 with merge ad1d8fe...

bors-servo pushed a commit that referenced this pull request Oct 8, 2019
webgl: Clear the drawing buffer when preserveDrawingBuffer is false.

This adds an explicit clear operation to a webgl canvas when the preserveDrawingBuffer attribute is false when creating the context. Because we're not using double buffering this may end up making some demos worse (ie. a clear operation at a random time while drawing a frame), but this problem is expected to go away when #24256 is fixed and we move to a multi-buffered frame setup. This change is important at this time because so many babylon.js demos rely on the engine clearing the frame, per the specification.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21132
- [x] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24386)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel-wpt

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Oct 8, 2019
@bors-servo

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #24333) made this pull request unmergeable. Please resolve the merge conflicts.

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Oct 8, 2019
@paulrouget

Copy link
Copy Markdown
Contributor

Latest change in this PR vastly improve the babylonjs demos!

@paulrouget

Copy link
Copy Markdown
Contributor

The exception is the basic demo, where the mesh turns black.

@paulrouget

Copy link
Copy Markdown
Contributor

Also Mansion demo still have the trail.

@jdm
jdm force-pushed the no-preserve-drawing-buffer branch from 7d51382 to cbad0cc Compare October 9, 2019 14:27
@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Oct 9, 2019
@jdm
jdm force-pushed the no-preserve-drawing-buffer branch 2 times, most recently from 10c6840 to d2b52c1 Compare October 9, 2019 14:30
@jdm

jdm commented Oct 9, 2019

Copy link
Copy Markdown
Member Author

r? @nox

The latest commit is largely cherry-picked from pcwalton@8ea6337, which is part of the ongoing WebGL rewrite that pcwalton is working on. It includes:

  • a single point at the end of each script task that causes all dirty webgl canvases to signal the end of a frame
  • simplifying the layout integration with webgl canvases

@jdm jdm removed the S-needs-rebase There are merge conflict errors. label Oct 9, 2019
@nox

nox commented Oct 9, 2019

Copy link
Copy Markdown
Contributor

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit d2b52c1 has been approved by nox

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Oct 9, 2019
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit d2b52c1 with merge 7890234...

bors-servo pushed a commit that referenced this pull request Oct 9, 2019
webgl: Clear the drawing buffer when preserveDrawingBuffer is false.

This adds an explicit clear operation to a webgl canvas when the preserveDrawingBuffer attribute is false when creating the context. Because we're not using double buffering this may end up making some demos worse (ie. a clear operation at a random time while drawing a frame), but this problem is expected to go away when #24256 is fixed and we move to a multi-buffered frame setup. This change is important at this time because so many babylon.js demos rely on the engine clearing the frame, per the specification.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21132
- [x] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24386)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - status-taskcluster

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Oct 9, 2019
@CYBAI

CYBAI commented Oct 10, 2019

Copy link
Copy Markdown
Member

I guess this is related 👀 ?

angle smoketest failures
C:\Users\task_1570628879\repo>mach smoketest --angle 
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.0
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
Where's the WebGL channel? (thread ScriptThread PipelineId { namespace_id: PipelineNamespaceId(1), index: PipelineIndex(1) }, at src\libcore\option.rs:1190)
stack backtrace:
   0: backtrace::backtrace::trace_unsynchronized<closure-0> (0x7ff729abb642)
             at C:\Users\task_1570628879\.cargo\registry\src\github.com-1ecc6299db9ec823\backtrace-0.3.35\src\backtrace\mod.rs:66
   1: backtrace::backtrace::trace<closure-0> (0x7ff729abb570)
             at C:\Users\task_1570628879\.cargo\registry\src\github.com-1ecc6299db9ec823\backtrace-0.3.35\src\backtrace\mod.rs:53
   2: backtrace::capture::Backtrace::create (0x7ff72516bbe8)
             at C:\Users\task_1570628879\.cargo\registry\src\github.com-1ecc6299db9ec823\backtrace-0.3.35\src\capture.rs:163
   3: backtrace::capture::Backtrace::new (0x7ff72516bb24)
             at C:\Users\task_1570628879\.cargo\registry\src\github.com-1ecc6299db9ec823\backtrace-0.3.35\src\capture.rs:127
   4: servo::main::{{closure}} (0x7ff7226a111b)
             at C:\Users\task_1570628879\repo\ports\glutin\main2.rs:116
   5: std::panicking::rust_panic_with_hook (0x7ff72518ba9d)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\/src\libstd\panicking.rs:477
   6: std::panicking::continue_panic_fmt (0x7ff72518b5e4)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\/src\libstd\panicking.rs:380
   7: std::panicking::rust_begin_panic (0x7ff72518b4c9)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\/src\libstd\panicking.rs:307
   8: core::panicking::panic_fmt (0x7ff72519ea89)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\/src\libcore\panicking.rs:84
   9: core::option::expect_failed (0x7ff72519eaf6)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\/src\libcore\option.rs:1190
  10: core::option::Option<script::dom::webglrenderingcontext::WebGLCommandSender>::expect<script::dom::webglrenderingcontext::WebGLCommandSender> (0x7ff72562ad14)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\src\libcore\option.rs:345
  11: script::dom::document::Document::flush_dirty_canvases (0x7ff72571a206)
             at C:\Users\task_1570628879\repo\components\script\dom\document.rs:2504
  12: script::dom::window::Window::force_reflow (0x7ff725b351c1)
             at C:\Users\task_1570628879\repo\components\script\dom\window.rs:1526
  13: script::dom::window::Window::reflow (0x7ff725b36d29)
             at C:\Users\task_1570628879\repo\components\script\dom\window.rs:1632
  14: script::dom::document::Document::finish_load (0x7ff725713a7d)
             at C:\Users\task_1570628879\repo\components\script\dom\document.rs:1769
  15: script::dom::servoparser::ServoParser::finish (0x7ff7238315a5)
             at C:\Users\task_1570628879\repo\components\script\dom\servoparser\mod.rs:593
  16: script::dom::servoparser::ServoParser::do_parse_sync (0x7ff7238306fb)
             at C:\Users\task_1570628879\repo\components\script\dom\servoparser\mod.rs:525
  17: script::dom::servoparser::{{impl}}::parse_sync::{{closure}} (0x7ff7238303b6)
             at C:\Users\task_1570628879\repo\components\script\dom\servoparser\mod.rs:498
  18: profile_traits::time::profile<(),closure-0> (0x7ff7279cf30d)
             at C:\Users\task_1570628879\repo\components\profile_traits\time.rs:146
  19: script::dom::servoparser::ServoParser::parse_sync (0x7ff723830290)
             at C:\Users\task_1570628879\repo\components\script\dom\servoparser\mod.rs:490
  20: script::dom::servoparser::{{impl}}::process_response_eof (0x7ff7238346db)
             at C:\Users\task_1570628879\repo\components\script\dom\servoparser\mod.rs:853
  21: script::script_thread::ScriptThread::handle_fetch_eof (0x7ff7257a7648)
             at C:\Users\task_1570628879\repo\components\script\script_thread.rs:3775
  22: script::script_thread::ScriptThread::handle_msg_from_constellation (0x7ff72578652c)
             at C:\Users\task_1570628879\repo\components\script\script_thread.rs:1819
  23: script::script_thread::{{impl}}::handle_msgs::{{closure}} (0x7ff725781493)
             at C:\Users\task_1570628879\repo\components\script\script_thread.rs:1549
  24: script::script_thread::ScriptThread::profile_event<closure-5,core::option::Option<bool>> (0x7ff725785810)
             at C:\Users\task_1570628879\repo\components\script\script_thread.rs:1785
  25: script::script_thread::ScriptThread::handle_msgs (0x7ff72577efac)
             at C:\Users\task_1570628879\repo\components\script\script_thread.rs:1543
  26: script::script_thread::ScriptThread::start (0x7ff72577c6f8)
             at C:\Users\task_1570628879\repo\components\script\script_thread.rs:1376
  27: script::script_thread::{{impl}}::create::{{closure}}::{{closure}} (0x7ff7257753f3)
             at C:\Users\task_1570628879\repo\components\script\script_thread.rs:803
  28: profile_traits::mem::ProfilerChan::run_with_memory_reporting<closure-1,fn(profile_traits::mem::ReportsChan) -> script::script_runtime::CommonScriptMsg,script::script_runtime::CommonScriptMsg,crossbeam_channel::channel::Sender<script::script_thread::MainTh (0x7ff7279ca77a)
             at C:\Users\task_1570628879\repo\components\profile_traits\mem.rs:88
  29: script::script_thread::{{impl}}::create::{{closure}} (0x7ff725775afe)
             at C:\Users\task_1570628879\repo\components\script\script_thread.rs:801
  30: std::sys_common::backtrace::__rust_begin_short_backtrace<closure-0,()> (0x7ff7258f40b6)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\src\libstd\sys_common\backtrace.rs:126
  31: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}<closure-0,()> (0x7ff72733fcc6)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\src\libstd\thread\mod.rs:470
  32: std::panic::{{impl}}::call_once<(),closure-0> (0x7ff7238d84e6)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\src\libstd\panic.rs:315
  33: std::panicking::try::do_call<std::panic::AssertUnwindSafe<closure-0>,()> (0x7ff728e7f9f2)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\src\libstd\panicking.rs:292
  34: panic_unwind::__rust_maybe_catch_panic (0x7ff725197f32)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\/src\libpanic_unwind\lib.rs:80
  35: std::panicking::try<(),std::panic::AssertUnwindSafe<closure-0>> (0x7ff728d6fda3)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\src\libstd\panicking.rs:271
  36: std::panic::catch_unwind<std::panic::AssertUnwindSafe<closure-0>,()> (0x7ff723987956)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\src\libstd\panic.rs:394
  37: std::thread::{{impl}}::spawn_unchecked::{{closure}}<closure-0,()> (0x7ff72733ea7c)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\src\libstd\thread\mod.rs:469
  38: core::ops::function::FnOnce::call_once<closure-0,()> (0x7ff7258fd4c3)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\src\libcore\ops\function.rs:227
  39: alloc::boxed::{{impl}}::call_once<(),FnOnce<()>> (0x7ff725176927)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\src\liballoc\boxed.rs:922
  40: std::sys::windows::thread::{{impl}}::new::thread_start (0x7ff725196557)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\/src\libstd\sys\windows\thread.rs:47
  41: BaseThreadInitThunk (0x7ffc9c7684d4)
  42: RtlUserThreadStart (0x7ffc9d21e851)
[2019-10-09T17:18:40Z ERROR servo] Where's the WebGL channel?
Where's the WebGL channel? (thread ScriptThread PipelineId { namespace_id: PipelineNamespaceId(1), index: PipelineIndex(2) }, at src\libcore\option.rs:1190)
stack backtrace:
   0: backtrace::backtrace::trace_unsynchronized<closure-0> (0x7ff729abb642)
             at C:\Users\task_1570628879\.cargo\registry\src\github.com-1ecc6299db9ec823\backtrace-0.3.35\src\backtrace\mod.rs:66
   1: backtrace::backtrace::trace<closure-0> (0x7ff729abb570)
             at C:\Users\task_1570628879\.cargo\registry\src\github.com-1ecc6299db9ec823\backtrace-0.3.35\src\backtrace\mod.rs:53
   2: backtrace::capture::Backtrace::create (0x7ff72516bbe8)
             at C:\Users\task_1570628879\.cargo\registry\src\github.com-1ecc6299db9ec823\backtrace-0.3.35\src\capture.rs:163
   3: backtrace::capture::Backtrace::new (0x7ff72516bb24)
             at C:\Users\task_1570628879\.cargo\registry\src\github.com-1ecc6299db9ec823\backtrace-0.3.35\src\capture.rs:127
   4: servo::main::{{closure}} (0x7ff7226a111b)
             at C:\Users\task_1570628879\repo\ports\glutin\main2.rs:116
   5: std::panicking::rust_panic_with_hook (0x7ff72518ba9d)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\/src\libstd\panicking.rs:477
   6: std::panicking::continue_panic_fmt (0x7ff72518b5e4)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\/src\libstd\panicking.rs:380
   7: std::panicking::rust_begin_panic (0x7ff72518b4c9)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\/src\libstd\panicking.rs:307
   8: core::panicking::panic_fmt (0x7ff72519ea89)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\/src\libcore\panicking.rs:84
   9: core::option::expect_failed (0x7ff72519eaf6)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\/src\libcore\option.rs:1190
  10: core::option::Option<script::dom::webglrenderingcontext::WebGLCommandSender>::expect<script::dom::webglrenderingcontext::WebGLCommandSender> (0x7ff72562ad14)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\src\libcore\option.rs:345
  11: script::dom::document::Document::flush_dirty_canvases (0x7ff72571a206)
             at C:\Users\task_1570628879\repo\components\script\dom\document.rs:2504
  12: script::dom::window::Window::force_reflow (0x7ff725b351c1)
             at C:\Users\task_1570628879\repo\components\script\dom\window.rs:1526
  13: script::dom::window::Window::reflow (0x7ff725b36d29)
             at C:\Users\task_1570628879\repo\components\script\dom\window.rs:1632
  14: script::dom::document::Document::finish_load (0x7ff725713a7d)
             at C:\Users\task_1570628879\repo\components\script\dom\document.rs:1769
  15: script::dom::servoparser::ServoParser::finish (0x7ff7238315a5)
             at C:\Users\task_1570628879\repo\components\script\dom\servoparser\mod.rs:593
  16: script::dom::servoparser::ServoParser::do_parse_sync (0x7ff7238306fb)
             at C:\Users\task_1570628879\repo\components\script\dom\servoparser\mod.rs:525
  17: script::dom::servoparser::{{impl}}::parse_sync::{{closure}} (0x7ff7238303b6)
             at C:\Users\task_1570628879\repo\components\script\dom\servoparser\mod.rs:498
  18: profile_traits::time::profile<(),closure-0> (0x7ff7279cf30d)
             at C:\Users\task_1570628879\repo\components\profile_traits\time.rs:146
  19: script::dom::servoparser::ServoParser::parse_sync (0x7ff723830290)
             at C:\Users\task_1570628879\repo\components\script\dom\servoparser\mod.rs:490
  20: script::dom::servoparser::{{impl}}::process_response_eof (0x7ff7238346db)
             at C:\Users\task_1570628879\repo\components\script\dom\servoparser\mod.rs:853
  21: script::script_thread::ScriptThread::handle_fetch_eof (0x7ff7257a7648)
             at C:\Users\task_1570628879\repo\components\script\script_thread.rs:3775
  22: script::script_thread::ScriptThread::handle_msg_from_constellation (0x7ff72578652c)
             at C:\Users\task_1570628879\repo\components\script\script_thread.rs:1819
  23: script::script_thread::{{impl}}::handle_msgs::{{closure}} (0x7ff725781493)
             at C:\Users\task_1570628879\repo\components\script\script_thread.rs:1549
  24: script::script_thread::ScriptThread::profile_event<closure-5,core::option::Option<bool>> (0x7ff725785810)
             at C:\Users\task_1570628879\repo\components\script\script_thread.rs:1785
  25: script::script_thread::ScriptThread::handle_msgs (0x7ff72577efac)
             at C:\Users\task_1570628879\repo\components\script\script_thread.rs:1543
  26: script::script_thread::ScriptThread::start (0x7ff72577c6f8)
             at C:\Users\task_1570628879\repo\components\script\script_thread.rs:1376
  27: script::script_thread::{{impl}}::create::{{closure}}::{{closure}} (0x7ff7257753f3)
             at C:\Users\task_1570628879\repo\components\script\script_thread.rs:803
  28: profile_traits::mem::ProfilerChan::run_with_memory_reporting<closure-1,fn(profile_traits::mem::ReportsChan) -> script::script_runtime::CommonScriptMsg,script::script_runtime::CommonScriptMsg,crossbeam_channel::channel::Sender<script::script_thread::MainTh (0x7ff7279ca77a)
             at C:\Users\task_1570628879\repo\components\profile_traits\mem.rs:88
  29: script::script_thread::{{impl}}::create::{{closure}} (0x7ff725775afe)
             at C:\Users\task_1570628879\repo\components\script\script_thread.rs:801
  30: std::sys_common::backtrace::__rust_begin_short_backtrace<closure-0,()> (0x7ff7258f40b6)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\src\libstd\sys_common\backtrace.rs:126
  31: std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}<closure-0,()> (0x7ff72733fcc6)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\src\libstd\thread\mod.rs:470
  32: std::panic::{{impl}}::call_once<(),closure-0> (0x7ff7238d84e6)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\src\libstd\panic.rs:315
  33: std::panicking::try::do_call<std::panic::AssertUnwindSafe<closure-0>,()> (0x7ff728e7f9f2)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\src\libstd\panicking.rs:292
  34: panic_unwind::__rust_maybe_catch_panic (0x7ff725197f32)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\/src\libpanic_unwind\lib.rs:80
  35: std::panicking::try<(),std::panic::AssertUnwindSafe<closure-0>> (0x7ff728d6fda3)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\src\libstd\panicking.rs:271
  36: std::panic::catch_unwind<std::panic::AssertUnwindSafe<closure-0>,()> (0x7ff723987956)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\src\libstd\panic.rs:394
  37: std::thread::{{impl}}::spawn_unchecked::{{closure}}<closure-0,()> (0x7ff72733ea7c)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\src\libstd\thread\mod.rs:469
  38: core::ops::function::FnOnce::call_once<closure-0,()> (0x7ff7258fd4c3)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\src\libcore\ops\function.rs:227
  39: alloc::boxed::{{impl}}::call_once<(),FnOnce<()>> (0x7ff725176927)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\src\liballoc\boxed.rs:922
  40: std::sys::windows::thread::{{impl}}::new::thread_start (0x7ff725196557)
             at /rustc/084beb83e0e87d673d5fabc844d28e8e8ae2ab4c\/src\libstd\sys\windows\thread.rs:47
  41: BaseThreadInitThunk (0x7ffc9c7684d4)
  42: RtlUserThreadStart (0x7ffc9d21e851)
[2019-10-09T17:18:40Z ERROR servo] Where's the WebGL channel?
[2019-10-09T17:18:40Z ERROR constellation::constellation] about:failure failed

@jdm

jdm commented Oct 10, 2019

Copy link
Copy Markdown
Member Author

Yep. Need to not send swapbuffer messages for no webgl canvases.

@jdm
jdm force-pushed the no-preserve-drawing-buffer branch from d2b52c1 to c53680b Compare October 10, 2019 13:57
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Oct 10, 2019
@jdm

jdm commented Oct 10, 2019

Copy link
Copy Markdown
Member Author

@bors-servo r=nox

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit c53680b has been approved by nox

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Oct 10, 2019
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit c53680b with merge ab8d998...

bors-servo pushed a commit that referenced this pull request Oct 10, 2019
webgl: Clear the drawing buffer when preserveDrawingBuffer is false.

This adds an explicit clear operation to a webgl canvas when the preserveDrawingBuffer attribute is false when creating the context. Because we're not using double buffering this may end up making some demos worse (ie. a clear operation at a random time while drawing a frame), but this problem is expected to go away when #24256 is fixed and we move to a multi-buffered frame setup. This change is important at this time because so many babylon.js demos rely on the engine clearing the frame, per the specification.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21132
- [x] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24386)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - linux-rel-css, linux-rel-wpt, status-taskcluster
Approved by: nox
Pushing ab8d998 to master...

@bors-servo
bors-servo merged commit c53680b into servo:master Oct 10, 2019
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support preserveDrawingBuffer's WebGL context option

6 participants