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

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

Issue 1230073002: Teach SkyShell.apk to stop posting frames when not visible (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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/ui/engine.h
diff --git a/sky/shell/ui/engine.h b/sky/shell/ui/engine.h
index f4c51ffac368fc74836e4d2b62fb664e1951d196..fbda1ec449a5e9afbf87fcdc7970ac6fe6a75dce 100644
--- a/sky/shell/ui/engine.h
+++ b/sky/shell/ui/engine.h
@@ -71,6 +71,9 @@ class Engine : public UIDelegate,
void RunFromSnapshot(const mojo::String& path) override;
void RunFromBundle(const mojo::String& path) override;
+ void OnActivityPaused() override;
+ void OnActivityResumed() override;
+
// SkyViewClient methods:
void ScheduleFrame() override;
void DidCreateIsolate(Dart_Isolate isolate) override;
@@ -88,6 +91,9 @@ class Engine : public UIDelegate,
void RunFromSnapshotStream(const std::string& name,
mojo::ScopedDataPipeConsumerHandle snapshot);
+ void StopAnimator();
+ void StartAnimatorIfPossible();
+
Config config_;
scoped_ptr<Animator> animator_;
@@ -99,6 +105,9 @@ class Engine : public UIDelegate,
blink::SkyDisplayMetrics display_metrics_;
mojo::Binding<SkyEngine> binding_;
+ bool activity_running_;
+ bool have_surface_;
+
base::WeakPtrFactory<Engine> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(Engine);

Powered by Google App Engine
This is Rietveld 408576698