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

Unified Diff: ui/views/mus/platform_window_mus.cc

Issue 1438903002: p1 mus+ash chrome renders ui and content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased, fixed release build Created 5 years, 1 month 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 | « ui/views/mus/native_widget_mus.cc ('k') | ui/views/mus/window_tree_host_mus.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/platform_window_mus.cc
diff --git a/ui/views/mus/platform_window_mus.cc b/ui/views/mus/platform_window_mus.cc
index be343eb045b9a15b9ef35f35ad4ecdc33a4292e0..3a9c85f5623d466c8dc0568028fab0cae50d4032 100644
--- a/ui/views/mus/platform_window_mus.cc
+++ b/ui/views/mus/platform_window_mus.cc
@@ -13,6 +13,11 @@
namespace views {
+namespace {
+static uint32_t accelerated_widget_count = 1;
+
+} // namespace
+
PlatformWindowMus::PlatformWindowMus(ui::PlatformWindowDelegate* delegate,
mus::Window* mus_window)
: delegate_(delegate),
@@ -23,9 +28,18 @@ PlatformWindowMus::PlatformWindowMus(ui::PlatformWindowDelegate* delegate,
DCHECK(mus_window_);
mus_window_->AddObserver(this);
+ // We need accelerated widget numbers to be different for each
+ // window and fit in the smallest sizeof(AcceleratedWidget) uint32_t
+ // has this property.
+#if defined(OS_WIN)
+ delegate_->OnAcceleratedWidgetAvailable(
+ reinterpret_cast<gfx::AcceleratedWidget>(accelerated_widget_count++),
+ mus_window_->viewport_metrics().device_pixel_ratio);
+#else
delegate_->OnAcceleratedWidgetAvailable(
- gfx::kNullAcceleratedWidget,
+ static_cast<gfx::AcceleratedWidget>(accelerated_widget_count++),
mus_window_->viewport_metrics().device_pixel_ratio);
+#endif
}
PlatformWindowMus::~PlatformWindowMus() {
« no previous file with comments | « ui/views/mus/native_widget_mus.cc ('k') | ui/views/mus/window_tree_host_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698