Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(534)

Unified Diff: ui/ozone/platform/dri/dri_gpu_platform_support.cc

Issue 801233003: [ozone] Temporary workaround for GPU support message filter not being installed early enough. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/dri_gpu_platform_support.cc
diff --git a/ui/ozone/platform/dri/dri_gpu_platform_support.cc b/ui/ozone/platform/dri/dri_gpu_platform_support.cc
index af063d43440a7eca24c6bb5c00b9389faa1473e2..af85fa4821138f06f28ba01f5855c2184290e2b3 100644
--- a/ui/ozone/platform/dri/dri_gpu_platform_support.cc
+++ b/ui/ozone/platform/dri/dri_gpu_platform_support.cc
@@ -34,7 +34,8 @@ class DriGpuPlatformSupportMessageFilter : public IPC::MessageFilter {
main_thread_listener_(main_thread_listener),
main_thread_task_runner_(base::ThreadTaskRunnerHandle::Get()),
pending_main_thread_operations_(0),
- cursor_animating_(false) {}
+ cursor_animating_(false),
+ start_on_main_(true) {}
void OnFilterAdded(IPC::Sender* sender) override {
io_thread_task_runner_ = base::ThreadTaskRunnerHandle::Get();
@@ -59,7 +60,8 @@ class DriGpuPlatformSupportMessageFilter : public IPC::MessageFilter {
bool cursor_was_animating = cursor_animating_;
UpdateAnimationState(message);
if (cursor_state_message || pending_main_thread_operations_ ||
- cursor_animating_ || cursor_was_animating) {
+ cursor_animating_ || cursor_was_animating || start_on_main_) {
+ start_on_main_ = false;
pending_main_thread_operations_++;
base::Closure main_thread_message_handler =
@@ -151,6 +153,12 @@ class DriGpuPlatformSupportMessageFilter : public IPC::MessageFilter {
scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_;
int32 pending_main_thread_operations_;
bool cursor_animating_;
+ // The filter is not installed early enough, so some messages may
+ // get routed to main thread. Once we get our first message on io, send it
+ // to main to ensure all prior main thread operations are finished before we
+ // continue on io.
+ // TODO: remove this once filter is properly installed.
+ bool start_on_main_;
};
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698