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

Unified Diff: sky/shell/ui/engine.cc

Issue 974483004: Stocks app shouldn't show black when resuming from recents list (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
« no previous file with comments | « sky/shell/ui/engine.h ('k') | sky/shell/ui_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/shell/ui/engine.cc
diff --git a/sky/shell/ui/engine.cc b/sky/shell/ui/engine.cc
index e28b55ee1448ac356759a114eb0587127d21a5ac..80d2463425c0d4caf4fa60c6e2b331cfcb401f75 100644
--- a/sky/shell/ui/engine.cc
+++ b/sky/shell/ui/engine.cc
@@ -33,7 +33,7 @@ void ConfigureSettings(blink::WebSettings* settings) {
}
Engine::Engine(const Config& config)
- : java_task_runner_(config.java_task_runner),
+ : config_(config),
animator_(new Animator(config, this)),
web_view_(nullptr),
device_pixel_ratio_(1.0f),
@@ -52,10 +52,11 @@ base::WeakPtr<Engine> Engine::GetWeakPtr() {
mojo::ServiceProviderPtr Engine::CreateServiceProvider() {
mojo::MessagePipe pipe;
- java_task_runner_->PostTask(FROM_HERE, base::Bind(
- CreateJavaServiceProvider,
- base::Passed(mojo::MakeRequest<mojo::ServiceProvider>(
- pipe.handle1.Pass()))));
+ config_.java_task_runner->PostTask(
+ FROM_HERE,
+ base::Bind(CreateJavaServiceProvider,
+ base::Passed(mojo::MakeRequest<mojo::ServiceProvider>(
+ pipe.handle1.Pass()))));
return mojo::MakeProxy<mojo::ServiceProvider>(pipe.handle0.Pass());
}
@@ -94,6 +95,20 @@ void Engine::ConnectToViewportObserver(
viewport_observer_binding_.Bind(request.Pass());
}
+void Engine::OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) {
+ config_.gpu_task_runner->PostTask(
+ FROM_HERE, base::Bind(&GPUDelegate::OnAcceleratedWidgetAvailable,
+ config_.gpu_delegate, widget));
+ if (web_view_)
+ scheduleVisualUpdate();
+}
+
+void Engine::OnOutputSurfaceDestroyed() {
+ config_.gpu_task_runner->PostTask(
+ FROM_HERE,
+ base::Bind(&GPUDelegate::OnOutputSurfaceDestroyed, config_.gpu_delegate));
+}
+
void Engine::OnViewportMetricsChanged(int width, int height,
float device_pixel_ratio) {
physical_size_.SetSize(width, height);
« no previous file with comments | « sky/shell/ui/engine.h ('k') | sky/shell/ui_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698