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

Unified Diff: mojo/services/surfaces/surfaces_service_application.cc

Issue 534843002: Convert view manager to surfaces with uploading shim in client lib (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove overzealous shutdown check in cc/surfaces, add NON_EXPORTED_BASE for windows build, saturate… Created 6 years, 3 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 | « mojo/services/surfaces/surfaces_service_application.h ('k') | mojo/services/view_manager/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/surfaces/surfaces_service_application.cc
diff --git a/mojo/services/surfaces/surfaces_service_application.cc b/mojo/services/surfaces/surfaces_service_application.cc
index 3169b4ee7ef3ea1e356197b44a865af2d34145d2..b70d077a9c47ab127e9b31d537942c86fee0bd23 100644
--- a/mojo/services/surfaces/surfaces_service_application.cc
+++ b/mojo/services/surfaces/surfaces_service_application.cc
@@ -13,7 +13,7 @@
namespace mojo {
SurfacesServiceApplication::SurfacesServiceApplication()
- : next_id_namespace_(1u), display_(NULL) {
+ : next_id_namespace_(1u), display_(NULL), draw_timer_(false, false) {
}
SurfacesServiceApplication::~SurfacesServiceApplication() {
@@ -33,8 +33,12 @@ void SurfacesServiceApplication::Create(
}
void SurfacesServiceApplication::FrameSubmitted() {
- if (display_)
- display_->Draw();
+ if (!draw_timer_.IsRunning() && display_) {
+ draw_timer_.Start(FROM_HERE,
+ base::TimeDelta::FromMilliseconds(17),
+ base::Bind(base::IgnoreResult(&cc::Display::Draw),
+ base::Unretained(display_)));
+ }
}
void SurfacesServiceApplication::SetDisplay(cc::Display* display) {
« no previous file with comments | « mojo/services/surfaces/surfaces_service_application.h ('k') | mojo/services/view_manager/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698