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

Unified Diff: services/view_manager/display_manager.h

Issue 940293003: Add a Display and ContextProvider concept to mojom, use to recreate (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 | « services/surfaces/surfaces_service_application.cc ('k') | services/view_manager/display_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/view_manager/display_manager.h
diff --git a/services/view_manager/display_manager.h b/services/view_manager/display_manager.h
index ce6ab76b57661d8b291a0d3913002cfe7d42cb47..034be3cd8e4a3843b65d7dc2d909e1ae92ff33e9 100644
--- a/services/view_manager/display_manager.h
+++ b/services/view_manager/display_manager.h
@@ -11,10 +11,9 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/timer/timer.h"
-#include "cc/surfaces/surface_id.h"
#include "mojo/public/cpp/bindings/callback.h"
#include "mojo/services/native_viewport/public/interfaces/native_viewport.mojom.h"
-#include "mojo/services/surfaces/public/interfaces/surfaces.mojom.h"
+#include "mojo/services/surfaces/public/interfaces/display.mojom.h"
#include "mojo/services/view_manager/public/interfaces/view_manager.mojom.h"
#include "ui/gfx/rect.h"
@@ -66,14 +65,12 @@ class DefaultDisplayManager : public DisplayManager,
const mojo::ViewportMetrics& GetViewportMetrics() override;
private:
- void OnCreatedNativeViewport(uint64_t native_viewport_id,
- mojo::ViewportMetricsPtr metrics);
+ void WantToDraw();
void Draw();
+ void DidDraw();
void OnMetricsChanged(mojo::ViewportMetricsPtr metrics);
- void SetIdNamespace(uint32_t id_namespace);
-
// ErrorHandler:
void OnConnectionError() override;
@@ -84,10 +81,9 @@ class DefaultDisplayManager : public DisplayManager,
mojo::ViewportMetrics metrics_;
gfx::Rect dirty_rect_;
base::Timer draw_timer_;
+ bool frame_pending_;
- mojo::SurfacePtr surface_;
- uint32_t id_namespace_;
- bool surface_allocated_;
+ mojo::DisplayPtr display_;
mojo::NativeViewportPtr native_viewport_;
mojo::Callback<void()> native_viewport_closed_callback_;
base::WeakPtrFactory<DefaultDisplayManager> weak_factory_;
« no previous file with comments | « services/surfaces/surfaces_service_application.cc ('k') | services/view_manager/display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698