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

Unified Diff: components/mus/ws/frame_generator_delegate.h

Issue 2112993002: Factor draw functionality out of DefaultPlatformDisplay into FrameGenerator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing debug LOG's. Created 4 years, 6 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: components/mus/ws/frame_generator_delegate.h
diff --git a/components/mus/ws/server_window_tracker.h b/components/mus/ws/frame_generator_delegate.h
similarity index 30%
copy from components/mus/ws/server_window_tracker.h
copy to components/mus/ws/frame_generator_delegate.h
index d3b73f06be11f828d8b6c79914a0001cd7963752..537eb895913edd92b844419f9811b826d93dfdd2 100644
--- a/components/mus/ws/server_window_tracker.h
+++ b/components/mus/ws/frame_generator_delegate.h
@@ -2,24 +2,35 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef COMPONENTS_MUS_WS_SERVER_WINDOW_TRACKER_H_
-#define COMPONENTS_MUS_WS_SERVER_WINDOW_TRACKER_H_
-
-#include <stdint.h>
-#include <set>
+#ifndef COMPONENTS_MUS_WS_FRAME_GENERATOR_DELEGATE_H_
+#define COMPONENTS_MUS_WS_FRAME_GENERATOR_DELEGATE_H_
#include "base/macros.h"
-#include "components/mus/ws/server_window.h"
-#include "components/mus/ws/server_window_observer.h"
-#include "ui/base/window_tracker_template.h"
namespace mus {
namespace ws {
-using ServerWindowTracker =
- ui::WindowTrackerTemplate<ServerWindow, ServerWindowObserver>;
+class ServerWindow;
+
+struct ViewportMetrics {
+ gfx::Size size_in_pixels;
+ float device_scale_factor = 0.f;
+};
+
+class FrameGeneratorDelegate {
+ public:
+ virtual ~FrameGeneratorDelegate(){};
sky 2016/06/30 23:40:20 nit: no ';', space after '()' and move to protecte
mfomitchev 2016/07/06 15:53:09 Done.
+
+ // Returns the root window of the display.
+ virtual ServerWindow* GetRootWindow() = 0;
+
+ // Called when a compositor frame is finished drawing.
+ virtual void OnCompositorFrameDrawn() = 0;
+
+ virtual const ViewportMetrics& GetViewportMetrics() = 0;
+};
} // namespace ws
} // namespace mus
-#endif // COMPONENTS_MUS_WS_SERVER_WINDOW_TRACKER_H_
+#endif // COMPONENTS_MUS_WS_FRAME_GENERATOR_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698