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

Unified Diff: sky/shell/shell.cc

Issue 880443003: Plumb resize notifications around sky/shell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: git cl format Created 5 years, 10 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
Index: sky/shell/shell.cc
diff --git a/sky/shell/shell.cc b/sky/shell/shell.cc
index 3a54bb2c09fb6c976252357d760af314fb8a2419..a5ca2f380173bef1eb1a7d55c7b8d75a079a73da 100644
--- a/sky/shell/shell.cc
+++ b/sky/shell/shell.cc
@@ -7,7 +7,9 @@
#include "base/bind.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread.h"
+#include "sky/shell/gpu/rasterizer.h"
#include "sky/shell/sky_view.h"
+#include "sky/shell/ui/engine.h"
namespace sky {
namespace shell {
@@ -31,17 +33,13 @@ void Shell::Init() {
ui_thread_->message_loop()->PostTask(
FROM_HERE, base::Bind(&Engine::Init, engine_->GetWeakPtr()));
- view_.reset(new SkyView(this));
- view_->Init();
-}
-
-void Shell::OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) {
- gpu_thread_->message_loop()->PostTask(
- FROM_HERE,
- base::Bind(&Rasterizer::Init, rasterizer_->GetWeakPtr(), widget));
-}
+ SkyView::Config config;
+ config.gpu_task_runner = gpu_thread_->message_loop()->task_runner();
eseidel 2015/02/05 05:57:28 Feels a little odd to not just ask the gpu_delegat
abarth-chromium 2015/02/05 06:16:23 Yeah, I just didn't want to talk to the gpu_delega
+ config.gpu_delegate = rasterizer_->GetWeakPtr();
+ config.ui_task_runner = ui_thread_->message_loop()->task_runner();
+ config.ui_delegate = engine_->GetWeakPtr();
-void Shell::OnDestroyed() {
+ view_.reset(new SkyView(config));
}
} // namespace shell

Powered by Google App Engine
This is Rietveld 408576698